UNPKG

1.32 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 = 370);
85/******/ })
86/************************************************************************/
87/******/ ([
88/* 0 */,
89/* 1 */,
90/* 2 */
91/***/ (function(module, exports, __webpack_require__) {
92
93"use strict";
94/* --------------------------------------------------------------------------------------------
95 * Copyright (c) Microsoft Corporation. All rights reserved.
96 * Licensed under the MIT License. See License.txt in the project root for license information.
97 * ------------------------------------------------------------------------------------------ */
98/// <reference path="../typings/thenable.d.ts" />
99
100function __export(m) {
101 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
102}
103Object.defineProperty(exports, "__esModule", { value: true });
104const vscode_languageserver_protocol_1 = __webpack_require__(3);
105exports.Event = vscode_languageserver_protocol_1.Event;
106const configuration_1 = __webpack_require__(33);
107const workspaceFolders_1 = __webpack_require__(35);
108const progress_1 = __webpack_require__(36);
109const Is = __webpack_require__(34);
110const UUID = __webpack_require__(37);
111// ------------- Reexport the API surface of the language worker API ----------------------
112__export(__webpack_require__(3));
113const fm = __webpack_require__(38);
114var Files;
115(function (Files) {
116 Files.uriToFilePath = fm.uriToFilePath;
117 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
118 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
119 Files.resolve = fm.resolve;
120 Files.resolveModulePath = fm.resolveModulePath;
121})(Files = exports.Files || (exports.Files = {}));
122let shutdownReceived = false;
123let exitTimer = undefined;
124function setupExitTimer() {
125 const argName = '--clientProcessId';
126 function runTimer(value) {
127 try {
128 let processId = parseInt(value);
129 if (!isNaN(processId)) {
130 exitTimer = setInterval(() => {
131 try {
132 process.kill(processId, 0);
133 }
134 catch (ex) {
135 // Parent process doesn't exist anymore. Exit the server.
136 process.exit(shutdownReceived ? 0 : 1);
137 }
138 }, 3000);
139 }
140 }
141 catch (e) {
142 // Ignore errors;
143 }
144 }
145 for (let i = 2; i < process.argv.length; i++) {
146 let arg = process.argv[i];
147 if (arg === argName && i + 1 < process.argv.length) {
148 runTimer(process.argv[i + 1]);
149 return;
150 }
151 else {
152 let args = arg.split('=');
153 if (args[0] === argName) {
154 runTimer(args[1]);
155 }
156 }
157 }
158}
159setupExitTimer();
160function null2Undefined(value) {
161 if (value === null) {
162 return void 0;
163 }
164 return value;
165}
166/**
167 * A manager for simple text documents
168 */
169class TextDocuments {
170 /**
171 * Create a new text document manager.
172 */
173 constructor(configuration) {
174 this._documents = Object.create(null);
175 this._configuration = configuration;
176 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
177 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
178 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
179 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
180 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
181 }
182 /**
183 * An event that fires when a text document managed by this manager
184 * has been opened or the content changes.
185 */
186 get onDidChangeContent() {
187 return this._onDidChangeContent.event;
188 }
189 /**
190 * An event that fires when a text document managed by this manager
191 * has been opened.
192 */
193 get onDidOpen() {
194 return this._onDidOpen.event;
195 }
196 /**
197 * An event that fires when a text document managed by this manager
198 * will be saved.
199 */
200 get onWillSave() {
201 return this._onWillSave.event;
202 }
203 /**
204 * Sets a handler that will be called if a participant wants to provide
205 * edits during a text document save.
206 */
207 onWillSaveWaitUntil(handler) {
208 this._willSaveWaitUntil = handler;
209 }
210 /**
211 * An event that fires when a text document managed by this manager
212 * has been saved.
213 */
214 get onDidSave() {
215 return this._onDidSave.event;
216 }
217 /**
218 * An event that fires when a text document managed by this manager
219 * has been closed.
220 */
221 get onDidClose() {
222 return this._onDidClose.event;
223 }
224 /**
225 * Returns the document for the given URI. Returns undefined if
226 * the document is not mananged by this instance.
227 *
228 * @param uri The text document's URI to retrieve.
229 * @return the text document or `undefined`.
230 */
231 get(uri) {
232 return this._documents[uri];
233 }
234 /**
235 * Returns all text documents managed by this instance.
236 *
237 * @return all text documents.
238 */
239 all() {
240 return Object.keys(this._documents).map(key => this._documents[key]);
241 }
242 /**
243 * Returns the URIs of all text documents managed by this instance.
244 *
245 * @return the URI's of all text documents.
246 */
247 keys() {
248 return Object.keys(this._documents);
249 }
250 /**
251 * Listens for `low level` notification on the given connection to
252 * update the text documents managed by this instance.
253 *
254 * @param connection The connection to listen on.
255 */
256 listen(connection) {
257 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
258 connection.onDidOpenTextDocument((event) => {
259 let td = event.textDocument;
260 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
261 this._documents[td.uri] = document;
262 let toFire = Object.freeze({ document });
263 this._onDidOpen.fire(toFire);
264 this._onDidChangeContent.fire(toFire);
265 });
266 connection.onDidChangeTextDocument((event) => {
267 let td = event.textDocument;
268 let changes = event.contentChanges;
269 if (changes.length === 0) {
270 return;
271 }
272 let document = this._documents[td.uri];
273 const { version } = td;
274 if (version === null || version === void 0) {
275 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
276 }
277 document = this._configuration.update(document, changes, version);
278 this._documents[td.uri] = document;
279 this._onDidChangeContent.fire(Object.freeze({ document }));
280 });
281 connection.onDidCloseTextDocument((event) => {
282 let document = this._documents[event.textDocument.uri];
283 if (document) {
284 delete this._documents[event.textDocument.uri];
285 this._onDidClose.fire(Object.freeze({ document }));
286 }
287 });
288 connection.onWillSaveTextDocument((event) => {
289 let document = this._documents[event.textDocument.uri];
290 if (document) {
291 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
292 }
293 });
294 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
295 let document = this._documents[event.textDocument.uri];
296 if (document && this._willSaveWaitUntil) {
297 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
298 }
299 else {
300 return [];
301 }
302 });
303 connection.onDidSaveTextDocument((event) => {
304 let document = this._documents[event.textDocument.uri];
305 if (document) {
306 this._onDidSave.fire(Object.freeze({ document }));
307 }
308 });
309 }
310}
311exports.TextDocuments = TextDocuments;
312/**
313 * Helps tracking error message. Equal occurences of the same
314 * message are only stored once. This class is for example
315 * useful if text documents are validated in a loop and equal
316 * error message should be folded into one.
317 */
318class ErrorMessageTracker {
319 constructor() {
320 this._messages = Object.create(null);
321 }
322 /**
323 * Add a message to the tracker.
324 *
325 * @param message The message to add.
326 */
327 add(message) {
328 let count = this._messages[message];
329 if (!count) {
330 count = 0;
331 }
332 count++;
333 this._messages[message] = count;
334 }
335 /**
336 * Send all tracked messages to the connection's window.
337 *
338 * @param connection The connection established between client and server.
339 */
340 sendErrors(connection) {
341 Object.keys(this._messages).forEach(message => {
342 connection.window.showErrorMessage(message);
343 });
344 }
345}
346exports.ErrorMessageTracker = ErrorMessageTracker;
347class RemoteConsoleImpl {
348 constructor() {
349 }
350 rawAttach(connection) {
351 this._rawConnection = connection;
352 }
353 attach(connection) {
354 this._connection = connection;
355 }
356 get connection() {
357 if (!this._connection) {
358 throw new Error('Remote is not attached to a connection yet.');
359 }
360 return this._connection;
361 }
362 fillServerCapabilities(_capabilities) {
363 }
364 initialize(_capabilities) {
365 }
366 error(message) {
367 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
368 }
369 warn(message) {
370 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
371 }
372 info(message) {
373 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
374 }
375 log(message) {
376 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
377 }
378 send(type, message) {
379 if (this._rawConnection) {
380 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
381 }
382 }
383}
384class _RemoteWindowImpl {
385 constructor() {
386 }
387 attach(connection) {
388 this._connection = connection;
389 }
390 get connection() {
391 if (!this._connection) {
392 throw new Error('Remote is not attached to a connection yet.');
393 }
394 return this._connection;
395 }
396 initialize(_capabilities) {
397 }
398 fillServerCapabilities(_capabilities) {
399 }
400 showErrorMessage(message, ...actions) {
401 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
402 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
403 }
404 showWarningMessage(message, ...actions) {
405 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
406 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
407 }
408 showInformationMessage(message, ...actions) {
409 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
410 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
411 }
412}
413const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
414var BulkRegistration;
415(function (BulkRegistration) {
416 /**
417 * Creates a new bulk registration.
418 * @return an empty bulk registration.
419 */
420 function create() {
421 return new BulkRegistrationImpl();
422 }
423 BulkRegistration.create = create;
424})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
425class BulkRegistrationImpl {
426 constructor() {
427 this._registrations = [];
428 this._registered = new Set();
429 }
430 add(type, registerOptions) {
431 const method = Is.string(type) ? type : type.method;
432 if (this._registered.has(method)) {
433 throw new Error(`${method} is already added to this registration`);
434 }
435 const id = UUID.generateUuid();
436 this._registrations.push({
437 id: id,
438 method: method,
439 registerOptions: registerOptions || {}
440 });
441 this._registered.add(method);
442 }
443 asRegistrationParams() {
444 return {
445 registrations: this._registrations
446 };
447 }
448}
449var BulkUnregistration;
450(function (BulkUnregistration) {
451 function create() {
452 return new BulkUnregistrationImpl(undefined, []);
453 }
454 BulkUnregistration.create = create;
455})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
456class BulkUnregistrationImpl {
457 constructor(_connection, unregistrations) {
458 this._connection = _connection;
459 this._unregistrations = new Map();
460 unregistrations.forEach(unregistration => {
461 this._unregistrations.set(unregistration.method, unregistration);
462 });
463 }
464 get isAttached() {
465 return !!this._connection;
466 }
467 attach(connection) {
468 this._connection = connection;
469 }
470 add(unregistration) {
471 this._unregistrations.set(unregistration.method, unregistration);
472 }
473 dispose() {
474 let unregistrations = [];
475 for (let unregistration of this._unregistrations.values()) {
476 unregistrations.push(unregistration);
477 }
478 let params = {
479 unregisterations: unregistrations
480 };
481 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
482 this._connection.console.info(`Bulk unregistration failed.`);
483 });
484 }
485 disposeSingle(arg) {
486 const method = Is.string(arg) ? arg : arg.method;
487 const unregistration = this._unregistrations.get(method);
488 if (!unregistration) {
489 return false;
490 }
491 let params = {
492 unregisterations: [unregistration]
493 };
494 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
495 this._unregistrations.delete(method);
496 }, (_error) => {
497 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
498 });
499 return true;
500 }
501}
502class RemoteClientImpl {
503 attach(connection) {
504 this._connection = connection;
505 }
506 get connection() {
507 if (!this._connection) {
508 throw new Error('Remote is not attached to a connection yet.');
509 }
510 return this._connection;
511 }
512 initialize(_capabilities) {
513 }
514 fillServerCapabilities(_capabilities) {
515 }
516 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
517 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
518 return this.registerMany(typeOrRegistrations);
519 }
520 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
521 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
522 }
523 else {
524 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
525 }
526 }
527 registerSingle1(unregistration, type, registerOptions) {
528 const method = Is.string(type) ? type : type.method;
529 const id = UUID.generateUuid();
530 let params = {
531 registrations: [{ id, method, registerOptions: registerOptions || {} }]
532 };
533 if (!unregistration.isAttached) {
534 unregistration.attach(this._connection);
535 }
536 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
537 unregistration.add({ id: id, method: method });
538 return unregistration;
539 }, (_error) => {
540 this.connection.console.info(`Registering request handler for ${method} failed.`);
541 return Promise.reject(_error);
542 });
543 }
544 registerSingle2(type, registerOptions) {
545 const method = Is.string(type) ? type : type.method;
546 const id = UUID.generateUuid();
547 let params = {
548 registrations: [{ id, method, registerOptions: registerOptions || {} }]
549 };
550 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
551 return vscode_languageserver_protocol_1.Disposable.create(() => {
552 this.unregisterSingle(id, method);
553 });
554 }, (_error) => {
555 this.connection.console.info(`Registering request handler for ${method} failed.`);
556 return Promise.reject(_error);
557 });
558 }
559 unregisterSingle(id, method) {
560 let params = {
561 unregisterations: [{ id, method }]
562 };
563 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
564 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
565 });
566 }
567 registerMany(registrations) {
568 let params = registrations.asRegistrationParams();
569 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
570 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
571 }, (_error) => {
572 this.connection.console.info(`Bulk registration failed.`);
573 return Promise.reject(_error);
574 });
575 }
576}
577class _RemoteWorkspaceImpl {
578 constructor() {
579 }
580 attach(connection) {
581 this._connection = connection;
582 }
583 get connection() {
584 if (!this._connection) {
585 throw new Error('Remote is not attached to a connection yet.');
586 }
587 return this._connection;
588 }
589 initialize(_capabilities) {
590 }
591 fillServerCapabilities(_capabilities) {
592 }
593 applyEdit(paramOrEdit) {
594 function isApplyWorkspaceEditParams(value) {
595 return value && !!value.edit;
596 }
597 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
598 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
599 }
600}
601const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
602class TelemetryImpl {
603 constructor() {
604 }
605 attach(connection) {
606 this._connection = connection;
607 }
608 get connection() {
609 if (!this._connection) {
610 throw new Error('Remote is not attached to a connection yet.');
611 }
612 return this._connection;
613 }
614 initialize(_capabilities) {
615 }
616 fillServerCapabilities(_capabilities) {
617 }
618 logEvent(data) {
619 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
620 }
621}
622class TracerImpl {
623 constructor() {
624 this._trace = vscode_languageserver_protocol_1.Trace.Off;
625 }
626 attach(connection) {
627 this._connection = connection;
628 }
629 get connection() {
630 if (!this._connection) {
631 throw new Error('Remote is not attached to a connection yet.');
632 }
633 return this._connection;
634 }
635 initialize(_capabilities) {
636 }
637 fillServerCapabilities(_capabilities) {
638 }
639 set trace(value) {
640 this._trace = value;
641 }
642 log(message, verbose) {
643 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
644 return;
645 }
646 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
647 message: message,
648 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
649 });
650 }
651}
652class LanguagesImpl {
653 constructor() {
654 }
655 attach(connection) {
656 this._connection = connection;
657 }
658 get connection() {
659 if (!this._connection) {
660 throw new Error('Remote is not attached to a connection yet.');
661 }
662 return this._connection;
663 }
664 initialize(_capabilities) {
665 }
666 fillServerCapabilities(_capabilities) {
667 }
668 attachWorkDoneProgress(params) {
669 return progress_1.attachWorkDone(this.connection, params);
670 }
671 attachPartialResultProgress(_type, params) {
672 return progress_1.attachPartialResult(this.connection, params);
673 }
674}
675exports.LanguagesImpl = LanguagesImpl;
676function combineConsoleFeatures(one, two) {
677 return function (Base) {
678 return two(one(Base));
679 };
680}
681exports.combineConsoleFeatures = combineConsoleFeatures;
682function combineTelemetryFeatures(one, two) {
683 return function (Base) {
684 return two(one(Base));
685 };
686}
687exports.combineTelemetryFeatures = combineTelemetryFeatures;
688function combineTracerFeatures(one, two) {
689 return function (Base) {
690 return two(one(Base));
691 };
692}
693exports.combineTracerFeatures = combineTracerFeatures;
694function combineClientFeatures(one, two) {
695 return function (Base) {
696 return two(one(Base));
697 };
698}
699exports.combineClientFeatures = combineClientFeatures;
700function combineWindowFeatures(one, two) {
701 return function (Base) {
702 return two(one(Base));
703 };
704}
705exports.combineWindowFeatures = combineWindowFeatures;
706function combineWorkspaceFeatures(one, two) {
707 return function (Base) {
708 return two(one(Base));
709 };
710}
711exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
712function combineLanguagesFeatures(one, two) {
713 return function (Base) {
714 return two(one(Base));
715 };
716}
717exports.combineLanguagesFeatures = combineLanguagesFeatures;
718function combineFeatures(one, two) {
719 function combine(one, two, func) {
720 if (one && two) {
721 return func(one, two);
722 }
723 else if (one) {
724 return one;
725 }
726 else {
727 return two;
728 }
729 }
730 let result = {
731 __brand: 'features',
732 console: combine(one.console, two.console, combineConsoleFeatures),
733 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
734 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
735 client: combine(one.client, two.client, combineClientFeatures),
736 window: combine(one.window, two.window, combineWindowFeatures),
737 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
738 };
739 return result;
740}
741exports.combineFeatures = combineFeatures;
742function createConnection(arg1, arg2, arg3, arg4) {
743 let factories;
744 let input;
745 let output;
746 let strategy;
747 if (arg1 !== void 0 && arg1.__brand === 'features') {
748 factories = arg1;
749 arg1 = arg2;
750 arg2 = arg3;
751 arg3 = arg4;
752 }
753 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
754 strategy = arg1;
755 }
756 else {
757 input = arg1;
758 output = arg2;
759 strategy = arg3;
760 }
761 return _createConnection(input, output, strategy, factories);
762}
763exports.createConnection = createConnection;
764function _createConnection(input, output, strategy, factories) {
765 if (!input && !output && process.argv.length > 2) {
766 let port = void 0;
767 let pipeName = void 0;
768 let argv = process.argv.slice(2);
769 for (let i = 0; i < argv.length; i++) {
770 let arg = argv[i];
771 if (arg === '--node-ipc') {
772 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
773 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
774 break;
775 }
776 else if (arg === '--stdio') {
777 input = process.stdin;
778 output = process.stdout;
779 break;
780 }
781 else if (arg === '--socket') {
782 port = parseInt(argv[i + 1]);
783 break;
784 }
785 else if (arg === '--pipe') {
786 pipeName = argv[i + 1];
787 break;
788 }
789 else {
790 var args = arg.split('=');
791 if (args[0] === '--socket') {
792 port = parseInt(args[1]);
793 break;
794 }
795 else if (args[0] === '--pipe') {
796 pipeName = args[1];
797 break;
798 }
799 }
800 }
801 if (port) {
802 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
803 input = transport[0];
804 output = transport[1];
805 }
806 else if (pipeName) {
807 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
808 input = transport[0];
809 output = transport[1];
810 }
811 }
812 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
813 if (!input) {
814 throw new Error('Connection input stream is not set. ' + commandLineMessage);
815 }
816 if (!output) {
817 throw new Error('Connection output stream is not set. ' + commandLineMessage);
818 }
819 // Backwards compatibility
820 if (Is.func(input.read) && Is.func(input.on)) {
821 let inputStream = input;
822 inputStream.on('end', () => {
823 process.exit(shutdownReceived ? 0 : 1);
824 });
825 inputStream.on('close', () => {
826 process.exit(shutdownReceived ? 0 : 1);
827 });
828 }
829 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
830 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
831 logger.rawAttach(connection);
832 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
833 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
834 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
835 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
836 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
837 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
838 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
839 function asPromise(value) {
840 if (value instanceof Promise) {
841 return value;
842 }
843 else if (Is.thenable(value)) {
844 return new Promise((resolve, reject) => {
845 value.then((resolved) => resolve(resolved), (error) => reject(error));
846 });
847 }
848 else {
849 return Promise.resolve(value);
850 }
851 }
852 let shutdownHandler = undefined;
853 let initializeHandler = undefined;
854 let exitHandler = undefined;
855 let protocolConnection = {
856 listen: () => connection.listen(),
857 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
858 onRequest: (type, handler) => connection.onRequest(type, handler),
859 sendNotification: (type, param) => {
860 const method = Is.string(type) ? type : type.method;
861 if (arguments.length === 1) {
862 connection.sendNotification(method);
863 }
864 else {
865 connection.sendNotification(method, param);
866 }
867 },
868 onNotification: (type, handler) => connection.onNotification(type, handler),
869 onProgress: connection.onProgress,
870 sendProgress: connection.sendProgress,
871 onInitialize: (handler) => initializeHandler = handler,
872 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
873 onShutdown: (handler) => shutdownHandler = handler,
874 onExit: (handler) => exitHandler = handler,
875 get console() { return logger; },
876 get telemetry() { return telemetry; },
877 get tracer() { return tracer; },
878 get client() { return client; },
879 get window() { return remoteWindow; },
880 get workspace() { return workspace; },
881 get languages() { return languages; },
882 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
883 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
884 __textDocumentSync: undefined,
885 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
886 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
887 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
888 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
889 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
890 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
891 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
892 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
893 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
894 }),
895 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
896 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
897 }),
898 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
899 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
900 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
901 }),
902 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
903 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
904 }),
905 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
906 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
907 }),
908 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
909 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
910 }),
911 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
912 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
913 }),
914 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
915 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
916 }),
917 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
918 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
919 }),
920 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
921 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
922 }),
923 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
924 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
925 }),
926 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
927 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
928 }),
929 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
930 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
931 }),
932 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
933 return handler(params, cancel);
934 }),
935 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
936 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
937 }),
938 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
939 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
940 }),
941 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
942 return handler(params, cancel);
943 }),
944 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
945 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
946 }),
947 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
948 return handler(params, cancel);
949 }),
950 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
951 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
952 }),
953 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
954 return handler(params, cancel);
955 }),
956 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
957 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
958 }),
959 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
960 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
961 }),
962 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
963 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
964 }),
965 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
966 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
967 }),
968 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
969 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
970 }),
971 dispose: () => connection.dispose()
972 };
973 for (let remote of allRemotes) {
974 remote.attach(protocolConnection);
975 }
976 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
977 const processId = params.processId;
978 if (Is.number(processId) && exitTimer === void 0) {
979 // We received a parent process id. Set up a timer to periodically check
980 // if the parent is still alive.
981 setInterval(() => {
982 try {
983 process.kill(processId, 0);
984 }
985 catch (ex) {
986 // Parent process doesn't exist anymore. Exit the server.
987 process.exit(shutdownReceived ? 0 : 1);
988 }
989 }, 3000);
990 }
991 if (Is.string(params.trace)) {
992 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
993 }
994 for (let remote of allRemotes) {
995 remote.initialize(params.capabilities);
996 }
997 if (initializeHandler) {
998 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
999 return asPromise(result).then((value) => {
1000 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
1001 return value;
1002 }
1003 let result = value;
1004 if (!result) {
1005 result = { capabilities: {} };
1006 }
1007 let capabilities = result.capabilities;
1008 if (!capabilities) {
1009 capabilities = {};
1010 result.capabilities = capabilities;
1011 }
1012 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
1013 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1014 }
1015 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
1016 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1017 }
1018 for (let remote of allRemotes) {
1019 remote.fillServerCapabilities(capabilities);
1020 }
1021 return result;
1022 });
1023 }
1024 else {
1025 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
1026 for (let remote of allRemotes) {
1027 remote.fillServerCapabilities(result.capabilities);
1028 }
1029 return result;
1030 }
1031 });
1032 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
1033 shutdownReceived = true;
1034 if (shutdownHandler) {
1035 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
1036 }
1037 else {
1038 return undefined;
1039 }
1040 });
1041 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
1042 try {
1043 if (exitHandler) {
1044 exitHandler();
1045 }
1046 }
1047 finally {
1048 if (shutdownReceived) {
1049 process.exit(0);
1050 }
1051 else {
1052 process.exit(1);
1053 }
1054 }
1055 });
1056 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
1057 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
1058 });
1059 return protocolConnection;
1060}
1061// Export the protocol currently in proposed state.
1062const callHierarchy_proposed_1 = __webpack_require__(42);
1063const st = __webpack_require__(43);
1064var ProposedFeatures;
1065(function (ProposedFeatures) {
1066 ProposedFeatures.all = {
1067 __brand: 'features',
1068 languages: combineLanguagesFeatures(callHierarchy_proposed_1.CallHierarchyFeature, st.SemanticTokensFeature)
1069 };
1070 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
1071})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
1072//# sourceMappingURL=main.js.map
1073
1074/***/ }),
1075/* 3 */
1076/***/ (function(module, exports, __webpack_require__) {
1077
1078"use strict";
1079/* --------------------------------------------------------------------------------------------
1080 * Copyright (c) Microsoft Corporation. All rights reserved.
1081 * Licensed under the MIT License. See License.txt in the project root for license information.
1082 * ------------------------------------------------------------------------------------------ */
1083
1084function __export(m) {
1085 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1086}
1087Object.defineProperty(exports, "__esModule", { value: true });
1088const vscode_jsonrpc_1 = __webpack_require__(4);
1089exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
1090exports.ResponseError = vscode_jsonrpc_1.ResponseError;
1091exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
1092exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
1093exports.Disposable = vscode_jsonrpc_1.Disposable;
1094exports.Event = vscode_jsonrpc_1.Event;
1095exports.Emitter = vscode_jsonrpc_1.Emitter;
1096exports.Trace = vscode_jsonrpc_1.Trace;
1097exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
1098exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
1099exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
1100exports.RequestType = vscode_jsonrpc_1.RequestType;
1101exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
1102exports.NotificationType = vscode_jsonrpc_1.NotificationType;
1103exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
1104exports.MessageReader = vscode_jsonrpc_1.MessageReader;
1105exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
1106exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
1107exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
1108exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
1109exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
1110exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
1111exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
1112exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
1113exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
1114exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
1115exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
1116exports.ProgressType = vscode_jsonrpc_1.ProgressType;
1117__export(__webpack_require__(18));
1118__export(__webpack_require__(19));
1119const callHierarchy = __webpack_require__(31);
1120const st = __webpack_require__(32);
1121var Proposed;
1122(function (Proposed) {
1123 let CallHierarchyPrepareRequest;
1124 (function (CallHierarchyPrepareRequest) {
1125 CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;
1126 CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;
1127 })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));
1128 let CallHierarchyIncomingCallsRequest;
1129 (function (CallHierarchyIncomingCallsRequest) {
1130 CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
1131 CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
1132 })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
1133 let CallHierarchyOutgoingCallsRequest;
1134 (function (CallHierarchyOutgoingCallsRequest) {
1135 CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
1136 CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
1137 })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
1138 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
1139 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
1140 Proposed.SemanticTokens = st.SemanticTokens;
1141 let SemanticTokensRequest;
1142 (function (SemanticTokensRequest) {
1143 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
1144 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
1145 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
1146 let SemanticTokensEditsRequest;
1147 (function (SemanticTokensEditsRequest) {
1148 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
1149 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
1150 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
1151 let SemanticTokensRangeRequest;
1152 (function (SemanticTokensRangeRequest) {
1153 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
1154 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
1155 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
1156})(Proposed = exports.Proposed || (exports.Proposed = {}));
1157function createProtocolConnection(reader, writer, logger, strategy) {
1158 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
1159}
1160exports.createProtocolConnection = createProtocolConnection;
1161
1162
1163/***/ }),
1164/* 4 */
1165/***/ (function(module, exports, __webpack_require__) {
1166
1167"use strict";
1168/* --------------------------------------------------------------------------------------------
1169 * Copyright (c) Microsoft Corporation. All rights reserved.
1170 * Licensed under the MIT License. See License.txt in the project root for license information.
1171 * ------------------------------------------------------------------------------------------ */
1172/// <reference path="../typings/thenable.d.ts" />
1173
1174function __export(m) {
1175 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1176}
1177Object.defineProperty(exports, "__esModule", { value: true });
1178const Is = __webpack_require__(5);
1179const messages_1 = __webpack_require__(6);
1180exports.RequestType = messages_1.RequestType;
1181exports.RequestType0 = messages_1.RequestType0;
1182exports.RequestType1 = messages_1.RequestType1;
1183exports.RequestType2 = messages_1.RequestType2;
1184exports.RequestType3 = messages_1.RequestType3;
1185exports.RequestType4 = messages_1.RequestType4;
1186exports.RequestType5 = messages_1.RequestType5;
1187exports.RequestType6 = messages_1.RequestType6;
1188exports.RequestType7 = messages_1.RequestType7;
1189exports.RequestType8 = messages_1.RequestType8;
1190exports.RequestType9 = messages_1.RequestType9;
1191exports.ResponseError = messages_1.ResponseError;
1192exports.ErrorCodes = messages_1.ErrorCodes;
1193exports.NotificationType = messages_1.NotificationType;
1194exports.NotificationType0 = messages_1.NotificationType0;
1195exports.NotificationType1 = messages_1.NotificationType1;
1196exports.NotificationType2 = messages_1.NotificationType2;
1197exports.NotificationType3 = messages_1.NotificationType3;
1198exports.NotificationType4 = messages_1.NotificationType4;
1199exports.NotificationType5 = messages_1.NotificationType5;
1200exports.NotificationType6 = messages_1.NotificationType6;
1201exports.NotificationType7 = messages_1.NotificationType7;
1202exports.NotificationType8 = messages_1.NotificationType8;
1203exports.NotificationType9 = messages_1.NotificationType9;
1204const messageReader_1 = __webpack_require__(7);
1205exports.MessageReader = messageReader_1.MessageReader;
1206exports.StreamMessageReader = messageReader_1.StreamMessageReader;
1207exports.IPCMessageReader = messageReader_1.IPCMessageReader;
1208exports.SocketMessageReader = messageReader_1.SocketMessageReader;
1209const messageWriter_1 = __webpack_require__(9);
1210exports.MessageWriter = messageWriter_1.MessageWriter;
1211exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
1212exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
1213exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
1214const events_1 = __webpack_require__(8);
1215exports.Disposable = events_1.Disposable;
1216exports.Event = events_1.Event;
1217exports.Emitter = events_1.Emitter;
1218const cancellation_1 = __webpack_require__(10);
1219exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1220exports.CancellationToken = cancellation_1.CancellationToken;
1221const linkedMap_1 = __webpack_require__(11);
1222__export(__webpack_require__(12));
1223__export(__webpack_require__(17));
1224var CancelNotification;
1225(function (CancelNotification) {
1226 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1227})(CancelNotification || (CancelNotification = {}));
1228var ProgressNotification;
1229(function (ProgressNotification) {
1230 ProgressNotification.type = new messages_1.NotificationType('$/progress');
1231})(ProgressNotification || (ProgressNotification = {}));
1232class ProgressType {
1233 constructor() {
1234 }
1235}
1236exports.ProgressType = ProgressType;
1237exports.NullLogger = Object.freeze({
1238 error: () => { },
1239 warn: () => { },
1240 info: () => { },
1241 log: () => { }
1242});
1243var Trace;
1244(function (Trace) {
1245 Trace[Trace["Off"] = 0] = "Off";
1246 Trace[Trace["Messages"] = 1] = "Messages";
1247 Trace[Trace["Verbose"] = 2] = "Verbose";
1248})(Trace = exports.Trace || (exports.Trace = {}));
1249(function (Trace) {
1250 function fromString(value) {
1251 if (!Is.string(value)) {
1252 return Trace.Off;
1253 }
1254 value = value.toLowerCase();
1255 switch (value) {
1256 case 'off':
1257 return Trace.Off;
1258 case 'messages':
1259 return Trace.Messages;
1260 case 'verbose':
1261 return Trace.Verbose;
1262 default:
1263 return Trace.Off;
1264 }
1265 }
1266 Trace.fromString = fromString;
1267 function toString(value) {
1268 switch (value) {
1269 case Trace.Off:
1270 return 'off';
1271 case Trace.Messages:
1272 return 'messages';
1273 case Trace.Verbose:
1274 return 'verbose';
1275 default:
1276 return 'off';
1277 }
1278 }
1279 Trace.toString = toString;
1280})(Trace = exports.Trace || (exports.Trace = {}));
1281var TraceFormat;
1282(function (TraceFormat) {
1283 TraceFormat["Text"] = "text";
1284 TraceFormat["JSON"] = "json";
1285})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1286(function (TraceFormat) {
1287 function fromString(value) {
1288 value = value.toLowerCase();
1289 if (value === 'json') {
1290 return TraceFormat.JSON;
1291 }
1292 else {
1293 return TraceFormat.Text;
1294 }
1295 }
1296 TraceFormat.fromString = fromString;
1297})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1298var SetTraceNotification;
1299(function (SetTraceNotification) {
1300 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
1301})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1302var LogTraceNotification;
1303(function (LogTraceNotification) {
1304 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
1305})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1306var ConnectionErrors;
1307(function (ConnectionErrors) {
1308 /**
1309 * The connection is closed.
1310 */
1311 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1312 /**
1313 * The connection got disposed.
1314 */
1315 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1316 /**
1317 * The connection is already in listening mode.
1318 */
1319 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1320})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1321class ConnectionError extends Error {
1322 constructor(code, message) {
1323 super(message);
1324 this.code = code;
1325 Object.setPrototypeOf(this, ConnectionError.prototype);
1326 }
1327}
1328exports.ConnectionError = ConnectionError;
1329var ConnectionStrategy;
1330(function (ConnectionStrategy) {
1331 function is(value) {
1332 let candidate = value;
1333 return candidate && Is.func(candidate.cancelUndispatched);
1334 }
1335 ConnectionStrategy.is = is;
1336})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1337var ConnectionState;
1338(function (ConnectionState) {
1339 ConnectionState[ConnectionState["New"] = 1] = "New";
1340 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1341 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1342 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1343})(ConnectionState || (ConnectionState = {}));
1344function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
1345 let sequenceNumber = 0;
1346 let notificationSquenceNumber = 0;
1347 let unknownResponseSquenceNumber = 0;
1348 const version = '2.0';
1349 let starRequestHandler = undefined;
1350 let requestHandlers = Object.create(null);
1351 let starNotificationHandler = undefined;
1352 let notificationHandlers = Object.create(null);
1353 let progressHandlers = new Map();
1354 let timer;
1355 let messageQueue = new linkedMap_1.LinkedMap();
1356 let responsePromises = Object.create(null);
1357 let requestTokens = Object.create(null);
1358 let trace = Trace.Off;
1359 let traceFormat = TraceFormat.Text;
1360 let tracer;
1361 let state = ConnectionState.New;
1362 let errorEmitter = new events_1.Emitter();
1363 let closeEmitter = new events_1.Emitter();
1364 let unhandledNotificationEmitter = new events_1.Emitter();
1365 let unhandledProgressEmitter = new events_1.Emitter();
1366 let disposeEmitter = new events_1.Emitter();
1367 function createRequestQueueKey(id) {
1368 return 'req-' + id.toString();
1369 }
1370 function createResponseQueueKey(id) {
1371 if (id === null) {
1372 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1373 }
1374 else {
1375 return 'res-' + id.toString();
1376 }
1377 }
1378 function createNotificationQueueKey() {
1379 return 'not-' + (++notificationSquenceNumber).toString();
1380 }
1381 function addMessageToQueue(queue, message) {
1382 if (messages_1.isRequestMessage(message)) {
1383 queue.set(createRequestQueueKey(message.id), message);
1384 }
1385 else if (messages_1.isResponseMessage(message)) {
1386 queue.set(createResponseQueueKey(message.id), message);
1387 }
1388 else {
1389 queue.set(createNotificationQueueKey(), message);
1390 }
1391 }
1392 function cancelUndispatched(_message) {
1393 return undefined;
1394 }
1395 function isListening() {
1396 return state === ConnectionState.Listening;
1397 }
1398 function isClosed() {
1399 return state === ConnectionState.Closed;
1400 }
1401 function isDisposed() {
1402 return state === ConnectionState.Disposed;
1403 }
1404 function closeHandler() {
1405 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1406 state = ConnectionState.Closed;
1407 closeEmitter.fire(undefined);
1408 }
1409 // If the connection is disposed don't sent close events.
1410 }
1411 function readErrorHandler(error) {
1412 errorEmitter.fire([error, undefined, undefined]);
1413 }
1414 function writeErrorHandler(data) {
1415 errorEmitter.fire(data);
1416 }
1417 messageReader.onClose(closeHandler);
1418 messageReader.onError(readErrorHandler);
1419 messageWriter.onClose(closeHandler);
1420 messageWriter.onError(writeErrorHandler);
1421 function triggerMessageQueue() {
1422 if (timer || messageQueue.size === 0) {
1423 return;
1424 }
1425 timer = setImmediate(() => {
1426 timer = undefined;
1427 processMessageQueue();
1428 });
1429 }
1430 function processMessageQueue() {
1431 if (messageQueue.size === 0) {
1432 return;
1433 }
1434 let message = messageQueue.shift();
1435 try {
1436 if (messages_1.isRequestMessage(message)) {
1437 handleRequest(message);
1438 }
1439 else if (messages_1.isNotificationMessage(message)) {
1440 handleNotification(message);
1441 }
1442 else if (messages_1.isResponseMessage(message)) {
1443 handleResponse(message);
1444 }
1445 else {
1446 handleInvalidMessage(message);
1447 }
1448 }
1449 finally {
1450 triggerMessageQueue();
1451 }
1452 }
1453 let callback = (message) => {
1454 try {
1455 // We have received a cancellation message. Check if the message is still in the queue
1456 // and cancel it if allowed to do so.
1457 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1458 let key = createRequestQueueKey(message.params.id);
1459 let toCancel = messageQueue.get(key);
1460 if (messages_1.isRequestMessage(toCancel)) {
1461 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
1462 if (response && (response.error !== void 0 || response.result !== void 0)) {
1463 messageQueue.delete(key);
1464 response.id = toCancel.id;
1465 traceSendingResponse(response, message.method, Date.now());
1466 messageWriter.write(response);
1467 return;
1468 }
1469 }
1470 }
1471 addMessageToQueue(messageQueue, message);
1472 }
1473 finally {
1474 triggerMessageQueue();
1475 }
1476 };
1477 function handleRequest(requestMessage) {
1478 if (isDisposed()) {
1479 // we return here silently since we fired an event when the
1480 // connection got disposed.
1481 return;
1482 }
1483 function reply(resultOrError, method, startTime) {
1484 let message = {
1485 jsonrpc: version,
1486 id: requestMessage.id
1487 };
1488 if (resultOrError instanceof messages_1.ResponseError) {
1489 message.error = resultOrError.toJson();
1490 }
1491 else {
1492 message.result = resultOrError === void 0 ? null : resultOrError;
1493 }
1494 traceSendingResponse(message, method, startTime);
1495 messageWriter.write(message);
1496 }
1497 function replyError(error, method, startTime) {
1498 let message = {
1499 jsonrpc: version,
1500 id: requestMessage.id,
1501 error: error.toJson()
1502 };
1503 traceSendingResponse(message, method, startTime);
1504 messageWriter.write(message);
1505 }
1506 function replySuccess(result, method, startTime) {
1507 // The JSON RPC defines that a response must either have a result or an error
1508 // So we can't treat undefined as a valid response result.
1509 if (result === void 0) {
1510 result = null;
1511 }
1512 let message = {
1513 jsonrpc: version,
1514 id: requestMessage.id,
1515 result: result
1516 };
1517 traceSendingResponse(message, method, startTime);
1518 messageWriter.write(message);
1519 }
1520 traceReceivedRequest(requestMessage);
1521 let element = requestHandlers[requestMessage.method];
1522 let type;
1523 let requestHandler;
1524 if (element) {
1525 type = element.type;
1526 requestHandler = element.handler;
1527 }
1528 let startTime = Date.now();
1529 if (requestHandler || starRequestHandler) {
1530 let cancellationSource = new cancellation_1.CancellationTokenSource();
1531 let tokenKey = String(requestMessage.id);
1532 requestTokens[tokenKey] = cancellationSource;
1533 try {
1534 let handlerResult;
1535 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1536 handlerResult = requestHandler
1537 ? requestHandler(cancellationSource.token)
1538 : starRequestHandler(requestMessage.method, cancellationSource.token);
1539 }
1540 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
1541 handlerResult = requestHandler
1542 ? requestHandler(...requestMessage.params, cancellationSource.token)
1543 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
1544 }
1545 else {
1546 handlerResult = requestHandler
1547 ? requestHandler(requestMessage.params, cancellationSource.token)
1548 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
1549 }
1550 let promise = handlerResult;
1551 if (!handlerResult) {
1552 delete requestTokens[tokenKey];
1553 replySuccess(handlerResult, requestMessage.method, startTime);
1554 }
1555 else if (promise.then) {
1556 promise.then((resultOrError) => {
1557 delete requestTokens[tokenKey];
1558 reply(resultOrError, requestMessage.method, startTime);
1559 }, error => {
1560 delete requestTokens[tokenKey];
1561 if (error instanceof messages_1.ResponseError) {
1562 replyError(error, requestMessage.method, startTime);
1563 }
1564 else if (error && Is.string(error.message)) {
1565 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1566 }
1567 else {
1568 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1569 }
1570 });
1571 }
1572 else {
1573 delete requestTokens[tokenKey];
1574 reply(handlerResult, requestMessage.method, startTime);
1575 }
1576 }
1577 catch (error) {
1578 delete requestTokens[tokenKey];
1579 if (error instanceof messages_1.ResponseError) {
1580 reply(error, requestMessage.method, startTime);
1581 }
1582 else if (error && Is.string(error.message)) {
1583 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1584 }
1585 else {
1586 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1587 }
1588 }
1589 }
1590 else {
1591 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
1592 }
1593 }
1594 function handleResponse(responseMessage) {
1595 if (isDisposed()) {
1596 // See handle request.
1597 return;
1598 }
1599 if (responseMessage.id === null) {
1600 if (responseMessage.error) {
1601 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
1602 }
1603 else {
1604 logger.error(`Received response message without id. No further error information provided.`);
1605 }
1606 }
1607 else {
1608 let key = String(responseMessage.id);
1609 let responsePromise = responsePromises[key];
1610 traceReceivedResponse(responseMessage, responsePromise);
1611 if (responsePromise) {
1612 delete responsePromises[key];
1613 try {
1614 if (responseMessage.error) {
1615 let error = responseMessage.error;
1616 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
1617 }
1618 else if (responseMessage.result !== void 0) {
1619 responsePromise.resolve(responseMessage.result);
1620 }
1621 else {
1622 throw new Error('Should never happen.');
1623 }
1624 }
1625 catch (error) {
1626 if (error.message) {
1627 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
1628 }
1629 else {
1630 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
1631 }
1632 }
1633 }
1634 }
1635 }
1636 function handleNotification(message) {
1637 if (isDisposed()) {
1638 // See handle request.
1639 return;
1640 }
1641 let type = undefined;
1642 let notificationHandler;
1643 if (message.method === CancelNotification.type.method) {
1644 notificationHandler = (params) => {
1645 let id = params.id;
1646 let source = requestTokens[String(id)];
1647 if (source) {
1648 source.cancel();
1649 }
1650 };
1651 }
1652 else {
1653 let element = notificationHandlers[message.method];
1654 if (element) {
1655 notificationHandler = element.handler;
1656 type = element.type;
1657 }
1658 }
1659 if (notificationHandler || starNotificationHandler) {
1660 try {
1661 traceReceivedNotification(message);
1662 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1663 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
1664 }
1665 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
1666 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
1667 }
1668 else {
1669 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
1670 }
1671 }
1672 catch (error) {
1673 if (error.message) {
1674 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
1675 }
1676 else {
1677 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
1678 }
1679 }
1680 }
1681 else {
1682 unhandledNotificationEmitter.fire(message);
1683 }
1684 }
1685 function handleInvalidMessage(message) {
1686 if (!message) {
1687 logger.error('Received empty message.');
1688 return;
1689 }
1690 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
1691 // Test whether we find an id to reject the promise
1692 let responseMessage = message;
1693 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
1694 let key = String(responseMessage.id);
1695 let responseHandler = responsePromises[key];
1696 if (responseHandler) {
1697 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
1698 }
1699 }
1700 }
1701 function traceSendingRequest(message) {
1702 if (trace === Trace.Off || !tracer) {
1703 return;
1704 }
1705 if (traceFormat === TraceFormat.Text) {
1706 let data = undefined;
1707 if (trace === Trace.Verbose && message.params) {
1708 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1709 }
1710 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
1711 }
1712 else {
1713 logLSPMessage('send-request', message);
1714 }
1715 }
1716 function traceSendingNotification(message) {
1717 if (trace === Trace.Off || !tracer) {
1718 return;
1719 }
1720 if (traceFormat === TraceFormat.Text) {
1721 let data = undefined;
1722 if (trace === Trace.Verbose) {
1723 if (message.params) {
1724 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1725 }
1726 else {
1727 data = 'No parameters provided.\n\n';
1728 }
1729 }
1730 tracer.log(`Sending notification '${message.method}'.`, data);
1731 }
1732 else {
1733 logLSPMessage('send-notification', message);
1734 }
1735 }
1736 function traceSendingResponse(message, method, startTime) {
1737 if (trace === Trace.Off || !tracer) {
1738 return;
1739 }
1740 if (traceFormat === TraceFormat.Text) {
1741 let data = undefined;
1742 if (trace === Trace.Verbose) {
1743 if (message.error && message.error.data) {
1744 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1745 }
1746 else {
1747 if (message.result) {
1748 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1749 }
1750 else if (message.error === void 0) {
1751 data = 'No result returned.\n\n';
1752 }
1753 }
1754 }
1755 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
1756 }
1757 else {
1758 logLSPMessage('send-response', message);
1759 }
1760 }
1761 function traceReceivedRequest(message) {
1762 if (trace === Trace.Off || !tracer) {
1763 return;
1764 }
1765 if (traceFormat === TraceFormat.Text) {
1766 let data = undefined;
1767 if (trace === Trace.Verbose && message.params) {
1768 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1769 }
1770 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
1771 }
1772 else {
1773 logLSPMessage('receive-request', message);
1774 }
1775 }
1776 function traceReceivedNotification(message) {
1777 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
1778 return;
1779 }
1780 if (traceFormat === TraceFormat.Text) {
1781 let data = undefined;
1782 if (trace === Trace.Verbose) {
1783 if (message.params) {
1784 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1785 }
1786 else {
1787 data = 'No parameters provided.\n\n';
1788 }
1789 }
1790 tracer.log(`Received notification '${message.method}'.`, data);
1791 }
1792 else {
1793 logLSPMessage('receive-notification', message);
1794 }
1795 }
1796 function traceReceivedResponse(message, responsePromise) {
1797 if (trace === Trace.Off || !tracer) {
1798 return;
1799 }
1800 if (traceFormat === TraceFormat.Text) {
1801 let data = undefined;
1802 if (trace === Trace.Verbose) {
1803 if (message.error && message.error.data) {
1804 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1805 }
1806 else {
1807 if (message.result) {
1808 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1809 }
1810 else if (message.error === void 0) {
1811 data = 'No result returned.\n\n';
1812 }
1813 }
1814 }
1815 if (responsePromise) {
1816 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
1817 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
1818 }
1819 else {
1820 tracer.log(`Received response ${message.id} without active response promise.`, data);
1821 }
1822 }
1823 else {
1824 logLSPMessage('receive-response', message);
1825 }
1826 }
1827 function logLSPMessage(type, message) {
1828 if (!tracer || trace === Trace.Off) {
1829 return;
1830 }
1831 const lspMessage = {
1832 isLSPMessage: true,
1833 type,
1834 message,
1835 timestamp: Date.now()
1836 };
1837 tracer.log(lspMessage);
1838 }
1839 function throwIfClosedOrDisposed() {
1840 if (isClosed()) {
1841 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
1842 }
1843 if (isDisposed()) {
1844 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
1845 }
1846 }
1847 function throwIfListening() {
1848 if (isListening()) {
1849 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
1850 }
1851 }
1852 function throwIfNotListening() {
1853 if (!isListening()) {
1854 throw new Error('Call listen() first.');
1855 }
1856 }
1857 function undefinedToNull(param) {
1858 if (param === void 0) {
1859 return null;
1860 }
1861 else {
1862 return param;
1863 }
1864 }
1865 function computeMessageParams(type, params) {
1866 let result;
1867 let numberOfParams = type.numberOfParams;
1868 switch (numberOfParams) {
1869 case 0:
1870 result = null;
1871 break;
1872 case 1:
1873 result = undefinedToNull(params[0]);
1874 break;
1875 default:
1876 result = [];
1877 for (let i = 0; i < params.length && i < numberOfParams; i++) {
1878 result.push(undefinedToNull(params[i]));
1879 }
1880 if (params.length < numberOfParams) {
1881 for (let i = params.length; i < numberOfParams; i++) {
1882 result.push(null);
1883 }
1884 }
1885 break;
1886 }
1887 return result;
1888 }
1889 let connection = {
1890 sendNotification: (type, ...params) => {
1891 throwIfClosedOrDisposed();
1892 let method;
1893 let messageParams;
1894 if (Is.string(type)) {
1895 method = type;
1896 switch (params.length) {
1897 case 0:
1898 messageParams = null;
1899 break;
1900 case 1:
1901 messageParams = params[0];
1902 break;
1903 default:
1904 messageParams = params;
1905 break;
1906 }
1907 }
1908 else {
1909 method = type.method;
1910 messageParams = computeMessageParams(type, params);
1911 }
1912 let notificationMessage = {
1913 jsonrpc: version,
1914 method: method,
1915 params: messageParams
1916 };
1917 traceSendingNotification(notificationMessage);
1918 messageWriter.write(notificationMessage);
1919 },
1920 onNotification: (type, handler) => {
1921 throwIfClosedOrDisposed();
1922 if (Is.func(type)) {
1923 starNotificationHandler = type;
1924 }
1925 else if (handler) {
1926 if (Is.string(type)) {
1927 notificationHandlers[type] = { type: undefined, handler };
1928 }
1929 else {
1930 notificationHandlers[type.method] = { type, handler };
1931 }
1932 }
1933 },
1934 onProgress: (_type, token, handler) => {
1935 if (progressHandlers.has(token)) {
1936 throw new Error(`Progress handler for token ${token} already registered`);
1937 }
1938 progressHandlers.set(token, handler);
1939 return {
1940 dispose: () => {
1941 progressHandlers.delete(token);
1942 }
1943 };
1944 },
1945 sendProgress: (_type, token, value) => {
1946 connection.sendNotification(ProgressNotification.type, { token, value });
1947 },
1948 onUnhandledProgress: unhandledProgressEmitter.event,
1949 sendRequest: (type, ...params) => {
1950 throwIfClosedOrDisposed();
1951 throwIfNotListening();
1952 let method;
1953 let messageParams;
1954 let token = undefined;
1955 if (Is.string(type)) {
1956 method = type;
1957 switch (params.length) {
1958 case 0:
1959 messageParams = null;
1960 break;
1961 case 1:
1962 // The cancellation token is optional so it can also be undefined.
1963 if (cancellation_1.CancellationToken.is(params[0])) {
1964 messageParams = null;
1965 token = params[0];
1966 }
1967 else {
1968 messageParams = undefinedToNull(params[0]);
1969 }
1970 break;
1971 default:
1972 const last = params.length - 1;
1973 if (cancellation_1.CancellationToken.is(params[last])) {
1974 token = params[last];
1975 if (params.length === 2) {
1976 messageParams = undefinedToNull(params[0]);
1977 }
1978 else {
1979 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
1980 }
1981 }
1982 else {
1983 messageParams = params.map(value => undefinedToNull(value));
1984 }
1985 break;
1986 }
1987 }
1988 else {
1989 method = type.method;
1990 messageParams = computeMessageParams(type, params);
1991 let numberOfParams = type.numberOfParams;
1992 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
1993 }
1994 let id = sequenceNumber++;
1995 let result = new Promise((resolve, reject) => {
1996 let requestMessage = {
1997 jsonrpc: version,
1998 id: id,
1999 method: method,
2000 params: messageParams
2001 };
2002 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
2003 traceSendingRequest(requestMessage);
2004 try {
2005 messageWriter.write(requestMessage);
2006 }
2007 catch (e) {
2008 // Writing the message failed. So we need to reject the promise.
2009 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
2010 responsePromise = null;
2011 }
2012 if (responsePromise) {
2013 responsePromises[String(id)] = responsePromise;
2014 }
2015 });
2016 if (token) {
2017 token.onCancellationRequested(() => {
2018 connection.sendNotification(CancelNotification.type, { id });
2019 });
2020 }
2021 return result;
2022 },
2023 onRequest: (type, handler) => {
2024 throwIfClosedOrDisposed();
2025 if (Is.func(type)) {
2026 starRequestHandler = type;
2027 }
2028 else if (handler) {
2029 if (Is.string(type)) {
2030 requestHandlers[type] = { type: undefined, handler };
2031 }
2032 else {
2033 requestHandlers[type.method] = { type, handler };
2034 }
2035 }
2036 },
2037 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
2038 let _sendNotification = false;
2039 let _traceFormat = TraceFormat.Text;
2040 if (sendNotificationOrTraceOptions !== void 0) {
2041 if (Is.boolean(sendNotificationOrTraceOptions)) {
2042 _sendNotification = sendNotificationOrTraceOptions;
2043 }
2044 else {
2045 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
2046 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
2047 }
2048 }
2049 trace = _value;
2050 traceFormat = _traceFormat;
2051 if (trace === Trace.Off) {
2052 tracer = undefined;
2053 }
2054 else {
2055 tracer = _tracer;
2056 }
2057 if (_sendNotification && !isClosed() && !isDisposed()) {
2058 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
2059 }
2060 },
2061 onError: errorEmitter.event,
2062 onClose: closeEmitter.event,
2063 onUnhandledNotification: unhandledNotificationEmitter.event,
2064 onDispose: disposeEmitter.event,
2065 dispose: () => {
2066 if (isDisposed()) {
2067 return;
2068 }
2069 state = ConnectionState.Disposed;
2070 disposeEmitter.fire(undefined);
2071 let error = new Error('Connection got disposed.');
2072 Object.keys(responsePromises).forEach((key) => {
2073 responsePromises[key].reject(error);
2074 });
2075 responsePromises = Object.create(null);
2076 requestTokens = Object.create(null);
2077 messageQueue = new linkedMap_1.LinkedMap();
2078 // Test for backwards compatibility
2079 if (Is.func(messageWriter.dispose)) {
2080 messageWriter.dispose();
2081 }
2082 if (Is.func(messageReader.dispose)) {
2083 messageReader.dispose();
2084 }
2085 },
2086 listen: () => {
2087 throwIfClosedOrDisposed();
2088 throwIfListening();
2089 state = ConnectionState.Listening;
2090 messageReader.listen(callback);
2091 },
2092 inspect: () => {
2093 // eslint-disable-next-line no-console
2094 console.log('inspect');
2095 }
2096 };
2097 connection.onNotification(LogTraceNotification.type, (params) => {
2098 if (trace === Trace.Off || !tracer) {
2099 return;
2100 }
2101 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
2102 });
2103 connection.onNotification(ProgressNotification.type, (params) => {
2104 const handler = progressHandlers.get(params.token);
2105 if (handler) {
2106 handler(params.value);
2107 }
2108 else {
2109 unhandledProgressEmitter.fire(params);
2110 }
2111 });
2112 return connection;
2113}
2114function isMessageReader(value) {
2115 return value.listen !== void 0 && value.read === void 0;
2116}
2117function isMessageWriter(value) {
2118 return value.write !== void 0 && value.end === void 0;
2119}
2120function createMessageConnection(input, output, logger, strategy) {
2121 if (!logger) {
2122 logger = exports.NullLogger;
2123 }
2124 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
2125 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
2126 return _createMessageConnection(reader, writer, logger, strategy);
2127}
2128exports.createMessageConnection = createMessageConnection;
2129
2130
2131/***/ }),
2132/* 5 */
2133/***/ (function(module, exports, __webpack_require__) {
2134
2135"use strict";
2136/* --------------------------------------------------------------------------------------------
2137 * Copyright (c) Microsoft Corporation. All rights reserved.
2138 * Licensed under the MIT License. See License.txt in the project root for license information.
2139 * ------------------------------------------------------------------------------------------ */
2140
2141Object.defineProperty(exports, "__esModule", { value: true });
2142function boolean(value) {
2143 return value === true || value === false;
2144}
2145exports.boolean = boolean;
2146function string(value) {
2147 return typeof value === 'string' || value instanceof String;
2148}
2149exports.string = string;
2150function number(value) {
2151 return typeof value === 'number' || value instanceof Number;
2152}
2153exports.number = number;
2154function error(value) {
2155 return value instanceof Error;
2156}
2157exports.error = error;
2158function func(value) {
2159 return typeof value === 'function';
2160}
2161exports.func = func;
2162function array(value) {
2163 return Array.isArray(value);
2164}
2165exports.array = array;
2166function stringArray(value) {
2167 return array(value) && value.every(elem => string(elem));
2168}
2169exports.stringArray = stringArray;
2170
2171
2172/***/ }),
2173/* 6 */
2174/***/ (function(module, exports, __webpack_require__) {
2175
2176"use strict";
2177/* --------------------------------------------------------------------------------------------
2178 * Copyright (c) Microsoft Corporation. All rights reserved.
2179 * Licensed under the MIT License. See License.txt in the project root for license information.
2180 * ------------------------------------------------------------------------------------------ */
2181
2182Object.defineProperty(exports, "__esModule", { value: true });
2183const is = __webpack_require__(5);
2184/**
2185 * Predefined error codes.
2186 */
2187var ErrorCodes;
2188(function (ErrorCodes) {
2189 // Defined by JSON RPC
2190 ErrorCodes.ParseError = -32700;
2191 ErrorCodes.InvalidRequest = -32600;
2192 ErrorCodes.MethodNotFound = -32601;
2193 ErrorCodes.InvalidParams = -32602;
2194 ErrorCodes.InternalError = -32603;
2195 ErrorCodes.serverErrorStart = -32099;
2196 ErrorCodes.serverErrorEnd = -32000;
2197 ErrorCodes.ServerNotInitialized = -32002;
2198 ErrorCodes.UnknownErrorCode = -32001;
2199 // Defined by the protocol.
2200 ErrorCodes.RequestCancelled = -32800;
2201 ErrorCodes.ContentModified = -32801;
2202 // Defined by VSCode library.
2203 ErrorCodes.MessageWriteError = 1;
2204 ErrorCodes.MessageReadError = 2;
2205})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
2206/**
2207 * An error object return in a response in case a request
2208 * has failed.
2209 */
2210class ResponseError extends Error {
2211 constructor(code, message, data) {
2212 super(message);
2213 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
2214 this.data = data;
2215 Object.setPrototypeOf(this, ResponseError.prototype);
2216 }
2217 toJson() {
2218 return {
2219 code: this.code,
2220 message: this.message,
2221 data: this.data,
2222 };
2223 }
2224}
2225exports.ResponseError = ResponseError;
2226/**
2227 * An abstract implementation of a MessageType.
2228 */
2229class AbstractMessageType {
2230 constructor(_method, _numberOfParams) {
2231 this._method = _method;
2232 this._numberOfParams = _numberOfParams;
2233 }
2234 get method() {
2235 return this._method;
2236 }
2237 get numberOfParams() {
2238 return this._numberOfParams;
2239 }
2240}
2241exports.AbstractMessageType = AbstractMessageType;
2242/**
2243 * Classes to type request response pairs
2244 *
2245 * The type parameter RO will be removed in the next major version
2246 * of the JSON RPC library since it is a LSP concept and doesn't
2247 * belong here. For now it is tagged as default never.
2248 */
2249class RequestType0 extends AbstractMessageType {
2250 constructor(method) {
2251 super(method, 0);
2252 }
2253}
2254exports.RequestType0 = RequestType0;
2255class RequestType extends AbstractMessageType {
2256 constructor(method) {
2257 super(method, 1);
2258 }
2259}
2260exports.RequestType = RequestType;
2261class RequestType1 extends AbstractMessageType {
2262 constructor(method) {
2263 super(method, 1);
2264 }
2265}
2266exports.RequestType1 = RequestType1;
2267class RequestType2 extends AbstractMessageType {
2268 constructor(method) {
2269 super(method, 2);
2270 }
2271}
2272exports.RequestType2 = RequestType2;
2273class RequestType3 extends AbstractMessageType {
2274 constructor(method) {
2275 super(method, 3);
2276 }
2277}
2278exports.RequestType3 = RequestType3;
2279class RequestType4 extends AbstractMessageType {
2280 constructor(method) {
2281 super(method, 4);
2282 }
2283}
2284exports.RequestType4 = RequestType4;
2285class RequestType5 extends AbstractMessageType {
2286 constructor(method) {
2287 super(method, 5);
2288 }
2289}
2290exports.RequestType5 = RequestType5;
2291class RequestType6 extends AbstractMessageType {
2292 constructor(method) {
2293 super(method, 6);
2294 }
2295}
2296exports.RequestType6 = RequestType6;
2297class RequestType7 extends AbstractMessageType {
2298 constructor(method) {
2299 super(method, 7);
2300 }
2301}
2302exports.RequestType7 = RequestType7;
2303class RequestType8 extends AbstractMessageType {
2304 constructor(method) {
2305 super(method, 8);
2306 }
2307}
2308exports.RequestType8 = RequestType8;
2309class RequestType9 extends AbstractMessageType {
2310 constructor(method) {
2311 super(method, 9);
2312 }
2313}
2314exports.RequestType9 = RequestType9;
2315/**
2316 * The type parameter RO will be removed in the next major version
2317 * of the JSON RPC library since it is a LSP concept and doesn't
2318 * belong here. For now it is tagged as default never.
2319 */
2320class NotificationType extends AbstractMessageType {
2321 constructor(method) {
2322 super(method, 1);
2323 this._ = undefined;
2324 }
2325}
2326exports.NotificationType = NotificationType;
2327class NotificationType0 extends AbstractMessageType {
2328 constructor(method) {
2329 super(method, 0);
2330 }
2331}
2332exports.NotificationType0 = NotificationType0;
2333class NotificationType1 extends AbstractMessageType {
2334 constructor(method) {
2335 super(method, 1);
2336 }
2337}
2338exports.NotificationType1 = NotificationType1;
2339class NotificationType2 extends AbstractMessageType {
2340 constructor(method) {
2341 super(method, 2);
2342 }
2343}
2344exports.NotificationType2 = NotificationType2;
2345class NotificationType3 extends AbstractMessageType {
2346 constructor(method) {
2347 super(method, 3);
2348 }
2349}
2350exports.NotificationType3 = NotificationType3;
2351class NotificationType4 extends AbstractMessageType {
2352 constructor(method) {
2353 super(method, 4);
2354 }
2355}
2356exports.NotificationType4 = NotificationType4;
2357class NotificationType5 extends AbstractMessageType {
2358 constructor(method) {
2359 super(method, 5);
2360 }
2361}
2362exports.NotificationType5 = NotificationType5;
2363class NotificationType6 extends AbstractMessageType {
2364 constructor(method) {
2365 super(method, 6);
2366 }
2367}
2368exports.NotificationType6 = NotificationType6;
2369class NotificationType7 extends AbstractMessageType {
2370 constructor(method) {
2371 super(method, 7);
2372 }
2373}
2374exports.NotificationType7 = NotificationType7;
2375class NotificationType8 extends AbstractMessageType {
2376 constructor(method) {
2377 super(method, 8);
2378 }
2379}
2380exports.NotificationType8 = NotificationType8;
2381class NotificationType9 extends AbstractMessageType {
2382 constructor(method) {
2383 super(method, 9);
2384 }
2385}
2386exports.NotificationType9 = NotificationType9;
2387/**
2388 * Tests if the given message is a request message
2389 */
2390function isRequestMessage(message) {
2391 let candidate = message;
2392 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2393}
2394exports.isRequestMessage = isRequestMessage;
2395/**
2396 * Tests if the given message is a notification message
2397 */
2398function isNotificationMessage(message) {
2399 let candidate = message;
2400 return candidate && is.string(candidate.method) && message.id === void 0;
2401}
2402exports.isNotificationMessage = isNotificationMessage;
2403/**
2404 * Tests if the given message is a response message
2405 */
2406function isResponseMessage(message) {
2407 let candidate = message;
2408 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2409}
2410exports.isResponseMessage = isResponseMessage;
2411
2412
2413/***/ }),
2414/* 7 */
2415/***/ (function(module, exports, __webpack_require__) {
2416
2417"use strict";
2418/* --------------------------------------------------------------------------------------------
2419 * Copyright (c) Microsoft Corporation. All rights reserved.
2420 * Licensed under the MIT License. See License.txt in the project root for license information.
2421 * ------------------------------------------------------------------------------------------ */
2422
2423Object.defineProperty(exports, "__esModule", { value: true });
2424const events_1 = __webpack_require__(8);
2425const Is = __webpack_require__(5);
2426let DefaultSize = 8192;
2427let CR = Buffer.from('\r', 'ascii')[0];
2428let LF = Buffer.from('\n', 'ascii')[0];
2429let CRLF = '\r\n';
2430class MessageBuffer {
2431 constructor(encoding = 'utf8') {
2432 this.encoding = encoding;
2433 this.index = 0;
2434 this.buffer = Buffer.allocUnsafe(DefaultSize);
2435 }
2436 append(chunk) {
2437 var toAppend = chunk;
2438 if (typeof (chunk) === 'string') {
2439 var str = chunk;
2440 var bufferLen = Buffer.byteLength(str, this.encoding);
2441 toAppend = Buffer.allocUnsafe(bufferLen);
2442 toAppend.write(str, 0, bufferLen, this.encoding);
2443 }
2444 if (this.buffer.length - this.index >= toAppend.length) {
2445 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
2446 }
2447 else {
2448 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
2449 if (this.index === 0) {
2450 this.buffer = Buffer.allocUnsafe(newSize);
2451 toAppend.copy(this.buffer, 0, 0, toAppend.length);
2452 }
2453 else {
2454 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
2455 }
2456 }
2457 this.index += toAppend.length;
2458 }
2459 tryReadHeaders() {
2460 let result = undefined;
2461 let current = 0;
2462 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
2463 current++;
2464 }
2465 // No header / body separator found (e.g CRLFCRLF)
2466 if (current + 3 >= this.index) {
2467 return result;
2468 }
2469 result = Object.create(null);
2470 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
2471 headers.forEach((header) => {
2472 let index = header.indexOf(':');
2473 if (index === -1) {
2474 throw new Error('Message header must separate key and value using :');
2475 }
2476 let key = header.substr(0, index);
2477 let value = header.substr(index + 1).trim();
2478 result[key] = value;
2479 });
2480 let nextStart = current + 4;
2481 this.buffer = this.buffer.slice(nextStart);
2482 this.index = this.index - nextStart;
2483 return result;
2484 }
2485 tryReadContent(length) {
2486 if (this.index < length) {
2487 return null;
2488 }
2489 let result = this.buffer.toString(this.encoding, 0, length);
2490 let nextStart = length;
2491 this.buffer.copy(this.buffer, 0, nextStart);
2492 this.index = this.index - nextStart;
2493 return result;
2494 }
2495 get numberOfBytes() {
2496 return this.index;
2497 }
2498}
2499var MessageReader;
2500(function (MessageReader) {
2501 function is(value) {
2502 let candidate = value;
2503 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2504 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2505 }
2506 MessageReader.is = is;
2507})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2508class AbstractMessageReader {
2509 constructor() {
2510 this.errorEmitter = new events_1.Emitter();
2511 this.closeEmitter = new events_1.Emitter();
2512 this.partialMessageEmitter = new events_1.Emitter();
2513 }
2514 dispose() {
2515 this.errorEmitter.dispose();
2516 this.closeEmitter.dispose();
2517 }
2518 get onError() {
2519 return this.errorEmitter.event;
2520 }
2521 fireError(error) {
2522 this.errorEmitter.fire(this.asError(error));
2523 }
2524 get onClose() {
2525 return this.closeEmitter.event;
2526 }
2527 fireClose() {
2528 this.closeEmitter.fire(undefined);
2529 }
2530 get onPartialMessage() {
2531 return this.partialMessageEmitter.event;
2532 }
2533 firePartialMessage(info) {
2534 this.partialMessageEmitter.fire(info);
2535 }
2536 asError(error) {
2537 if (error instanceof Error) {
2538 return error;
2539 }
2540 else {
2541 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2542 }
2543 }
2544}
2545exports.AbstractMessageReader = AbstractMessageReader;
2546class StreamMessageReader extends AbstractMessageReader {
2547 constructor(readable, encoding = 'utf8') {
2548 super();
2549 this.readable = readable;
2550 this.buffer = new MessageBuffer(encoding);
2551 this._partialMessageTimeout = 10000;
2552 }
2553 set partialMessageTimeout(timeout) {
2554 this._partialMessageTimeout = timeout;
2555 }
2556 get partialMessageTimeout() {
2557 return this._partialMessageTimeout;
2558 }
2559 listen(callback) {
2560 this.nextMessageLength = -1;
2561 this.messageToken = 0;
2562 this.partialMessageTimer = undefined;
2563 this.callback = callback;
2564 this.readable.on('data', (data) => {
2565 this.onData(data);
2566 });
2567 this.readable.on('error', (error) => this.fireError(error));
2568 this.readable.on('close', () => this.fireClose());
2569 }
2570 onData(data) {
2571 this.buffer.append(data);
2572 while (true) {
2573 if (this.nextMessageLength === -1) {
2574 let headers = this.buffer.tryReadHeaders();
2575 if (!headers) {
2576 return;
2577 }
2578 let contentLength = headers['Content-Length'];
2579 if (!contentLength) {
2580 throw new Error('Header must provide a Content-Length property.');
2581 }
2582 let length = parseInt(contentLength);
2583 if (isNaN(length)) {
2584 throw new Error('Content-Length value must be a number.');
2585 }
2586 this.nextMessageLength = length;
2587 // Take the encoding form the header. For compatibility
2588 // treat both utf-8 and utf8 as node utf8
2589 }
2590 var msg = this.buffer.tryReadContent(this.nextMessageLength);
2591 if (msg === null) {
2592 /** We haven't received the full message yet. */
2593 this.setPartialMessageTimer();
2594 return;
2595 }
2596 this.clearPartialMessageTimer();
2597 this.nextMessageLength = -1;
2598 this.messageToken++;
2599 var json = JSON.parse(msg);
2600 this.callback(json);
2601 }
2602 }
2603 clearPartialMessageTimer() {
2604 if (this.partialMessageTimer) {
2605 clearTimeout(this.partialMessageTimer);
2606 this.partialMessageTimer = undefined;
2607 }
2608 }
2609 setPartialMessageTimer() {
2610 this.clearPartialMessageTimer();
2611 if (this._partialMessageTimeout <= 0) {
2612 return;
2613 }
2614 this.partialMessageTimer = setTimeout((token, timeout) => {
2615 this.partialMessageTimer = undefined;
2616 if (token === this.messageToken) {
2617 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2618 this.setPartialMessageTimer();
2619 }
2620 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2621 }
2622}
2623exports.StreamMessageReader = StreamMessageReader;
2624class IPCMessageReader extends AbstractMessageReader {
2625 constructor(process) {
2626 super();
2627 this.process = process;
2628 let eventEmitter = this.process;
2629 eventEmitter.on('error', (error) => this.fireError(error));
2630 eventEmitter.on('close', () => this.fireClose());
2631 }
2632 listen(callback) {
2633 this.process.on('message', callback);
2634 }
2635}
2636exports.IPCMessageReader = IPCMessageReader;
2637class SocketMessageReader extends StreamMessageReader {
2638 constructor(socket, encoding = 'utf-8') {
2639 super(socket, encoding);
2640 }
2641}
2642exports.SocketMessageReader = SocketMessageReader;
2643
2644
2645/***/ }),
2646/* 8 */
2647/***/ (function(module, exports, __webpack_require__) {
2648
2649"use strict";
2650/* --------------------------------------------------------------------------------------------
2651 * Copyright (c) Microsoft Corporation. All rights reserved.
2652 * Licensed under the MIT License. See License.txt in the project root for license information.
2653 * ------------------------------------------------------------------------------------------ */
2654
2655Object.defineProperty(exports, "__esModule", { value: true });
2656var Disposable;
2657(function (Disposable) {
2658 function create(func) {
2659 return {
2660 dispose: func
2661 };
2662 }
2663 Disposable.create = create;
2664})(Disposable = exports.Disposable || (exports.Disposable = {}));
2665var Event;
2666(function (Event) {
2667 const _disposable = { dispose() { } };
2668 Event.None = function () { return _disposable; };
2669})(Event = exports.Event || (exports.Event = {}));
2670class CallbackList {
2671 add(callback, context = null, bucket) {
2672 if (!this._callbacks) {
2673 this._callbacks = [];
2674 this._contexts = [];
2675 }
2676 this._callbacks.push(callback);
2677 this._contexts.push(context);
2678 if (Array.isArray(bucket)) {
2679 bucket.push({ dispose: () => this.remove(callback, context) });
2680 }
2681 }
2682 remove(callback, context = null) {
2683 if (!this._callbacks) {
2684 return;
2685 }
2686 var foundCallbackWithDifferentContext = false;
2687 for (var i = 0, len = this._callbacks.length; i < len; i++) {
2688 if (this._callbacks[i] === callback) {
2689 if (this._contexts[i] === context) {
2690 // callback & context match => remove it
2691 this._callbacks.splice(i, 1);
2692 this._contexts.splice(i, 1);
2693 return;
2694 }
2695 else {
2696 foundCallbackWithDifferentContext = true;
2697 }
2698 }
2699 }
2700 if (foundCallbackWithDifferentContext) {
2701 throw new Error('When adding a listener with a context, you should remove it with the same context');
2702 }
2703 }
2704 invoke(...args) {
2705 if (!this._callbacks) {
2706 return [];
2707 }
2708 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2709 for (var i = 0, len = callbacks.length; i < len; i++) {
2710 try {
2711 ret.push(callbacks[i].apply(contexts[i], args));
2712 }
2713 catch (e) {
2714 // eslint-disable-next-line no-console
2715 console.error(e);
2716 }
2717 }
2718 return ret;
2719 }
2720 isEmpty() {
2721 return !this._callbacks || this._callbacks.length === 0;
2722 }
2723 dispose() {
2724 this._callbacks = undefined;
2725 this._contexts = undefined;
2726 }
2727}
2728class Emitter {
2729 constructor(_options) {
2730 this._options = _options;
2731 }
2732 /**
2733 * For the public to allow to subscribe
2734 * to events from this Emitter
2735 */
2736 get event() {
2737 if (!this._event) {
2738 this._event = (listener, thisArgs, disposables) => {
2739 if (!this._callbacks) {
2740 this._callbacks = new CallbackList();
2741 }
2742 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2743 this._options.onFirstListenerAdd(this);
2744 }
2745 this._callbacks.add(listener, thisArgs);
2746 let result;
2747 result = {
2748 dispose: () => {
2749 this._callbacks.remove(listener, thisArgs);
2750 result.dispose = Emitter._noop;
2751 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2752 this._options.onLastListenerRemove(this);
2753 }
2754 }
2755 };
2756 if (Array.isArray(disposables)) {
2757 disposables.push(result);
2758 }
2759 return result;
2760 };
2761 }
2762 return this._event;
2763 }
2764 /**
2765 * To be kept private to fire an event to
2766 * subscribers
2767 */
2768 fire(event) {
2769 if (this._callbacks) {
2770 this._callbacks.invoke.call(this._callbacks, event);
2771 }
2772 }
2773 dispose() {
2774 if (this._callbacks) {
2775 this._callbacks.dispose();
2776 this._callbacks = undefined;
2777 }
2778 }
2779}
2780exports.Emitter = Emitter;
2781Emitter._noop = function () { };
2782
2783
2784/***/ }),
2785/* 9 */
2786/***/ (function(module, exports, __webpack_require__) {
2787
2788"use strict";
2789/* --------------------------------------------------------------------------------------------
2790 * Copyright (c) Microsoft Corporation. All rights reserved.
2791 * Licensed under the MIT License. See License.txt in the project root for license information.
2792 * ------------------------------------------------------------------------------------------ */
2793
2794Object.defineProperty(exports, "__esModule", { value: true });
2795const events_1 = __webpack_require__(8);
2796const Is = __webpack_require__(5);
2797let ContentLength = 'Content-Length: ';
2798let CRLF = '\r\n';
2799var MessageWriter;
2800(function (MessageWriter) {
2801 function is(value) {
2802 let candidate = value;
2803 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2804 Is.func(candidate.onError) && Is.func(candidate.write);
2805 }
2806 MessageWriter.is = is;
2807})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2808class AbstractMessageWriter {
2809 constructor() {
2810 this.errorEmitter = new events_1.Emitter();
2811 this.closeEmitter = new events_1.Emitter();
2812 }
2813 dispose() {
2814 this.errorEmitter.dispose();
2815 this.closeEmitter.dispose();
2816 }
2817 get onError() {
2818 return this.errorEmitter.event;
2819 }
2820 fireError(error, message, count) {
2821 this.errorEmitter.fire([this.asError(error), message, count]);
2822 }
2823 get onClose() {
2824 return this.closeEmitter.event;
2825 }
2826 fireClose() {
2827 this.closeEmitter.fire(undefined);
2828 }
2829 asError(error) {
2830 if (error instanceof Error) {
2831 return error;
2832 }
2833 else {
2834 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2835 }
2836 }
2837}
2838exports.AbstractMessageWriter = AbstractMessageWriter;
2839class StreamMessageWriter extends AbstractMessageWriter {
2840 constructor(writable, encoding = 'utf8') {
2841 super();
2842 this.writable = writable;
2843 this.encoding = encoding;
2844 this.errorCount = 0;
2845 this.writable.on('error', (error) => this.fireError(error));
2846 this.writable.on('close', () => this.fireClose());
2847 }
2848 write(msg) {
2849 let json = JSON.stringify(msg);
2850 let contentLength = Buffer.byteLength(json, this.encoding);
2851 let headers = [
2852 ContentLength, contentLength.toString(), CRLF,
2853 CRLF
2854 ];
2855 try {
2856 // Header must be written in ASCII encoding
2857 this.writable.write(headers.join(''), 'ascii');
2858 // Now write the content. This can be written in any encoding
2859 this.writable.write(json, this.encoding);
2860 this.errorCount = 0;
2861 }
2862 catch (error) {
2863 this.errorCount++;
2864 this.fireError(error, msg, this.errorCount);
2865 }
2866 }
2867}
2868exports.StreamMessageWriter = StreamMessageWriter;
2869class IPCMessageWriter extends AbstractMessageWriter {
2870 constructor(process) {
2871 super();
2872 this.process = process;
2873 this.errorCount = 0;
2874 this.queue = [];
2875 this.sending = false;
2876 let eventEmitter = this.process;
2877 eventEmitter.on('error', (error) => this.fireError(error));
2878 eventEmitter.on('close', () => this.fireClose);
2879 }
2880 write(msg) {
2881 if (!this.sending && this.queue.length === 0) {
2882 // See https://github.com/nodejs/node/issues/7657
2883 this.doWriteMessage(msg);
2884 }
2885 else {
2886 this.queue.push(msg);
2887 }
2888 }
2889 doWriteMessage(msg) {
2890 try {
2891 if (this.process.send) {
2892 this.sending = true;
2893 this.process.send(msg, undefined, undefined, (error) => {
2894 this.sending = false;
2895 if (error) {
2896 this.errorCount++;
2897 this.fireError(error, msg, this.errorCount);
2898 }
2899 else {
2900 this.errorCount = 0;
2901 }
2902 if (this.queue.length > 0) {
2903 this.doWriteMessage(this.queue.shift());
2904 }
2905 });
2906 }
2907 }
2908 catch (error) {
2909 this.errorCount++;
2910 this.fireError(error, msg, this.errorCount);
2911 }
2912 }
2913}
2914exports.IPCMessageWriter = IPCMessageWriter;
2915class SocketMessageWriter extends AbstractMessageWriter {
2916 constructor(socket, encoding = 'utf8') {
2917 super();
2918 this.socket = socket;
2919 this.queue = [];
2920 this.sending = false;
2921 this.encoding = encoding;
2922 this.errorCount = 0;
2923 this.socket.on('error', (error) => this.fireError(error));
2924 this.socket.on('close', () => this.fireClose());
2925 }
2926 dispose() {
2927 super.dispose();
2928 this.socket.destroy();
2929 }
2930 write(msg) {
2931 if (!this.sending && this.queue.length === 0) {
2932 // See https://github.com/nodejs/node/issues/7657
2933 this.doWriteMessage(msg);
2934 }
2935 else {
2936 this.queue.push(msg);
2937 }
2938 }
2939 doWriteMessage(msg) {
2940 let json = JSON.stringify(msg);
2941 let contentLength = Buffer.byteLength(json, this.encoding);
2942 let headers = [
2943 ContentLength, contentLength.toString(), CRLF,
2944 CRLF
2945 ];
2946 try {
2947 // Header must be written in ASCII encoding
2948 this.sending = true;
2949 this.socket.write(headers.join(''), 'ascii', (error) => {
2950 if (error) {
2951 this.handleError(error, msg);
2952 }
2953 try {
2954 // Now write the content. This can be written in any encoding
2955 this.socket.write(json, this.encoding, (error) => {
2956 this.sending = false;
2957 if (error) {
2958 this.handleError(error, msg);
2959 }
2960 else {
2961 this.errorCount = 0;
2962 }
2963 if (this.queue.length > 0) {
2964 this.doWriteMessage(this.queue.shift());
2965 }
2966 });
2967 }
2968 catch (error) {
2969 this.handleError(error, msg);
2970 }
2971 });
2972 }
2973 catch (error) {
2974 this.handleError(error, msg);
2975 }
2976 }
2977 handleError(error, msg) {
2978 this.errorCount++;
2979 this.fireError(error, msg, this.errorCount);
2980 }
2981}
2982exports.SocketMessageWriter = SocketMessageWriter;
2983
2984
2985/***/ }),
2986/* 10 */
2987/***/ (function(module, exports, __webpack_require__) {
2988
2989"use strict";
2990/*---------------------------------------------------------------------------------------------
2991 * Copyright (c) Microsoft Corporation. All rights reserved.
2992 * Licensed under the MIT License. See License.txt in the project root for license information.
2993 *--------------------------------------------------------------------------------------------*/
2994
2995Object.defineProperty(exports, "__esModule", { value: true });
2996const events_1 = __webpack_require__(8);
2997const Is = __webpack_require__(5);
2998var CancellationToken;
2999(function (CancellationToken) {
3000 CancellationToken.None = Object.freeze({
3001 isCancellationRequested: false,
3002 onCancellationRequested: events_1.Event.None
3003 });
3004 CancellationToken.Cancelled = Object.freeze({
3005 isCancellationRequested: true,
3006 onCancellationRequested: events_1.Event.None
3007 });
3008 function is(value) {
3009 let candidate = value;
3010 return candidate && (candidate === CancellationToken.None
3011 || candidate === CancellationToken.Cancelled
3012 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
3013 }
3014 CancellationToken.is = is;
3015})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
3016const shortcutEvent = Object.freeze(function (callback, context) {
3017 let handle = setTimeout(callback.bind(context), 0);
3018 return { dispose() { clearTimeout(handle); } };
3019});
3020class MutableToken {
3021 constructor() {
3022 this._isCancelled = false;
3023 }
3024 cancel() {
3025 if (!this._isCancelled) {
3026 this._isCancelled = true;
3027 if (this._emitter) {
3028 this._emitter.fire(undefined);
3029 this.dispose();
3030 }
3031 }
3032 }
3033 get isCancellationRequested() {
3034 return this._isCancelled;
3035 }
3036 get onCancellationRequested() {
3037 if (this._isCancelled) {
3038 return shortcutEvent;
3039 }
3040 if (!this._emitter) {
3041 this._emitter = new events_1.Emitter();
3042 }
3043 return this._emitter.event;
3044 }
3045 dispose() {
3046 if (this._emitter) {
3047 this._emitter.dispose();
3048 this._emitter = undefined;
3049 }
3050 }
3051}
3052class CancellationTokenSource {
3053 get token() {
3054 if (!this._token) {
3055 // be lazy and create the token only when
3056 // actually needed
3057 this._token = new MutableToken();
3058 }
3059 return this._token;
3060 }
3061 cancel() {
3062 if (!this._token) {
3063 // save an object by returning the default
3064 // cancelled token when cancellation happens
3065 // before someone asks for the token
3066 this._token = CancellationToken.Cancelled;
3067 }
3068 else {
3069 this._token.cancel();
3070 }
3071 }
3072 dispose() {
3073 if (!this._token) {
3074 // ensure to initialize with an empty token if we had none
3075 this._token = CancellationToken.None;
3076 }
3077 else if (this._token instanceof MutableToken) {
3078 // actually dispose
3079 this._token.dispose();
3080 }
3081 }
3082}
3083exports.CancellationTokenSource = CancellationTokenSource;
3084
3085
3086/***/ }),
3087/* 11 */
3088/***/ (function(module, exports, __webpack_require__) {
3089
3090"use strict";
3091
3092/*---------------------------------------------------------------------------------------------
3093 * Copyright (c) Microsoft Corporation. All rights reserved.
3094 * Licensed under the MIT License. See License.txt in the project root for license information.
3095 *--------------------------------------------------------------------------------------------*/
3096Object.defineProperty(exports, "__esModule", { value: true });
3097var Touch;
3098(function (Touch) {
3099 Touch.None = 0;
3100 Touch.First = 1;
3101 Touch.Last = 2;
3102})(Touch = exports.Touch || (exports.Touch = {}));
3103class LinkedMap {
3104 constructor() {
3105 this._map = new Map();
3106 this._head = undefined;
3107 this._tail = undefined;
3108 this._size = 0;
3109 }
3110 clear() {
3111 this._map.clear();
3112 this._head = undefined;
3113 this._tail = undefined;
3114 this._size = 0;
3115 }
3116 isEmpty() {
3117 return !this._head && !this._tail;
3118 }
3119 get size() {
3120 return this._size;
3121 }
3122 has(key) {
3123 return this._map.has(key);
3124 }
3125 get(key) {
3126 const item = this._map.get(key);
3127 if (!item) {
3128 return undefined;
3129 }
3130 return item.value;
3131 }
3132 set(key, value, touch = Touch.None) {
3133 let item = this._map.get(key);
3134 if (item) {
3135 item.value = value;
3136 if (touch !== Touch.None) {
3137 this.touch(item, touch);
3138 }
3139 }
3140 else {
3141 item = { key, value, next: undefined, previous: undefined };
3142 switch (touch) {
3143 case Touch.None:
3144 this.addItemLast(item);
3145 break;
3146 case Touch.First:
3147 this.addItemFirst(item);
3148 break;
3149 case Touch.Last:
3150 this.addItemLast(item);
3151 break;
3152 default:
3153 this.addItemLast(item);
3154 break;
3155 }
3156 this._map.set(key, item);
3157 this._size++;
3158 }
3159 }
3160 delete(key) {
3161 const item = this._map.get(key);
3162 if (!item) {
3163 return false;
3164 }
3165 this._map.delete(key);
3166 this.removeItem(item);
3167 this._size--;
3168 return true;
3169 }
3170 shift() {
3171 if (!this._head && !this._tail) {
3172 return undefined;
3173 }
3174 if (!this._head || !this._tail) {
3175 throw new Error('Invalid list');
3176 }
3177 const item = this._head;
3178 this._map.delete(item.key);
3179 this.removeItem(item);
3180 this._size--;
3181 return item.value;
3182 }
3183 forEach(callbackfn, thisArg) {
3184 let current = this._head;
3185 while (current) {
3186 if (thisArg) {
3187 callbackfn.bind(thisArg)(current.value, current.key, this);
3188 }
3189 else {
3190 callbackfn(current.value, current.key, this);
3191 }
3192 current = current.next;
3193 }
3194 }
3195 forEachReverse(callbackfn, thisArg) {
3196 let current = this._tail;
3197 while (current) {
3198 if (thisArg) {
3199 callbackfn.bind(thisArg)(current.value, current.key, this);
3200 }
3201 else {
3202 callbackfn(current.value, current.key, this);
3203 }
3204 current = current.previous;
3205 }
3206 }
3207 values() {
3208 let result = [];
3209 let current = this._head;
3210 while (current) {
3211 result.push(current.value);
3212 current = current.next;
3213 }
3214 return result;
3215 }
3216 keys() {
3217 let result = [];
3218 let current = this._head;
3219 while (current) {
3220 result.push(current.key);
3221 current = current.next;
3222 }
3223 return result;
3224 }
3225 /* JSON RPC run on es5 which has no Symbol.iterator
3226 public keys(): IterableIterator<K> {
3227 let current = this._head;
3228 let iterator: IterableIterator<K> = {
3229 [Symbol.iterator]() {
3230 return iterator;
3231 },
3232 next():IteratorResult<K> {
3233 if (current) {
3234 let result = { value: current.key, done: false };
3235 current = current.next;
3236 return result;
3237 } else {
3238 return { value: undefined, done: true };
3239 }
3240 }
3241 };
3242 return iterator;
3243 }
3244
3245 public values(): IterableIterator<V> {
3246 let current = this._head;
3247 let iterator: IterableIterator<V> = {
3248 [Symbol.iterator]() {
3249 return iterator;
3250 },
3251 next():IteratorResult<V> {
3252 if (current) {
3253 let result = { value: current.value, done: false };
3254 current = current.next;
3255 return result;
3256 } else {
3257 return { value: undefined, done: true };
3258 }
3259 }
3260 };
3261 return iterator;
3262 }
3263 */
3264 addItemFirst(item) {
3265 // First time Insert
3266 if (!this._head && !this._tail) {
3267 this._tail = item;
3268 }
3269 else if (!this._head) {
3270 throw new Error('Invalid list');
3271 }
3272 else {
3273 item.next = this._head;
3274 this._head.previous = item;
3275 }
3276 this._head = item;
3277 }
3278 addItemLast(item) {
3279 // First time Insert
3280 if (!this._head && !this._tail) {
3281 this._head = item;
3282 }
3283 else if (!this._tail) {
3284 throw new Error('Invalid list');
3285 }
3286 else {
3287 item.previous = this._tail;
3288 this._tail.next = item;
3289 }
3290 this._tail = item;
3291 }
3292 removeItem(item) {
3293 if (item === this._head && item === this._tail) {
3294 this._head = undefined;
3295 this._tail = undefined;
3296 }
3297 else if (item === this._head) {
3298 this._head = item.next;
3299 }
3300 else if (item === this._tail) {
3301 this._tail = item.previous;
3302 }
3303 else {
3304 const next = item.next;
3305 const previous = item.previous;
3306 if (!next || !previous) {
3307 throw new Error('Invalid list');
3308 }
3309 next.previous = previous;
3310 previous.next = next;
3311 }
3312 }
3313 touch(item, touch) {
3314 if (!this._head || !this._tail) {
3315 throw new Error('Invalid list');
3316 }
3317 if ((touch !== Touch.First && touch !== Touch.Last)) {
3318 return;
3319 }
3320 if (touch === Touch.First) {
3321 if (item === this._head) {
3322 return;
3323 }
3324 const next = item.next;
3325 const previous = item.previous;
3326 // Unlink the item
3327 if (item === this._tail) {
3328 // previous must be defined since item was not head but is tail
3329 // So there are more than on item in the map
3330 previous.next = undefined;
3331 this._tail = previous;
3332 }
3333 else {
3334 // Both next and previous are not undefined since item was neither head nor tail.
3335 next.previous = previous;
3336 previous.next = next;
3337 }
3338 // Insert the node at head
3339 item.previous = undefined;
3340 item.next = this._head;
3341 this._head.previous = item;
3342 this._head = item;
3343 }
3344 else if (touch === Touch.Last) {
3345 if (item === this._tail) {
3346 return;
3347 }
3348 const next = item.next;
3349 const previous = item.previous;
3350 // Unlink the item.
3351 if (item === this._head) {
3352 // next must be defined since item was not tail but is head
3353 // So there are more than on item in the map
3354 next.previous = undefined;
3355 this._head = next;
3356 }
3357 else {
3358 // Both next and previous are not undefined since item was neither head nor tail.
3359 next.previous = previous;
3360 previous.next = next;
3361 }
3362 item.next = undefined;
3363 item.previous = this._tail;
3364 this._tail.next = item;
3365 this._tail = item;
3366 }
3367 }
3368}
3369exports.LinkedMap = LinkedMap;
3370
3371
3372/***/ }),
3373/* 12 */
3374/***/ (function(module, exports, __webpack_require__) {
3375
3376"use strict";
3377/* --------------------------------------------------------------------------------------------
3378 * Copyright (c) Microsoft Corporation. All rights reserved.
3379 * Licensed under the MIT License. See License.txt in the project root for license information.
3380 * ------------------------------------------------------------------------------------------ */
3381
3382Object.defineProperty(exports, "__esModule", { value: true });
3383const path_1 = __webpack_require__(13);
3384const os_1 = __webpack_require__(14);
3385const crypto_1 = __webpack_require__(15);
3386const net_1 = __webpack_require__(16);
3387const messageReader_1 = __webpack_require__(7);
3388const messageWriter_1 = __webpack_require__(9);
3389function generateRandomPipeName() {
3390 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
3391 if (process.platform === 'win32') {
3392 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
3393 }
3394 else {
3395 // Mac/Unix: use socket file
3396 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
3397 }
3398}
3399exports.generateRandomPipeName = generateRandomPipeName;
3400function createClientPipeTransport(pipeName, encoding = 'utf-8') {
3401 let connectResolve;
3402 let connected = new Promise((resolve, _reject) => {
3403 connectResolve = resolve;
3404 });
3405 return new Promise((resolve, reject) => {
3406 let server = net_1.createServer((socket) => {
3407 server.close();
3408 connectResolve([
3409 new messageReader_1.SocketMessageReader(socket, encoding),
3410 new messageWriter_1.SocketMessageWriter(socket, encoding)
3411 ]);
3412 });
3413 server.on('error', reject);
3414 server.listen(pipeName, () => {
3415 server.removeListener('error', reject);
3416 resolve({
3417 onConnected: () => { return connected; }
3418 });
3419 });
3420 });
3421}
3422exports.createClientPipeTransport = createClientPipeTransport;
3423function createServerPipeTransport(pipeName, encoding = 'utf-8') {
3424 const socket = net_1.createConnection(pipeName);
3425 return [
3426 new messageReader_1.SocketMessageReader(socket, encoding),
3427 new messageWriter_1.SocketMessageWriter(socket, encoding)
3428 ];
3429}
3430exports.createServerPipeTransport = createServerPipeTransport;
3431
3432
3433/***/ }),
3434/* 13 */
3435/***/ (function(module, exports) {
3436
3437module.exports = require("path");
3438
3439/***/ }),
3440/* 14 */
3441/***/ (function(module, exports) {
3442
3443module.exports = require("os");
3444
3445/***/ }),
3446/* 15 */
3447/***/ (function(module, exports) {
3448
3449module.exports = require("crypto");
3450
3451/***/ }),
3452/* 16 */
3453/***/ (function(module, exports) {
3454
3455module.exports = require("net");
3456
3457/***/ }),
3458/* 17 */
3459/***/ (function(module, exports, __webpack_require__) {
3460
3461"use strict";
3462/* --------------------------------------------------------------------------------------------
3463 * Copyright (c) Microsoft Corporation. All rights reserved.
3464 * Licensed under the MIT License. See License.txt in the project root for license information.
3465 * ------------------------------------------------------------------------------------------ */
3466
3467Object.defineProperty(exports, "__esModule", { value: true });
3468const net_1 = __webpack_require__(16);
3469const messageReader_1 = __webpack_require__(7);
3470const messageWriter_1 = __webpack_require__(9);
3471function createClientSocketTransport(port, encoding = 'utf-8') {
3472 let connectResolve;
3473 let connected = new Promise((resolve, _reject) => {
3474 connectResolve = resolve;
3475 });
3476 return new Promise((resolve, reject) => {
3477 let server = net_1.createServer((socket) => {
3478 server.close();
3479 connectResolve([
3480 new messageReader_1.SocketMessageReader(socket, encoding),
3481 new messageWriter_1.SocketMessageWriter(socket, encoding)
3482 ]);
3483 });
3484 server.on('error', reject);
3485 server.listen(port, '127.0.0.1', () => {
3486 server.removeListener('error', reject);
3487 resolve({
3488 onConnected: () => { return connected; }
3489 });
3490 });
3491 });
3492}
3493exports.createClientSocketTransport = createClientSocketTransport;
3494function createServerSocketTransport(port, encoding = 'utf-8') {
3495 const socket = net_1.createConnection(port, '127.0.0.1');
3496 return [
3497 new messageReader_1.SocketMessageReader(socket, encoding),
3498 new messageWriter_1.SocketMessageWriter(socket, encoding)
3499 ];
3500}
3501exports.createServerSocketTransport = createServerSocketTransport;
3502
3503
3504/***/ }),
3505/* 18 */
3506/***/ (function(module, __webpack_exports__, __webpack_require__) {
3507
3508"use strict";
3509__webpack_require__.r(__webpack_exports__);
3510/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
3511/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
3512/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
3513/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
3514/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
3515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
3516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
3517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
3518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
3519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
3520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
3521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
3522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
3523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
3524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
3525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
3526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
3527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
3528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
3529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
3530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
3531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
3532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
3533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
3534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
3535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
3536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
3537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
3538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
3539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
3540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
3541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
3542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
3543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
3544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
3545/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
3546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
3547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
3548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
3549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
3550/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
3551/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
3552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
3553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
3554/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
3555/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
3556/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
3557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
3558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
3559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
3560/* --------------------------------------------------------------------------------------------
3561 * Copyright (c) Microsoft Corporation. All rights reserved.
3562 * Licensed under the MIT License. See License.txt in the project root for license information.
3563 * ------------------------------------------------------------------------------------------ */
3564
3565/**
3566 * The Position namespace provides helper functions to work with
3567 * [Position](#Position) literals.
3568 */
3569var Position;
3570(function (Position) {
3571 /**
3572 * Creates a new Position literal from the given line and character.
3573 * @param line The position's line.
3574 * @param character The position's character.
3575 */
3576 function create(line, character) {
3577 return { line: line, character: character };
3578 }
3579 Position.create = create;
3580 /**
3581 * Checks whether the given liternal conforms to the [Position](#Position) interface.
3582 */
3583 function is(value) {
3584 var candidate = value;
3585 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
3586 }
3587 Position.is = is;
3588})(Position || (Position = {}));
3589/**
3590 * The Range namespace provides helper functions to work with
3591 * [Range](#Range) literals.
3592 */
3593var Range;
3594(function (Range) {
3595 function create(one, two, three, four) {
3596 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
3597 return { start: Position.create(one, two), end: Position.create(three, four) };
3598 }
3599 else if (Position.is(one) && Position.is(two)) {
3600 return { start: one, end: two };
3601 }
3602 else {
3603 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3604 }
3605 }
3606 Range.create = create;
3607 /**
3608 * Checks whether the given literal conforms to the [Range](#Range) interface.
3609 */
3610 function is(value) {
3611 var candidate = value;
3612 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3613 }
3614 Range.is = is;
3615})(Range || (Range = {}));
3616/**
3617 * The Location namespace provides helper functions to work with
3618 * [Location](#Location) literals.
3619 */
3620var Location;
3621(function (Location) {
3622 /**
3623 * Creates a Location literal.
3624 * @param uri The location's uri.
3625 * @param range The location's range.
3626 */
3627 function create(uri, range) {
3628 return { uri: uri, range: range };
3629 }
3630 Location.create = create;
3631 /**
3632 * Checks whether the given literal conforms to the [Location](#Location) interface.
3633 */
3634 function is(value) {
3635 var candidate = value;
3636 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3637 }
3638 Location.is = is;
3639})(Location || (Location = {}));
3640/**
3641 * The LocationLink namespace provides helper functions to work with
3642 * [LocationLink](#LocationLink) literals.
3643 */
3644var LocationLink;
3645(function (LocationLink) {
3646 /**
3647 * Creates a LocationLink literal.
3648 * @param targetUri The definition's uri.
3649 * @param targetRange The full range of the definition.
3650 * @param targetSelectionRange The span of the symbol definition at the target.
3651 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3652 */
3653 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3654 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3655 }
3656 LocationLink.create = create;
3657 /**
3658 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3659 */
3660 function is(value) {
3661 var candidate = value;
3662 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3663 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3664 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3665 }
3666 LocationLink.is = is;
3667})(LocationLink || (LocationLink = {}));
3668/**
3669 * The Color namespace provides helper functions to work with
3670 * [Color](#Color) literals.
3671 */
3672var Color;
3673(function (Color) {
3674 /**
3675 * Creates a new Color literal.
3676 */
3677 function create(red, green, blue, alpha) {
3678 return {
3679 red: red,
3680 green: green,
3681 blue: blue,
3682 alpha: alpha,
3683 };
3684 }
3685 Color.create = create;
3686 /**
3687 * Checks whether the given literal conforms to the [Color](#Color) interface.
3688 */
3689 function is(value) {
3690 var candidate = value;
3691 return Is.number(candidate.red)
3692 && Is.number(candidate.green)
3693 && Is.number(candidate.blue)
3694 && Is.number(candidate.alpha);
3695 }
3696 Color.is = is;
3697})(Color || (Color = {}));
3698/**
3699 * The ColorInformation namespace provides helper functions to work with
3700 * [ColorInformation](#ColorInformation) literals.
3701 */
3702var ColorInformation;
3703(function (ColorInformation) {
3704 /**
3705 * Creates a new ColorInformation literal.
3706 */
3707 function create(range, color) {
3708 return {
3709 range: range,
3710 color: color,
3711 };
3712 }
3713 ColorInformation.create = create;
3714 /**
3715 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3716 */
3717 function is(value) {
3718 var candidate = value;
3719 return Range.is(candidate.range) && Color.is(candidate.color);
3720 }
3721 ColorInformation.is = is;
3722})(ColorInformation || (ColorInformation = {}));
3723/**
3724 * The Color namespace provides helper functions to work with
3725 * [ColorPresentation](#ColorPresentation) literals.
3726 */
3727var ColorPresentation;
3728(function (ColorPresentation) {
3729 /**
3730 * Creates a new ColorInformation literal.
3731 */
3732 function create(label, textEdit, additionalTextEdits) {
3733 return {
3734 label: label,
3735 textEdit: textEdit,
3736 additionalTextEdits: additionalTextEdits,
3737 };
3738 }
3739 ColorPresentation.create = create;
3740 /**
3741 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3742 */
3743 function is(value) {
3744 var candidate = value;
3745 return Is.string(candidate.label)
3746 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3747 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3748 }
3749 ColorPresentation.is = is;
3750})(ColorPresentation || (ColorPresentation = {}));
3751/**
3752 * Enum of known range kinds
3753 */
3754var FoldingRangeKind;
3755(function (FoldingRangeKind) {
3756 /**
3757 * Folding range for a comment
3758 */
3759 FoldingRangeKind["Comment"] = "comment";
3760 /**
3761 * Folding range for a imports or includes
3762 */
3763 FoldingRangeKind["Imports"] = "imports";
3764 /**
3765 * Folding range for a region (e.g. `#region`)
3766 */
3767 FoldingRangeKind["Region"] = "region";
3768})(FoldingRangeKind || (FoldingRangeKind = {}));
3769/**
3770 * The folding range namespace provides helper functions to work with
3771 * [FoldingRange](#FoldingRange) literals.
3772 */
3773var FoldingRange;
3774(function (FoldingRange) {
3775 /**
3776 * Creates a new FoldingRange literal.
3777 */
3778 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3779 var result = {
3780 startLine: startLine,
3781 endLine: endLine
3782 };
3783 if (Is.defined(startCharacter)) {
3784 result.startCharacter = startCharacter;
3785 }
3786 if (Is.defined(endCharacter)) {
3787 result.endCharacter = endCharacter;
3788 }
3789 if (Is.defined(kind)) {
3790 result.kind = kind;
3791 }
3792 return result;
3793 }
3794 FoldingRange.create = create;
3795 /**
3796 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3797 */
3798 function is(value) {
3799 var candidate = value;
3800 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
3801 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
3802 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
3803 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3804 }
3805 FoldingRange.is = is;
3806})(FoldingRange || (FoldingRange = {}));
3807/**
3808 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3809 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3810 */
3811var DiagnosticRelatedInformation;
3812(function (DiagnosticRelatedInformation) {
3813 /**
3814 * Creates a new DiagnosticRelatedInformation literal.
3815 */
3816 function create(location, message) {
3817 return {
3818 location: location,
3819 message: message
3820 };
3821 }
3822 DiagnosticRelatedInformation.create = create;
3823 /**
3824 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3825 */
3826 function is(value) {
3827 var candidate = value;
3828 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3829 }
3830 DiagnosticRelatedInformation.is = is;
3831})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3832/**
3833 * The diagnostic's severity.
3834 */
3835var DiagnosticSeverity;
3836(function (DiagnosticSeverity) {
3837 /**
3838 * Reports an error.
3839 */
3840 DiagnosticSeverity.Error = 1;
3841 /**
3842 * Reports a warning.
3843 */
3844 DiagnosticSeverity.Warning = 2;
3845 /**
3846 * Reports an information.
3847 */
3848 DiagnosticSeverity.Information = 3;
3849 /**
3850 * Reports a hint.
3851 */
3852 DiagnosticSeverity.Hint = 4;
3853})(DiagnosticSeverity || (DiagnosticSeverity = {}));
3854/**
3855 * The diagnostic tags.
3856 *
3857 * @since 3.15.0
3858 */
3859var DiagnosticTag;
3860(function (DiagnosticTag) {
3861 /**
3862 * Unused or unnecessary code.
3863 *
3864 * Clients are allowed to render diagnostics with this tag faded out instead of having
3865 * an error squiggle.
3866 */
3867 DiagnosticTag.Unnecessary = 1;
3868 /**
3869 * Deprecated or obsolete code.
3870 *
3871 * Clients are allowed to rendered diagnostics with this tag strike through.
3872 */
3873 DiagnosticTag.Deprecated = 2;
3874})(DiagnosticTag || (DiagnosticTag = {}));
3875/**
3876 * The Diagnostic namespace provides helper functions to work with
3877 * [Diagnostic](#Diagnostic) literals.
3878 */
3879var Diagnostic;
3880(function (Diagnostic) {
3881 /**
3882 * Creates a new Diagnostic literal.
3883 */
3884 function create(range, message, severity, code, source, relatedInformation) {
3885 var result = { range: range, message: message };
3886 if (Is.defined(severity)) {
3887 result.severity = severity;
3888 }
3889 if (Is.defined(code)) {
3890 result.code = code;
3891 }
3892 if (Is.defined(source)) {
3893 result.source = source;
3894 }
3895 if (Is.defined(relatedInformation)) {
3896 result.relatedInformation = relatedInformation;
3897 }
3898 return result;
3899 }
3900 Diagnostic.create = create;
3901 /**
3902 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3903 */
3904 function is(value) {
3905 var candidate = value;
3906 return Is.defined(candidate)
3907 && Range.is(candidate.range)
3908 && Is.string(candidate.message)
3909 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3910 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3911 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3912 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3913 }
3914 Diagnostic.is = is;
3915})(Diagnostic || (Diagnostic = {}));
3916/**
3917 * The Command namespace provides helper functions to work with
3918 * [Command](#Command) literals.
3919 */
3920var Command;
3921(function (Command) {
3922 /**
3923 * Creates a new Command literal.
3924 */
3925 function create(title, command) {
3926 var args = [];
3927 for (var _i = 2; _i < arguments.length; _i++) {
3928 args[_i - 2] = arguments[_i];
3929 }
3930 var result = { title: title, command: command };
3931 if (Is.defined(args) && args.length > 0) {
3932 result.arguments = args;
3933 }
3934 return result;
3935 }
3936 Command.create = create;
3937 /**
3938 * Checks whether the given literal conforms to the [Command](#Command) interface.
3939 */
3940 function is(value) {
3941 var candidate = value;
3942 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3943 }
3944 Command.is = is;
3945})(Command || (Command = {}));
3946/**
3947 * The TextEdit namespace provides helper function to create replace,
3948 * insert and delete edits more easily.
3949 */
3950var TextEdit;
3951(function (TextEdit) {
3952 /**
3953 * Creates a replace text edit.
3954 * @param range The range of text to be replaced.
3955 * @param newText The new text.
3956 */
3957 function replace(range, newText) {
3958 return { range: range, newText: newText };
3959 }
3960 TextEdit.replace = replace;
3961 /**
3962 * Creates a insert text edit.
3963 * @param position The position to insert the text at.
3964 * @param newText The text to be inserted.
3965 */
3966 function insert(position, newText) {
3967 return { range: { start: position, end: position }, newText: newText };
3968 }
3969 TextEdit.insert = insert;
3970 /**
3971 * Creates a delete text edit.
3972 * @param range The range of text to be deleted.
3973 */
3974 function del(range) {
3975 return { range: range, newText: '' };
3976 }
3977 TextEdit.del = del;
3978 function is(value) {
3979 var candidate = value;
3980 return Is.objectLiteral(candidate)
3981 && Is.string(candidate.newText)
3982 && Range.is(candidate.range);
3983 }
3984 TextEdit.is = is;
3985})(TextEdit || (TextEdit = {}));
3986/**
3987 * The TextDocumentEdit namespace provides helper function to create
3988 * an edit that manipulates a text document.
3989 */
3990var TextDocumentEdit;
3991(function (TextDocumentEdit) {
3992 /**
3993 * Creates a new `TextDocumentEdit`
3994 */
3995 function create(textDocument, edits) {
3996 return { textDocument: textDocument, edits: edits };
3997 }
3998 TextDocumentEdit.create = create;
3999 function is(value) {
4000 var candidate = value;
4001 return Is.defined(candidate)
4002 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
4003 && Array.isArray(candidate.edits);
4004 }
4005 TextDocumentEdit.is = is;
4006})(TextDocumentEdit || (TextDocumentEdit = {}));
4007var CreateFile;
4008(function (CreateFile) {
4009 function create(uri, options) {
4010 var result = {
4011 kind: 'create',
4012 uri: uri
4013 };
4014 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4015 result.options = options;
4016 }
4017 return result;
4018 }
4019 CreateFile.create = create;
4020 function is(value) {
4021 var candidate = value;
4022 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
4023 (candidate.options === void 0 ||
4024 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4025 }
4026 CreateFile.is = is;
4027})(CreateFile || (CreateFile = {}));
4028var RenameFile;
4029(function (RenameFile) {
4030 function create(oldUri, newUri, options) {
4031 var result = {
4032 kind: 'rename',
4033 oldUri: oldUri,
4034 newUri: newUri
4035 };
4036 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4037 result.options = options;
4038 }
4039 return result;
4040 }
4041 RenameFile.create = create;
4042 function is(value) {
4043 var candidate = value;
4044 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
4045 (candidate.options === void 0 ||
4046 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4047 }
4048 RenameFile.is = is;
4049})(RenameFile || (RenameFile = {}));
4050var DeleteFile;
4051(function (DeleteFile) {
4052 function create(uri, options) {
4053 var result = {
4054 kind: 'delete',
4055 uri: uri
4056 };
4057 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
4058 result.options = options;
4059 }
4060 return result;
4061 }
4062 DeleteFile.create = create;
4063 function is(value) {
4064 var candidate = value;
4065 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
4066 (candidate.options === void 0 ||
4067 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
4068 }
4069 DeleteFile.is = is;
4070})(DeleteFile || (DeleteFile = {}));
4071var WorkspaceEdit;
4072(function (WorkspaceEdit) {
4073 function is(value) {
4074 var candidate = value;
4075 return candidate &&
4076 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
4077 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
4078 if (Is.string(change.kind)) {
4079 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
4080 }
4081 else {
4082 return TextDocumentEdit.is(change);
4083 }
4084 }));
4085 }
4086 WorkspaceEdit.is = is;
4087})(WorkspaceEdit || (WorkspaceEdit = {}));
4088var TextEditChangeImpl = /** @class */ (function () {
4089 function TextEditChangeImpl(edits) {
4090 this.edits = edits;
4091 }
4092 TextEditChangeImpl.prototype.insert = function (position, newText) {
4093 this.edits.push(TextEdit.insert(position, newText));
4094 };
4095 TextEditChangeImpl.prototype.replace = function (range, newText) {
4096 this.edits.push(TextEdit.replace(range, newText));
4097 };
4098 TextEditChangeImpl.prototype.delete = function (range) {
4099 this.edits.push(TextEdit.del(range));
4100 };
4101 TextEditChangeImpl.prototype.add = function (edit) {
4102 this.edits.push(edit);
4103 };
4104 TextEditChangeImpl.prototype.all = function () {
4105 return this.edits;
4106 };
4107 TextEditChangeImpl.prototype.clear = function () {
4108 this.edits.splice(0, this.edits.length);
4109 };
4110 return TextEditChangeImpl;
4111}());
4112/**
4113 * A workspace change helps constructing changes to a workspace.
4114 */
4115var WorkspaceChange = /** @class */ (function () {
4116 function WorkspaceChange(workspaceEdit) {
4117 var _this = this;
4118 this._textEditChanges = Object.create(null);
4119 if (workspaceEdit) {
4120 this._workspaceEdit = workspaceEdit;
4121 if (workspaceEdit.documentChanges) {
4122 workspaceEdit.documentChanges.forEach(function (change) {
4123 if (TextDocumentEdit.is(change)) {
4124 var textEditChange = new TextEditChangeImpl(change.edits);
4125 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4126 }
4127 });
4128 }
4129 else if (workspaceEdit.changes) {
4130 Object.keys(workspaceEdit.changes).forEach(function (key) {
4131 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4132 _this._textEditChanges[key] = textEditChange;
4133 });
4134 }
4135 }
4136 }
4137 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4138 /**
4139 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4140 * use to be returned from a workspace edit operation like rename.
4141 */
4142 get: function () {
4143 return this._workspaceEdit;
4144 },
4145 enumerable: true,
4146 configurable: true
4147 });
4148 WorkspaceChange.prototype.getTextEditChange = function (key) {
4149 if (VersionedTextDocumentIdentifier.is(key)) {
4150 if (!this._workspaceEdit) {
4151 this._workspaceEdit = {
4152 documentChanges: []
4153 };
4154 }
4155 if (!this._workspaceEdit.documentChanges) {
4156 throw new Error('Workspace edit is not configured for document changes.');
4157 }
4158 var textDocument = key;
4159 var result = this._textEditChanges[textDocument.uri];
4160 if (!result) {
4161 var edits = [];
4162 var textDocumentEdit = {
4163 textDocument: textDocument,
4164 edits: edits
4165 };
4166 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4167 result = new TextEditChangeImpl(edits);
4168 this._textEditChanges[textDocument.uri] = result;
4169 }
4170 return result;
4171 }
4172 else {
4173 if (!this._workspaceEdit) {
4174 this._workspaceEdit = {
4175 changes: Object.create(null)
4176 };
4177 }
4178 if (!this._workspaceEdit.changes) {
4179 throw new Error('Workspace edit is not configured for normal text edit changes.');
4180 }
4181 var result = this._textEditChanges[key];
4182 if (!result) {
4183 var edits = [];
4184 this._workspaceEdit.changes[key] = edits;
4185 result = new TextEditChangeImpl(edits);
4186 this._textEditChanges[key] = result;
4187 }
4188 return result;
4189 }
4190 };
4191 WorkspaceChange.prototype.createFile = function (uri, options) {
4192 this.checkDocumentChanges();
4193 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4194 };
4195 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4196 this.checkDocumentChanges();
4197 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4198 };
4199 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4200 this.checkDocumentChanges();
4201 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4202 };
4203 WorkspaceChange.prototype.checkDocumentChanges = function () {
4204 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4205 throw new Error('Workspace edit is not configured for document changes.');
4206 }
4207 };
4208 return WorkspaceChange;
4209}());
4210
4211/**
4212 * The TextDocumentIdentifier namespace provides helper functions to work with
4213 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4214 */
4215var TextDocumentIdentifier;
4216(function (TextDocumentIdentifier) {
4217 /**
4218 * Creates a new TextDocumentIdentifier literal.
4219 * @param uri The document's uri.
4220 */
4221 function create(uri) {
4222 return { uri: uri };
4223 }
4224 TextDocumentIdentifier.create = create;
4225 /**
4226 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4227 */
4228 function is(value) {
4229 var candidate = value;
4230 return Is.defined(candidate) && Is.string(candidate.uri);
4231 }
4232 TextDocumentIdentifier.is = is;
4233})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4234/**
4235 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4236 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4237 */
4238var VersionedTextDocumentIdentifier;
4239(function (VersionedTextDocumentIdentifier) {
4240 /**
4241 * Creates a new VersionedTextDocumentIdentifier literal.
4242 * @param uri The document's uri.
4243 * @param uri The document's text.
4244 */
4245 function create(uri, version) {
4246 return { uri: uri, version: version };
4247 }
4248 VersionedTextDocumentIdentifier.create = create;
4249 /**
4250 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4251 */
4252 function is(value) {
4253 var candidate = value;
4254 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4255 }
4256 VersionedTextDocumentIdentifier.is = is;
4257})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4258/**
4259 * The TextDocumentItem namespace provides helper functions to work with
4260 * [TextDocumentItem](#TextDocumentItem) literals.
4261 */
4262var TextDocumentItem;
4263(function (TextDocumentItem) {
4264 /**
4265 * Creates a new TextDocumentItem literal.
4266 * @param uri The document's uri.
4267 * @param languageId The document's language identifier.
4268 * @param version The document's version number.
4269 * @param text The document's text.
4270 */
4271 function create(uri, languageId, version, text) {
4272 return { uri: uri, languageId: languageId, version: version, text: text };
4273 }
4274 TextDocumentItem.create = create;
4275 /**
4276 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4277 */
4278 function is(value) {
4279 var candidate = value;
4280 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4281 }
4282 TextDocumentItem.is = is;
4283})(TextDocumentItem || (TextDocumentItem = {}));
4284/**
4285 * Describes the content type that a client supports in various
4286 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4287 *
4288 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4289 * are reserved for internal usage.
4290 */
4291var MarkupKind;
4292(function (MarkupKind) {
4293 /**
4294 * Plain text is supported as a content format
4295 */
4296 MarkupKind.PlainText = 'plaintext';
4297 /**
4298 * Markdown is supported as a content format
4299 */
4300 MarkupKind.Markdown = 'markdown';
4301})(MarkupKind || (MarkupKind = {}));
4302(function (MarkupKind) {
4303 /**
4304 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4305 */
4306 function is(value) {
4307 var candidate = value;
4308 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4309 }
4310 MarkupKind.is = is;
4311})(MarkupKind || (MarkupKind = {}));
4312var MarkupContent;
4313(function (MarkupContent) {
4314 /**
4315 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4316 */
4317 function is(value) {
4318 var candidate = value;
4319 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4320 }
4321 MarkupContent.is = is;
4322})(MarkupContent || (MarkupContent = {}));
4323/**
4324 * The kind of a completion entry.
4325 */
4326var CompletionItemKind;
4327(function (CompletionItemKind) {
4328 CompletionItemKind.Text = 1;
4329 CompletionItemKind.Method = 2;
4330 CompletionItemKind.Function = 3;
4331 CompletionItemKind.Constructor = 4;
4332 CompletionItemKind.Field = 5;
4333 CompletionItemKind.Variable = 6;
4334 CompletionItemKind.Class = 7;
4335 CompletionItemKind.Interface = 8;
4336 CompletionItemKind.Module = 9;
4337 CompletionItemKind.Property = 10;
4338 CompletionItemKind.Unit = 11;
4339 CompletionItemKind.Value = 12;
4340 CompletionItemKind.Enum = 13;
4341 CompletionItemKind.Keyword = 14;
4342 CompletionItemKind.Snippet = 15;
4343 CompletionItemKind.Color = 16;
4344 CompletionItemKind.File = 17;
4345 CompletionItemKind.Reference = 18;
4346 CompletionItemKind.Folder = 19;
4347 CompletionItemKind.EnumMember = 20;
4348 CompletionItemKind.Constant = 21;
4349 CompletionItemKind.Struct = 22;
4350 CompletionItemKind.Event = 23;
4351 CompletionItemKind.Operator = 24;
4352 CompletionItemKind.TypeParameter = 25;
4353})(CompletionItemKind || (CompletionItemKind = {}));
4354/**
4355 * Defines whether the insert text in a completion item should be interpreted as
4356 * plain text or a snippet.
4357 */
4358var InsertTextFormat;
4359(function (InsertTextFormat) {
4360 /**
4361 * The primary text to be inserted is treated as a plain string.
4362 */
4363 InsertTextFormat.PlainText = 1;
4364 /**
4365 * The primary text to be inserted is treated as a snippet.
4366 *
4367 * A snippet can define tab stops and placeholders with `$1`, `$2`
4368 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4369 * the end of the snippet. Placeholders with equal identifiers are linked,
4370 * that is typing in one will update others too.
4371 *
4372 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
4373 */
4374 InsertTextFormat.Snippet = 2;
4375})(InsertTextFormat || (InsertTextFormat = {}));
4376/**
4377 * Completion item tags are extra annotations that tweak the rendering of a completion
4378 * item.
4379 *
4380 * @since 3.15.0
4381 */
4382var CompletionItemTag;
4383(function (CompletionItemTag) {
4384 /**
4385 * Render a completion as obsolete, usually using a strike-out.
4386 */
4387 CompletionItemTag.Deprecated = 1;
4388})(CompletionItemTag || (CompletionItemTag = {}));
4389/**
4390 * The CompletionItem namespace provides functions to deal with
4391 * completion items.
4392 */
4393var CompletionItem;
4394(function (CompletionItem) {
4395 /**
4396 * Create a completion item and seed it with a label.
4397 * @param label The completion item's label
4398 */
4399 function create(label) {
4400 return { label: label };
4401 }
4402 CompletionItem.create = create;
4403})(CompletionItem || (CompletionItem = {}));
4404/**
4405 * The CompletionList namespace provides functions to deal with
4406 * completion lists.
4407 */
4408var CompletionList;
4409(function (CompletionList) {
4410 /**
4411 * Creates a new completion list.
4412 *
4413 * @param items The completion items.
4414 * @param isIncomplete The list is not complete.
4415 */
4416 function create(items, isIncomplete) {
4417 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4418 }
4419 CompletionList.create = create;
4420})(CompletionList || (CompletionList = {}));
4421var MarkedString;
4422(function (MarkedString) {
4423 /**
4424 * Creates a marked string from plain text.
4425 *
4426 * @param plainText The plain text.
4427 */
4428 function fromPlainText(plainText) {
4429 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4430 }
4431 MarkedString.fromPlainText = fromPlainText;
4432 /**
4433 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4434 */
4435 function is(value) {
4436 var candidate = value;
4437 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4438 }
4439 MarkedString.is = is;
4440})(MarkedString || (MarkedString = {}));
4441var Hover;
4442(function (Hover) {
4443 /**
4444 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4445 */
4446 function is(value) {
4447 var candidate = value;
4448 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4449 MarkedString.is(candidate.contents) ||
4450 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
4451 }
4452 Hover.is = is;
4453})(Hover || (Hover = {}));
4454/**
4455 * The ParameterInformation namespace provides helper functions to work with
4456 * [ParameterInformation](#ParameterInformation) literals.
4457 */
4458var ParameterInformation;
4459(function (ParameterInformation) {
4460 /**
4461 * Creates a new parameter information literal.
4462 *
4463 * @param label A label string.
4464 * @param documentation A doc string.
4465 */
4466 function create(label, documentation) {
4467 return documentation ? { label: label, documentation: documentation } : { label: label };
4468 }
4469 ParameterInformation.create = create;
4470})(ParameterInformation || (ParameterInformation = {}));
4471/**
4472 * The SignatureInformation namespace provides helper functions to work with
4473 * [SignatureInformation](#SignatureInformation) literals.
4474 */
4475var SignatureInformation;
4476(function (SignatureInformation) {
4477 function create(label, documentation) {
4478 var parameters = [];
4479 for (var _i = 2; _i < arguments.length; _i++) {
4480 parameters[_i - 2] = arguments[_i];
4481 }
4482 var result = { label: label };
4483 if (Is.defined(documentation)) {
4484 result.documentation = documentation;
4485 }
4486 if (Is.defined(parameters)) {
4487 result.parameters = parameters;
4488 }
4489 else {
4490 result.parameters = [];
4491 }
4492 return result;
4493 }
4494 SignatureInformation.create = create;
4495})(SignatureInformation || (SignatureInformation = {}));
4496/**
4497 * A document highlight kind.
4498 */
4499var DocumentHighlightKind;
4500(function (DocumentHighlightKind) {
4501 /**
4502 * A textual occurrence.
4503 */
4504 DocumentHighlightKind.Text = 1;
4505 /**
4506 * Read-access of a symbol, like reading a variable.
4507 */
4508 DocumentHighlightKind.Read = 2;
4509 /**
4510 * Write-access of a symbol, like writing to a variable.
4511 */
4512 DocumentHighlightKind.Write = 3;
4513})(DocumentHighlightKind || (DocumentHighlightKind = {}));
4514/**
4515 * DocumentHighlight namespace to provide helper functions to work with
4516 * [DocumentHighlight](#DocumentHighlight) literals.
4517 */
4518var DocumentHighlight;
4519(function (DocumentHighlight) {
4520 /**
4521 * Create a DocumentHighlight object.
4522 * @param range The range the highlight applies to.
4523 */
4524 function create(range, kind) {
4525 var result = { range: range };
4526 if (Is.number(kind)) {
4527 result.kind = kind;
4528 }
4529 return result;
4530 }
4531 DocumentHighlight.create = create;
4532})(DocumentHighlight || (DocumentHighlight = {}));
4533/**
4534 * A symbol kind.
4535 */
4536var SymbolKind;
4537(function (SymbolKind) {
4538 SymbolKind.File = 1;
4539 SymbolKind.Module = 2;
4540 SymbolKind.Namespace = 3;
4541 SymbolKind.Package = 4;
4542 SymbolKind.Class = 5;
4543 SymbolKind.Method = 6;
4544 SymbolKind.Property = 7;
4545 SymbolKind.Field = 8;
4546 SymbolKind.Constructor = 9;
4547 SymbolKind.Enum = 10;
4548 SymbolKind.Interface = 11;
4549 SymbolKind.Function = 12;
4550 SymbolKind.Variable = 13;
4551 SymbolKind.Constant = 14;
4552 SymbolKind.String = 15;
4553 SymbolKind.Number = 16;
4554 SymbolKind.Boolean = 17;
4555 SymbolKind.Array = 18;
4556 SymbolKind.Object = 19;
4557 SymbolKind.Key = 20;
4558 SymbolKind.Null = 21;
4559 SymbolKind.EnumMember = 22;
4560 SymbolKind.Struct = 23;
4561 SymbolKind.Event = 24;
4562 SymbolKind.Operator = 25;
4563 SymbolKind.TypeParameter = 26;
4564})(SymbolKind || (SymbolKind = {}));
4565/**
4566 * Symbol tags are extra annotations that tweak the rendering of a symbol.
4567 * @since 3.15
4568 */
4569var SymbolTag;
4570(function (SymbolTag) {
4571 /**
4572 * Render a symbol as obsolete, usually using a strike-out.
4573 */
4574 SymbolTag.Deprecated = 1;
4575})(SymbolTag || (SymbolTag = {}));
4576var SymbolInformation;
4577(function (SymbolInformation) {
4578 /**
4579 * Creates a new symbol information literal.
4580 *
4581 * @param name The name of the symbol.
4582 * @param kind The kind of the symbol.
4583 * @param range The range of the location of the symbol.
4584 * @param uri The resource of the location of symbol, defaults to the current document.
4585 * @param containerName The name of the symbol containing the symbol.
4586 */
4587 function create(name, kind, range, uri, containerName) {
4588 var result = {
4589 name: name,
4590 kind: kind,
4591 location: { uri: uri, range: range }
4592 };
4593 if (containerName) {
4594 result.containerName = containerName;
4595 }
4596 return result;
4597 }
4598 SymbolInformation.create = create;
4599})(SymbolInformation || (SymbolInformation = {}));
4600var DocumentSymbol;
4601(function (DocumentSymbol) {
4602 /**
4603 * Creates a new symbol information literal.
4604 *
4605 * @param name The name of the symbol.
4606 * @param detail The detail of the symbol.
4607 * @param kind The kind of the symbol.
4608 * @param range The range of the symbol.
4609 * @param selectionRange The selectionRange of the symbol.
4610 * @param children Children of the symbol.
4611 */
4612 function create(name, detail, kind, range, selectionRange, children) {
4613 var result = {
4614 name: name,
4615 detail: detail,
4616 kind: kind,
4617 range: range,
4618 selectionRange: selectionRange
4619 };
4620 if (children !== void 0) {
4621 result.children = children;
4622 }
4623 return result;
4624 }
4625 DocumentSymbol.create = create;
4626 /**
4627 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4628 */
4629 function is(value) {
4630 var candidate = value;
4631 return candidate &&
4632 Is.string(candidate.name) && Is.number(candidate.kind) &&
4633 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4634 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
4635 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
4636 (candidate.children === void 0 || Array.isArray(candidate.children));
4637 }
4638 DocumentSymbol.is = is;
4639})(DocumentSymbol || (DocumentSymbol = {}));
4640/**
4641 * A set of predefined code action kinds
4642 */
4643var CodeActionKind;
4644(function (CodeActionKind) {
4645 /**
4646 * Empty kind.
4647 */
4648 CodeActionKind.Empty = '';
4649 /**
4650 * Base kind for quickfix actions: 'quickfix'
4651 */
4652 CodeActionKind.QuickFix = 'quickfix';
4653 /**
4654 * Base kind for refactoring actions: 'refactor'
4655 */
4656 CodeActionKind.Refactor = 'refactor';
4657 /**
4658 * Base kind for refactoring extraction actions: 'refactor.extract'
4659 *
4660 * Example extract actions:
4661 *
4662 * - Extract method
4663 * - Extract function
4664 * - Extract variable
4665 * - Extract interface from class
4666 * - ...
4667 */
4668 CodeActionKind.RefactorExtract = 'refactor.extract';
4669 /**
4670 * Base kind for refactoring inline actions: 'refactor.inline'
4671 *
4672 * Example inline actions:
4673 *
4674 * - Inline function
4675 * - Inline variable
4676 * - Inline constant
4677 * - ...
4678 */
4679 CodeActionKind.RefactorInline = 'refactor.inline';
4680 /**
4681 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4682 *
4683 * Example rewrite actions:
4684 *
4685 * - Convert JavaScript function to class
4686 * - Add or remove parameter
4687 * - Encapsulate field
4688 * - Make method static
4689 * - Move method to base class
4690 * - ...
4691 */
4692 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4693 /**
4694 * Base kind for source actions: `source`
4695 *
4696 * Source code actions apply to the entire file.
4697 */
4698 CodeActionKind.Source = 'source';
4699 /**
4700 * Base kind for an organize imports source action: `source.organizeImports`
4701 */
4702 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4703 /**
4704 * Base kind for auto-fix source actions: `source.fixAll`.
4705 *
4706 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4707 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4708 *
4709 * @since 3.15.0
4710 */
4711 CodeActionKind.SourceFixAll = 'source.fixAll';
4712})(CodeActionKind || (CodeActionKind = {}));
4713/**
4714 * The CodeActionContext namespace provides helper functions to work with
4715 * [CodeActionContext](#CodeActionContext) literals.
4716 */
4717var CodeActionContext;
4718(function (CodeActionContext) {
4719 /**
4720 * Creates a new CodeActionContext literal.
4721 */
4722 function create(diagnostics, only) {
4723 var result = { diagnostics: diagnostics };
4724 if (only !== void 0 && only !== null) {
4725 result.only = only;
4726 }
4727 return result;
4728 }
4729 CodeActionContext.create = create;
4730 /**
4731 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4732 */
4733 function is(value) {
4734 var candidate = value;
4735 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
4736 }
4737 CodeActionContext.is = is;
4738})(CodeActionContext || (CodeActionContext = {}));
4739var CodeAction;
4740(function (CodeAction) {
4741 function create(title, commandOrEdit, kind) {
4742 var result = { title: title };
4743 if (Command.is(commandOrEdit)) {
4744 result.command = commandOrEdit;
4745 }
4746 else {
4747 result.edit = commandOrEdit;
4748 }
4749 if (kind !== void 0) {
4750 result.kind = kind;
4751 }
4752 return result;
4753 }
4754 CodeAction.create = create;
4755 function is(value) {
4756 var candidate = value;
4757 return candidate && Is.string(candidate.title) &&
4758 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4759 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
4760 (candidate.edit !== void 0 || candidate.command !== void 0) &&
4761 (candidate.command === void 0 || Command.is(candidate.command)) &&
4762 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
4763 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
4764 }
4765 CodeAction.is = is;
4766})(CodeAction || (CodeAction = {}));
4767/**
4768 * The CodeLens namespace provides helper functions to work with
4769 * [CodeLens](#CodeLens) literals.
4770 */
4771var CodeLens;
4772(function (CodeLens) {
4773 /**
4774 * Creates a new CodeLens literal.
4775 */
4776 function create(range, data) {
4777 var result = { range: range };
4778 if (Is.defined(data)) {
4779 result.data = data;
4780 }
4781 return result;
4782 }
4783 CodeLens.create = create;
4784 /**
4785 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4786 */
4787 function is(value) {
4788 var candidate = value;
4789 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4790 }
4791 CodeLens.is = is;
4792})(CodeLens || (CodeLens = {}));
4793/**
4794 * The FormattingOptions namespace provides helper functions to work with
4795 * [FormattingOptions](#FormattingOptions) literals.
4796 */
4797var FormattingOptions;
4798(function (FormattingOptions) {
4799 /**
4800 * Creates a new FormattingOptions literal.
4801 */
4802 function create(tabSize, insertSpaces) {
4803 return { tabSize: tabSize, insertSpaces: insertSpaces };
4804 }
4805 FormattingOptions.create = create;
4806 /**
4807 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4808 */
4809 function is(value) {
4810 var candidate = value;
4811 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4812 }
4813 FormattingOptions.is = is;
4814})(FormattingOptions || (FormattingOptions = {}));
4815/**
4816 * The DocumentLink namespace provides helper functions to work with
4817 * [DocumentLink](#DocumentLink) literals.
4818 */
4819var DocumentLink;
4820(function (DocumentLink) {
4821 /**
4822 * Creates a new DocumentLink literal.
4823 */
4824 function create(range, target, data) {
4825 return { range: range, target: target, data: data };
4826 }
4827 DocumentLink.create = create;
4828 /**
4829 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4830 */
4831 function is(value) {
4832 var candidate = value;
4833 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4834 }
4835 DocumentLink.is = is;
4836})(DocumentLink || (DocumentLink = {}));
4837/**
4838 * The SelectionRange namespace provides helper function to work with
4839 * SelectionRange literals.
4840 */
4841var SelectionRange;
4842(function (SelectionRange) {
4843 /**
4844 * Creates a new SelectionRange
4845 * @param range the range.
4846 * @param parent an optional parent.
4847 */
4848 function create(range, parent) {
4849 return { range: range, parent: parent };
4850 }
4851 SelectionRange.create = create;
4852 function is(value) {
4853 var candidate = value;
4854 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
4855 }
4856 SelectionRange.is = is;
4857})(SelectionRange || (SelectionRange = {}));
4858var EOL = ['\n', '\r\n', '\r'];
4859/**
4860 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
4861 */
4862var TextDocument;
4863(function (TextDocument) {
4864 /**
4865 * Creates a new ITextDocument literal from the given uri and content.
4866 * @param uri The document's uri.
4867 * @param languageId The document's language Id.
4868 * @param content The document's content.
4869 */
4870 function create(uri, languageId, version, content) {
4871 return new FullTextDocument(uri, languageId, version, content);
4872 }
4873 TextDocument.create = create;
4874 /**
4875 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
4876 */
4877 function is(value) {
4878 var candidate = value;
4879 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
4880 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
4881 }
4882 TextDocument.is = is;
4883 function applyEdits(document, edits) {
4884 var text = document.getText();
4885 var sortedEdits = mergeSort(edits, function (a, b) {
4886 var diff = a.range.start.line - b.range.start.line;
4887 if (diff === 0) {
4888 return a.range.start.character - b.range.start.character;
4889 }
4890 return diff;
4891 });
4892 var lastModifiedOffset = text.length;
4893 for (var i = sortedEdits.length - 1; i >= 0; i--) {
4894 var e = sortedEdits[i];
4895 var startOffset = document.offsetAt(e.range.start);
4896 var endOffset = document.offsetAt(e.range.end);
4897 if (endOffset <= lastModifiedOffset) {
4898 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
4899 }
4900 else {
4901 throw new Error('Overlapping edit');
4902 }
4903 lastModifiedOffset = startOffset;
4904 }
4905 return text;
4906 }
4907 TextDocument.applyEdits = applyEdits;
4908 function mergeSort(data, compare) {
4909 if (data.length <= 1) {
4910 // sorted
4911 return data;
4912 }
4913 var p = (data.length / 2) | 0;
4914 var left = data.slice(0, p);
4915 var right = data.slice(p);
4916 mergeSort(left, compare);
4917 mergeSort(right, compare);
4918 var leftIdx = 0;
4919 var rightIdx = 0;
4920 var i = 0;
4921 while (leftIdx < left.length && rightIdx < right.length) {
4922 var ret = compare(left[leftIdx], right[rightIdx]);
4923 if (ret <= 0) {
4924 // smaller_equal -> take left to preserve order
4925 data[i++] = left[leftIdx++];
4926 }
4927 else {
4928 // greater -> take right
4929 data[i++] = right[rightIdx++];
4930 }
4931 }
4932 while (leftIdx < left.length) {
4933 data[i++] = left[leftIdx++];
4934 }
4935 while (rightIdx < right.length) {
4936 data[i++] = right[rightIdx++];
4937 }
4938 return data;
4939 }
4940})(TextDocument || (TextDocument = {}));
4941var FullTextDocument = /** @class */ (function () {
4942 function FullTextDocument(uri, languageId, version, content) {
4943 this._uri = uri;
4944 this._languageId = languageId;
4945 this._version = version;
4946 this._content = content;
4947 this._lineOffsets = undefined;
4948 }
4949 Object.defineProperty(FullTextDocument.prototype, "uri", {
4950 get: function () {
4951 return this._uri;
4952 },
4953 enumerable: true,
4954 configurable: true
4955 });
4956 Object.defineProperty(FullTextDocument.prototype, "languageId", {
4957 get: function () {
4958 return this._languageId;
4959 },
4960 enumerable: true,
4961 configurable: true
4962 });
4963 Object.defineProperty(FullTextDocument.prototype, "version", {
4964 get: function () {
4965 return this._version;
4966 },
4967 enumerable: true,
4968 configurable: true
4969 });
4970 FullTextDocument.prototype.getText = function (range) {
4971 if (range) {
4972 var start = this.offsetAt(range.start);
4973 var end = this.offsetAt(range.end);
4974 return this._content.substring(start, end);
4975 }
4976 return this._content;
4977 };
4978 FullTextDocument.prototype.update = function (event, version) {
4979 this._content = event.text;
4980 this._version = version;
4981 this._lineOffsets = undefined;
4982 };
4983 FullTextDocument.prototype.getLineOffsets = function () {
4984 if (this._lineOffsets === undefined) {
4985 var lineOffsets = [];
4986 var text = this._content;
4987 var isLineStart = true;
4988 for (var i = 0; i < text.length; i++) {
4989 if (isLineStart) {
4990 lineOffsets.push(i);
4991 isLineStart = false;
4992 }
4993 var ch = text.charAt(i);
4994 isLineStart = (ch === '\r' || ch === '\n');
4995 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
4996 i++;
4997 }
4998 }
4999 if (isLineStart && text.length > 0) {
5000 lineOffsets.push(text.length);
5001 }
5002 this._lineOffsets = lineOffsets;
5003 }
5004 return this._lineOffsets;
5005 };
5006 FullTextDocument.prototype.positionAt = function (offset) {
5007 offset = Math.max(Math.min(offset, this._content.length), 0);
5008 var lineOffsets = this.getLineOffsets();
5009 var low = 0, high = lineOffsets.length;
5010 if (high === 0) {
5011 return Position.create(0, offset);
5012 }
5013 while (low < high) {
5014 var mid = Math.floor((low + high) / 2);
5015 if (lineOffsets[mid] > offset) {
5016 high = mid;
5017 }
5018 else {
5019 low = mid + 1;
5020 }
5021 }
5022 // low is the least x for which the line offset is larger than the current offset
5023 // or array.length if no line offset is larger than the current offset
5024 var line = low - 1;
5025 return Position.create(line, offset - lineOffsets[line]);
5026 };
5027 FullTextDocument.prototype.offsetAt = function (position) {
5028 var lineOffsets = this.getLineOffsets();
5029 if (position.line >= lineOffsets.length) {
5030 return this._content.length;
5031 }
5032 else if (position.line < 0) {
5033 return 0;
5034 }
5035 var lineOffset = lineOffsets[position.line];
5036 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
5037 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
5038 };
5039 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
5040 get: function () {
5041 return this.getLineOffsets().length;
5042 },
5043 enumerable: true,
5044 configurable: true
5045 });
5046 return FullTextDocument;
5047}());
5048var Is;
5049(function (Is) {
5050 var toString = Object.prototype.toString;
5051 function defined(value) {
5052 return typeof value !== 'undefined';
5053 }
5054 Is.defined = defined;
5055 function undefined(value) {
5056 return typeof value === 'undefined';
5057 }
5058 Is.undefined = undefined;
5059 function boolean(value) {
5060 return value === true || value === false;
5061 }
5062 Is.boolean = boolean;
5063 function string(value) {
5064 return toString.call(value) === '[object String]';
5065 }
5066 Is.string = string;
5067 function number(value) {
5068 return toString.call(value) === '[object Number]';
5069 }
5070 Is.number = number;
5071 function func(value) {
5072 return toString.call(value) === '[object Function]';
5073 }
5074 Is.func = func;
5075 function objectLiteral(value) {
5076 // Strictly speaking class instances pass this check as well. Since the LSP
5077 // doesn't use classes we ignore this for now. If we do we need to add something
5078 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5079 return value !== null && typeof value === 'object';
5080 }
5081 Is.objectLiteral = objectLiteral;
5082 function typedArray(value, check) {
5083 return Array.isArray(value) && value.every(check);
5084 }
5085 Is.typedArray = typedArray;
5086})(Is || (Is = {}));
5087
5088
5089/***/ }),
5090/* 19 */
5091/***/ (function(module, exports, __webpack_require__) {
5092
5093"use strict";
5094/* --------------------------------------------------------------------------------------------
5095 * Copyright (c) Microsoft Corporation. All rights reserved.
5096 * Licensed under the MIT License. See License.txt in the project root for license information.
5097 * ------------------------------------------------------------------------------------------ */
5098
5099Object.defineProperty(exports, "__esModule", { value: true });
5100const Is = __webpack_require__(20);
5101const vscode_jsonrpc_1 = __webpack_require__(4);
5102const messages_1 = __webpack_require__(21);
5103const protocol_implementation_1 = __webpack_require__(22);
5104exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
5105const protocol_typeDefinition_1 = __webpack_require__(23);
5106exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
5107const protocol_workspaceFolders_1 = __webpack_require__(24);
5108exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
5109exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
5110const protocol_configuration_1 = __webpack_require__(25);
5111exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
5112const protocol_colorProvider_1 = __webpack_require__(26);
5113exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
5114exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
5115const protocol_foldingRange_1 = __webpack_require__(27);
5116exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
5117const protocol_declaration_1 = __webpack_require__(28);
5118exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
5119const protocol_selectionRange_1 = __webpack_require__(29);
5120exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
5121const protocol_progress_1 = __webpack_require__(30);
5122exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
5123exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
5124exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
5125// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5126let __noDynamicImport;
5127/**
5128 * The DocumentFilter namespace provides helper functions to work with
5129 * [DocumentFilter](#DocumentFilter) literals.
5130 */
5131var DocumentFilter;
5132(function (DocumentFilter) {
5133 function is(value) {
5134 const candidate = value;
5135 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5136 }
5137 DocumentFilter.is = is;
5138})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5139/**
5140 * The DocumentSelector namespace provides helper functions to work with
5141 * [DocumentSelector](#DocumentSelector)s.
5142 */
5143var DocumentSelector;
5144(function (DocumentSelector) {
5145 function is(value) {
5146 if (!Array.isArray(value)) {
5147 return false;
5148 }
5149 for (let elem of value) {
5150 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5151 return false;
5152 }
5153 }
5154 return true;
5155 }
5156 DocumentSelector.is = is;
5157})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5158/**
5159 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5160 * handler on the client side.
5161 */
5162var RegistrationRequest;
5163(function (RegistrationRequest) {
5164 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5165})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5166/**
5167 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5168 * handler on the client side.
5169 */
5170var UnregistrationRequest;
5171(function (UnregistrationRequest) {
5172 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5173})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5174var ResourceOperationKind;
5175(function (ResourceOperationKind) {
5176 /**
5177 * Supports creating new files and folders.
5178 */
5179 ResourceOperationKind.Create = 'create';
5180 /**
5181 * Supports renaming existing files and folders.
5182 */
5183 ResourceOperationKind.Rename = 'rename';
5184 /**
5185 * Supports deleting existing files and folders.
5186 */
5187 ResourceOperationKind.Delete = 'delete';
5188})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5189var FailureHandlingKind;
5190(function (FailureHandlingKind) {
5191 /**
5192 * Applying the workspace change is simply aborted if one of the changes provided
5193 * fails. All operations executed before the failing operation stay executed.
5194 */
5195 FailureHandlingKind.Abort = 'abort';
5196 /**
5197 * All operations are executed transactional. That means they either all
5198 * succeed or no changes at all are applied to the workspace.
5199 */
5200 FailureHandlingKind.Transactional = 'transactional';
5201 /**
5202 * If the workspace edit contains only textual file changes they are executed transactional.
5203 * If resource changes (create, rename or delete file) are part of the change the failure
5204 * handling startegy is abort.
5205 */
5206 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5207 /**
5208 * The client tries to undo the operations already executed. But there is no
5209 * guarantee that this is succeeding.
5210 */
5211 FailureHandlingKind.Undo = 'undo';
5212})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5213/**
5214 * The StaticRegistrationOptions namespace provides helper functions to work with
5215 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5216 */
5217var StaticRegistrationOptions;
5218(function (StaticRegistrationOptions) {
5219 function hasId(value) {
5220 const candidate = value;
5221 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5222 }
5223 StaticRegistrationOptions.hasId = hasId;
5224})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5225/**
5226 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5227 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5228 */
5229var TextDocumentRegistrationOptions;
5230(function (TextDocumentRegistrationOptions) {
5231 function is(value) {
5232 const candidate = value;
5233 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5234 }
5235 TextDocumentRegistrationOptions.is = is;
5236})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5237/**
5238 * The WorkDoneProgressOptions namespace provides helper functions to work with
5239 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5240 */
5241var WorkDoneProgressOptions;
5242(function (WorkDoneProgressOptions) {
5243 function is(value) {
5244 const candidate = value;
5245 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5246 }
5247 WorkDoneProgressOptions.is = is;
5248 function hasWorkDoneProgress(value) {
5249 const candidate = value;
5250 return candidate && Is.boolean(candidate.workDoneProgress);
5251 }
5252 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5253})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5254/**
5255 * The initialize request is sent from the client to the server.
5256 * It is sent once as the request after starting up the server.
5257 * The requests parameter is of type [InitializeParams](#InitializeParams)
5258 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5259 * resolves to such.
5260 */
5261var InitializeRequest;
5262(function (InitializeRequest) {
5263 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5264})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5265/**
5266 * Known error codes for an `InitializeError`;
5267 */
5268var InitializeError;
5269(function (InitializeError) {
5270 /**
5271 * If the protocol version provided by the client can't be handled by the server.
5272 * @deprecated This initialize error got replaced by client capabilities. There is
5273 * no version handshake in version 3.0x
5274 */
5275 InitializeError.unknownProtocolVersion = 1;
5276})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5277/**
5278 * The intialized notification is sent from the client to the
5279 * server after the client is fully initialized and the server
5280 * is allowed to send requests from the server to the client.
5281 */
5282var InitializedNotification;
5283(function (InitializedNotification) {
5284 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
5285})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5286//---- Shutdown Method ----
5287/**
5288 * A shutdown request is sent from the client to the server.
5289 * It is sent once when the client decides to shutdown the
5290 * server. The only notification that is sent after a shutdown request
5291 * is the exit event.
5292 */
5293var ShutdownRequest;
5294(function (ShutdownRequest) {
5295 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
5296})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5297//---- Exit Notification ----
5298/**
5299 * The exit event is sent from the client to the server to
5300 * ask the server to exit its process.
5301 */
5302var ExitNotification;
5303(function (ExitNotification) {
5304 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
5305})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5306/**
5307 * The configuration change notification is sent from the client to the server
5308 * when the client's configuration has changed. The notification contains
5309 * the changed configuration as defined by the language client.
5310 */
5311var DidChangeConfigurationNotification;
5312(function (DidChangeConfigurationNotification) {
5313 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
5314})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5315//---- Message show and log notifications ----
5316/**
5317 * The message type
5318 */
5319var MessageType;
5320(function (MessageType) {
5321 /**
5322 * An error message.
5323 */
5324 MessageType.Error = 1;
5325 /**
5326 * A warning message.
5327 */
5328 MessageType.Warning = 2;
5329 /**
5330 * An information message.
5331 */
5332 MessageType.Info = 3;
5333 /**
5334 * A log message.
5335 */
5336 MessageType.Log = 4;
5337})(MessageType = exports.MessageType || (exports.MessageType = {}));
5338/**
5339 * The show message notification is sent from a server to a client to ask
5340 * the client to display a particular message in the user interface.
5341 */
5342var ShowMessageNotification;
5343(function (ShowMessageNotification) {
5344 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
5345})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5346/**
5347 * The show message request is sent from the server to the client to show a message
5348 * and a set of options actions to the user.
5349 */
5350var ShowMessageRequest;
5351(function (ShowMessageRequest) {
5352 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
5353})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5354/**
5355 * The log message notification is sent from the server to the client to ask
5356 * the client to log a particular message.
5357 */
5358var LogMessageNotification;
5359(function (LogMessageNotification) {
5360 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
5361})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5362//---- Telemetry notification
5363/**
5364 * The telemetry event notification is sent from the server to the client to ask
5365 * the client to log telemetry data.
5366 */
5367var TelemetryEventNotification;
5368(function (TelemetryEventNotification) {
5369 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
5370})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5371/**
5372 * Defines how the host (editor) should sync
5373 * document changes to the language server.
5374 */
5375var TextDocumentSyncKind;
5376(function (TextDocumentSyncKind) {
5377 /**
5378 * Documents should not be synced at all.
5379 */
5380 TextDocumentSyncKind.None = 0;
5381 /**
5382 * Documents are synced by always sending the full content
5383 * of the document.
5384 */
5385 TextDocumentSyncKind.Full = 1;
5386 /**
5387 * Documents are synced by sending the full content on open.
5388 * After that only incremental updates to the document are
5389 * send.
5390 */
5391 TextDocumentSyncKind.Incremental = 2;
5392})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5393/**
5394 * The document open notification is sent from the client to the server to signal
5395 * newly opened text documents. The document's truth is now managed by the client
5396 * and the server must not try to read the document's truth using the document's
5397 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5398 * mean that its content is presented in an editor. An open notification must not
5399 * be sent more than once without a corresponding close notification send before.
5400 * This means open and close notification must be balanced and the max open count
5401 * is one.
5402 */
5403var DidOpenTextDocumentNotification;
5404(function (DidOpenTextDocumentNotification) {
5405 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
5406 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
5407})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5408/**
5409 * The document change notification is sent from the client to the server to signal
5410 * changes to a text document.
5411 */
5412var DidChangeTextDocumentNotification;
5413(function (DidChangeTextDocumentNotification) {
5414 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
5415 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
5416})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5417/**
5418 * The document close notification is sent from the client to the server when
5419 * the document got closed in the client. The document's truth now exists where
5420 * the document's uri points to (e.g. if the document's uri is a file uri the
5421 * truth now exists on disk). As with the open notification the close notification
5422 * is about managing the document's content. Receiving a close notification
5423 * doesn't mean that the document was open in an editor before. A close
5424 * notification requires a previous open notification to be sent.
5425 */
5426var DidCloseTextDocumentNotification;
5427(function (DidCloseTextDocumentNotification) {
5428 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
5429 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
5430})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5431/**
5432 * The document save notification is sent from the client to the server when
5433 * the document got saved in the client.
5434 */
5435var DidSaveTextDocumentNotification;
5436(function (DidSaveTextDocumentNotification) {
5437 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
5438 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
5439})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5440/**
5441 * Represents reasons why a text document is saved.
5442 */
5443var TextDocumentSaveReason;
5444(function (TextDocumentSaveReason) {
5445 /**
5446 * Manually triggered, e.g. by the user pressing save, by starting debugging,
5447 * or by an API call.
5448 */
5449 TextDocumentSaveReason.Manual = 1;
5450 /**
5451 * Automatic after a delay.
5452 */
5453 TextDocumentSaveReason.AfterDelay = 2;
5454 /**
5455 * When the editor lost focus.
5456 */
5457 TextDocumentSaveReason.FocusOut = 3;
5458})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
5459/**
5460 * A document will save notification is sent from the client to the server before
5461 * the document is actually saved.
5462 */
5463var WillSaveTextDocumentNotification;
5464(function (WillSaveTextDocumentNotification) {
5465 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
5466 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
5467})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5468/**
5469 * A document will save request is sent from the client to the server before
5470 * the document is actually saved. The request can return an array of TextEdits
5471 * which will be applied to the text document before it is saved. Please note that
5472 * clients might drop results if computing the text edits took too long or if a
5473 * server constantly fails on this request. This is done to keep the save fast and
5474 * reliable.
5475 */
5476var WillSaveTextDocumentWaitUntilRequest;
5477(function (WillSaveTextDocumentWaitUntilRequest) {
5478 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
5479 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
5480})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5481/**
5482 * The watched files notification is sent from the client to the server when
5483 * the client detects changes to file watched by the language client.
5484 */
5485var DidChangeWatchedFilesNotification;
5486(function (DidChangeWatchedFilesNotification) {
5487 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
5488})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5489/**
5490 * The file event type
5491 */
5492var FileChangeType;
5493(function (FileChangeType) {
5494 /**
5495 * The file got created.
5496 */
5497 FileChangeType.Created = 1;
5498 /**
5499 * The file got changed.
5500 */
5501 FileChangeType.Changed = 2;
5502 /**
5503 * The file got deleted.
5504 */
5505 FileChangeType.Deleted = 3;
5506})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5507var WatchKind;
5508(function (WatchKind) {
5509 /**
5510 * Interested in create events.
5511 */
5512 WatchKind.Create = 1;
5513 /**
5514 * Interested in change events
5515 */
5516 WatchKind.Change = 2;
5517 /**
5518 * Interested in delete events
5519 */
5520 WatchKind.Delete = 4;
5521})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5522/**
5523 * Diagnostics notification are sent from the server to the client to signal
5524 * results of validation runs.
5525 */
5526var PublishDiagnosticsNotification;
5527(function (PublishDiagnosticsNotification) {
5528 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
5529})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5530/**
5531 * How a completion was triggered
5532 */
5533var CompletionTriggerKind;
5534(function (CompletionTriggerKind) {
5535 /**
5536 * Completion was triggered by typing an identifier (24x7 code
5537 * complete), manual invocation (e.g Ctrl+Space) or via API.
5538 */
5539 CompletionTriggerKind.Invoked = 1;
5540 /**
5541 * Completion was triggered by a trigger character specified by
5542 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5543 */
5544 CompletionTriggerKind.TriggerCharacter = 2;
5545 /**
5546 * Completion was re-triggered as current completion list is incomplete
5547 */
5548 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5549})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5550/**
5551 * Request to request completion at a given text document position. The request's
5552 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5553 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5554 * or a Thenable that resolves to such.
5555 *
5556 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5557 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5558 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5559 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5560 */
5561var CompletionRequest;
5562(function (CompletionRequest) {
5563 CompletionRequest.method = 'textDocument/completion';
5564 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
5565 /** @deprecated Use CompletionRequest.type */
5566 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5567})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5568/**
5569 * Request to resolve additional information for a given completion item.The request's
5570 * parameter is of type [CompletionItem](#CompletionItem) the response
5571 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5572 */
5573var CompletionResolveRequest;
5574(function (CompletionResolveRequest) {
5575 CompletionResolveRequest.method = 'completionItem/resolve';
5576 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
5577})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5578/**
5579 * Request to request hover information at a given text document position. The request's
5580 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5581 * type [Hover](#Hover) or a Thenable that resolves to such.
5582 */
5583var HoverRequest;
5584(function (HoverRequest) {
5585 HoverRequest.method = 'textDocument/hover';
5586 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
5587})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5588/**
5589 * How a signature help was triggered.
5590 *
5591 * @since 3.15.0
5592 */
5593var SignatureHelpTriggerKind;
5594(function (SignatureHelpTriggerKind) {
5595 /**
5596 * Signature help was invoked manually by the user or by a command.
5597 */
5598 SignatureHelpTriggerKind.Invoked = 1;
5599 /**
5600 * Signature help was triggered by a trigger character.
5601 */
5602 SignatureHelpTriggerKind.TriggerCharacter = 2;
5603 /**
5604 * Signature help was triggered by the cursor moving or by the document content changing.
5605 */
5606 SignatureHelpTriggerKind.ContentChange = 3;
5607})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
5608var SignatureHelpRequest;
5609(function (SignatureHelpRequest) {
5610 SignatureHelpRequest.method = 'textDocument/signatureHelp';
5611 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
5612})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5613/**
5614 * A request to resolve the definition location of a symbol at a given text
5615 * document position. The request's parameter is of type [TextDocumentPosition]
5616 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5617 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5618 * to such.
5619 */
5620var DefinitionRequest;
5621(function (DefinitionRequest) {
5622 DefinitionRequest.method = 'textDocument/definition';
5623 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
5624 /** @deprecated Use DefinitionRequest.type */
5625 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5626})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5627/**
5628 * A request to resolve project-wide references for the symbol denoted
5629 * by the given text document position. The request's parameter is of
5630 * type [ReferenceParams](#ReferenceParams) the response is of type
5631 * [Location[]](#Location) or a Thenable that resolves to such.
5632 */
5633var ReferencesRequest;
5634(function (ReferencesRequest) {
5635 ReferencesRequest.method = 'textDocument/references';
5636 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
5637 /** @deprecated Use ReferencesRequest.type */
5638 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5639})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5640/**
5641 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5642 * text document position. The request's parameter is of type [TextDocumentPosition]
5643 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5644 * (#DocumentHighlight) or a Thenable that resolves to such.
5645 */
5646var DocumentHighlightRequest;
5647(function (DocumentHighlightRequest) {
5648 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
5649 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
5650 /** @deprecated Use DocumentHighlightRequest.type */
5651 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5652})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5653/**
5654 * A request to list all symbols found in a given text document. The request's
5655 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5656 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5657 * that resolves to such.
5658 */
5659var DocumentSymbolRequest;
5660(function (DocumentSymbolRequest) {
5661 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
5662 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
5663 /** @deprecated Use DocumentSymbolRequest.type */
5664 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5665})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5666/**
5667 * A request to provide commands for the given text document and range.
5668 */
5669var CodeActionRequest;
5670(function (CodeActionRequest) {
5671 CodeActionRequest.method = 'textDocument/codeAction';
5672 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
5673 /** @deprecated Use CodeActionRequest.type */
5674 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5675})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5676/**
5677 * A request to list project-wide symbols matching the query string given
5678 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5679 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5680 * resolves to such.
5681 */
5682var WorkspaceSymbolRequest;
5683(function (WorkspaceSymbolRequest) {
5684 WorkspaceSymbolRequest.method = 'workspace/symbol';
5685 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
5686 /** @deprecated Use WorkspaceSymbolRequest.type */
5687 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5688})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5689/**
5690 * A request to provide code lens for the given text document.
5691 */
5692var CodeLensRequest;
5693(function (CodeLensRequest) {
5694 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
5695 /** @deprecated Use CodeLensRequest.type */
5696 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5697})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5698/**
5699 * A request to resolve a command for a given code lens.
5700 */
5701var CodeLensResolveRequest;
5702(function (CodeLensResolveRequest) {
5703 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
5704})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5705/**
5706 * A request to provide document links
5707 */
5708var DocumentLinkRequest;
5709(function (DocumentLinkRequest) {
5710 DocumentLinkRequest.method = 'textDocument/documentLink';
5711 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
5712 /** @deprecated Use DocumentLinkRequest.type */
5713 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5714})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5715/**
5716 * Request to resolve additional information for a given document link. The request's
5717 * parameter is of type [DocumentLink](#DocumentLink) the response
5718 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5719 */
5720var DocumentLinkResolveRequest;
5721(function (DocumentLinkResolveRequest) {
5722 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
5723})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5724/**
5725 * A request to to format a whole document.
5726 */
5727var DocumentFormattingRequest;
5728(function (DocumentFormattingRequest) {
5729 DocumentFormattingRequest.method = 'textDocument/formatting';
5730 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
5731})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5732/**
5733 * A request to to format a range in a document.
5734 */
5735var DocumentRangeFormattingRequest;
5736(function (DocumentRangeFormattingRequest) {
5737 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
5738 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
5739})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5740/**
5741 * A request to format a document on type.
5742 */
5743var DocumentOnTypeFormattingRequest;
5744(function (DocumentOnTypeFormattingRequest) {
5745 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
5746 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
5747})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5748/**
5749 * A request to rename a symbol.
5750 */
5751var RenameRequest;
5752(function (RenameRequest) {
5753 RenameRequest.method = 'textDocument/rename';
5754 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
5755})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
5756/**
5757 * A request to test and perform the setup necessary for a rename.
5758 */
5759var PrepareRenameRequest;
5760(function (PrepareRenameRequest) {
5761 PrepareRenameRequest.method = 'textDocument/prepareRename';
5762 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
5763})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
5764/**
5765 * A request send from the client to the server to execute a command. The request might return
5766 * a workspace edit which the client will apply to the workspace.
5767 */
5768var ExecuteCommandRequest;
5769(function (ExecuteCommandRequest) {
5770 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
5771})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
5772/**
5773 * A request sent from the server to the client to modified certain resources.
5774 */
5775var ApplyWorkspaceEditRequest;
5776(function (ApplyWorkspaceEditRequest) {
5777 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
5778})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
5779
5780
5781/***/ }),
5782/* 20 */
5783/***/ (function(module, exports, __webpack_require__) {
5784
5785"use strict";
5786/* --------------------------------------------------------------------------------------------
5787 * Copyright (c) Microsoft Corporation. All rights reserved.
5788 * Licensed under the MIT License. See License.txt in the project root for license information.
5789 * ------------------------------------------------------------------------------------------ */
5790
5791Object.defineProperty(exports, "__esModule", { value: true });
5792function boolean(value) {
5793 return value === true || value === false;
5794}
5795exports.boolean = boolean;
5796function string(value) {
5797 return typeof value === 'string' || value instanceof String;
5798}
5799exports.string = string;
5800function number(value) {
5801 return typeof value === 'number' || value instanceof Number;
5802}
5803exports.number = number;
5804function error(value) {
5805 return value instanceof Error;
5806}
5807exports.error = error;
5808function func(value) {
5809 return typeof value === 'function';
5810}
5811exports.func = func;
5812function array(value) {
5813 return Array.isArray(value);
5814}
5815exports.array = array;
5816function stringArray(value) {
5817 return array(value) && value.every(elem => string(elem));
5818}
5819exports.stringArray = stringArray;
5820function typedArray(value, check) {
5821 return Array.isArray(value) && value.every(check);
5822}
5823exports.typedArray = typedArray;
5824function objectLiteral(value) {
5825 // Strictly speaking class instances pass this check as well. Since the LSP
5826 // doesn't use classes we ignore this for now. If we do we need to add something
5827 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5828 return value !== null && typeof value === 'object';
5829}
5830exports.objectLiteral = objectLiteral;
5831
5832
5833/***/ }),
5834/* 21 */
5835/***/ (function(module, exports, __webpack_require__) {
5836
5837"use strict";
5838/* --------------------------------------------------------------------------------------------
5839 * Copyright (c) Microsoft Corporation. All rights reserved.
5840 * Licensed under the MIT License. See License.txt in the project root for license information.
5841 * ------------------------------------------------------------------------------------------ */
5842
5843Object.defineProperty(exports, "__esModule", { value: true });
5844const vscode_jsonrpc_1 = __webpack_require__(4);
5845class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5846 constructor(method) {
5847 super(method);
5848 }
5849}
5850exports.ProtocolRequestType0 = ProtocolRequestType0;
5851class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5852 constructor(method) {
5853 super(method);
5854 }
5855}
5856exports.ProtocolRequestType = ProtocolRequestType;
5857class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5858 constructor(method) {
5859 super(method);
5860 }
5861}
5862exports.ProtocolNotificationType = ProtocolNotificationType;
5863class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5864 constructor(method) {
5865 super(method);
5866 }
5867}
5868exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5869
5870
5871/***/ }),
5872/* 22 */
5873/***/ (function(module, exports, __webpack_require__) {
5874
5875"use strict";
5876/* --------------------------------------------------------------------------------------------
5877 * Copyright (c) Microsoft Corporation. All rights reserved.
5878 * Licensed under the MIT License. See License.txt in the project root for license information.
5879 * ------------------------------------------------------------------------------------------ */
5880
5881Object.defineProperty(exports, "__esModule", { value: true });
5882const vscode_jsonrpc_1 = __webpack_require__(4);
5883const messages_1 = __webpack_require__(21);
5884// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5885let __noDynamicImport;
5886/**
5887 * A request to resolve the implementation locations of a symbol at a given text
5888 * document position. The request's parameter is of type [TextDocumentPositioParams]
5889 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5890 * Thenable that resolves to such.
5891 */
5892var ImplementationRequest;
5893(function (ImplementationRequest) {
5894 ImplementationRequest.method = 'textDocument/implementation';
5895 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
5896 /** @deprecated Use ImplementationRequest.type */
5897 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5898})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
5899
5900
5901/***/ }),
5902/* 23 */
5903/***/ (function(module, exports, __webpack_require__) {
5904
5905"use strict";
5906/* --------------------------------------------------------------------------------------------
5907 * Copyright (c) Microsoft Corporation. All rights reserved.
5908 * Licensed under the MIT License. See License.txt in the project root for license information.
5909 * ------------------------------------------------------------------------------------------ */
5910
5911Object.defineProperty(exports, "__esModule", { value: true });
5912const vscode_jsonrpc_1 = __webpack_require__(4);
5913const messages_1 = __webpack_require__(21);
5914// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5915let __noDynamicImport;
5916/**
5917 * A request to resolve the type definition locations of a symbol at a given text
5918 * document position. The request's parameter is of type [TextDocumentPositioParams]
5919 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5920 * Thenable that resolves to such.
5921 */
5922var TypeDefinitionRequest;
5923(function (TypeDefinitionRequest) {
5924 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
5925 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
5926 /** @deprecated Use TypeDefinitionRequest.type */
5927 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5928})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
5929
5930
5931/***/ }),
5932/* 24 */
5933/***/ (function(module, exports, __webpack_require__) {
5934
5935"use strict";
5936/* --------------------------------------------------------------------------------------------
5937 * Copyright (c) Microsoft Corporation. All rights reserved.
5938 * Licensed under the MIT License. See License.txt in the project root for license information.
5939 * ------------------------------------------------------------------------------------------ */
5940
5941Object.defineProperty(exports, "__esModule", { value: true });
5942const messages_1 = __webpack_require__(21);
5943/**
5944 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
5945 */
5946var WorkspaceFoldersRequest;
5947(function (WorkspaceFoldersRequest) {
5948 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
5949})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
5950/**
5951 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
5952 * folder configuration changes.
5953 */
5954var DidChangeWorkspaceFoldersNotification;
5955(function (DidChangeWorkspaceFoldersNotification) {
5956 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
5957})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
5958
5959
5960/***/ }),
5961/* 25 */
5962/***/ (function(module, exports, __webpack_require__) {
5963
5964"use strict";
5965/* --------------------------------------------------------------------------------------------
5966 * Copyright (c) Microsoft Corporation. All rights reserved.
5967 * Licensed under the MIT License. See License.txt in the project root for license information.
5968 * ------------------------------------------------------------------------------------------ */
5969
5970Object.defineProperty(exports, "__esModule", { value: true });
5971const messages_1 = __webpack_require__(21);
5972/**
5973 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
5974 * configuration setting.
5975 *
5976 * This pull model replaces the old push model were the client signaled configuration change via an
5977 * event. If the server still needs to react to configuration changes (since the server caches the
5978 * result of `workspace/configuration` requests) the server should register for an empty configuration
5979 * change event and empty the cache if such an event is received.
5980 */
5981var ConfigurationRequest;
5982(function (ConfigurationRequest) {
5983 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
5984})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
5985
5986
5987/***/ }),
5988/* 26 */
5989/***/ (function(module, exports, __webpack_require__) {
5990
5991"use strict";
5992/* --------------------------------------------------------------------------------------------
5993 * Copyright (c) Microsoft Corporation. All rights reserved.
5994 * Licensed under the MIT License. See License.txt in the project root for license information.
5995 * ------------------------------------------------------------------------------------------ */
5996
5997Object.defineProperty(exports, "__esModule", { value: true });
5998const vscode_jsonrpc_1 = __webpack_require__(4);
5999const messages_1 = __webpack_require__(21);
6000/**
6001 * A request to list all color symbols found in a given text document. The request's
6002 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
6003 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6004 * that resolves to such.
6005 */
6006var DocumentColorRequest;
6007(function (DocumentColorRequest) {
6008 DocumentColorRequest.method = 'textDocument/documentColor';
6009 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
6010 /** @deprecated Use DocumentColorRequest.type */
6011 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6012})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
6013/**
6014 * A request to list all presentation for a color. The request's
6015 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
6016 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6017 * that resolves to such.
6018 */
6019var ColorPresentationRequest;
6020(function (ColorPresentationRequest) {
6021 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
6022})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
6023
6024
6025/***/ }),
6026/* 27 */
6027/***/ (function(module, exports, __webpack_require__) {
6028
6029"use strict";
6030
6031/*---------------------------------------------------------------------------------------------
6032 * Copyright (c) Microsoft Corporation. All rights reserved.
6033 * Licensed under the MIT License. See License.txt in the project root for license information.
6034 *--------------------------------------------------------------------------------------------*/
6035Object.defineProperty(exports, "__esModule", { value: true });
6036const vscode_jsonrpc_1 = __webpack_require__(4);
6037const messages_1 = __webpack_require__(21);
6038/**
6039 * Enum of known range kinds
6040 */
6041var FoldingRangeKind;
6042(function (FoldingRangeKind) {
6043 /**
6044 * Folding range for a comment
6045 */
6046 FoldingRangeKind["Comment"] = "comment";
6047 /**
6048 * Folding range for a imports or includes
6049 */
6050 FoldingRangeKind["Imports"] = "imports";
6051 /**
6052 * Folding range for a region (e.g. `#region`)
6053 */
6054 FoldingRangeKind["Region"] = "region";
6055})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
6056/**
6057 * A request to provide folding ranges in a document. The request's
6058 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
6059 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
6060 * that resolves to such.
6061 */
6062var FoldingRangeRequest;
6063(function (FoldingRangeRequest) {
6064 FoldingRangeRequest.method = 'textDocument/foldingRange';
6065 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
6066 /** @deprecated Use FoldingRangeRequest.type */
6067 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6068})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
6069
6070
6071/***/ }),
6072/* 28 */
6073/***/ (function(module, exports, __webpack_require__) {
6074
6075"use strict";
6076/* --------------------------------------------------------------------------------------------
6077 * Copyright (c) Microsoft Corporation. All rights reserved.
6078 * Licensed under the MIT License. See License.txt in the project root for license information.
6079 * ------------------------------------------------------------------------------------------ */
6080
6081Object.defineProperty(exports, "__esModule", { value: true });
6082const vscode_jsonrpc_1 = __webpack_require__(4);
6083const messages_1 = __webpack_require__(21);
6084// @ts-ignore: to avoid inlining LocatioLink as dynamic import
6085let __noDynamicImport;
6086/**
6087 * A request to resolve the type definition locations of a symbol at a given text
6088 * document position. The request's parameter is of type [TextDocumentPositioParams]
6089 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6090 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6091 * to such.
6092 */
6093var DeclarationRequest;
6094(function (DeclarationRequest) {
6095 DeclarationRequest.method = 'textDocument/declaration';
6096 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6097 /** @deprecated Use DeclarationRequest.type */
6098 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6099})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6100
6101
6102/***/ }),
6103/* 29 */
6104/***/ (function(module, exports, __webpack_require__) {
6105
6106"use strict";
6107
6108/*---------------------------------------------------------------------------------------------
6109 * Copyright (c) Microsoft Corporation. All rights reserved.
6110 * Licensed under the MIT License. See License.txt in the project root for license information.
6111 *--------------------------------------------------------------------------------------------*/
6112Object.defineProperty(exports, "__esModule", { value: true });
6113const vscode_jsonrpc_1 = __webpack_require__(4);
6114const messages_1 = __webpack_require__(21);
6115/**
6116 * A request to provide selection ranges in a document. The request's
6117 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6118 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6119 * that resolves to such.
6120 */
6121var SelectionRangeRequest;
6122(function (SelectionRangeRequest) {
6123 SelectionRangeRequest.method = 'textDocument/selectionRange';
6124 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6125 /** @deprecated Use SelectionRangeRequest.type */
6126 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6127})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6128
6129
6130/***/ }),
6131/* 30 */
6132/***/ (function(module, exports, __webpack_require__) {
6133
6134"use strict";
6135/* --------------------------------------------------------------------------------------------
6136 * Copyright (c) Microsoft Corporation. All rights reserved.
6137 * Licensed under the MIT License. See License.txt in the project root for license information.
6138 * ------------------------------------------------------------------------------------------ */
6139
6140Object.defineProperty(exports, "__esModule", { value: true });
6141const vscode_jsonrpc_1 = __webpack_require__(4);
6142const messages_1 = __webpack_require__(21);
6143var WorkDoneProgress;
6144(function (WorkDoneProgress) {
6145 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6146})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6147/**
6148 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6149 * reporting from the server.
6150 */
6151var WorkDoneProgressCreateRequest;
6152(function (WorkDoneProgressCreateRequest) {
6153 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6154})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6155/**
6156 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6157 * initiated on the server side.
6158 */
6159var WorkDoneProgressCancelNotification;
6160(function (WorkDoneProgressCancelNotification) {
6161 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6162})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6163
6164
6165/***/ }),
6166/* 31 */
6167/***/ (function(module, exports, __webpack_require__) {
6168
6169"use strict";
6170/* --------------------------------------------------------------------------------------------
6171 * Copyright (c) TypeFox and others. All rights reserved.
6172 * Licensed under the MIT License. See License.txt in the project root for license information.
6173 * ------------------------------------------------------------------------------------------ */
6174
6175Object.defineProperty(exports, "__esModule", { value: true });
6176const messages_1 = __webpack_require__(21);
6177/**
6178 * A request to result a `CallHierarchyItem` in a document at a given position.
6179 * Can be used as an input to a incoming or outgoing call hierarchy.
6180 *
6181 * @since 3.16.0 - Proposed state
6182 */
6183var CallHierarchyPrepareRequest;
6184(function (CallHierarchyPrepareRequest) {
6185 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6186 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6187})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6188/**
6189 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6190 *
6191 * @since 3.16.0 - Proposed state
6192 */
6193var CallHierarchyIncomingCallsRequest;
6194(function (CallHierarchyIncomingCallsRequest) {
6195 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6196 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6197})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6198/**
6199 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6200 *
6201 * @since 3.16.0 - Proposed state
6202 */
6203var CallHierarchyOutgoingCallsRequest;
6204(function (CallHierarchyOutgoingCallsRequest) {
6205 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6206 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6207})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6208
6209
6210/***/ }),
6211/* 32 */
6212/***/ (function(module, exports, __webpack_require__) {
6213
6214"use strict";
6215/* --------------------------------------------------------------------------------------------
6216 * Copyright (c) Microsoft Corporation. All rights reserved.
6217 * Licensed under the MIT License. See License.txt in the project root for license information.
6218 * ------------------------------------------------------------------------------------------ */
6219
6220Object.defineProperty(exports, "__esModule", { value: true });
6221const messages_1 = __webpack_require__(21);
6222/**
6223 * A set of predefined token types. This set is not fixed
6224 * an clients can specify additional token types via the
6225 * corresponding client capabilities.
6226 *
6227 * @since 3.16.0 - Proposed state
6228 */
6229var SemanticTokenTypes;
6230(function (SemanticTokenTypes) {
6231 SemanticTokenTypes["comment"] = "comment";
6232 SemanticTokenTypes["keyword"] = "keyword";
6233 SemanticTokenTypes["string"] = "string";
6234 SemanticTokenTypes["number"] = "number";
6235 SemanticTokenTypes["regexp"] = "regexp";
6236 SemanticTokenTypes["operator"] = "operator";
6237 SemanticTokenTypes["namespace"] = "namespace";
6238 SemanticTokenTypes["type"] = "type";
6239 SemanticTokenTypes["struct"] = "struct";
6240 SemanticTokenTypes["class"] = "class";
6241 SemanticTokenTypes["interface"] = "interface";
6242 SemanticTokenTypes["enum"] = "enum";
6243 SemanticTokenTypes["typeParameter"] = "typeParameter";
6244 SemanticTokenTypes["function"] = "function";
6245 SemanticTokenTypes["member"] = "member";
6246 SemanticTokenTypes["property"] = "property";
6247 SemanticTokenTypes["macro"] = "macro";
6248 SemanticTokenTypes["variable"] = "variable";
6249 SemanticTokenTypes["parameter"] = "parameter";
6250 SemanticTokenTypes["label"] = "label";
6251})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6252/**
6253 * A set of predefined token modifiers. This set is not fixed
6254 * an clients can specify additional token types via the
6255 * corresponding client capabilities.
6256 *
6257 * @since 3.16.0 - Proposed state
6258 */
6259var SemanticTokenModifiers;
6260(function (SemanticTokenModifiers) {
6261 SemanticTokenModifiers["documentation"] = "documentation";
6262 SemanticTokenModifiers["declaration"] = "declaration";
6263 SemanticTokenModifiers["definition"] = "definition";
6264 SemanticTokenModifiers["reference"] = "reference";
6265 SemanticTokenModifiers["static"] = "static";
6266 SemanticTokenModifiers["abstract"] = "abstract";
6267 SemanticTokenModifiers["deprecated"] = "deprecated";
6268 SemanticTokenModifiers["async"] = "async";
6269 SemanticTokenModifiers["volatile"] = "volatile";
6270 SemanticTokenModifiers["readonly"] = "readonly";
6271})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6272/**
6273 * @since 3.16.0 - Proposed state
6274 */
6275var SemanticTokens;
6276(function (SemanticTokens) {
6277 function is(value) {
6278 const candidate = value;
6279 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6280 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6281 }
6282 SemanticTokens.is = is;
6283})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6284/**
6285 * @since 3.16.0 - Proposed state
6286 */
6287var SemanticTokensRequest;
6288(function (SemanticTokensRequest) {
6289 SemanticTokensRequest.method = 'textDocument/semanticTokens';
6290 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
6291})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
6292/**
6293 * @since 3.16.0 - Proposed state
6294 */
6295var SemanticTokensEditsRequest;
6296(function (SemanticTokensEditsRequest) {
6297 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
6298 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
6299})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
6300/**
6301 * @since 3.16.0 - Proposed state
6302 */
6303var SemanticTokensRangeRequest;
6304(function (SemanticTokensRangeRequest) {
6305 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
6306 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
6307})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
6308
6309
6310/***/ }),
6311/* 33 */
6312/***/ (function(module, exports, __webpack_require__) {
6313
6314"use strict";
6315/* --------------------------------------------------------------------------------------------
6316 * Copyright (c) Microsoft Corporation. All rights reserved.
6317 * Licensed under the MIT License. See License.txt in the project root for license information.
6318 * ------------------------------------------------------------------------------------------ */
6319
6320Object.defineProperty(exports, "__esModule", { value: true });
6321const vscode_languageserver_protocol_1 = __webpack_require__(3);
6322const Is = __webpack_require__(34);
6323exports.ConfigurationFeature = (Base) => {
6324 return class extends Base {
6325 getConfiguration(arg) {
6326 if (!arg) {
6327 return this._getConfiguration({});
6328 }
6329 else if (Is.string(arg)) {
6330 return this._getConfiguration({ section: arg });
6331 }
6332 else {
6333 return this._getConfiguration(arg);
6334 }
6335 }
6336 _getConfiguration(arg) {
6337 let params = {
6338 items: Array.isArray(arg) ? arg : [arg]
6339 };
6340 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
6341 return Array.isArray(arg) ? result : result[0];
6342 });
6343 }
6344 };
6345};
6346//# sourceMappingURL=configuration.js.map
6347
6348/***/ }),
6349/* 34 */
6350/***/ (function(module, exports, __webpack_require__) {
6351
6352"use strict";
6353/* --------------------------------------------------------------------------------------------
6354 * Copyright (c) Microsoft Corporation. All rights reserved.
6355 * Licensed under the MIT License. See License.txt in the project root for license information.
6356 * ------------------------------------------------------------------------------------------ */
6357
6358Object.defineProperty(exports, "__esModule", { value: true });
6359function boolean(value) {
6360 return value === true || value === false;
6361}
6362exports.boolean = boolean;
6363function string(value) {
6364 return typeof value === 'string' || value instanceof String;
6365}
6366exports.string = string;
6367function number(value) {
6368 return typeof value === 'number' || value instanceof Number;
6369}
6370exports.number = number;
6371function error(value) {
6372 return value instanceof Error;
6373}
6374exports.error = error;
6375function func(value) {
6376 return typeof value === 'function';
6377}
6378exports.func = func;
6379function array(value) {
6380 return Array.isArray(value);
6381}
6382exports.array = array;
6383function stringArray(value) {
6384 return array(value) && value.every(elem => string(elem));
6385}
6386exports.stringArray = stringArray;
6387function typedArray(value, check) {
6388 return Array.isArray(value) && value.every(check);
6389}
6390exports.typedArray = typedArray;
6391function thenable(value) {
6392 return value && func(value.then);
6393}
6394exports.thenable = thenable;
6395//# sourceMappingURL=is.js.map
6396
6397/***/ }),
6398/* 35 */
6399/***/ (function(module, exports, __webpack_require__) {
6400
6401"use strict";
6402/* --------------------------------------------------------------------------------------------
6403 * Copyright (c) Microsoft Corporation. All rights reserved.
6404 * Licensed under the MIT License. See License.txt in the project root for license information.
6405 * ------------------------------------------------------------------------------------------ */
6406
6407Object.defineProperty(exports, "__esModule", { value: true });
6408const vscode_languageserver_protocol_1 = __webpack_require__(3);
6409exports.WorkspaceFoldersFeature = (Base) => {
6410 return class extends Base {
6411 initialize(capabilities) {
6412 let workspaceCapabilities = capabilities.workspace;
6413 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
6414 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
6415 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
6416 this._onDidChangeWorkspaceFolders.fire(params.event);
6417 });
6418 }
6419 }
6420 getWorkspaceFolders() {
6421 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
6422 }
6423 get onDidChangeWorkspaceFolders() {
6424 if (!this._onDidChangeWorkspaceFolders) {
6425 throw new Error('Client doesn\'t support sending workspace folder change events.');
6426 }
6427 if (!this._unregistration) {
6428 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
6429 }
6430 return this._onDidChangeWorkspaceFolders.event;
6431 }
6432 };
6433};
6434//# sourceMappingURL=workspaceFolders.js.map
6435
6436/***/ }),
6437/* 36 */
6438/***/ (function(module, exports, __webpack_require__) {
6439
6440"use strict";
6441/* --------------------------------------------------------------------------------------------
6442 * Copyright (c) Microsoft Corporation. All rights reserved.
6443 * Licensed under the MIT License. See License.txt in the project root for license information.
6444 * ------------------------------------------------------------------------------------------ */
6445
6446Object.defineProperty(exports, "__esModule", { value: true });
6447const vscode_languageserver_protocol_1 = __webpack_require__(3);
6448const uuid_1 = __webpack_require__(37);
6449class WorkDoneProgressImpl {
6450 constructor(_connection, _token) {
6451 this._connection = _connection;
6452 this._token = _token;
6453 WorkDoneProgressImpl.Instances.set(this._token, this);
6454 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6455 }
6456 get token() {
6457 return this._source.token;
6458 }
6459 begin(title, percentage, message, cancellable) {
6460 let param = {
6461 kind: 'begin',
6462 title,
6463 percentage,
6464 message,
6465 cancellable
6466 };
6467 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6468 }
6469 report(arg0, arg1) {
6470 let param = {
6471 kind: 'report'
6472 };
6473 if (typeof arg0 === 'number') {
6474 param.percentage = arg0;
6475 if (arg1 !== undefined) {
6476 param.message = arg1;
6477 }
6478 }
6479 else {
6480 param.message = arg0;
6481 }
6482 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6483 }
6484 done() {
6485 WorkDoneProgressImpl.Instances.delete(this._token);
6486 this._source.dispose();
6487 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
6488 }
6489 cancel() {
6490 this._source.cancel();
6491 }
6492}
6493WorkDoneProgressImpl.Instances = new Map();
6494class NullProgress {
6495 constructor() {
6496 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6497 }
6498 get token() {
6499 return this._source.token;
6500 }
6501 begin() {
6502 }
6503 report() {
6504 }
6505 done() {
6506 }
6507}
6508function attachWorkDone(connection, params) {
6509 if (params === undefined || params.workDoneToken === undefined) {
6510 return new NullProgress();
6511 }
6512 const token = params.workDoneToken;
6513 delete params.workDoneToken;
6514 return new WorkDoneProgressImpl(connection, token);
6515}
6516exports.attachWorkDone = attachWorkDone;
6517exports.ProgressFeature = (Base) => {
6518 return class extends Base {
6519 initialize(capabilities) {
6520 var _a;
6521 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
6522 this._progressSupported = true;
6523 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
6524 let progress = WorkDoneProgressImpl.Instances.get(params.token);
6525 if (progress !== undefined) {
6526 progress.cancel();
6527 }
6528 });
6529 }
6530 }
6531 attachWorkDoneProgress(token) {
6532 if (token === undefined) {
6533 return new NullProgress();
6534 }
6535 else {
6536 return new WorkDoneProgressImpl(this.connection, token);
6537 }
6538 }
6539 createWorkDoneProgress() {
6540 if (this._progressSupported) {
6541 const token = uuid_1.generateUuid();
6542 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
6543 const result = new WorkDoneProgressImpl(this.connection, token);
6544 return result;
6545 });
6546 }
6547 else {
6548 return Promise.resolve(new NullProgress());
6549 }
6550 }
6551 };
6552};
6553var ResultProgress;
6554(function (ResultProgress) {
6555 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
6556})(ResultProgress || (ResultProgress = {}));
6557class ResultProgressImpl {
6558 constructor(_connection, _token) {
6559 this._connection = _connection;
6560 this._token = _token;
6561 }
6562 report(data) {
6563 this._connection.sendProgress(ResultProgress.type, this._token, data);
6564 }
6565}
6566function attachPartialResult(connection, params) {
6567 if (params === undefined || params.partialResultToken === undefined) {
6568 return undefined;
6569 }
6570 const token = params.partialResultToken;
6571 delete params.partialResultToken;
6572 return new ResultProgressImpl(connection, token);
6573}
6574exports.attachPartialResult = attachPartialResult;
6575//# sourceMappingURL=progress.js.map
6576
6577/***/ }),
6578/* 37 */
6579/***/ (function(module, exports, __webpack_require__) {
6580
6581"use strict";
6582/*---------------------------------------------------------------------------------------------
6583 * Copyright (c) Microsoft Corporation. All rights reserved.
6584 * Licensed under the MIT License. See License.txt in the project root for license information.
6585 *--------------------------------------------------------------------------------------------*/
6586
6587Object.defineProperty(exports, "__esModule", { value: true });
6588class ValueUUID {
6589 constructor(_value) {
6590 this._value = _value;
6591 // empty
6592 }
6593 asHex() {
6594 return this._value;
6595 }
6596 equals(other) {
6597 return this.asHex() === other.asHex();
6598 }
6599}
6600class V4UUID extends ValueUUID {
6601 constructor() {
6602 super([
6603 V4UUID._randomHex(),
6604 V4UUID._randomHex(),
6605 V4UUID._randomHex(),
6606 V4UUID._randomHex(),
6607 V4UUID._randomHex(),
6608 V4UUID._randomHex(),
6609 V4UUID._randomHex(),
6610 V4UUID._randomHex(),
6611 '-',
6612 V4UUID._randomHex(),
6613 V4UUID._randomHex(),
6614 V4UUID._randomHex(),
6615 V4UUID._randomHex(),
6616 '-',
6617 '4',
6618 V4UUID._randomHex(),
6619 V4UUID._randomHex(),
6620 V4UUID._randomHex(),
6621 '-',
6622 V4UUID._oneOf(V4UUID._timeHighBits),
6623 V4UUID._randomHex(),
6624 V4UUID._randomHex(),
6625 V4UUID._randomHex(),
6626 '-',
6627 V4UUID._randomHex(),
6628 V4UUID._randomHex(),
6629 V4UUID._randomHex(),
6630 V4UUID._randomHex(),
6631 V4UUID._randomHex(),
6632 V4UUID._randomHex(),
6633 V4UUID._randomHex(),
6634 V4UUID._randomHex(),
6635 V4UUID._randomHex(),
6636 V4UUID._randomHex(),
6637 V4UUID._randomHex(),
6638 V4UUID._randomHex(),
6639 ].join(''));
6640 }
6641 static _oneOf(array) {
6642 return array[Math.floor(array.length * Math.random())];
6643 }
6644 static _randomHex() {
6645 return V4UUID._oneOf(V4UUID._chars);
6646 }
6647}
6648V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
6649V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
6650/**
6651 * An empty UUID that contains only zeros.
6652 */
6653exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
6654function v4() {
6655 return new V4UUID();
6656}
6657exports.v4 = v4;
6658const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6659function isUUID(value) {
6660 return _UUIDPattern.test(value);
6661}
6662exports.isUUID = isUUID;
6663/**
6664 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
6665 * @param value A uuid string.
6666 */
6667function parse(value) {
6668 if (!isUUID(value)) {
6669 throw new Error('invalid uuid');
6670 }
6671 return new ValueUUID(value);
6672}
6673exports.parse = parse;
6674function generateUuid() {
6675 return v4().asHex();
6676}
6677exports.generateUuid = generateUuid;
6678//# sourceMappingURL=uuid.js.map
6679
6680/***/ }),
6681/* 38 */
6682/***/ (function(module, exports, __webpack_require__) {
6683
6684"use strict";
6685/* --------------------------------------------------------------------------------------------
6686 * Copyright (c) Microsoft Corporation. All rights reserved.
6687 * Licensed under the MIT License. See License.txt in the project root for license information.
6688 * ------------------------------------------------------------------------------------------ */
6689
6690Object.defineProperty(exports, "__esModule", { value: true });
6691const url = __webpack_require__(39);
6692const path = __webpack_require__(13);
6693const fs = __webpack_require__(40);
6694const child_process_1 = __webpack_require__(41);
6695/**
6696 * @deprecated Use the `vscode-uri` npm module which provides a more
6697 * complete implementation of handling VS Code URIs.
6698 */
6699function uriToFilePath(uri) {
6700 let parsed = url.parse(uri);
6701 if (parsed.protocol !== 'file:' || !parsed.path) {
6702 return undefined;
6703 }
6704 let segments = parsed.path.split('/');
6705 for (var i = 0, len = segments.length; i < len; i++) {
6706 segments[i] = decodeURIComponent(segments[i]);
6707 }
6708 if (process.platform === 'win32' && segments.length > 1) {
6709 let first = segments[0];
6710 let second = segments[1];
6711 // Do we have a drive letter and we started with a / which is the
6712 // case if the first segement is empty (see split above)
6713 if (first.length === 0 && second.length > 1 && second[1] === ':') {
6714 // Remove first slash
6715 segments.shift();
6716 }
6717 }
6718 return path.normalize(segments.join('/'));
6719}
6720exports.uriToFilePath = uriToFilePath;
6721function isWindows() {
6722 return process.platform === 'win32';
6723}
6724function resolve(moduleName, nodePath, cwd, tracer) {
6725 const nodePathKey = 'NODE_PATH';
6726 const app = [
6727 'var p = process;',
6728 'p.on(\'message\',function(m){',
6729 'if(m.c===\'e\'){',
6730 'p.exit(0);',
6731 '}',
6732 'else if(m.c===\'rs\'){',
6733 'try{',
6734 'var r=require.resolve(m.a);',
6735 'p.send({c:\'r\',s:true,r:r});',
6736 '}',
6737 'catch(err){',
6738 'p.send({c:\'r\',s:false});',
6739 '}',
6740 '}',
6741 '});'
6742 ].join('');
6743 return new Promise((resolve, reject) => {
6744 let env = process.env;
6745 let newEnv = Object.create(null);
6746 Object.keys(env).forEach(key => newEnv[key] = env[key]);
6747 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
6748 if (newEnv[nodePathKey]) {
6749 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
6750 }
6751 else {
6752 newEnv[nodePathKey] = nodePath;
6753 }
6754 if (tracer) {
6755 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
6756 }
6757 }
6758 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6759 try {
6760 let cp = child_process_1.fork('', [], {
6761 cwd: cwd,
6762 env: newEnv,
6763 execArgv: ['-e', app]
6764 });
6765 if (cp.pid === void 0) {
6766 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6767 return;
6768 }
6769 cp.on('error', (error) => {
6770 reject(error);
6771 });
6772 cp.on('message', (message) => {
6773 if (message.c === 'r') {
6774 cp.send({ c: 'e' });
6775 if (message.s) {
6776 resolve(message.r);
6777 }
6778 else {
6779 reject(new Error(`Failed to resolve module: ${moduleName}`));
6780 }
6781 }
6782 });
6783 let message = {
6784 c: 'rs',
6785 a: moduleName
6786 };
6787 cp.send(message);
6788 }
6789 catch (error) {
6790 reject(error);
6791 }
6792 });
6793}
6794exports.resolve = resolve;
6795/**
6796 * Resolve the global npm package path.
6797 * @deprecated Since this depends on the used package manager and their version the best is that servers
6798 * implement this themselves since they know best what kind of package managers to support.
6799 * @param tracer the tracer to use
6800 */
6801function resolveGlobalNodePath(tracer) {
6802 let npmCommand = 'npm';
6803 const env = Object.create(null);
6804 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
6805 env['NO_UPDATE_NOTIFIER'] = 'true';
6806 const options = {
6807 encoding: 'utf8',
6808 env
6809 };
6810 if (isWindows()) {
6811 npmCommand = 'npm.cmd';
6812 options.shell = true;
6813 }
6814 let handler = () => { };
6815 try {
6816 process.on('SIGPIPE', handler);
6817 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
6818 if (!stdout) {
6819 if (tracer) {
6820 tracer(`'npm config get prefix' didn't return a value.`);
6821 }
6822 return undefined;
6823 }
6824 let prefix = stdout.trim();
6825 if (tracer) {
6826 tracer(`'npm config get prefix' value is: ${prefix}`);
6827 }
6828 if (prefix.length > 0) {
6829 if (isWindows()) {
6830 return path.join(prefix, 'node_modules');
6831 }
6832 else {
6833 return path.join(prefix, 'lib', 'node_modules');
6834 }
6835 }
6836 return undefined;
6837 }
6838 catch (err) {
6839 return undefined;
6840 }
6841 finally {
6842 process.removeListener('SIGPIPE', handler);
6843 }
6844}
6845exports.resolveGlobalNodePath = resolveGlobalNodePath;
6846/*
6847 * Resolve the global yarn pakage path.
6848 * @deprecated Since this depends on the used package manager and their version the best is that servers
6849 * implement this themselves since they know best what kind of package managers to support.
6850 * @param tracer the tracer to use
6851 */
6852function resolveGlobalYarnPath(tracer) {
6853 let yarnCommand = 'yarn';
6854 let options = {
6855 encoding: 'utf8'
6856 };
6857 if (isWindows()) {
6858 yarnCommand = 'yarn.cmd';
6859 options.shell = true;
6860 }
6861 let handler = () => { };
6862 try {
6863 process.on('SIGPIPE', handler);
6864 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
6865 let stdout = results.stdout;
6866 if (!stdout) {
6867 if (tracer) {
6868 tracer(`'yarn global dir' didn't return a value.`);
6869 if (results.stderr) {
6870 tracer(results.stderr);
6871 }
6872 }
6873 return undefined;
6874 }
6875 let lines = stdout.trim().split(/\r?\n/);
6876 for (let line of lines) {
6877 try {
6878 let yarn = JSON.parse(line);
6879 if (yarn.type === 'log') {
6880 return path.join(yarn.data, 'node_modules');
6881 }
6882 }
6883 catch (e) {
6884 // Do nothing. Ignore the line
6885 }
6886 }
6887 return undefined;
6888 }
6889 catch (err) {
6890 return undefined;
6891 }
6892 finally {
6893 process.removeListener('SIGPIPE', handler);
6894 }
6895}
6896exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
6897var FileSystem;
6898(function (FileSystem) {
6899 let _isCaseSensitive = undefined;
6900 function isCaseSensitive() {
6901 if (_isCaseSensitive !== void 0) {
6902 return _isCaseSensitive;
6903 }
6904 if (process.platform === 'win32') {
6905 _isCaseSensitive = false;
6906 }
6907 else {
6908 // convert current file name to upper case / lower case and check if file exists
6909 // (guards against cases when name is already all uppercase or lowercase)
6910 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
6911 }
6912 return _isCaseSensitive;
6913 }
6914 FileSystem.isCaseSensitive = isCaseSensitive;
6915 function isParent(parent, child) {
6916 if (isCaseSensitive()) {
6917 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
6918 }
6919 else {
6920 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
6921 }
6922 }
6923 FileSystem.isParent = isParent;
6924})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
6925function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
6926 if (nodePath) {
6927 if (!path.isAbsolute(nodePath)) {
6928 nodePath = path.join(workspaceRoot, nodePath);
6929 }
6930 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
6931 if (FileSystem.isParent(nodePath, value)) {
6932 return value;
6933 }
6934 else {
6935 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
6936 }
6937 }).then(undefined, (_error) => {
6938 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6939 });
6940 }
6941 else {
6942 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6943 }
6944}
6945exports.resolveModulePath = resolveModulePath;
6946//# sourceMappingURL=files.js.map
6947
6948/***/ }),
6949/* 39 */
6950/***/ (function(module, exports) {
6951
6952module.exports = require("url");
6953
6954/***/ }),
6955/* 40 */
6956/***/ (function(module, exports) {
6957
6958module.exports = require("fs");
6959
6960/***/ }),
6961/* 41 */
6962/***/ (function(module, exports) {
6963
6964module.exports = require("child_process");
6965
6966/***/ }),
6967/* 42 */
6968/***/ (function(module, exports, __webpack_require__) {
6969
6970"use strict";
6971/* --------------------------------------------------------------------------------------------
6972 * Copyright (c) Microsoft Corporation. All rights reserved.
6973 * Licensed under the MIT License. See License.txt in the project root for license information.
6974 * ------------------------------------------------------------------------------------------ */
6975
6976Object.defineProperty(exports, "__esModule", { value: true });
6977const vscode_languageserver_protocol_1 = __webpack_require__(3);
6978exports.CallHierarchyFeature = (Base) => {
6979 return class extends Base {
6980 get callHierarchy() {
6981 return {
6982 onPrepare: (handler) => {
6983 this.connection.onRequest(vscode_languageserver_protocol_1.Proposed.CallHierarchyPrepareRequest.type, (params, cancel) => {
6984 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
6985 });
6986 },
6987 onIncomingCalls: (handler) => {
6988 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyIncomingCallsRequest.type;
6989 this.connection.onRequest(type, (params, cancel) => {
6990 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6991 });
6992 },
6993 onOutgoingCalls: (handler) => {
6994 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyOutgoingCallsRequest.type;
6995 this.connection.onRequest(type, (params, cancel) => {
6996 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6997 });
6998 }
6999 };
7000 }
7001 };
7002};
7003//# sourceMappingURL=callHierarchy.proposed.js.map
7004
7005/***/ }),
7006/* 43 */
7007/***/ (function(module, exports, __webpack_require__) {
7008
7009"use strict";
7010/* --------------------------------------------------------------------------------------------
7011 * Copyright (c) Microsoft Corporation. All rights reserved.
7012 * Licensed under the MIT License. See License.txt in the project root for license information.
7013 * ------------------------------------------------------------------------------------------ */
7014
7015Object.defineProperty(exports, "__esModule", { value: true });
7016const vscode_languageserver_protocol_1 = __webpack_require__(3);
7017exports.SemanticTokensFeature = (Base) => {
7018 return class extends Base {
7019 get semanticTokens() {
7020 return {
7021 on: (handler) => {
7022 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
7023 this.connection.onRequest(type, (params, cancel) => {
7024 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7025 });
7026 },
7027 onEdits: (handler) => {
7028 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
7029 this.connection.onRequest(type, (params, cancel) => {
7030 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7031 });
7032 },
7033 onRange: (handler) => {
7034 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
7035 this.connection.onRequest(type, (params, cancel) => {
7036 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7037 });
7038 }
7039 };
7040 }
7041 };
7042};
7043class SemanticTokensBuilder {
7044 constructor() {
7045 this._prevData = undefined;
7046 this.initialize();
7047 }
7048 initialize() {
7049 this._id = Date.now();
7050 this._prevLine = 0;
7051 this._prevChar = 0;
7052 this._data = [];
7053 this._dataLen = 0;
7054 }
7055 push(line, char, length, tokenType, tokenModifiers) {
7056 let pushLine = line;
7057 let pushChar = char;
7058 if (this._dataLen > 0) {
7059 pushLine -= this._prevLine;
7060 if (pushLine === 0) {
7061 pushChar -= this._prevChar;
7062 }
7063 }
7064 this._data[this._dataLen++] = pushLine;
7065 this._data[this._dataLen++] = pushChar;
7066 this._data[this._dataLen++] = length;
7067 this._data[this._dataLen++] = tokenType;
7068 this._data[this._dataLen++] = tokenModifiers;
7069 this._prevLine = line;
7070 this._prevChar = char;
7071 }
7072 get id() {
7073 return this._id.toString();
7074 }
7075 previousResult(id) {
7076 if (this.id === id) {
7077 this._prevData = this._data;
7078 }
7079 this.initialize();
7080 }
7081 build() {
7082 this._prevData = undefined;
7083 return {
7084 resultId: this.id,
7085 data: this._data
7086 };
7087 }
7088 canBuildEdits() {
7089 return this._prevData !== undefined;
7090 }
7091 buildEdits() {
7092 if (this._prevData !== undefined) {
7093 const prevDataLength = this._prevData.length;
7094 const dataLength = this._data.length;
7095 let startIndex = 0;
7096 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
7097 startIndex++;
7098 }
7099 if (startIndex < dataLength && startIndex < prevDataLength) {
7100 // Find end index
7101 let endIndex = 0;
7102 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
7103 endIndex++;
7104 }
7105 const newData = this._data.slice(startIndex, dataLength - endIndex);
7106 const result = {
7107 resultId: this.id,
7108 edits: [
7109 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
7110 ]
7111 };
7112 return result;
7113 }
7114 else if (startIndex < dataLength) {
7115 return { resultId: this.id, edits: [
7116 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
7117 ] };
7118 }
7119 else if (startIndex < prevDataLength) {
7120 return { resultId: this.id, edits: [
7121 { start: startIndex, deleteCount: prevDataLength - startIndex }
7122 ] };
7123 }
7124 else {
7125 return { resultId: this.id, edits: [] };
7126 }
7127 }
7128 else {
7129 return this.build();
7130 }
7131 }
7132}
7133exports.SemanticTokensBuilder = SemanticTokensBuilder;
7134//# sourceMappingURL=sematicTokens.proposed.js.map
7135
7136/***/ }),
7137/* 44 */
7138/***/ (function(module, exports, __webpack_require__) {
7139
7140"use strict";
7141
7142Object.defineProperty(exports, "__esModule", { value: true });
7143exports.sortTexts = {
7144 one: "00001",
7145 two: "00002",
7146 three: "00003",
7147 four: "00004",
7148};
7149exports.projectRootPatterns = [".git", "autoload", "plugin"];
7150
7151
7152/***/ }),
7153/* 45 */,
7154/* 46 */
7155/***/ (function(module, exports, __webpack_require__) {
7156
7157"use strict";
7158
7159var __assign = (this && this.__assign) || function () {
7160 __assign = Object.assign || function(t) {
7161 for (var s, i = 1, n = arguments.length; i < n; i++) {
7162 s = arguments[i];
7163 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7164 t[p] = s[p];
7165 }
7166 return t;
7167 };
7168 return __assign.apply(this, arguments);
7169};
7170var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7171 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7172 return new (P || (P = Promise))(function (resolve, reject) {
7173 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7174 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7175 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7176 step((generator = generator.apply(thisArg, _arguments || [])).next());
7177 });
7178};
7179var __generator = (this && this.__generator) || function (thisArg, body) {
7180 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7181 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7182 function verb(n) { return function (v) { return step([n, v]); }; }
7183 function step(op) {
7184 if (f) throw new TypeError("Generator is already executing.");
7185 while (_) try {
7186 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;
7187 if (y = 0, t) op = [op[0] & 2, t.value];
7188 switch (op[0]) {
7189 case 0: case 1: t = op; break;
7190 case 4: _.label++; return { value: op[1], done: false };
7191 case 5: _.label++; y = op[1]; op = [0]; continue;
7192 case 7: op = _.ops.pop(); _.trys.pop(); continue;
7193 default:
7194 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7195 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7196 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7197 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7198 if (t[2]) _.ops.pop();
7199 _.trys.pop(); continue;
7200 }
7201 op = body.call(thisArg, _);
7202 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7203 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7204 }
7205};
7206var __spreadArrays = (this && this.__spreadArrays) || function () {
7207 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7208 for (var r = Array(s), k = 0, i = 0; i < il; i++)
7209 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7210 r[k] = a[j];
7211 return r;
7212};
7213var __importDefault = (this && this.__importDefault) || function (mod) {
7214 return (mod && mod.__esModule) ? mod : { "default": mod };
7215};
7216Object.defineProperty(exports, "__esModule", { value: true });
7217var child_process_1 = __webpack_require__(41);
7218var findup_1 = __importDefault(__webpack_require__(47));
7219var fs_1 = __importDefault(__webpack_require__(40));
7220var path_1 = __importDefault(__webpack_require__(13));
7221var vscode_languageserver_1 = __webpack_require__(2);
7222var vimparser_1 = __webpack_require__(52);
7223var patterns_1 = __webpack_require__(54);
7224function isSomeMatchPattern(patterns, line) {
7225 return patterns.some(function (p) { return p.test(line); });
7226}
7227exports.isSomeMatchPattern = isSomeMatchPattern;
7228function executeFile(input, command, args, option) {
7229 return new Promise(function (resolve, reject) {
7230 var stdout = "";
7231 var stderr = "";
7232 var error;
7233 var isPassAsText = false;
7234 args = (args || []).map(function (arg) {
7235 if (/%text/.test(arg)) {
7236 isPassAsText = true;
7237 return arg.replace(/%text/g, input.toString());
7238 }
7239 return arg;
7240 });
7241 var cp = child_process_1.spawn(command, args, option);
7242 cp.stdout.on("data", function (data) {
7243 stdout += data;
7244 });
7245 cp.stderr.on("data", function (data) {
7246 stderr += data;
7247 });
7248 cp.on("error", function (err) {
7249 error = err;
7250 reject(error);
7251 });
7252 cp.on("close", function (code) {
7253 if (!error) {
7254 resolve({ code: code, stdout: stdout, stderr: stderr });
7255 }
7256 });
7257 // error will occur when cp get error
7258 if (!isPassAsText) {
7259 input.pipe(cp.stdin).on("error", function () { return; });
7260 }
7261 });
7262}
7263exports.executeFile = executeFile;
7264// cover cb type async function to promise
7265function pcb(cb) {
7266 return function () {
7267 var args = [];
7268 for (var _i = 0; _i < arguments.length; _i++) {
7269 args[_i] = arguments[_i];
7270 }
7271 return new Promise(function (resolve) {
7272 cb.apply(void 0, __spreadArrays(args, [function () {
7273 var params = [];
7274 for (var _i = 0; _i < arguments.length; _i++) {
7275 params[_i] = arguments[_i];
7276 }
7277 resolve(params);
7278 }]));
7279 });
7280 };
7281}
7282exports.pcb = pcb;
7283// find work dirname by root patterns
7284function findProjectRoot(filePath, rootPatterns) {
7285 return __awaiter(this, void 0, void 0, function () {
7286 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
7287 return __generator(this, function (_b) {
7288 switch (_b.label) {
7289 case 0:
7290 dirname = path_1.default.dirname(filePath);
7291 patterns = [].concat(rootPatterns);
7292 dirCandidate = "";
7293 _i = 0, patterns_2 = patterns;
7294 _b.label = 1;
7295 case 1:
7296 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
7297 pattern = patterns_2[_i];
7298 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
7299 case 2:
7300 _a = _b.sent(), err = _a[0], dir = _a[1];
7301 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
7302 dirCandidate = dir;
7303 }
7304 _b.label = 3;
7305 case 3:
7306 _i++;
7307 return [3 /*break*/, 1];
7308 case 4:
7309 if (dirCandidate.length) {
7310 return [2 /*return*/, dirCandidate];
7311 }
7312 return [2 /*return*/, dirname];
7313 }
7314 });
7315 });
7316}
7317exports.findProjectRoot = findProjectRoot;
7318function markupSnippets(snippets) {
7319 return [
7320 "```vim",
7321 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
7322 "```",
7323 ].join("\n");
7324}
7325exports.markupSnippets = markupSnippets;
7326function getWordFromPosition(doc, position) {
7327 if (!doc) {
7328 return;
7329 }
7330 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)));
7331 // not keyword position
7332 if (!character || !patterns_1.keywordPattern.test(character)) {
7333 return;
7334 }
7335 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)));
7336 // comment line
7337 if (patterns_1.commentPattern.test(currentLine)) {
7338 return;
7339 }
7340 var preSegment = currentLine.slice(0, position.character);
7341 var nextSegment = currentLine.slice(position.character);
7342 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
7343 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
7344 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
7345 return {
7346 word: word,
7347 left: wordLeft && wordLeft[1] || "",
7348 right: wordRight && wordRight[1] || "",
7349 wordLeft: wordLeft && wordLeft[1]
7350 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
7351 : "" + preSegment + word,
7352 wordRight: wordRight && wordRight[1]
7353 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
7354 : "" + word + nextSegment,
7355 };
7356}
7357exports.getWordFromPosition = getWordFromPosition;
7358// parse vim buffer
7359function handleParse(textDoc) {
7360 return __awaiter(this, void 0, void 0, function () {
7361 var text, tokens, node;
7362 return __generator(this, function (_a) {
7363 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
7364 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
7365 try {
7366 node = new vimparser_1.VimLParser(true).parse(tokens);
7367 return [2 /*return*/, [node, ""]];
7368 }
7369 catch (error) {
7370 return [2 /*return*/, [null, error]];
7371 }
7372 return [2 /*return*/];
7373 });
7374 });
7375}
7376exports.handleParse = handleParse;
7377// remove snippets of completionItem
7378function removeSnippets(completionItems) {
7379 if (completionItems === void 0) { completionItems = []; }
7380 return completionItems.map(function (item) {
7381 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
7382 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
7383 }
7384 return item;
7385 });
7386}
7387exports.removeSnippets = removeSnippets;
7388exports.isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7389 return __generator(this, function (_a) {
7390 return [2 /*return*/, new Promise(function (resolve) {
7391 fs_1.default.lstat(filePath, function (err, stats) {
7392 resolve({
7393 err: err,
7394 stats: stats && stats.isSymbolicLink(),
7395 });
7396 });
7397 })];
7398 });
7399}); };
7400exports.getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7401 var _a, err, stats;
7402 return __generator(this, function (_b) {
7403 switch (_b.label) {
7404 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
7405 case 1:
7406 _a = _b.sent(), err = _a.err, stats = _a.stats;
7407 if (!err && stats) {
7408 return [2 /*return*/, new Promise(function (resolve) {
7409 fs_1.default.realpath(filePath, function (error, realPath) {
7410 if (error) {
7411 return resolve(filePath);
7412 }
7413 resolve(realPath);
7414 });
7415 })];
7416 }
7417 return [2 /*return*/, filePath];
7418 }
7419 });
7420}); };
7421
7422
7423/***/ }),
7424/* 47 */
7425/***/ (function(module, exports, __webpack_require__) {
7426
7427var fs = __webpack_require__(40),
7428 Path = __webpack_require__(13),
7429 util = __webpack_require__(48),
7430 colors = __webpack_require__(49),
7431 EE = __webpack_require__(51).EventEmitter,
7432 fsExists = fs.exists ? fs.exists : Path.exists,
7433 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
7434
7435module.exports = function(dir, iterator, options, callback){
7436 return FindUp(dir, iterator, options, callback);
7437};
7438
7439function FindUp(dir, iterator, options, callback){
7440 if (!(this instanceof FindUp)) {
7441 return new FindUp(dir, iterator, options, callback);
7442 }
7443 if(typeof options === 'function'){
7444 callback = options;
7445 options = {};
7446 }
7447 options = options || {};
7448
7449 EE.call(this);
7450 this.found = false;
7451 this.stopPlease = false;
7452 var self = this;
7453
7454 if(typeof iterator === 'string'){
7455 var file = iterator;
7456 iterator = function(dir, cb){
7457 return fsExists(Path.join(dir, file), cb);
7458 };
7459 }
7460
7461 if(callback) {
7462 this.on('found', function(dir){
7463 if(options.verbose) console.log(('found '+ dir ).green);
7464 callback(null, dir);
7465 self.stop();
7466 });
7467
7468 this.on('end', function(){
7469 if(options.verbose) console.log('end'.grey);
7470 if(!self.found) callback(new Error('not found'));
7471 });
7472
7473 this.on('error', function(err){
7474 if(options.verbose) console.log('error'.red, err);
7475 callback(err);
7476 });
7477 }
7478
7479 this._find(dir, iterator, options, callback);
7480}
7481util.inherits(FindUp, EE);
7482
7483FindUp.prototype._find = function(dir, iterator, options, callback){
7484 var self = this;
7485
7486 iterator(dir, function(exists){
7487 if(options.verbose) console.log(('traverse '+ dir).grey);
7488 if(exists) {
7489 self.found = true;
7490 self.emit('found', dir);
7491 }
7492
7493 var parentDir = Path.join(dir, '..');
7494 if (self.stopPlease) return self.emit('end');
7495 if (dir === parentDir) return self.emit('end');
7496 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
7497 self._find(parentDir, iterator, options, callback);
7498 });
7499};
7500
7501FindUp.prototype.stop = function(){
7502 this.stopPlease = true;
7503};
7504
7505module.exports.FindUp = FindUp;
7506
7507module.exports.sync = function(dir, iteratorSync){
7508 if(typeof iteratorSync === 'string'){
7509 var file = iteratorSync;
7510 iteratorSync = function(dir){
7511 return fsExistsSync(Path.join(dir, file));
7512 };
7513 }
7514 var initialDir = dir;
7515 while(dir !== Path.join(dir, '..')){
7516 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
7517 if(iteratorSync(dir)) return dir;
7518 dir = Path.join(dir, '..');
7519 }
7520 throw new Error('not found');
7521};
7522
7523
7524/***/ }),
7525/* 48 */
7526/***/ (function(module, exports) {
7527
7528module.exports = require("util");
7529
7530/***/ }),
7531/* 49 */
7532/***/ (function(module, exports, __webpack_require__) {
7533
7534/*
7535colors.js
7536
7537Copyright (c) 2010
7538
7539Marak Squires
7540Alexis Sellier (cloudhead)
7541
7542Permission is hereby granted, free of charge, to any person obtaining a copy
7543of this software and associated documentation files (the "Software"), to deal
7544in the Software without restriction, including without limitation the rights
7545to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7546copies of the Software, and to permit persons to whom the Software is
7547furnished to do so, subject to the following conditions:
7548
7549The above copyright notice and this permission notice shall be included in
7550all copies or substantial portions of the Software.
7551
7552THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7553IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7554FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7555AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7556LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7557OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7558THE SOFTWARE.
7559
7560*/
7561
7562var isHeadless = false;
7563
7564if (typeof module !== 'undefined') {
7565 isHeadless = true;
7566}
7567
7568if (!isHeadless) {
7569 var exports = {};
7570 var module = {};
7571 var colors = exports;
7572 exports.mode = "browser";
7573} else {
7574 exports.mode = "console";
7575}
7576
7577//
7578// Prototypes the string object to have additional method calls that add terminal colors
7579//
7580var addProperty = function (color, func) {
7581 exports[color] = function (str) {
7582 return func.apply(str);
7583 };
7584 String.prototype.__defineGetter__(color, func);
7585};
7586
7587function stylize(str, style) {
7588
7589 var styles;
7590
7591 if (exports.mode === 'console') {
7592 styles = {
7593 //styles
7594 'bold' : ['\x1B[1m', '\x1B[22m'],
7595 'italic' : ['\x1B[3m', '\x1B[23m'],
7596 'underline' : ['\x1B[4m', '\x1B[24m'],
7597 'inverse' : ['\x1B[7m', '\x1B[27m'],
7598 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
7599 //text colors
7600 //grayscale
7601 'white' : ['\x1B[37m', '\x1B[39m'],
7602 'grey' : ['\x1B[90m', '\x1B[39m'],
7603 'black' : ['\x1B[30m', '\x1B[39m'],
7604 //colors
7605 'blue' : ['\x1B[34m', '\x1B[39m'],
7606 'cyan' : ['\x1B[36m', '\x1B[39m'],
7607 'green' : ['\x1B[32m', '\x1B[39m'],
7608 'magenta' : ['\x1B[35m', '\x1B[39m'],
7609 'red' : ['\x1B[31m', '\x1B[39m'],
7610 'yellow' : ['\x1B[33m', '\x1B[39m'],
7611 //background colors
7612 //grayscale
7613 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
7614 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
7615 'blackBG' : ['\x1B[40m', '\x1B[49m'],
7616 //colors
7617 'blueBG' : ['\x1B[44m', '\x1B[49m'],
7618 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
7619 'greenBG' : ['\x1B[42m', '\x1B[49m'],
7620 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
7621 'redBG' : ['\x1B[41m', '\x1B[49m'],
7622 'yellowBG' : ['\x1B[43m', '\x1B[49m']
7623 };
7624 } else if (exports.mode === 'browser') {
7625 styles = {
7626 //styles
7627 'bold' : ['<b>', '</b>'],
7628 'italic' : ['<i>', '</i>'],
7629 'underline' : ['<u>', '</u>'],
7630 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
7631 'strikethrough' : ['<del>', '</del>'],
7632 //text colors
7633 //grayscale
7634 'white' : ['<span style="color:white;">', '</span>'],
7635 'grey' : ['<span style="color:gray;">', '</span>'],
7636 'black' : ['<span style="color:black;">', '</span>'],
7637 //colors
7638 'blue' : ['<span style="color:blue;">', '</span>'],
7639 'cyan' : ['<span style="color:cyan;">', '</span>'],
7640 'green' : ['<span style="color:green;">', '</span>'],
7641 'magenta' : ['<span style="color:magenta;">', '</span>'],
7642 'red' : ['<span style="color:red;">', '</span>'],
7643 'yellow' : ['<span style="color:yellow;">', '</span>'],
7644 //background colors
7645 //grayscale
7646 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
7647 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
7648 'blackBG' : ['<span style="background-color:black;">', '</span>'],
7649 //colors
7650 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
7651 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
7652 'greenBG' : ['<span style="background-color:green;">', '</span>'],
7653 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
7654 'redBG' : ['<span style="background-color:red;">', '</span>'],
7655 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
7656 };
7657 } else if (exports.mode === 'none') {
7658 return str + '';
7659 } else {
7660 console.log('unsupported mode, try "browser", "console" or "none"');
7661 }
7662 return styles[style][0] + str + styles[style][1];
7663}
7664
7665function applyTheme(theme) {
7666
7667 //
7668 // Remark: This is a list of methods that exist
7669 // on String that you should not overwrite.
7670 //
7671 var stringPrototypeBlacklist = [
7672 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
7673 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
7674 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
7675 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
7676 ];
7677
7678 Object.keys(theme).forEach(function (prop) {
7679 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
7680 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
7681 }
7682 else {
7683 if (typeof(theme[prop]) === 'string') {
7684 addProperty(prop, function () {
7685 return exports[theme[prop]](this);
7686 });
7687 }
7688 else {
7689 addProperty(prop, function () {
7690 var ret = this;
7691 for (var t = 0; t < theme[prop].length; t++) {
7692 ret = exports[theme[prop][t]](ret);
7693 }
7694 return ret;
7695 });
7696 }
7697 }
7698 });
7699}
7700
7701
7702//
7703// Iterate through all default styles and colors
7704//
7705var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
7706x.forEach(function (style) {
7707
7708 // __defineGetter__ at the least works in more browsers
7709 // http://robertnyman.com/javascript/javascript-getters-setters.html
7710 // Object.defineProperty only works in Chrome
7711 addProperty(style, function () {
7712 return stylize(this, style);
7713 });
7714});
7715
7716function sequencer(map) {
7717 return function () {
7718 if (!isHeadless) {
7719 return this.replace(/( )/, '$1');
7720 }
7721 var exploded = this.split(""), i = 0;
7722 exploded = exploded.map(map);
7723 return exploded.join("");
7724 };
7725}
7726
7727var rainbowMap = (function () {
7728 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
7729 return function (letter, i, exploded) {
7730 if (letter === " ") {
7731 return letter;
7732 } else {
7733 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
7734 }
7735 };
7736})();
7737
7738exports.themes = {};
7739
7740exports.addSequencer = function (name, map) {
7741 addProperty(name, sequencer(map));
7742};
7743
7744exports.addSequencer('rainbow', rainbowMap);
7745exports.addSequencer('zebra', function (letter, i, exploded) {
7746 return i % 2 === 0 ? letter : letter.inverse;
7747});
7748
7749exports.setTheme = function (theme) {
7750 if (typeof theme === 'string') {
7751 try {
7752 exports.themes[theme] = __webpack_require__(50)(theme);
7753 applyTheme(exports.themes[theme]);
7754 return exports.themes[theme];
7755 } catch (err) {
7756 console.log(err);
7757 return err;
7758 }
7759 } else {
7760 applyTheme(theme);
7761 }
7762};
7763
7764
7765addProperty('stripColors', function () {
7766 return ("" + this).replace(/\x1B\[\d+m/g, '');
7767});
7768
7769// please no
7770function zalgo(text, options) {
7771 var soul = {
7772 "up" : [
7773 '̍', '̎', '̄', '̅',
7774 '̿', '̑', '̆', '̐',
7775 '͒', '͗', '͑', '̇',
7776 '̈', '̊', '͂', '̓',
7777 '̈', '͊', '͋', '͌',
7778 '̃', '̂', '̌', '͐',
7779 '̀', '́', '̋', '̏',
7780 '̒', '̓', '̔', '̽',
7781 '̉', 'ͣ', 'ͤ', 'ͥ',
7782 'ͦ', 'ͧ', 'ͨ', 'ͩ',
7783 'ͪ', 'ͫ', 'ͬ', 'ͭ',
7784 'ͮ', 'ͯ', '̾', '͛',
7785 '͆', '̚'
7786 ],
7787 "down" : [
7788 '̖', '̗', '̘', '̙',
7789 '̜', '̝', '̞', '̟',
7790 '̠', '̤', '̥', '̦',
7791 '̩', '̪', '̫', '̬',
7792 '̭', '̮', '̯', '̰',
7793 '̱', '̲', '̳', '̹',
7794 '̺', '̻', '̼', 'ͅ',
7795 '͇', '͈', '͉', '͍',
7796 '͎', '͓', '͔', '͕',
7797 '͖', '͙', '͚', '̣'
7798 ],
7799 "mid" : [
7800 '̕', '̛', '̀', '́',
7801 '͘', '̡', '̢', '̧',
7802 '̨', '̴', '̵', '̶',
7803 '͜', '͝', '͞',
7804 '͟', '͠', '͢', '̸',
7805 '̷', '͡', ' ҉'
7806 ]
7807 },
7808 all = [].concat(soul.up, soul.down, soul.mid),
7809 zalgo = {};
7810
7811 function randomNumber(range) {
7812 var r = Math.floor(Math.random() * range);
7813 return r;
7814 }
7815
7816 function is_char(character) {
7817 var bool = false;
7818 all.filter(function (i) {
7819 bool = (i === character);
7820 });
7821 return bool;
7822 }
7823
7824 function heComes(text, options) {
7825 var result = '', counts, l;
7826 options = options || {};
7827 options["up"] = options["up"] || true;
7828 options["mid"] = options["mid"] || true;
7829 options["down"] = options["down"] || true;
7830 options["size"] = options["size"] || "maxi";
7831 text = text.split('');
7832 for (l in text) {
7833 if (is_char(l)) {
7834 continue;
7835 }
7836 result = result + text[l];
7837 counts = {"up" : 0, "down" : 0, "mid" : 0};
7838 switch (options.size) {
7839 case 'mini':
7840 counts.up = randomNumber(8);
7841 counts.min = randomNumber(2);
7842 counts.down = randomNumber(8);
7843 break;
7844 case 'maxi':
7845 counts.up = randomNumber(16) + 3;
7846 counts.min = randomNumber(4) + 1;
7847 counts.down = randomNumber(64) + 3;
7848 break;
7849 default:
7850 counts.up = randomNumber(8) + 1;
7851 counts.mid = randomNumber(6) / 2;
7852 counts.down = randomNumber(8) + 1;
7853 break;
7854 }
7855
7856 var arr = ["up", "mid", "down"];
7857 for (var d in arr) {
7858 var index = arr[d];
7859 for (var i = 0 ; i <= counts[index]; i++) {
7860 if (options[index]) {
7861 result = result + soul[index][randomNumber(soul[index].length)];
7862 }
7863 }
7864 }
7865 }
7866 return result;
7867 }
7868 return heComes(text);
7869}
7870
7871
7872// don't summon zalgo
7873addProperty('zalgo', function () {
7874 return zalgo(this);
7875});
7876
7877
7878/***/ }),
7879/* 50 */
7880/***/ (function(module, exports) {
7881
7882function webpackEmptyContext(req) {
7883 var e = new Error("Cannot find module '" + req + "'");
7884 e.code = 'MODULE_NOT_FOUND';
7885 throw e;
7886}
7887webpackEmptyContext.keys = function() { return []; };
7888webpackEmptyContext.resolve = webpackEmptyContext;
7889module.exports = webpackEmptyContext;
7890webpackEmptyContext.id = 50;
7891
7892/***/ }),
7893/* 51 */
7894/***/ (function(module, exports) {
7895
7896module.exports = require("events");
7897
7898/***/ }),
7899/* 52 */
7900/***/ (function(module, exports, __webpack_require__) {
7901
7902/* WEBPACK VAR INJECTION */(function(module) {//!/usr/bin/env nodejs
7903// usage: nodejs vimlparser.js [--neovim] foo.vim
7904
7905var fs = __webpack_require__(40);
7906var util = __webpack_require__(48);
7907
7908function main() {
7909 var neovim = false;
7910 var fpath = ''
7911 var args = process.argv;
7912 if (args.length == 4) {
7913 if (args[2] == '--neovim') {
7914 neovim = true;
7915 }
7916 fpath = args[3];
7917 } else if (args.length == 3) {
7918 neovim = false;
7919 fpath = args[2]
7920 }
7921 var r = new StringReader(viml_readfile(fpath));
7922 var p = new VimLParser(neovim);
7923 var c = new Compiler();
7924 try {
7925 var lines = c.compile(p.parse(r));
7926 for (var i in lines) {
7927 process.stdout.write(lines[i] + "\n");
7928 }
7929 } catch (e) {
7930 process.stdout.write(e + '\n');
7931 }
7932}
7933
7934var pat_vim2js = {
7935 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7936 "[@*!=><&~#]" : "[@*!=><&~#]",
7937 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7938 "\\<BANG\\>" : "\\bBANG\\b",
7939 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7940 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7941 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7942 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7943 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7944 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7945 "\\S" : "\\S",
7946 "\\a" : "[A-Za-z]",
7947 "\\d" : "\\d",
7948 "\\h" : "[A-Za-z_]",
7949 "\\s" : "\\s",
7950 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7951 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7952 "\\w" : "[0-9A-Za-z_]",
7953 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7954 "\\x" : "[0-9A-Fa-f]",
7955 "^++" : "^\+\+",
7956 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7957 "^++bad=drop" : "^\\+\\+bad=drop",
7958 "^++bad=keep" : "^\\+\\+bad=keep",
7959 "^++bin\\>" : "^\\+\\+bin\\b",
7960 "^++edit\\>" : "^\\+\\+edit\\b",
7961 "^++enc=\\S" : "^\\+\\+enc=\\S",
7962 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7963 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7964 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7965 "^++nobin\\>" : "^\\+\\+nobin\\b",
7966 "^[A-Z]" : "^[A-Z]",
7967 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7968 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7969 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7970 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7971 "^\\d" : "^\\d",
7972 "^\\h" : "^[A-Za-z_]",
7973 "^\\s" : "^\\s",
7974 "^\\s*\\\\" : "^\\s*\\\\",
7975 "^[ \\t]$" : "^[ \\t]$",
7976 "^[A-Za-z]$" : "^[A-Za-z]$",
7977 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7978 "^[0-9]$" : "^[0-9]$",
7979 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7980 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7981 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7982 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7983 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7984 "^[A-Z]$" : "^[A-Z]$",
7985 "^[a-z]$" : "^[a-z]$",
7986 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7987 "^[0-7]$" : "^[0-7]$",
7988 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7989 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7990 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7991}
7992
7993function viml_add(lst, item) {
7994 lst.push(item);
7995}
7996
7997function viml_call(func, args) {
7998 return func.apply(null, args);
7999}
8000
8001function viml_char2nr(c) {
8002 return c.charCodeAt(0);
8003}
8004
8005function viml_empty(obj) {
8006 return obj.length == 0;
8007}
8008
8009function viml_equalci(a, b) {
8010 return a.toLowerCase() == b.toLowerCase();
8011}
8012
8013function viml_eqreg(s, reg) {
8014 var mx = new RegExp(pat_vim2js[reg]);
8015 return mx.exec(s) != null;
8016}
8017
8018function viml_eqregh(s, reg) {
8019 var mx = new RegExp(pat_vim2js[reg]);
8020 return mx.exec(s) != null;
8021}
8022
8023function viml_eqregq(s, reg) {
8024 var mx = new RegExp(pat_vim2js[reg], "i");
8025 return mx.exec(s) != null;
8026}
8027
8028function viml_escape(s, chars) {
8029 var r = '';
8030 for (var i = 0; i < s.length; ++i) {
8031 if (chars.indexOf(s.charAt(i)) != -1) {
8032 r = r + "\\" + s.charAt(i);
8033 } else {
8034 r = r + s.charAt(i);
8035 }
8036 }
8037 return r;
8038}
8039
8040function viml_extend(obj, item) {
8041 obj.push.apply(obj, item);
8042}
8043
8044function viml_insert(lst, item) {
8045 var idx = arguments.length >= 3 ? arguments[2] : 0;
8046 lst.splice(0, 0, item);
8047}
8048
8049function viml_join(lst, sep) {
8050 return lst.join(sep);
8051}
8052
8053function viml_keys(obj) {
8054 return Object.keys(obj);
8055}
8056
8057function viml_len(obj) {
8058 if (typeof obj === 'string') {
8059 var len = 0;
8060 for (var i = 0; i < obj.length; i++) {
8061 var c = obj.charCodeAt(i);
8062 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
8063 }
8064 return len;
8065 }
8066 return obj.length;
8067}
8068
8069function viml_printf() {
8070 var a000 = Array.prototype.slice.call(arguments, 0);
8071 if (a000.length == 1) {
8072 return a000[0];
8073 } else {
8074 return util.format.apply(null, a000);
8075 }
8076}
8077
8078function viml_range(start) {
8079 var end = arguments.length >= 2 ? arguments[1] : null;
8080 if (end == null) {
8081 var x = [];
8082 for (var i = 0; i < start; ++i) {
8083 x.push(i);
8084 }
8085 return x;
8086 } else {
8087 var x = []
8088 for (var i = start; i <= end; ++i) {
8089 x.push(i);
8090 }
8091 return x;
8092 }
8093}
8094
8095function viml_readfile(path) {
8096 // FIXME: newline?
8097 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
8098}
8099
8100function viml_remove(lst, idx) {
8101 lst.splice(idx, 1);
8102}
8103
8104function viml_split(s, sep) {
8105 if (sep == "\\zs") {
8106 return s.split("");
8107 }
8108 throw "NotImplemented";
8109}
8110
8111function viml_str2nr(s) {
8112 var base = arguments.length >= 2 ? arguments[1] : 10;
8113 return parseInt(s, base);
8114}
8115
8116function viml_string(obj) {
8117 return obj.toString();
8118}
8119
8120function viml_has_key(obj, key) {
8121 return obj[key] !== undefined;
8122}
8123
8124function viml_stridx(a, b) {
8125 return a.indexOf(b);
8126}
8127
8128var NIL = [];
8129var TRUE = 1;
8130var FALSE = 0;
8131var NODE_TOPLEVEL = 1;
8132var NODE_COMMENT = 2;
8133var NODE_EXCMD = 3;
8134var NODE_FUNCTION = 4;
8135var NODE_ENDFUNCTION = 5;
8136var NODE_DELFUNCTION = 6;
8137var NODE_RETURN = 7;
8138var NODE_EXCALL = 8;
8139var NODE_LET = 9;
8140var NODE_UNLET = 10;
8141var NODE_LOCKVAR = 11;
8142var NODE_UNLOCKVAR = 12;
8143var NODE_IF = 13;
8144var NODE_ELSEIF = 14;
8145var NODE_ELSE = 15;
8146var NODE_ENDIF = 16;
8147var NODE_WHILE = 17;
8148var NODE_ENDWHILE = 18;
8149var NODE_FOR = 19;
8150var NODE_ENDFOR = 20;
8151var NODE_CONTINUE = 21;
8152var NODE_BREAK = 22;
8153var NODE_TRY = 23;
8154var NODE_CATCH = 24;
8155var NODE_FINALLY = 25;
8156var NODE_ENDTRY = 26;
8157var NODE_THROW = 27;
8158var NODE_ECHO = 28;
8159var NODE_ECHON = 29;
8160var NODE_ECHOHL = 30;
8161var NODE_ECHOMSG = 31;
8162var NODE_ECHOERR = 32;
8163var NODE_EXECUTE = 33;
8164var NODE_TERNARY = 34;
8165var NODE_OR = 35;
8166var NODE_AND = 36;
8167var NODE_EQUAL = 37;
8168var NODE_EQUALCI = 38;
8169var NODE_EQUALCS = 39;
8170var NODE_NEQUAL = 40;
8171var NODE_NEQUALCI = 41;
8172var NODE_NEQUALCS = 42;
8173var NODE_GREATER = 43;
8174var NODE_GREATERCI = 44;
8175var NODE_GREATERCS = 45;
8176var NODE_GEQUAL = 46;
8177var NODE_GEQUALCI = 47;
8178var NODE_GEQUALCS = 48;
8179var NODE_SMALLER = 49;
8180var NODE_SMALLERCI = 50;
8181var NODE_SMALLERCS = 51;
8182var NODE_SEQUAL = 52;
8183var NODE_SEQUALCI = 53;
8184var NODE_SEQUALCS = 54;
8185var NODE_MATCH = 55;
8186var NODE_MATCHCI = 56;
8187var NODE_MATCHCS = 57;
8188var NODE_NOMATCH = 58;
8189var NODE_NOMATCHCI = 59;
8190var NODE_NOMATCHCS = 60;
8191var NODE_IS = 61;
8192var NODE_ISCI = 62;
8193var NODE_ISCS = 63;
8194var NODE_ISNOT = 64;
8195var NODE_ISNOTCI = 65;
8196var NODE_ISNOTCS = 66;
8197var NODE_ADD = 67;
8198var NODE_SUBTRACT = 68;
8199var NODE_CONCAT = 69;
8200var NODE_MULTIPLY = 70;
8201var NODE_DIVIDE = 71;
8202var NODE_REMAINDER = 72;
8203var NODE_NOT = 73;
8204var NODE_MINUS = 74;
8205var NODE_PLUS = 75;
8206var NODE_SUBSCRIPT = 76;
8207var NODE_SLICE = 77;
8208var NODE_CALL = 78;
8209var NODE_DOT = 79;
8210var NODE_NUMBER = 80;
8211var NODE_STRING = 81;
8212var NODE_LIST = 82;
8213var NODE_DICT = 83;
8214var NODE_OPTION = 85;
8215var NODE_IDENTIFIER = 86;
8216var NODE_CURLYNAME = 87;
8217var NODE_ENV = 88;
8218var NODE_REG = 89;
8219var NODE_CURLYNAMEPART = 90;
8220var NODE_CURLYNAMEEXPR = 91;
8221var NODE_LAMBDA = 92;
8222var NODE_BLOB = 93;
8223var NODE_CONST = 94;
8224var NODE_EVAL = 95;
8225var NODE_HEREDOC = 96;
8226var NODE_METHOD = 97;
8227var TOKEN_EOF = 1;
8228var TOKEN_EOL = 2;
8229var TOKEN_SPACE = 3;
8230var TOKEN_OROR = 4;
8231var TOKEN_ANDAND = 5;
8232var TOKEN_EQEQ = 6;
8233var TOKEN_EQEQCI = 7;
8234var TOKEN_EQEQCS = 8;
8235var TOKEN_NEQ = 9;
8236var TOKEN_NEQCI = 10;
8237var TOKEN_NEQCS = 11;
8238var TOKEN_GT = 12;
8239var TOKEN_GTCI = 13;
8240var TOKEN_GTCS = 14;
8241var TOKEN_GTEQ = 15;
8242var TOKEN_GTEQCI = 16;
8243var TOKEN_GTEQCS = 17;
8244var TOKEN_LT = 18;
8245var TOKEN_LTCI = 19;
8246var TOKEN_LTCS = 20;
8247var TOKEN_LTEQ = 21;
8248var TOKEN_LTEQCI = 22;
8249var TOKEN_LTEQCS = 23;
8250var TOKEN_MATCH = 24;
8251var TOKEN_MATCHCI = 25;
8252var TOKEN_MATCHCS = 26;
8253var TOKEN_NOMATCH = 27;
8254var TOKEN_NOMATCHCI = 28;
8255var TOKEN_NOMATCHCS = 29;
8256var TOKEN_IS = 30;
8257var TOKEN_ISCI = 31;
8258var TOKEN_ISCS = 32;
8259var TOKEN_ISNOT = 33;
8260var TOKEN_ISNOTCI = 34;
8261var TOKEN_ISNOTCS = 35;
8262var TOKEN_PLUS = 36;
8263var TOKEN_MINUS = 37;
8264var TOKEN_DOT = 38;
8265var TOKEN_STAR = 39;
8266var TOKEN_SLASH = 40;
8267var TOKEN_PERCENT = 41;
8268var TOKEN_NOT = 42;
8269var TOKEN_QUESTION = 43;
8270var TOKEN_COLON = 44;
8271var TOKEN_POPEN = 45;
8272var TOKEN_PCLOSE = 46;
8273var TOKEN_SQOPEN = 47;
8274var TOKEN_SQCLOSE = 48;
8275var TOKEN_COPEN = 49;
8276var TOKEN_CCLOSE = 50;
8277var TOKEN_COMMA = 51;
8278var TOKEN_NUMBER = 52;
8279var TOKEN_SQUOTE = 53;
8280var TOKEN_DQUOTE = 54;
8281var TOKEN_OPTION = 55;
8282var TOKEN_IDENTIFIER = 56;
8283var TOKEN_ENV = 57;
8284var TOKEN_REG = 58;
8285var TOKEN_EQ = 59;
8286var TOKEN_OR = 60;
8287var TOKEN_SEMICOLON = 61;
8288var TOKEN_BACKTICK = 62;
8289var TOKEN_DOTDOTDOT = 63;
8290var TOKEN_SHARP = 64;
8291var TOKEN_ARROW = 65;
8292var TOKEN_BLOB = 66;
8293var TOKEN_LITCOPEN = 67;
8294var TOKEN_DOTDOT = 68;
8295var TOKEN_HEREDOC = 69;
8296var MAX_FUNC_ARGS = 20;
8297function isalpha(c) {
8298 return viml_eqregh(c, "^[A-Za-z]$");
8299}
8300
8301function isalnum(c) {
8302 return viml_eqregh(c, "^[0-9A-Za-z]$");
8303}
8304
8305function isdigit(c) {
8306 return viml_eqregh(c, "^[0-9]$");
8307}
8308
8309function isodigit(c) {
8310 return viml_eqregh(c, "^[0-7]$");
8311}
8312
8313function isxdigit(c) {
8314 return viml_eqregh(c, "^[0-9A-Fa-f]$");
8315}
8316
8317function iswordc(c) {
8318 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8319}
8320
8321function iswordc1(c) {
8322 return viml_eqregh(c, "^[A-Za-z_]$");
8323}
8324
8325function iswhite(c) {
8326 return viml_eqregh(c, "^[ \\t]$");
8327}
8328
8329function isnamec(c) {
8330 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
8331}
8332
8333function isnamec1(c) {
8334 return viml_eqregh(c, "^[A-Za-z_]$");
8335}
8336
8337function isargname(s) {
8338 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
8339}
8340
8341function isvarname(s) {
8342 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
8343}
8344
8345// FIXME:
8346function isidc(c) {
8347 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8348}
8349
8350function isupper(c) {
8351 return viml_eqregh(c, "^[A-Z]$");
8352}
8353
8354function islower(c) {
8355 return viml_eqregh(c, "^[a-z]$");
8356}
8357
8358function ExArg() {
8359 var ea = {};
8360 ea.forceit = FALSE;
8361 ea.addr_count = 0;
8362 ea.line1 = 0;
8363 ea.line2 = 0;
8364 ea.flags = 0;
8365 ea.do_ecmd_cmd = "";
8366 ea.do_ecmd_lnum = 0;
8367 ea.append = 0;
8368 ea.usefilter = FALSE;
8369 ea.amount = 0;
8370 ea.regname = 0;
8371 ea.force_bin = 0;
8372 ea.read_edit = 0;
8373 ea.force_ff = 0;
8374 ea.force_enc = 0;
8375 ea.bad_char = 0;
8376 ea.linepos = {};
8377 ea.cmdpos = [];
8378 ea.argpos = [];
8379 ea.cmd = {};
8380 ea.modifiers = [];
8381 ea.range = [];
8382 ea.argopt = {};
8383 ea.argcmd = {};
8384 return ea;
8385}
8386
8387// struct node {
8388// int type
8389// pos pos
8390// node left
8391// node right
8392// node cond
8393// node rest
8394// node[] list
8395// node[] rlist
8396// node[] default_args
8397// node[] body
8398// string op
8399// string str
8400// int depth
8401// variant value
8402// }
8403// TOPLEVEL .body
8404// COMMENT .str
8405// EXCMD .ea .str
8406// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
8407// ENDFUNCTION .ea
8408// DELFUNCTION .ea .left
8409// RETURN .ea .left
8410// EXCALL .ea .left
8411// LET .ea .op .left .list .rest .right
8412// CONST .ea .op .left .list .rest .right
8413// UNLET .ea .list
8414// LOCKVAR .ea .depth .list
8415// UNLOCKVAR .ea .depth .list
8416// IF .ea .body .cond .elseif .else .endif
8417// ELSEIF .ea .body .cond
8418// ELSE .ea .body
8419// ENDIF .ea
8420// WHILE .ea .body .cond .endwhile
8421// ENDWHILE .ea
8422// FOR .ea .body .left .list .rest .right .endfor
8423// ENDFOR .ea
8424// CONTINUE .ea
8425// BREAK .ea
8426// TRY .ea .body .catch .finally .endtry
8427// CATCH .ea .body .pattern
8428// FINALLY .ea .body
8429// ENDTRY .ea
8430// THROW .ea .left
8431// EVAL .ea .left
8432// ECHO .ea .list
8433// ECHON .ea .list
8434// ECHOHL .ea .str
8435// ECHOMSG .ea .list
8436// ECHOERR .ea .list
8437// EXECUTE .ea .list
8438// TERNARY .cond .left .right
8439// OR .left .right
8440// AND .left .right
8441// EQUAL .left .right
8442// EQUALCI .left .right
8443// EQUALCS .left .right
8444// NEQUAL .left .right
8445// NEQUALCI .left .right
8446// NEQUALCS .left .right
8447// GREATER .left .right
8448// GREATERCI .left .right
8449// GREATERCS .left .right
8450// GEQUAL .left .right
8451// GEQUALCI .left .right
8452// GEQUALCS .left .right
8453// SMALLER .left .right
8454// SMALLERCI .left .right
8455// SMALLERCS .left .right
8456// SEQUAL .left .right
8457// SEQUALCI .left .right
8458// SEQUALCS .left .right
8459// MATCH .left .right
8460// MATCHCI .left .right
8461// MATCHCS .left .right
8462// NOMATCH .left .right
8463// NOMATCHCI .left .right
8464// NOMATCHCS .left .right
8465// IS .left .right
8466// ISCI .left .right
8467// ISCS .left .right
8468// ISNOT .left .right
8469// ISNOTCI .left .right
8470// ISNOTCS .left .right
8471// ADD .left .right
8472// SUBTRACT .left .right
8473// CONCAT .left .right
8474// MULTIPLY .left .right
8475// DIVIDE .left .right
8476// REMAINDER .left .right
8477// NOT .left
8478// MINUS .left
8479// PLUS .left
8480// SUBSCRIPT .left .right
8481// SLICE .left .rlist
8482// METHOD .left .right
8483// CALL .left .rlist
8484// DOT .left .right
8485// NUMBER .value
8486// STRING .value
8487// LIST .value
8488// DICT .value
8489// BLOB .value
8490// NESTING .left
8491// OPTION .value
8492// IDENTIFIER .value
8493// CURLYNAME .value
8494// ENV .value
8495// REG .value
8496// CURLYNAMEPART .value
8497// CURLYNAMEEXPR .value
8498// LAMBDA .rlist .left
8499// HEREDOC .rlist .op .body
8500function Node(type) {
8501 return {"type":type};
8502}
8503
8504function Err(msg, pos) {
8505 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
8506}
8507
8508function VimLParser() { this.__init__.apply(this, arguments); }
8509VimLParser.prototype.__init__ = function() {
8510 var a000 = Array.prototype.slice.call(arguments, 0);
8511 if (viml_len(a000) > 0) {
8512 this.neovim = a000[0];
8513 }
8514 else {
8515 this.neovim = 0;
8516 }
8517 this.find_command_cache = {};
8518}
8519
8520VimLParser.prototype.push_context = function(node) {
8521 viml_insert(this.context, node);
8522}
8523
8524VimLParser.prototype.pop_context = function() {
8525 viml_remove(this.context, 0);
8526}
8527
8528VimLParser.prototype.find_context = function(type) {
8529 var i = 0;
8530 var __c3 = this.context;
8531 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
8532 var node = __c3[__i3];
8533 if (node.type == type) {
8534 return i;
8535 }
8536 i += 1;
8537 }
8538 return -1;
8539}
8540
8541VimLParser.prototype.add_node = function(node) {
8542 viml_add(this.context[0].body, node);
8543}
8544
8545VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
8546 if (this.context[0].type == NODE_FUNCTION) {
8547 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
8548 }
8549}
8550
8551VimLParser.prototype.check_missing_endif = function(ends, pos) {
8552 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
8553 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
8554 }
8555}
8556
8557VimLParser.prototype.check_missing_endtry = function(ends, pos) {
8558 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
8559 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
8560 }
8561}
8562
8563VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
8564 if (this.context[0].type == NODE_WHILE) {
8565 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
8566 }
8567}
8568
8569VimLParser.prototype.check_missing_endfor = function(ends, pos) {
8570 if (this.context[0].type == NODE_FOR) {
8571 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
8572 }
8573}
8574
8575VimLParser.prototype.parse = function(reader) {
8576 this.reader = reader;
8577 this.context = [];
8578 var toplevel = Node(NODE_TOPLEVEL);
8579 toplevel.pos = this.reader.getpos();
8580 toplevel.body = [];
8581 this.push_context(toplevel);
8582 while (this.reader.peek() != "<EOF>") {
8583 this.parse_one_cmd();
8584 }
8585 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
8586 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
8587 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
8588 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
8589 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
8590 this.pop_context();
8591 return toplevel;
8592}
8593
8594VimLParser.prototype.parse_one_cmd = function() {
8595 this.ea = ExArg();
8596 if (this.reader.peekn(2) == "#!") {
8597 this.parse_hashbang();
8598 this.reader.get();
8599 return;
8600 }
8601 this.reader.skip_white_and_colon();
8602 if (this.reader.peekn(1) == "") {
8603 this.reader.get();
8604 return;
8605 }
8606 if (this.reader.peekn(1) == "\"") {
8607 this.parse_comment();
8608 this.reader.get();
8609 return;
8610 }
8611 this.ea.linepos = this.reader.getpos();
8612 this.parse_command_modifiers();
8613 this.parse_range();
8614 this.parse_command();
8615 this.parse_trail();
8616}
8617
8618// FIXME:
8619VimLParser.prototype.parse_command_modifiers = function() {
8620 var modifiers = [];
8621 while (TRUE) {
8622 var pos = this.reader.tell();
8623 var d = "";
8624 if (isdigit(this.reader.peekn(1))) {
8625 var d = this.reader.read_digit();
8626 this.reader.skip_white();
8627 }
8628 var k = this.reader.read_alpha();
8629 var c = this.reader.peekn(1);
8630 this.reader.skip_white();
8631 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
8632 // abo\%[veleft]
8633 viml_add(modifiers, {"name":"aboveleft"});
8634 }
8635 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
8636 // bel\%[owright]
8637 viml_add(modifiers, {"name":"belowright"});
8638 }
8639 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
8640 // bro\%[wse]
8641 viml_add(modifiers, {"name":"browse"});
8642 }
8643 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
8644 // bo\%[tright]
8645 viml_add(modifiers, {"name":"botright"});
8646 }
8647 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
8648 // conf\%[irm]
8649 viml_add(modifiers, {"name":"confirm"});
8650 }
8651 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
8652 // kee\%[pmarks]
8653 viml_add(modifiers, {"name":"keepmarks"});
8654 }
8655 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
8656 // keepa\%[lt]
8657 viml_add(modifiers, {"name":"keepalt"});
8658 }
8659 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
8660 // keepj\%[umps]
8661 viml_add(modifiers, {"name":"keepjumps"});
8662 }
8663 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
8664 // keepp\%[atterns]
8665 viml_add(modifiers, {"name":"keeppatterns"});
8666 }
8667 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
8668 // hid\%[e]
8669 if (this.ends_excmds(c)) {
8670 break;
8671 }
8672 viml_add(modifiers, {"name":"hide"});
8673 }
8674 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
8675 // loc\%[kmarks]
8676 viml_add(modifiers, {"name":"lockmarks"});
8677 }
8678 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
8679 // lefta\%[bove]
8680 viml_add(modifiers, {"name":"leftabove"});
8681 }
8682 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
8683 // noa\%[utocmd]
8684 viml_add(modifiers, {"name":"noautocmd"});
8685 }
8686 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
8687 // :nos\%[wapfile]
8688 viml_add(modifiers, {"name":"noswapfile"});
8689 }
8690 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
8691 // rightb\%[elow]
8692 viml_add(modifiers, {"name":"rightbelow"});
8693 }
8694 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
8695 // san\%[dbox]
8696 viml_add(modifiers, {"name":"sandbox"});
8697 }
8698 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
8699 // sil\%[ent]
8700 if (c == "!") {
8701 this.reader.get();
8702 viml_add(modifiers, {"name":"silent", "bang":1});
8703 }
8704 else {
8705 viml_add(modifiers, {"name":"silent", "bang":0});
8706 }
8707 }
8708 else if (k == "tab") {
8709 // tab
8710 if (d != "") {
8711 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
8712 }
8713 else {
8714 viml_add(modifiers, {"name":"tab"});
8715 }
8716 }
8717 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
8718 // to\%[pleft]
8719 viml_add(modifiers, {"name":"topleft"});
8720 }
8721 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
8722 // uns\%[ilent]
8723 viml_add(modifiers, {"name":"unsilent"});
8724 }
8725 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
8726 // vert\%[ical]
8727 viml_add(modifiers, {"name":"vertical"});
8728 }
8729 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
8730 // verb\%[ose]
8731 if (d != "") {
8732 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
8733 }
8734 else {
8735 viml_add(modifiers, {"name":"verbose", "count":1});
8736 }
8737 }
8738 else {
8739 this.reader.seek_set(pos);
8740 break;
8741 }
8742 }
8743 this.ea.modifiers = modifiers;
8744}
8745
8746// FIXME:
8747VimLParser.prototype.parse_range = function() {
8748 var tokens = [];
8749 while (TRUE) {
8750 while (TRUE) {
8751 this.reader.skip_white();
8752 var c = this.reader.peekn(1);
8753 if (c == "") {
8754 break;
8755 }
8756 if (c == ".") {
8757 viml_add(tokens, this.reader.getn(1));
8758 }
8759 else if (c == "$") {
8760 viml_add(tokens, this.reader.getn(1));
8761 }
8762 else if (c == "'") {
8763 this.reader.getn(1);
8764 var m = this.reader.getn(1);
8765 if (m == "") {
8766 break;
8767 }
8768 viml_add(tokens, "'" + m);
8769 }
8770 else if (c == "/") {
8771 this.reader.getn(1);
8772 var __tmp = this.parse_pattern(c);
8773 var pattern = __tmp[0];
8774 var _ = __tmp[1];
8775 viml_add(tokens, pattern);
8776 }
8777 else if (c == "?") {
8778 this.reader.getn(1);
8779 var __tmp = this.parse_pattern(c);
8780 var pattern = __tmp[0];
8781 var _ = __tmp[1];
8782 viml_add(tokens, pattern);
8783 }
8784 else if (c == "\\") {
8785 var m = this.reader.p(1);
8786 if (m == "&" || m == "?" || m == "/") {
8787 this.reader.seek_cur(2);
8788 viml_add(tokens, "\\" + m);
8789 }
8790 else {
8791 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
8792 }
8793 }
8794 else if (isdigit(c)) {
8795 viml_add(tokens, this.reader.read_digit());
8796 }
8797 while (TRUE) {
8798 this.reader.skip_white();
8799 if (this.reader.peekn(1) == "") {
8800 break;
8801 }
8802 var n = this.reader.read_integer();
8803 if (n == "") {
8804 break;
8805 }
8806 viml_add(tokens, n);
8807 }
8808 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
8809 break;
8810 }
8811 }
8812 if (this.reader.peekn(1) == "%") {
8813 viml_add(tokens, this.reader.getn(1));
8814 }
8815 else if (this.reader.peekn(1) == "*") {
8816 // && &cpoptions !~ '\*'
8817 viml_add(tokens, this.reader.getn(1));
8818 }
8819 if (this.reader.peekn(1) == ";") {
8820 viml_add(tokens, this.reader.getn(1));
8821 continue;
8822 }
8823 else if (this.reader.peekn(1) == ",") {
8824 viml_add(tokens, this.reader.getn(1));
8825 continue;
8826 }
8827 break;
8828 }
8829 this.ea.range = tokens;
8830}
8831
8832// FIXME:
8833VimLParser.prototype.parse_pattern = function(delimiter) {
8834 var pattern = "";
8835 var endc = "";
8836 var inbracket = 0;
8837 while (TRUE) {
8838 var c = this.reader.getn(1);
8839 if (c == "") {
8840 break;
8841 }
8842 if (c == delimiter && inbracket == 0) {
8843 var endc = c;
8844 break;
8845 }
8846 pattern += c;
8847 if (c == "\\") {
8848 var c = this.reader.peekn(1);
8849 if (c == "") {
8850 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
8851 }
8852 this.reader.getn(1);
8853 pattern += c;
8854 }
8855 else if (c == "[") {
8856 inbracket += 1;
8857 }
8858 else if (c == "]") {
8859 inbracket -= 1;
8860 }
8861 }
8862 return [pattern, endc];
8863}
8864
8865VimLParser.prototype.parse_command = function() {
8866 this.reader.skip_white_and_colon();
8867 this.ea.cmdpos = this.reader.getpos();
8868 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8869 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8870 this.parse_cmd_modifier_range();
8871 }
8872 return;
8873 }
8874 this.ea.cmd = this.find_command();
8875 if (this.ea.cmd === NIL) {
8876 this.reader.setpos(this.ea.cmdpos);
8877 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8878 }
8879 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8880 this.reader.getn(1);
8881 this.ea.forceit = TRUE;
8882 }
8883 else {
8884 this.ea.forceit = FALSE;
8885 }
8886 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8887 throw Err("E477: No ! allowed", this.ea.cmdpos);
8888 }
8889 if (this.ea.cmd.name != "!") {
8890 this.reader.skip_white();
8891 }
8892 this.ea.argpos = this.reader.getpos();
8893 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8894 this.parse_argopt();
8895 }
8896 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8897 if (this.reader.p(0) == ">") {
8898 if (this.reader.p(1) != ">") {
8899 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8900 }
8901 this.reader.seek_cur(2);
8902 this.reader.skip_white();
8903 this.ea.append = 1;
8904 }
8905 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8906 this.reader.getn(1);
8907 this.ea.usefilter = TRUE;
8908 }
8909 }
8910 if (this.ea.cmd.name == "read") {
8911 if (this.ea.forceit) {
8912 this.ea.usefilter = TRUE;
8913 this.ea.forceit = FALSE;
8914 }
8915 else if (this.reader.peekn(1) == "!") {
8916 this.reader.getn(1);
8917 this.ea.usefilter = TRUE;
8918 }
8919 }
8920 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8921 this.ea.amount = 1;
8922 while (this.reader.peekn(1) == this.ea.cmd.name) {
8923 this.reader.getn(1);
8924 this.ea.amount += 1;
8925 }
8926 this.reader.skip_white();
8927 }
8928 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8929 this.parse_argcmd();
8930 }
8931 this._parse_command(this.ea.cmd.parser);
8932}
8933
8934// TODO: self[a:parser]
8935VimLParser.prototype._parse_command = function(parser) {
8936 if (parser == "parse_cmd_append") {
8937 this.parse_cmd_append();
8938 }
8939 else if (parser == "parse_cmd_break") {
8940 this.parse_cmd_break();
8941 }
8942 else if (parser == "parse_cmd_call") {
8943 this.parse_cmd_call();
8944 }
8945 else if (parser == "parse_cmd_catch") {
8946 this.parse_cmd_catch();
8947 }
8948 else if (parser == "parse_cmd_common") {
8949 this.parse_cmd_common();
8950 }
8951 else if (parser == "parse_cmd_continue") {
8952 this.parse_cmd_continue();
8953 }
8954 else if (parser == "parse_cmd_delfunction") {
8955 this.parse_cmd_delfunction();
8956 }
8957 else if (parser == "parse_cmd_echo") {
8958 this.parse_cmd_echo();
8959 }
8960 else if (parser == "parse_cmd_echoerr") {
8961 this.parse_cmd_echoerr();
8962 }
8963 else if (parser == "parse_cmd_echohl") {
8964 this.parse_cmd_echohl();
8965 }
8966 else if (parser == "parse_cmd_echomsg") {
8967 this.parse_cmd_echomsg();
8968 }
8969 else if (parser == "parse_cmd_echon") {
8970 this.parse_cmd_echon();
8971 }
8972 else if (parser == "parse_cmd_else") {
8973 this.parse_cmd_else();
8974 }
8975 else if (parser == "parse_cmd_elseif") {
8976 this.parse_cmd_elseif();
8977 }
8978 else if (parser == "parse_cmd_endfor") {
8979 this.parse_cmd_endfor();
8980 }
8981 else if (parser == "parse_cmd_endfunction") {
8982 this.parse_cmd_endfunction();
8983 }
8984 else if (parser == "parse_cmd_endif") {
8985 this.parse_cmd_endif();
8986 }
8987 else if (parser == "parse_cmd_endtry") {
8988 this.parse_cmd_endtry();
8989 }
8990 else if (parser == "parse_cmd_endwhile") {
8991 this.parse_cmd_endwhile();
8992 }
8993 else if (parser == "parse_cmd_execute") {
8994 this.parse_cmd_execute();
8995 }
8996 else if (parser == "parse_cmd_finally") {
8997 this.parse_cmd_finally();
8998 }
8999 else if (parser == "parse_cmd_finish") {
9000 this.parse_cmd_finish();
9001 }
9002 else if (parser == "parse_cmd_for") {
9003 this.parse_cmd_for();
9004 }
9005 else if (parser == "parse_cmd_function") {
9006 this.parse_cmd_function();
9007 }
9008 else if (parser == "parse_cmd_if") {
9009 this.parse_cmd_if();
9010 }
9011 else if (parser == "parse_cmd_insert") {
9012 this.parse_cmd_insert();
9013 }
9014 else if (parser == "parse_cmd_let") {
9015 this.parse_cmd_let();
9016 }
9017 else if (parser == "parse_cmd_const") {
9018 this.parse_cmd_const();
9019 }
9020 else if (parser == "parse_cmd_loadkeymap") {
9021 this.parse_cmd_loadkeymap();
9022 }
9023 else if (parser == "parse_cmd_lockvar") {
9024 this.parse_cmd_lockvar();
9025 }
9026 else if (parser == "parse_cmd_lua") {
9027 this.parse_cmd_lua();
9028 }
9029 else if (parser == "parse_cmd_modifier_range") {
9030 this.parse_cmd_modifier_range();
9031 }
9032 else if (parser == "parse_cmd_mzscheme") {
9033 this.parse_cmd_mzscheme();
9034 }
9035 else if (parser == "parse_cmd_perl") {
9036 this.parse_cmd_perl();
9037 }
9038 else if (parser == "parse_cmd_python") {
9039 this.parse_cmd_python();
9040 }
9041 else if (parser == "parse_cmd_python3") {
9042 this.parse_cmd_python3();
9043 }
9044 else if (parser == "parse_cmd_return") {
9045 this.parse_cmd_return();
9046 }
9047 else if (parser == "parse_cmd_ruby") {
9048 this.parse_cmd_ruby();
9049 }
9050 else if (parser == "parse_cmd_tcl") {
9051 this.parse_cmd_tcl();
9052 }
9053 else if (parser == "parse_cmd_throw") {
9054 this.parse_cmd_throw();
9055 }
9056 else if (parser == "parse_cmd_eval") {
9057 this.parse_cmd_eval();
9058 }
9059 else if (parser == "parse_cmd_try") {
9060 this.parse_cmd_try();
9061 }
9062 else if (parser == "parse_cmd_unlet") {
9063 this.parse_cmd_unlet();
9064 }
9065 else if (parser == "parse_cmd_unlockvar") {
9066 this.parse_cmd_unlockvar();
9067 }
9068 else if (parser == "parse_cmd_usercmd") {
9069 this.parse_cmd_usercmd();
9070 }
9071 else if (parser == "parse_cmd_while") {
9072 this.parse_cmd_while();
9073 }
9074 else if (parser == "parse_wincmd") {
9075 this.parse_wincmd();
9076 }
9077 else if (parser == "parse_cmd_syntax") {
9078 this.parse_cmd_syntax();
9079 }
9080 else {
9081 throw viml_printf("unknown parser: %s", viml_string(parser));
9082 }
9083}
9084
9085VimLParser.prototype.find_command = function() {
9086 var c = this.reader.peekn(1);
9087 var name = "";
9088 if (c == "k") {
9089 this.reader.getn(1);
9090 var name = "k";
9091 }
9092 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
9093 this.reader.getn(1);
9094 var name = "substitute";
9095 }
9096 else if (viml_eqregh(c, "[@*!=><&~#]")) {
9097 this.reader.getn(1);
9098 var name = c;
9099 }
9100 else if (this.reader.peekn(2) == "py") {
9101 var name = this.reader.read_alnum();
9102 }
9103 else {
9104 var pos = this.reader.tell();
9105 var name = this.reader.read_alpha();
9106 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
9107 this.reader.seek_set(pos);
9108 var name = this.reader.getn(viml_len(name) - 1);
9109 }
9110 }
9111 if (name == "") {
9112 return NIL;
9113 }
9114 if (viml_has_key(this.find_command_cache, name)) {
9115 return this.find_command_cache[name];
9116 }
9117 var cmd = NIL;
9118 var __c4 = this.builtin_commands;
9119 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
9120 var x = __c4[__i4];
9121 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9122 delete cmd;
9123 var cmd = x;
9124 break;
9125 }
9126 }
9127 if (this.neovim) {
9128 var __c5 = this.neovim_additional_commands;
9129 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
9130 var x = __c5[__i5];
9131 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9132 delete cmd;
9133 var cmd = x;
9134 break;
9135 }
9136 }
9137 var __c6 = this.neovim_removed_commands;
9138 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
9139 var x = __c6[__i6];
9140 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9141 delete cmd;
9142 var cmd = NIL;
9143 break;
9144 }
9145 }
9146 }
9147 // FIXME: user defined command
9148 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
9149 name += this.reader.read_alnum();
9150 delete cmd;
9151 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
9152 }
9153 this.find_command_cache[name] = cmd;
9154 return cmd;
9155}
9156
9157// TODO:
9158VimLParser.prototype.parse_hashbang = function() {
9159 this.reader.getn(-1);
9160}
9161
9162// TODO:
9163// ++opt=val
9164VimLParser.prototype.parse_argopt = function() {
9165 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
9166 var s = this.reader.peekn(20);
9167 if (viml_eqregh(s, "^++bin\\>")) {
9168 this.reader.getn(5);
9169 this.ea.force_bin = 1;
9170 }
9171 else if (viml_eqregh(s, "^++nobin\\>")) {
9172 this.reader.getn(7);
9173 this.ea.force_bin = 2;
9174 }
9175 else if (viml_eqregh(s, "^++edit\\>")) {
9176 this.reader.getn(6);
9177 this.ea.read_edit = 1;
9178 }
9179 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
9180 this.reader.getn(5);
9181 this.ea.force_ff = this.reader.read_alpha();
9182 }
9183 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
9184 this.reader.getn(13);
9185 this.ea.force_ff = this.reader.read_alpha();
9186 }
9187 else if (viml_eqregh(s, "^++enc=\\S")) {
9188 this.reader.getn(6);
9189 this.ea.force_enc = this.reader.read_nonwhite();
9190 }
9191 else if (viml_eqregh(s, "^++encoding=\\S")) {
9192 this.reader.getn(11);
9193 this.ea.force_enc = this.reader.read_nonwhite();
9194 }
9195 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
9196 this.reader.getn(6);
9197 if (viml_eqregh(s, "^++bad=keep")) {
9198 this.ea.bad_char = this.reader.getn(4);
9199 }
9200 else if (viml_eqregh(s, "^++bad=drop")) {
9201 this.ea.bad_char = this.reader.getn(4);
9202 }
9203 else {
9204 this.ea.bad_char = this.reader.getn(1);
9205 }
9206 }
9207 else if (viml_eqregh(s, "^++")) {
9208 throw Err("E474: Invalid Argument", this.reader.getpos());
9209 }
9210 else {
9211 break;
9212 }
9213 this.reader.skip_white();
9214 }
9215}
9216
9217// TODO:
9218// +command
9219VimLParser.prototype.parse_argcmd = function() {
9220 if (this.reader.peekn(1) == "+") {
9221 this.reader.getn(1);
9222 if (this.reader.peekn(1) == " ") {
9223 this.ea.do_ecmd_cmd = "$";
9224 }
9225 else {
9226 this.ea.do_ecmd_cmd = this.read_cmdarg();
9227 }
9228 }
9229}
9230
9231VimLParser.prototype.read_cmdarg = function() {
9232 var r = "";
9233 while (TRUE) {
9234 var c = this.reader.peekn(1);
9235 if (c == "" || iswhite(c)) {
9236 break;
9237 }
9238 this.reader.getn(1);
9239 if (c == "\\") {
9240 var c = this.reader.getn(1);
9241 }
9242 r += c;
9243 }
9244 return r;
9245}
9246
9247VimLParser.prototype.parse_comment = function() {
9248 var npos = this.reader.getpos();
9249 var c = this.reader.get();
9250 if (c != "\"") {
9251 throw Err(viml_printf("unexpected character: %s", c), npos);
9252 }
9253 var node = Node(NODE_COMMENT);
9254 node.pos = npos;
9255 node.str = this.reader.getn(-1);
9256 this.add_node(node);
9257}
9258
9259VimLParser.prototype.parse_trail = function() {
9260 this.reader.skip_white();
9261 var c = this.reader.peek();
9262 if (c == "<EOF>") {
9263 // pass
9264 }
9265 else if (c == "<EOL>") {
9266 this.reader.get();
9267 }
9268 else if (c == "|") {
9269 this.reader.get();
9270 }
9271 else if (c == "\"") {
9272 this.parse_comment();
9273 this.reader.get();
9274 }
9275 else {
9276 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
9277 }
9278}
9279
9280// modifier or range only command line
9281VimLParser.prototype.parse_cmd_modifier_range = function() {
9282 var node = Node(NODE_EXCMD);
9283 node.pos = this.ea.cmdpos;
9284 node.ea = this.ea;
9285 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
9286 this.add_node(node);
9287}
9288
9289// TODO:
9290VimLParser.prototype.parse_cmd_common = function() {
9291 var end = this.reader.getpos();
9292 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
9293 var end = this.separate_nextcmd();
9294 }
9295 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
9296 while (TRUE) {
9297 var end = this.reader.getpos();
9298 if (this.reader.getn(1) == "") {
9299 break;
9300 }
9301 }
9302 }
9303 else {
9304 while (TRUE) {
9305 var end = this.reader.getpos();
9306 if (this.reader.getn(1) == "") {
9307 break;
9308 }
9309 }
9310 }
9311 var node = Node(NODE_EXCMD);
9312 node.pos = this.ea.cmdpos;
9313 node.ea = this.ea;
9314 node.str = this.reader.getstr(this.ea.linepos, end);
9315 this.add_node(node);
9316}
9317
9318VimLParser.prototype.separate_nextcmd = function() {
9319 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
9320 this.skip_vimgrep_pat();
9321 }
9322 var pc = "";
9323 var end = this.reader.getpos();
9324 var nospend = end;
9325 while (TRUE) {
9326 var end = this.reader.getpos();
9327 if (!iswhite(pc)) {
9328 var nospend = end;
9329 }
9330 var c = this.reader.peek();
9331 if (c == "<EOF>" || c == "<EOL>") {
9332 break;
9333 }
9334 else if (c == "\x16") {
9335 // <C-V>
9336 this.reader.get();
9337 var end = this.reader.getpos();
9338 var nospend = this.reader.getpos();
9339 var c = this.reader.peek();
9340 if (c == "<EOF>" || c == "<EOL>") {
9341 break;
9342 }
9343 this.reader.get();
9344 }
9345 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
9346 this.reader.getn(2);
9347 this.parse_expr();
9348 var c = this.reader.peekn(1);
9349 if (c != "`") {
9350 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9351 }
9352 this.reader.getn(1);
9353 }
9354 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 != "@")) {
9355 var has_cpo_bar = FALSE;
9356 // &cpoptions =~ 'b'
9357 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
9358 this.reader.get();
9359 }
9360 else {
9361 break;
9362 }
9363 }
9364 else {
9365 this.reader.get();
9366 }
9367 var pc = c;
9368 }
9369 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
9370 var end = nospend;
9371 }
9372 return end;
9373}
9374
9375// FIXME
9376VimLParser.prototype.skip_vimgrep_pat = function() {
9377 if (this.reader.peekn(1) == "") {
9378 // pass
9379 }
9380 else if (isidc(this.reader.peekn(1))) {
9381 // :vimgrep pattern fname
9382 this.reader.read_nonwhite();
9383 }
9384 else {
9385 // :vimgrep /pattern/[g][j] fname
9386 var c = this.reader.getn(1);
9387 var __tmp = this.parse_pattern(c);
9388 var _ = __tmp[0];
9389 var endc = __tmp[1];
9390 if (c != endc) {
9391 return;
9392 }
9393 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
9394 this.reader.getn(1);
9395 }
9396 }
9397}
9398
9399VimLParser.prototype.parse_cmd_append = function() {
9400 this.reader.setpos(this.ea.linepos);
9401 var cmdline = this.reader.readline();
9402 var lines = [cmdline];
9403 var m = ".";
9404 while (TRUE) {
9405 if (this.reader.peek() == "<EOF>") {
9406 break;
9407 }
9408 var line = this.reader.getn(-1);
9409 viml_add(lines, line);
9410 if (line == m) {
9411 break;
9412 }
9413 this.reader.get();
9414 }
9415 var node = Node(NODE_EXCMD);
9416 node.pos = this.ea.cmdpos;
9417 node.ea = this.ea;
9418 node.str = viml_join(lines, "\n");
9419 this.add_node(node);
9420}
9421
9422VimLParser.prototype.parse_cmd_insert = function() {
9423 this.parse_cmd_append();
9424}
9425
9426VimLParser.prototype.parse_cmd_loadkeymap = function() {
9427 this.reader.setpos(this.ea.linepos);
9428 var cmdline = this.reader.readline();
9429 var lines = [cmdline];
9430 while (TRUE) {
9431 if (this.reader.peek() == "<EOF>") {
9432 break;
9433 }
9434 var line = this.reader.readline();
9435 viml_add(lines, line);
9436 }
9437 var node = Node(NODE_EXCMD);
9438 node.pos = this.ea.cmdpos;
9439 node.ea = this.ea;
9440 node.str = viml_join(lines, "\n");
9441 this.add_node(node);
9442}
9443
9444VimLParser.prototype.parse_cmd_lua = function() {
9445 var lines = [];
9446 this.reader.skip_white();
9447 if (this.reader.peekn(2) == "<<") {
9448 this.reader.getn(2);
9449 this.reader.skip_white();
9450 var m = this.reader.readline();
9451 if (m == "") {
9452 var m = ".";
9453 }
9454 this.reader.setpos(this.ea.linepos);
9455 var cmdline = this.reader.getn(-1);
9456 var lines = [cmdline];
9457 this.reader.get();
9458 while (TRUE) {
9459 if (this.reader.peek() == "<EOF>") {
9460 break;
9461 }
9462 var line = this.reader.getn(-1);
9463 viml_add(lines, line);
9464 if (line == m) {
9465 break;
9466 }
9467 this.reader.get();
9468 }
9469 }
9470 else {
9471 this.reader.setpos(this.ea.linepos);
9472 var cmdline = this.reader.getn(-1);
9473 var lines = [cmdline];
9474 }
9475 var node = Node(NODE_EXCMD);
9476 node.pos = this.ea.cmdpos;
9477 node.ea = this.ea;
9478 node.str = viml_join(lines, "\n");
9479 this.add_node(node);
9480}
9481
9482VimLParser.prototype.parse_cmd_mzscheme = function() {
9483 this.parse_cmd_lua();
9484}
9485
9486VimLParser.prototype.parse_cmd_perl = function() {
9487 this.parse_cmd_lua();
9488}
9489
9490VimLParser.prototype.parse_cmd_python = function() {
9491 this.parse_cmd_lua();
9492}
9493
9494VimLParser.prototype.parse_cmd_python3 = function() {
9495 this.parse_cmd_lua();
9496}
9497
9498VimLParser.prototype.parse_cmd_ruby = function() {
9499 this.parse_cmd_lua();
9500}
9501
9502VimLParser.prototype.parse_cmd_tcl = function() {
9503 this.parse_cmd_lua();
9504}
9505
9506VimLParser.prototype.parse_cmd_finish = function() {
9507 this.parse_cmd_common();
9508 if (this.context[0].type == NODE_TOPLEVEL) {
9509 this.reader.seek_end(0);
9510 }
9511}
9512
9513// FIXME
9514VimLParser.prototype.parse_cmd_usercmd = function() {
9515 this.parse_cmd_common();
9516}
9517
9518VimLParser.prototype.parse_cmd_function = function() {
9519 var pos = this.reader.tell();
9520 this.reader.skip_white();
9521 // :function
9522 if (this.ends_excmds(this.reader.peek())) {
9523 this.reader.seek_set(pos);
9524 this.parse_cmd_common();
9525 return;
9526 }
9527 // :function /pattern
9528 if (this.reader.peekn(1) == "/") {
9529 this.reader.seek_set(pos);
9530 this.parse_cmd_common();
9531 return;
9532 }
9533 var left = this.parse_lvalue_func();
9534 this.reader.skip_white();
9535 if (left.type == NODE_IDENTIFIER) {
9536 var s = left.value;
9537 var ss = viml_split(s, "\\zs");
9538 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
9539 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
9540 }
9541 }
9542 // :function {name}
9543 if (this.reader.peekn(1) != "(") {
9544 this.reader.seek_set(pos);
9545 this.parse_cmd_common();
9546 return;
9547 }
9548 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
9549 var node = Node(NODE_FUNCTION);
9550 node.pos = this.ea.cmdpos;
9551 node.body = [];
9552 node.ea = this.ea;
9553 node.left = left;
9554 node.rlist = [];
9555 node.default_args = [];
9556 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
9557 node.endfunction = NIL;
9558 this.reader.getn(1);
9559 var tokenizer = new ExprTokenizer(this.reader);
9560 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9561 tokenizer.get();
9562 }
9563 else {
9564 var named = {};
9565 while (TRUE) {
9566 var varnode = Node(NODE_IDENTIFIER);
9567 var token = tokenizer.get();
9568 if (token.type == TOKEN_IDENTIFIER) {
9569 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
9570 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
9571 }
9572 else if (viml_has_key(named, token.value)) {
9573 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
9574 }
9575 named[token.value] = 1;
9576 varnode.pos = token.pos;
9577 varnode.value = token.value;
9578 viml_add(node.rlist, varnode);
9579 if (tokenizer.peek().type == TOKEN_EQ) {
9580 tokenizer.get();
9581 viml_add(node.default_args, this.parse_expr());
9582 }
9583 else if (viml_len(node.default_args) > 0) {
9584 throw Err("E989: Non-default argument follows default argument", varnode.pos);
9585 }
9586 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
9587 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
9588 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
9589 }
9590 var token = tokenizer.get();
9591 if (token.type == TOKEN_COMMA) {
9592 // XXX: Vim allows last comma. F(a, b, ) => OK
9593 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9594 tokenizer.get();
9595 break;
9596 }
9597 }
9598 else if (token.type == TOKEN_PCLOSE) {
9599 break;
9600 }
9601 else {
9602 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9603 }
9604 }
9605 else if (token.type == TOKEN_DOTDOTDOT) {
9606 varnode.pos = token.pos;
9607 varnode.value = token.value;
9608 viml_add(node.rlist, varnode);
9609 var token = tokenizer.get();
9610 if (token.type == TOKEN_PCLOSE) {
9611 break;
9612 }
9613 else {
9614 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9615 }
9616 }
9617 else {
9618 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9619 }
9620 }
9621 }
9622 while (TRUE) {
9623 this.reader.skip_white();
9624 var epos = this.reader.getpos();
9625 var key = this.reader.read_alpha();
9626 if (key == "") {
9627 break;
9628 }
9629 else if (key == "range") {
9630 node.attr.range = TRUE;
9631 }
9632 else if (key == "abort") {
9633 node.attr.abort = TRUE;
9634 }
9635 else if (key == "dict") {
9636 node.attr.dict = TRUE;
9637 }
9638 else if (key == "closure") {
9639 node.attr.closure = TRUE;
9640 }
9641 else {
9642 throw Err(viml_printf("unexpected token: %s", key), epos);
9643 }
9644 }
9645 this.add_node(node);
9646 this.push_context(node);
9647}
9648
9649VimLParser.prototype.parse_cmd_endfunction = function() {
9650 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
9651 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
9652 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
9653 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
9654 if (this.context[0].type != NODE_FUNCTION) {
9655 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
9656 }
9657 this.reader.getn(-1);
9658 var node = Node(NODE_ENDFUNCTION);
9659 node.pos = this.ea.cmdpos;
9660 node.ea = this.ea;
9661 this.context[0].endfunction = node;
9662 this.pop_context();
9663}
9664
9665VimLParser.prototype.parse_cmd_delfunction = function() {
9666 var node = Node(NODE_DELFUNCTION);
9667 node.pos = this.ea.cmdpos;
9668 node.ea = this.ea;
9669 node.left = this.parse_lvalue_func();
9670 this.add_node(node);
9671}
9672
9673VimLParser.prototype.parse_cmd_return = function() {
9674 if (this.find_context(NODE_FUNCTION) == -1) {
9675 throw Err("E133: :return not inside a function", this.ea.cmdpos);
9676 }
9677 var node = Node(NODE_RETURN);
9678 node.pos = this.ea.cmdpos;
9679 node.ea = this.ea;
9680 node.left = NIL;
9681 this.reader.skip_white();
9682 var c = this.reader.peek();
9683 if (c == "\"" || !this.ends_excmds(c)) {
9684 node.left = this.parse_expr();
9685 }
9686 this.add_node(node);
9687}
9688
9689VimLParser.prototype.parse_cmd_call = function() {
9690 var node = Node(NODE_EXCALL);
9691 node.pos = this.ea.cmdpos;
9692 node.ea = this.ea;
9693 this.reader.skip_white();
9694 var c = this.reader.peek();
9695 if (this.ends_excmds(c)) {
9696 throw Err("E471: Argument required", this.reader.getpos());
9697 }
9698 node.left = this.parse_expr();
9699 if (node.left.type != NODE_CALL) {
9700 throw Err("Not a function call", node.left.pos);
9701 }
9702 this.add_node(node);
9703}
9704
9705VimLParser.prototype.parse_heredoc = function() {
9706 var node = Node(NODE_HEREDOC);
9707 node.pos = this.ea.cmdpos;
9708 node.op = "";
9709 node.rlist = [];
9710 node.body = [];
9711 while (TRUE) {
9712 this.reader.skip_white();
9713 var key = this.reader.read_word();
9714 if (key == "") {
9715 break;
9716 }
9717 if (!islower(key[0])) {
9718 node.op = key;
9719 break;
9720 }
9721 else {
9722 viml_add(node.rlist, key);
9723 }
9724 }
9725 if (node.op == "") {
9726 throw Err("E172: Missing marker", this.reader.getpos());
9727 }
9728 this.parse_trail();
9729 while (TRUE) {
9730 if (this.reader.peek() == "<EOF>") {
9731 break;
9732 }
9733 var line = this.reader.getn(-1);
9734 if (line == node.op) {
9735 return node;
9736 }
9737 viml_add(node.body, line);
9738 this.reader.get();
9739 }
9740 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
9741}
9742
9743VimLParser.prototype.parse_cmd_let = function() {
9744 var pos = this.reader.tell();
9745 this.reader.skip_white();
9746 // :let
9747 if (this.ends_excmds(this.reader.peek())) {
9748 this.reader.seek_set(pos);
9749 this.parse_cmd_common();
9750 return;
9751 }
9752 var lhs = this.parse_letlhs();
9753 this.reader.skip_white();
9754 var s1 = this.reader.peekn(1);
9755 var s2 = this.reader.peekn(2);
9756 // TODO check scriptversion?
9757 if (s2 == "..") {
9758 var s2 = this.reader.peekn(3);
9759 }
9760 else if (s2 == "=<") {
9761 var s2 = this.reader.peekn(3);
9762 }
9763 // :let {var-name} ..
9764 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
9765 this.reader.seek_set(pos);
9766 this.parse_cmd_common();
9767 return;
9768 }
9769 // :let left op right
9770 var node = Node(NODE_LET);
9771 node.pos = this.ea.cmdpos;
9772 node.ea = this.ea;
9773 node.op = "";
9774 node.left = lhs.left;
9775 node.list = lhs.list;
9776 node.rest = lhs.rest;
9777 node.right = NIL;
9778 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
9779 this.reader.getn(viml_len(s2));
9780 node.op = s2;
9781 }
9782 else if (s2 == "=<<") {
9783 this.reader.getn(viml_len(s2));
9784 this.reader.skip_white();
9785 node.op = s2;
9786 node.right = this.parse_heredoc();
9787 this.add_node(node);
9788 return;
9789 }
9790 else if (s1 == "=") {
9791 this.reader.getn(1);
9792 node.op = s1;
9793 }
9794 else {
9795 throw "NOT REACHED";
9796 }
9797 node.right = this.parse_expr();
9798 this.add_node(node);
9799}
9800
9801VimLParser.prototype.parse_cmd_const = function() {
9802 var pos = this.reader.tell();
9803 this.reader.skip_white();
9804 // :const
9805 if (this.ends_excmds(this.reader.peek())) {
9806 this.reader.seek_set(pos);
9807 this.parse_cmd_common();
9808 return;
9809 }
9810 var lhs = this.parse_constlhs();
9811 this.reader.skip_white();
9812 var s1 = this.reader.peekn(1);
9813 // :const {var-name}
9814 if (this.ends_excmds(s1) || s1 != "=") {
9815 this.reader.seek_set(pos);
9816 this.parse_cmd_common();
9817 return;
9818 }
9819 // :const left op right
9820 var node = Node(NODE_CONST);
9821 node.pos = this.ea.cmdpos;
9822 node.ea = this.ea;
9823 this.reader.getn(1);
9824 node.op = s1;
9825 node.left = lhs.left;
9826 node.list = lhs.list;
9827 node.rest = lhs.rest;
9828 node.right = this.parse_expr();
9829 this.add_node(node);
9830}
9831
9832VimLParser.prototype.parse_cmd_unlet = function() {
9833 var node = Node(NODE_UNLET);
9834 node.pos = this.ea.cmdpos;
9835 node.ea = this.ea;
9836 node.list = this.parse_lvaluelist();
9837 this.add_node(node);
9838}
9839
9840VimLParser.prototype.parse_cmd_lockvar = function() {
9841 var node = Node(NODE_LOCKVAR);
9842 node.pos = this.ea.cmdpos;
9843 node.ea = this.ea;
9844 node.depth = NIL;
9845 node.list = [];
9846 this.reader.skip_white();
9847 if (isdigit(this.reader.peekn(1))) {
9848 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9849 }
9850 node.list = this.parse_lvaluelist();
9851 this.add_node(node);
9852}
9853
9854VimLParser.prototype.parse_cmd_unlockvar = function() {
9855 var node = Node(NODE_UNLOCKVAR);
9856 node.pos = this.ea.cmdpos;
9857 node.ea = this.ea;
9858 node.depth = NIL;
9859 node.list = [];
9860 this.reader.skip_white();
9861 if (isdigit(this.reader.peekn(1))) {
9862 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9863 }
9864 node.list = this.parse_lvaluelist();
9865 this.add_node(node);
9866}
9867
9868VimLParser.prototype.parse_cmd_if = function() {
9869 var node = Node(NODE_IF);
9870 node.pos = this.ea.cmdpos;
9871 node.body = [];
9872 node.ea = this.ea;
9873 node.cond = this.parse_expr();
9874 node.elseif = [];
9875 node._else = NIL;
9876 node.endif = NIL;
9877 this.add_node(node);
9878 this.push_context(node);
9879}
9880
9881VimLParser.prototype.parse_cmd_elseif = function() {
9882 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9883 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9884 }
9885 if (this.context[0].type != NODE_IF) {
9886 this.pop_context();
9887 }
9888 var node = Node(NODE_ELSEIF);
9889 node.pos = this.ea.cmdpos;
9890 node.body = [];
9891 node.ea = this.ea;
9892 node.cond = this.parse_expr();
9893 viml_add(this.context[0].elseif, node);
9894 this.push_context(node);
9895}
9896
9897VimLParser.prototype.parse_cmd_else = function() {
9898 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9899 throw Err("E581: :else without :if", this.ea.cmdpos);
9900 }
9901 if (this.context[0].type != NODE_IF) {
9902 this.pop_context();
9903 }
9904 var node = Node(NODE_ELSE);
9905 node.pos = this.ea.cmdpos;
9906 node.body = [];
9907 node.ea = this.ea;
9908 this.context[0]._else = node;
9909 this.push_context(node);
9910}
9911
9912VimLParser.prototype.parse_cmd_endif = function() {
9913 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9914 throw Err("E580: :endif without :if", this.ea.cmdpos);
9915 }
9916 if (this.context[0].type != NODE_IF) {
9917 this.pop_context();
9918 }
9919 var node = Node(NODE_ENDIF);
9920 node.pos = this.ea.cmdpos;
9921 node.ea = this.ea;
9922 this.context[0].endif = node;
9923 this.pop_context();
9924}
9925
9926VimLParser.prototype.parse_cmd_while = function() {
9927 var node = Node(NODE_WHILE);
9928 node.pos = this.ea.cmdpos;
9929 node.body = [];
9930 node.ea = this.ea;
9931 node.cond = this.parse_expr();
9932 node.endwhile = NIL;
9933 this.add_node(node);
9934 this.push_context(node);
9935}
9936
9937VimLParser.prototype.parse_cmd_endwhile = function() {
9938 if (this.context[0].type != NODE_WHILE) {
9939 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9940 }
9941 var node = Node(NODE_ENDWHILE);
9942 node.pos = this.ea.cmdpos;
9943 node.ea = this.ea;
9944 this.context[0].endwhile = node;
9945 this.pop_context();
9946}
9947
9948VimLParser.prototype.parse_cmd_for = function() {
9949 var node = Node(NODE_FOR);
9950 node.pos = this.ea.cmdpos;
9951 node.body = [];
9952 node.ea = this.ea;
9953 node.left = NIL;
9954 node.right = NIL;
9955 node.endfor = NIL;
9956 var lhs = this.parse_letlhs();
9957 node.left = lhs.left;
9958 node.list = lhs.list;
9959 node.rest = lhs.rest;
9960 this.reader.skip_white();
9961 var epos = this.reader.getpos();
9962 if (this.reader.read_alpha() != "in") {
9963 throw Err("Missing \"in\" after :for", epos);
9964 }
9965 node.right = this.parse_expr();
9966 this.add_node(node);
9967 this.push_context(node);
9968}
9969
9970VimLParser.prototype.parse_cmd_endfor = function() {
9971 if (this.context[0].type != NODE_FOR) {
9972 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9973 }
9974 var node = Node(NODE_ENDFOR);
9975 node.pos = this.ea.cmdpos;
9976 node.ea = this.ea;
9977 this.context[0].endfor = node;
9978 this.pop_context();
9979}
9980
9981VimLParser.prototype.parse_cmd_continue = function() {
9982 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9983 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9984 }
9985 var node = Node(NODE_CONTINUE);
9986 node.pos = this.ea.cmdpos;
9987 node.ea = this.ea;
9988 this.add_node(node);
9989}
9990
9991VimLParser.prototype.parse_cmd_break = function() {
9992 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9993 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9994 }
9995 var node = Node(NODE_BREAK);
9996 node.pos = this.ea.cmdpos;
9997 node.ea = this.ea;
9998 this.add_node(node);
9999}
10000
10001VimLParser.prototype.parse_cmd_try = function() {
10002 var node = Node(NODE_TRY);
10003 node.pos = this.ea.cmdpos;
10004 node.body = [];
10005 node.ea = this.ea;
10006 node.catch = [];
10007 node._finally = NIL;
10008 node.endtry = NIL;
10009 this.add_node(node);
10010 this.push_context(node);
10011}
10012
10013VimLParser.prototype.parse_cmd_catch = function() {
10014 if (this.context[0].type == NODE_FINALLY) {
10015 throw Err("E604: :catch after :finally", this.ea.cmdpos);
10016 }
10017 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10018 throw Err("E603: :catch without :try", this.ea.cmdpos);
10019 }
10020 if (this.context[0].type != NODE_TRY) {
10021 this.pop_context();
10022 }
10023 var node = Node(NODE_CATCH);
10024 node.pos = this.ea.cmdpos;
10025 node.body = [];
10026 node.ea = this.ea;
10027 node.pattern = NIL;
10028 this.reader.skip_white();
10029 if (!this.ends_excmds(this.reader.peek())) {
10030 var __tmp = this.parse_pattern(this.reader.get());
10031 node.pattern = __tmp[0];
10032 var _ = __tmp[1];
10033 }
10034 viml_add(this.context[0].catch, node);
10035 this.push_context(node);
10036}
10037
10038VimLParser.prototype.parse_cmd_finally = function() {
10039 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10040 throw Err("E606: :finally without :try", this.ea.cmdpos);
10041 }
10042 if (this.context[0].type != NODE_TRY) {
10043 this.pop_context();
10044 }
10045 var node = Node(NODE_FINALLY);
10046 node.pos = this.ea.cmdpos;
10047 node.body = [];
10048 node.ea = this.ea;
10049 this.context[0]._finally = node;
10050 this.push_context(node);
10051}
10052
10053VimLParser.prototype.parse_cmd_endtry = function() {
10054 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
10055 throw Err("E602: :endtry without :try", this.ea.cmdpos);
10056 }
10057 if (this.context[0].type != NODE_TRY) {
10058 this.pop_context();
10059 }
10060 var node = Node(NODE_ENDTRY);
10061 node.pos = this.ea.cmdpos;
10062 node.ea = this.ea;
10063 this.context[0].endtry = node;
10064 this.pop_context();
10065}
10066
10067VimLParser.prototype.parse_cmd_throw = function() {
10068 var node = Node(NODE_THROW);
10069 node.pos = this.ea.cmdpos;
10070 node.ea = this.ea;
10071 node.left = this.parse_expr();
10072 this.add_node(node);
10073}
10074
10075VimLParser.prototype.parse_cmd_eval = function() {
10076 var node = Node(NODE_EVAL);
10077 node.pos = this.ea.cmdpos;
10078 node.ea = this.ea;
10079 node.left = this.parse_expr();
10080 this.add_node(node);
10081}
10082
10083VimLParser.prototype.parse_cmd_echo = function() {
10084 var node = Node(NODE_ECHO);
10085 node.pos = this.ea.cmdpos;
10086 node.ea = this.ea;
10087 node.list = this.parse_exprlist();
10088 this.add_node(node);
10089}
10090
10091VimLParser.prototype.parse_cmd_echon = function() {
10092 var node = Node(NODE_ECHON);
10093 node.pos = this.ea.cmdpos;
10094 node.ea = this.ea;
10095 node.list = this.parse_exprlist();
10096 this.add_node(node);
10097}
10098
10099VimLParser.prototype.parse_cmd_echohl = function() {
10100 var node = Node(NODE_ECHOHL);
10101 node.pos = this.ea.cmdpos;
10102 node.ea = this.ea;
10103 node.str = "";
10104 while (!this.ends_excmds(this.reader.peek())) {
10105 node.str += this.reader.get();
10106 }
10107 this.add_node(node);
10108}
10109
10110VimLParser.prototype.parse_cmd_echomsg = function() {
10111 var node = Node(NODE_ECHOMSG);
10112 node.pos = this.ea.cmdpos;
10113 node.ea = this.ea;
10114 node.list = this.parse_exprlist();
10115 this.add_node(node);
10116}
10117
10118VimLParser.prototype.parse_cmd_echoerr = function() {
10119 var node = Node(NODE_ECHOERR);
10120 node.pos = this.ea.cmdpos;
10121 node.ea = this.ea;
10122 node.list = this.parse_exprlist();
10123 this.add_node(node);
10124}
10125
10126VimLParser.prototype.parse_cmd_execute = function() {
10127 var node = Node(NODE_EXECUTE);
10128 node.pos = this.ea.cmdpos;
10129 node.ea = this.ea;
10130 node.list = this.parse_exprlist();
10131 this.add_node(node);
10132}
10133
10134VimLParser.prototype.parse_expr = function() {
10135 return new ExprParser(this.reader).parse();
10136}
10137
10138VimLParser.prototype.parse_exprlist = function() {
10139 var list = [];
10140 while (TRUE) {
10141 this.reader.skip_white();
10142 var c = this.reader.peek();
10143 if (c != "\"" && this.ends_excmds(c)) {
10144 break;
10145 }
10146 var node = this.parse_expr();
10147 viml_add(list, node);
10148 }
10149 return list;
10150}
10151
10152VimLParser.prototype.parse_lvalue_func = function() {
10153 var p = new LvalueParser(this.reader);
10154 var node = p.parse();
10155 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) {
10156 return node;
10157 }
10158 throw Err("Invalid Expression", node.pos);
10159}
10160
10161// FIXME:
10162VimLParser.prototype.parse_lvalue = function() {
10163 var p = new LvalueParser(this.reader);
10164 var node = p.parse();
10165 if (node.type == NODE_IDENTIFIER) {
10166 if (!isvarname(node.value)) {
10167 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10168 }
10169 }
10170 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) {
10171 return node;
10172 }
10173 throw Err("Invalid Expression", node.pos);
10174}
10175
10176// TODO: merge with s:VimLParser.parse_lvalue()
10177VimLParser.prototype.parse_constlvalue = function() {
10178 var p = new LvalueParser(this.reader);
10179 var node = p.parse();
10180 if (node.type == NODE_IDENTIFIER) {
10181 if (!isvarname(node.value)) {
10182 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10183 }
10184 }
10185 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
10186 return node;
10187 }
10188 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
10189 throw Err("E996: Cannot lock a list or dict", node.pos);
10190 }
10191 else if (node.type == NODE_OPTION) {
10192 throw Err("E996: Cannot lock an option", node.pos);
10193 }
10194 else if (node.type == NODE_ENV) {
10195 throw Err("E996: Cannot lock an environment variable", node.pos);
10196 }
10197 else if (node.type == NODE_REG) {
10198 throw Err("E996: Cannot lock a register", node.pos);
10199 }
10200 throw Err("Invalid Expression", node.pos);
10201}
10202
10203VimLParser.prototype.parse_lvaluelist = function() {
10204 var list = [];
10205 var node = this.parse_expr();
10206 viml_add(list, node);
10207 while (TRUE) {
10208 this.reader.skip_white();
10209 if (this.ends_excmds(this.reader.peek())) {
10210 break;
10211 }
10212 var node = this.parse_lvalue();
10213 viml_add(list, node);
10214 }
10215 return list;
10216}
10217
10218// FIXME:
10219VimLParser.prototype.parse_letlhs = function() {
10220 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10221 var tokenizer = new ExprTokenizer(this.reader);
10222 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10223 tokenizer.get();
10224 lhs.list = [];
10225 while (TRUE) {
10226 var node = this.parse_lvalue();
10227 viml_add(lhs.list, node);
10228 var token = tokenizer.get();
10229 if (token.type == TOKEN_SQCLOSE) {
10230 break;
10231 }
10232 else if (token.type == TOKEN_COMMA) {
10233 continue;
10234 }
10235 else if (token.type == TOKEN_SEMICOLON) {
10236 var node = this.parse_lvalue();
10237 lhs.rest = node;
10238 var token = tokenizer.get();
10239 if (token.type == TOKEN_SQCLOSE) {
10240 break;
10241 }
10242 else {
10243 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10244 }
10245 }
10246 else {
10247 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10248 }
10249 }
10250 }
10251 else {
10252 lhs.left = this.parse_lvalue();
10253 }
10254 return lhs;
10255}
10256
10257// TODO: merge with s:VimLParser.parse_letlhs() ?
10258VimLParser.prototype.parse_constlhs = function() {
10259 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10260 var tokenizer = new ExprTokenizer(this.reader);
10261 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10262 tokenizer.get();
10263 lhs.list = [];
10264 while (TRUE) {
10265 var node = this.parse_lvalue();
10266 viml_add(lhs.list, node);
10267 var token = tokenizer.get();
10268 if (token.type == TOKEN_SQCLOSE) {
10269 break;
10270 }
10271 else if (token.type == TOKEN_COMMA) {
10272 continue;
10273 }
10274 else if (token.type == TOKEN_SEMICOLON) {
10275 var node = this.parse_lvalue();
10276 lhs.rest = node;
10277 var token = tokenizer.get();
10278 if (token.type == TOKEN_SQCLOSE) {
10279 break;
10280 }
10281 else {
10282 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10283 }
10284 }
10285 else {
10286 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10287 }
10288 }
10289 }
10290 else {
10291 lhs.left = this.parse_constlvalue();
10292 }
10293 return lhs;
10294}
10295
10296VimLParser.prototype.ends_excmds = function(c) {
10297 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
10298}
10299
10300// FIXME: validate argument
10301VimLParser.prototype.parse_wincmd = function() {
10302 var c = this.reader.getn(1);
10303 if (c == "") {
10304 throw Err("E471: Argument required", this.reader.getpos());
10305 }
10306 else if (c == "g" || c == "\x07") {
10307 // <C-G>
10308 var c2 = this.reader.getn(1);
10309 if (c2 == "" || iswhite(c2)) {
10310 throw Err("E474: Invalid Argument", this.reader.getpos());
10311 }
10312 }
10313 var end = this.reader.getpos();
10314 this.reader.skip_white();
10315 if (!this.ends_excmds(this.reader.peek())) {
10316 throw Err("E474: Invalid Argument", this.reader.getpos());
10317 }
10318 var node = Node(NODE_EXCMD);
10319 node.pos = this.ea.cmdpos;
10320 node.ea = this.ea;
10321 node.str = this.reader.getstr(this.ea.linepos, end);
10322 this.add_node(node);
10323}
10324
10325// FIXME: validate argument
10326VimLParser.prototype.parse_cmd_syntax = function() {
10327 var end = this.reader.getpos();
10328 while (TRUE) {
10329 var end = this.reader.getpos();
10330 var c = this.reader.peek();
10331 if (c == "/" || c == "'" || c == "\"") {
10332 this.reader.getn(1);
10333 this.parse_pattern(c);
10334 }
10335 else if (c == "=") {
10336 this.reader.getn(1);
10337 this.parse_pattern(" ");
10338 }
10339 else if (this.ends_excmds(c)) {
10340 break;
10341 }
10342 this.reader.getn(1);
10343 }
10344 var node = Node(NODE_EXCMD);
10345 node.pos = this.ea.cmdpos;
10346 node.ea = this.ea;
10347 node.str = this.reader.getstr(this.ea.linepos, end);
10348 this.add_node(node);
10349}
10350
10351VimLParser.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"}];
10352VimLParser.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"}];
10353// To find new builtin_commands, run the below script.
10354// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
10355VimLParser.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"}];
10356// To find new builtin_functions, run the below script.
10357// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
10358VimLParser.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"}];
10359function ExprTokenizer() { this.__init__.apply(this, arguments); }
10360ExprTokenizer.prototype.__init__ = function(reader) {
10361 this.reader = reader;
10362 this.cache = {};
10363}
10364
10365ExprTokenizer.prototype.token = function(type, value, pos) {
10366 return {"type":type, "value":value, "pos":pos};
10367}
10368
10369ExprTokenizer.prototype.peek = function() {
10370 var pos = this.reader.tell();
10371 var r = this.get();
10372 this.reader.seek_set(pos);
10373 return r;
10374}
10375
10376ExprTokenizer.prototype.get = function() {
10377 // FIXME: remove dirty hack
10378 if (viml_has_key(this.cache, this.reader.tell())) {
10379 var x = this.cache[this.reader.tell()];
10380 this.reader.seek_set(x[0]);
10381 return x[1];
10382 }
10383 var pos = this.reader.tell();
10384 this.reader.skip_white();
10385 var r = this.get2();
10386 this.cache[pos] = [this.reader.tell(), r];
10387 return r;
10388}
10389
10390ExprTokenizer.prototype.get2 = function() {
10391 var r = this.reader;
10392 var pos = r.getpos();
10393 var c = r.peek();
10394 if (c == "<EOF>") {
10395 return this.token(TOKEN_EOF, c, pos);
10396 }
10397 else if (c == "<EOL>") {
10398 r.seek_cur(1);
10399 return this.token(TOKEN_EOL, c, pos);
10400 }
10401 else if (iswhite(c)) {
10402 var s = r.read_white();
10403 return this.token(TOKEN_SPACE, s, pos);
10404 }
10405 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
10406 var s = r.getn(3);
10407 s += r.read_xdigit();
10408 return this.token(TOKEN_NUMBER, s, pos);
10409 }
10410 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
10411 var s = r.getn(3);
10412 s += r.read_bdigit();
10413 return this.token(TOKEN_NUMBER, s, pos);
10414 }
10415 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
10416 var s = r.getn(2);
10417 s += r.read_blob();
10418 return this.token(TOKEN_BLOB, s, pos);
10419 }
10420 else if (isdigit(c)) {
10421 var s = r.read_digit();
10422 if (r.p(0) == "." && isdigit(r.p(1))) {
10423 s += r.getn(1);
10424 s += r.read_digit();
10425 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
10426 s += r.getn(2);
10427 s += r.read_digit();
10428 }
10429 }
10430 return this.token(TOKEN_NUMBER, s, pos);
10431 }
10432 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
10433 if (r.p(2) == "?") {
10434 r.seek_cur(3);
10435 return this.token(TOKEN_ISCI, "is?", pos);
10436 }
10437 else if (r.p(2) == "#") {
10438 r.seek_cur(3);
10439 return this.token(TOKEN_ISCS, "is#", pos);
10440 }
10441 else {
10442 r.seek_cur(2);
10443 return this.token(TOKEN_IS, "is", pos);
10444 }
10445 }
10446 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
10447 if (r.p(5) == "?") {
10448 r.seek_cur(6);
10449 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
10450 }
10451 else if (r.p(5) == "#") {
10452 r.seek_cur(6);
10453 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
10454 }
10455 else {
10456 r.seek_cur(5);
10457 return this.token(TOKEN_ISNOT, "isnot", pos);
10458 }
10459 }
10460 else if (isnamec1(c)) {
10461 var s = r.read_name();
10462 return this.token(TOKEN_IDENTIFIER, s, pos);
10463 }
10464 else if (c == "|" && r.p(1) == "|") {
10465 r.seek_cur(2);
10466 return this.token(TOKEN_OROR, "||", pos);
10467 }
10468 else if (c == "&" && r.p(1) == "&") {
10469 r.seek_cur(2);
10470 return this.token(TOKEN_ANDAND, "&&", pos);
10471 }
10472 else if (c == "=" && r.p(1) == "=") {
10473 if (r.p(2) == "?") {
10474 r.seek_cur(3);
10475 return this.token(TOKEN_EQEQCI, "==?", pos);
10476 }
10477 else if (r.p(2) == "#") {
10478 r.seek_cur(3);
10479 return this.token(TOKEN_EQEQCS, "==#", pos);
10480 }
10481 else {
10482 r.seek_cur(2);
10483 return this.token(TOKEN_EQEQ, "==", pos);
10484 }
10485 }
10486 else if (c == "!" && r.p(1) == "=") {
10487 if (r.p(2) == "?") {
10488 r.seek_cur(3);
10489 return this.token(TOKEN_NEQCI, "!=?", pos);
10490 }
10491 else if (r.p(2) == "#") {
10492 r.seek_cur(3);
10493 return this.token(TOKEN_NEQCS, "!=#", pos);
10494 }
10495 else {
10496 r.seek_cur(2);
10497 return this.token(TOKEN_NEQ, "!=", pos);
10498 }
10499 }
10500 else if (c == ">" && r.p(1) == "=") {
10501 if (r.p(2) == "?") {
10502 r.seek_cur(3);
10503 return this.token(TOKEN_GTEQCI, ">=?", pos);
10504 }
10505 else if (r.p(2) == "#") {
10506 r.seek_cur(3);
10507 return this.token(TOKEN_GTEQCS, ">=#", pos);
10508 }
10509 else {
10510 r.seek_cur(2);
10511 return this.token(TOKEN_GTEQ, ">=", pos);
10512 }
10513 }
10514 else if (c == "<" && r.p(1) == "=") {
10515 if (r.p(2) == "?") {
10516 r.seek_cur(3);
10517 return this.token(TOKEN_LTEQCI, "<=?", pos);
10518 }
10519 else if (r.p(2) == "#") {
10520 r.seek_cur(3);
10521 return this.token(TOKEN_LTEQCS, "<=#", pos);
10522 }
10523 else {
10524 r.seek_cur(2);
10525 return this.token(TOKEN_LTEQ, "<=", pos);
10526 }
10527 }
10528 else if (c == "=" && r.p(1) == "~") {
10529 if (r.p(2) == "?") {
10530 r.seek_cur(3);
10531 return this.token(TOKEN_MATCHCI, "=~?", pos);
10532 }
10533 else if (r.p(2) == "#") {
10534 r.seek_cur(3);
10535 return this.token(TOKEN_MATCHCS, "=~#", pos);
10536 }
10537 else {
10538 r.seek_cur(2);
10539 return this.token(TOKEN_MATCH, "=~", pos);
10540 }
10541 }
10542 else if (c == "!" && r.p(1) == "~") {
10543 if (r.p(2) == "?") {
10544 r.seek_cur(3);
10545 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
10546 }
10547 else if (r.p(2) == "#") {
10548 r.seek_cur(3);
10549 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
10550 }
10551 else {
10552 r.seek_cur(2);
10553 return this.token(TOKEN_NOMATCH, "!~", pos);
10554 }
10555 }
10556 else if (c == ">") {
10557 if (r.p(1) == "?") {
10558 r.seek_cur(2);
10559 return this.token(TOKEN_GTCI, ">?", pos);
10560 }
10561 else if (r.p(1) == "#") {
10562 r.seek_cur(2);
10563 return this.token(TOKEN_GTCS, ">#", pos);
10564 }
10565 else {
10566 r.seek_cur(1);
10567 return this.token(TOKEN_GT, ">", pos);
10568 }
10569 }
10570 else if (c == "<") {
10571 if (r.p(1) == "?") {
10572 r.seek_cur(2);
10573 return this.token(TOKEN_LTCI, "<?", pos);
10574 }
10575 else if (r.p(1) == "#") {
10576 r.seek_cur(2);
10577 return this.token(TOKEN_LTCS, "<#", pos);
10578 }
10579 else {
10580 r.seek_cur(1);
10581 return this.token(TOKEN_LT, "<", pos);
10582 }
10583 }
10584 else if (c == "+") {
10585 r.seek_cur(1);
10586 return this.token(TOKEN_PLUS, "+", pos);
10587 }
10588 else if (c == "-") {
10589 if (r.p(1) == ">") {
10590 r.seek_cur(2);
10591 return this.token(TOKEN_ARROW, "->", pos);
10592 }
10593 else {
10594 r.seek_cur(1);
10595 return this.token(TOKEN_MINUS, "-", pos);
10596 }
10597 }
10598 else if (c == ".") {
10599 if (r.p(1) == "." && r.p(2) == ".") {
10600 r.seek_cur(3);
10601 return this.token(TOKEN_DOTDOTDOT, "...", pos);
10602 }
10603 else if (r.p(1) == ".") {
10604 r.seek_cur(2);
10605 return this.token(TOKEN_DOTDOT, "..", pos);
10606 // TODO check scriptversion?
10607 }
10608 else {
10609 r.seek_cur(1);
10610 return this.token(TOKEN_DOT, ".", pos);
10611 // TODO check scriptversion?
10612 }
10613 }
10614 else if (c == "*") {
10615 r.seek_cur(1);
10616 return this.token(TOKEN_STAR, "*", pos);
10617 }
10618 else if (c == "/") {
10619 r.seek_cur(1);
10620 return this.token(TOKEN_SLASH, "/", pos);
10621 }
10622 else if (c == "%") {
10623 r.seek_cur(1);
10624 return this.token(TOKEN_PERCENT, "%", pos);
10625 }
10626 else if (c == "!") {
10627 r.seek_cur(1);
10628 return this.token(TOKEN_NOT, "!", pos);
10629 }
10630 else if (c == "?") {
10631 r.seek_cur(1);
10632 return this.token(TOKEN_QUESTION, "?", pos);
10633 }
10634 else if (c == ":") {
10635 r.seek_cur(1);
10636 return this.token(TOKEN_COLON, ":", pos);
10637 }
10638 else if (c == "#") {
10639 if (r.p(1) == "{") {
10640 r.seek_cur(2);
10641 return this.token(TOKEN_LITCOPEN, "#{", pos);
10642 }
10643 else {
10644 r.seek_cur(1);
10645 return this.token(TOKEN_SHARP, "#", pos);
10646 }
10647 }
10648 else if (c == "(") {
10649 r.seek_cur(1);
10650 return this.token(TOKEN_POPEN, "(", pos);
10651 }
10652 else if (c == ")") {
10653 r.seek_cur(1);
10654 return this.token(TOKEN_PCLOSE, ")", pos);
10655 }
10656 else if (c == "[") {
10657 r.seek_cur(1);
10658 return this.token(TOKEN_SQOPEN, "[", pos);
10659 }
10660 else if (c == "]") {
10661 r.seek_cur(1);
10662 return this.token(TOKEN_SQCLOSE, "]", pos);
10663 }
10664 else if (c == "{") {
10665 r.seek_cur(1);
10666 return this.token(TOKEN_COPEN, "{", pos);
10667 }
10668 else if (c == "}") {
10669 r.seek_cur(1);
10670 return this.token(TOKEN_CCLOSE, "}", pos);
10671 }
10672 else if (c == ",") {
10673 r.seek_cur(1);
10674 return this.token(TOKEN_COMMA, ",", pos);
10675 }
10676 else if (c == "'") {
10677 r.seek_cur(1);
10678 return this.token(TOKEN_SQUOTE, "'", pos);
10679 }
10680 else if (c == "\"") {
10681 r.seek_cur(1);
10682 return this.token(TOKEN_DQUOTE, "\"", pos);
10683 }
10684 else if (c == "$") {
10685 var s = r.getn(1);
10686 s += r.read_word();
10687 return this.token(TOKEN_ENV, s, pos);
10688 }
10689 else if (c == "@") {
10690 // @<EOL> is treated as @"
10691 return this.token(TOKEN_REG, r.getn(2), pos);
10692 }
10693 else if (c == "&") {
10694 var s = "";
10695 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
10696 var s = r.getn(3) + r.read_word();
10697 }
10698 else {
10699 var s = r.getn(1) + r.read_word();
10700 }
10701 return this.token(TOKEN_OPTION, s, pos);
10702 }
10703 else if (c == "=") {
10704 r.seek_cur(1);
10705 return this.token(TOKEN_EQ, "=", pos);
10706 }
10707 else if (c == "|") {
10708 r.seek_cur(1);
10709 return this.token(TOKEN_OR, "|", pos);
10710 }
10711 else if (c == ";") {
10712 r.seek_cur(1);
10713 return this.token(TOKEN_SEMICOLON, ";", pos);
10714 }
10715 else if (c == "`") {
10716 r.seek_cur(1);
10717 return this.token(TOKEN_BACKTICK, "`", pos);
10718 }
10719 else {
10720 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10721 }
10722}
10723
10724ExprTokenizer.prototype.get_sstring = function() {
10725 this.reader.skip_white();
10726 var c = this.reader.p(0);
10727 if (c != "'") {
10728 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10729 }
10730 this.reader.seek_cur(1);
10731 var s = "";
10732 while (TRUE) {
10733 var c = this.reader.p(0);
10734 if (c == "<EOF>" || c == "<EOL>") {
10735 throw Err("unexpected EOL", this.reader.getpos());
10736 }
10737 else if (c == "'") {
10738 this.reader.seek_cur(1);
10739 if (this.reader.p(0) == "'") {
10740 this.reader.seek_cur(1);
10741 s += "''";
10742 }
10743 else {
10744 break;
10745 }
10746 }
10747 else {
10748 this.reader.seek_cur(1);
10749 s += c;
10750 }
10751 }
10752 return s;
10753}
10754
10755ExprTokenizer.prototype.get_dstring = function() {
10756 this.reader.skip_white();
10757 var c = this.reader.p(0);
10758 if (c != "\"") {
10759 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10760 }
10761 this.reader.seek_cur(1);
10762 var s = "";
10763 while (TRUE) {
10764 var c = this.reader.p(0);
10765 if (c == "<EOF>" || c == "<EOL>") {
10766 throw Err("unexpectd EOL", this.reader.getpos());
10767 }
10768 else if (c == "\"") {
10769 this.reader.seek_cur(1);
10770 break;
10771 }
10772 else if (c == "\\") {
10773 this.reader.seek_cur(1);
10774 s += c;
10775 var c = this.reader.p(0);
10776 if (c == "<EOF>" || c == "<EOL>") {
10777 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
10778 }
10779 this.reader.seek_cur(1);
10780 s += c;
10781 }
10782 else {
10783 this.reader.seek_cur(1);
10784 s += c;
10785 }
10786 }
10787 return s;
10788}
10789
10790ExprTokenizer.prototype.parse_dict_literal_key = function() {
10791 this.reader.skip_white();
10792 var c = this.reader.peek();
10793 if (!isalnum(c) && c != "_" && c != "-") {
10794 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10795 }
10796 var node = Node(NODE_STRING);
10797 var s = c;
10798 this.reader.seek_cur(1);
10799 node.pos = this.reader.getpos();
10800 while (TRUE) {
10801 var c = this.reader.p(0);
10802 if (c == "<EOF>" || c == "<EOL>") {
10803 throw Err("unexpectd EOL", this.reader.getpos());
10804 }
10805 if (!isalnum(c) && c != "_" && c != "-") {
10806 break;
10807 }
10808 this.reader.seek_cur(1);
10809 s += c;
10810 }
10811 node.value = "'" + s + "'";
10812 return node;
10813}
10814
10815function ExprParser() { this.__init__.apply(this, arguments); }
10816ExprParser.prototype.__init__ = function(reader) {
10817 this.reader = reader;
10818 this.tokenizer = new ExprTokenizer(reader);
10819}
10820
10821ExprParser.prototype.parse = function() {
10822 return this.parse_expr1();
10823}
10824
10825// expr1: expr2 ? expr1 : expr1
10826ExprParser.prototype.parse_expr1 = function() {
10827 var left = this.parse_expr2();
10828 var pos = this.reader.tell();
10829 var token = this.tokenizer.get();
10830 if (token.type == TOKEN_QUESTION) {
10831 var node = Node(NODE_TERNARY);
10832 node.pos = token.pos;
10833 node.cond = left;
10834 node.left = this.parse_expr1();
10835 var token = this.tokenizer.get();
10836 if (token.type != TOKEN_COLON) {
10837 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10838 }
10839 node.right = this.parse_expr1();
10840 var left = node;
10841 }
10842 else {
10843 this.reader.seek_set(pos);
10844 }
10845 return left;
10846}
10847
10848// expr2: expr3 || expr3 ..
10849ExprParser.prototype.parse_expr2 = function() {
10850 var left = this.parse_expr3();
10851 while (TRUE) {
10852 var pos = this.reader.tell();
10853 var token = this.tokenizer.get();
10854 if (token.type == TOKEN_OROR) {
10855 var node = Node(NODE_OR);
10856 node.pos = token.pos;
10857 node.left = left;
10858 node.right = this.parse_expr3();
10859 var left = node;
10860 }
10861 else {
10862 this.reader.seek_set(pos);
10863 break;
10864 }
10865 }
10866 return left;
10867}
10868
10869// expr3: expr4 && expr4
10870ExprParser.prototype.parse_expr3 = function() {
10871 var left = this.parse_expr4();
10872 while (TRUE) {
10873 var pos = this.reader.tell();
10874 var token = this.tokenizer.get();
10875 if (token.type == TOKEN_ANDAND) {
10876 var node = Node(NODE_AND);
10877 node.pos = token.pos;
10878 node.left = left;
10879 node.right = this.parse_expr4();
10880 var left = node;
10881 }
10882 else {
10883 this.reader.seek_set(pos);
10884 break;
10885 }
10886 }
10887 return left;
10888}
10889
10890// expr4: expr5 == expr5
10891// expr5 != expr5
10892// expr5 > expr5
10893// expr5 >= expr5
10894// expr5 < expr5
10895// expr5 <= expr5
10896// expr5 =~ expr5
10897// expr5 !~ expr5
10898//
10899// expr5 ==? expr5
10900// expr5 ==# expr5
10901// etc.
10902//
10903// expr5 is expr5
10904// expr5 isnot expr5
10905ExprParser.prototype.parse_expr4 = function() {
10906 var left = this.parse_expr5();
10907 var pos = this.reader.tell();
10908 var token = this.tokenizer.get();
10909 if (token.type == TOKEN_EQEQ) {
10910 var node = Node(NODE_EQUAL);
10911 node.pos = token.pos;
10912 node.left = left;
10913 node.right = this.parse_expr5();
10914 var left = node;
10915 }
10916 else if (token.type == TOKEN_EQEQCI) {
10917 var node = Node(NODE_EQUALCI);
10918 node.pos = token.pos;
10919 node.left = left;
10920 node.right = this.parse_expr5();
10921 var left = node;
10922 }
10923 else if (token.type == TOKEN_EQEQCS) {
10924 var node = Node(NODE_EQUALCS);
10925 node.pos = token.pos;
10926 node.left = left;
10927 node.right = this.parse_expr5();
10928 var left = node;
10929 }
10930 else if (token.type == TOKEN_NEQ) {
10931 var node = Node(NODE_NEQUAL);
10932 node.pos = token.pos;
10933 node.left = left;
10934 node.right = this.parse_expr5();
10935 var left = node;
10936 }
10937 else if (token.type == TOKEN_NEQCI) {
10938 var node = Node(NODE_NEQUALCI);
10939 node.pos = token.pos;
10940 node.left = left;
10941 node.right = this.parse_expr5();
10942 var left = node;
10943 }
10944 else if (token.type == TOKEN_NEQCS) {
10945 var node = Node(NODE_NEQUALCS);
10946 node.pos = token.pos;
10947 node.left = left;
10948 node.right = this.parse_expr5();
10949 var left = node;
10950 }
10951 else if (token.type == TOKEN_GT) {
10952 var node = Node(NODE_GREATER);
10953 node.pos = token.pos;
10954 node.left = left;
10955 node.right = this.parse_expr5();
10956 var left = node;
10957 }
10958 else if (token.type == TOKEN_GTCI) {
10959 var node = Node(NODE_GREATERCI);
10960 node.pos = token.pos;
10961 node.left = left;
10962 node.right = this.parse_expr5();
10963 var left = node;
10964 }
10965 else if (token.type == TOKEN_GTCS) {
10966 var node = Node(NODE_GREATERCS);
10967 node.pos = token.pos;
10968 node.left = left;
10969 node.right = this.parse_expr5();
10970 var left = node;
10971 }
10972 else if (token.type == TOKEN_GTEQ) {
10973 var node = Node(NODE_GEQUAL);
10974 node.pos = token.pos;
10975 node.left = left;
10976 node.right = this.parse_expr5();
10977 var left = node;
10978 }
10979 else if (token.type == TOKEN_GTEQCI) {
10980 var node = Node(NODE_GEQUALCI);
10981 node.pos = token.pos;
10982 node.left = left;
10983 node.right = this.parse_expr5();
10984 var left = node;
10985 }
10986 else if (token.type == TOKEN_GTEQCS) {
10987 var node = Node(NODE_GEQUALCS);
10988 node.pos = token.pos;
10989 node.left = left;
10990 node.right = this.parse_expr5();
10991 var left = node;
10992 }
10993 else if (token.type == TOKEN_LT) {
10994 var node = Node(NODE_SMALLER);
10995 node.pos = token.pos;
10996 node.left = left;
10997 node.right = this.parse_expr5();
10998 var left = node;
10999 }
11000 else if (token.type == TOKEN_LTCI) {
11001 var node = Node(NODE_SMALLERCI);
11002 node.pos = token.pos;
11003 node.left = left;
11004 node.right = this.parse_expr5();
11005 var left = node;
11006 }
11007 else if (token.type == TOKEN_LTCS) {
11008 var node = Node(NODE_SMALLERCS);
11009 node.pos = token.pos;
11010 node.left = left;
11011 node.right = this.parse_expr5();
11012 var left = node;
11013 }
11014 else if (token.type == TOKEN_LTEQ) {
11015 var node = Node(NODE_SEQUAL);
11016 node.pos = token.pos;
11017 node.left = left;
11018 node.right = this.parse_expr5();
11019 var left = node;
11020 }
11021 else if (token.type == TOKEN_LTEQCI) {
11022 var node = Node(NODE_SEQUALCI);
11023 node.pos = token.pos;
11024 node.left = left;
11025 node.right = this.parse_expr5();
11026 var left = node;
11027 }
11028 else if (token.type == TOKEN_LTEQCS) {
11029 var node = Node(NODE_SEQUALCS);
11030 node.pos = token.pos;
11031 node.left = left;
11032 node.right = this.parse_expr5();
11033 var left = node;
11034 }
11035 else if (token.type == TOKEN_MATCH) {
11036 var node = Node(NODE_MATCH);
11037 node.pos = token.pos;
11038 node.left = left;
11039 node.right = this.parse_expr5();
11040 var left = node;
11041 }
11042 else if (token.type == TOKEN_MATCHCI) {
11043 var node = Node(NODE_MATCHCI);
11044 node.pos = token.pos;
11045 node.left = left;
11046 node.right = this.parse_expr5();
11047 var left = node;
11048 }
11049 else if (token.type == TOKEN_MATCHCS) {
11050 var node = Node(NODE_MATCHCS);
11051 node.pos = token.pos;
11052 node.left = left;
11053 node.right = this.parse_expr5();
11054 var left = node;
11055 }
11056 else if (token.type == TOKEN_NOMATCH) {
11057 var node = Node(NODE_NOMATCH);
11058 node.pos = token.pos;
11059 node.left = left;
11060 node.right = this.parse_expr5();
11061 var left = node;
11062 }
11063 else if (token.type == TOKEN_NOMATCHCI) {
11064 var node = Node(NODE_NOMATCHCI);
11065 node.pos = token.pos;
11066 node.left = left;
11067 node.right = this.parse_expr5();
11068 var left = node;
11069 }
11070 else if (token.type == TOKEN_NOMATCHCS) {
11071 var node = Node(NODE_NOMATCHCS);
11072 node.pos = token.pos;
11073 node.left = left;
11074 node.right = this.parse_expr5();
11075 var left = node;
11076 }
11077 else if (token.type == TOKEN_IS) {
11078 var node = Node(NODE_IS);
11079 node.pos = token.pos;
11080 node.left = left;
11081 node.right = this.parse_expr5();
11082 var left = node;
11083 }
11084 else if (token.type == TOKEN_ISCI) {
11085 var node = Node(NODE_ISCI);
11086 node.pos = token.pos;
11087 node.left = left;
11088 node.right = this.parse_expr5();
11089 var left = node;
11090 }
11091 else if (token.type == TOKEN_ISCS) {
11092 var node = Node(NODE_ISCS);
11093 node.pos = token.pos;
11094 node.left = left;
11095 node.right = this.parse_expr5();
11096 var left = node;
11097 }
11098 else if (token.type == TOKEN_ISNOT) {
11099 var node = Node(NODE_ISNOT);
11100 node.pos = token.pos;
11101 node.left = left;
11102 node.right = this.parse_expr5();
11103 var left = node;
11104 }
11105 else if (token.type == TOKEN_ISNOTCI) {
11106 var node = Node(NODE_ISNOTCI);
11107 node.pos = token.pos;
11108 node.left = left;
11109 node.right = this.parse_expr5();
11110 var left = node;
11111 }
11112 else if (token.type == TOKEN_ISNOTCS) {
11113 var node = Node(NODE_ISNOTCS);
11114 node.pos = token.pos;
11115 node.left = left;
11116 node.right = this.parse_expr5();
11117 var left = node;
11118 }
11119 else {
11120 this.reader.seek_set(pos);
11121 }
11122 return left;
11123}
11124
11125// expr5: expr6 + expr6 ..
11126// expr6 - expr6 ..
11127// expr6 . expr6 ..
11128// expr6 .. expr6 ..
11129ExprParser.prototype.parse_expr5 = function() {
11130 var left = this.parse_expr6();
11131 while (TRUE) {
11132 var pos = this.reader.tell();
11133 var token = this.tokenizer.get();
11134 if (token.type == TOKEN_PLUS) {
11135 var node = Node(NODE_ADD);
11136 node.pos = token.pos;
11137 node.left = left;
11138 node.right = this.parse_expr6();
11139 var left = node;
11140 }
11141 else if (token.type == TOKEN_MINUS) {
11142 var node = Node(NODE_SUBTRACT);
11143 node.pos = token.pos;
11144 node.left = left;
11145 node.right = this.parse_expr6();
11146 var left = node;
11147 }
11148 else if (token.type == TOKEN_DOTDOT) {
11149 // TODO check scriptversion?
11150 var node = Node(NODE_CONCAT);
11151 node.pos = token.pos;
11152 node.left = left;
11153 node.right = this.parse_expr6();
11154 var left = node;
11155 }
11156 else if (token.type == TOKEN_DOT) {
11157 // TODO check scriptversion?
11158 var node = Node(NODE_CONCAT);
11159 node.pos = token.pos;
11160 node.left = left;
11161 node.right = this.parse_expr6();
11162 var left = node;
11163 }
11164 else {
11165 this.reader.seek_set(pos);
11166 break;
11167 }
11168 }
11169 return left;
11170}
11171
11172// expr6: expr7 * expr7 ..
11173// expr7 / expr7 ..
11174// expr7 % expr7 ..
11175ExprParser.prototype.parse_expr6 = function() {
11176 var left = this.parse_expr7();
11177 while (TRUE) {
11178 var pos = this.reader.tell();
11179 var token = this.tokenizer.get();
11180 if (token.type == TOKEN_STAR) {
11181 var node = Node(NODE_MULTIPLY);
11182 node.pos = token.pos;
11183 node.left = left;
11184 node.right = this.parse_expr7();
11185 var left = node;
11186 }
11187 else if (token.type == TOKEN_SLASH) {
11188 var node = Node(NODE_DIVIDE);
11189 node.pos = token.pos;
11190 node.left = left;
11191 node.right = this.parse_expr7();
11192 var left = node;
11193 }
11194 else if (token.type == TOKEN_PERCENT) {
11195 var node = Node(NODE_REMAINDER);
11196 node.pos = token.pos;
11197 node.left = left;
11198 node.right = this.parse_expr7();
11199 var left = node;
11200 }
11201 else {
11202 this.reader.seek_set(pos);
11203 break;
11204 }
11205 }
11206 return left;
11207}
11208
11209// expr7: ! expr7
11210// - expr7
11211// + expr7
11212ExprParser.prototype.parse_expr7 = function() {
11213 var pos = this.reader.tell();
11214 var token = this.tokenizer.get();
11215 if (token.type == TOKEN_NOT) {
11216 var node = Node(NODE_NOT);
11217 node.pos = token.pos;
11218 node.left = this.parse_expr7();
11219 return node;
11220 }
11221 else if (token.type == TOKEN_MINUS) {
11222 var node = Node(NODE_MINUS);
11223 node.pos = token.pos;
11224 node.left = this.parse_expr7();
11225 return node;
11226 }
11227 else if (token.type == TOKEN_PLUS) {
11228 var node = Node(NODE_PLUS);
11229 node.pos = token.pos;
11230 node.left = this.parse_expr7();
11231 return node;
11232 }
11233 else {
11234 this.reader.seek_set(pos);
11235 var node = this.parse_expr8();
11236 return node;
11237 }
11238}
11239
11240// expr8: expr8[expr1]
11241// expr8[expr1 : expr1]
11242// expr8.name
11243// expr8->name(expr1, ...)
11244// expr8->s:user_func(expr1, ...)
11245// expr8->{lambda}(expr1, ...)
11246// expr8(expr1, ...)
11247ExprParser.prototype.parse_expr8 = function() {
11248 var left = this.parse_expr9();
11249 while (TRUE) {
11250 var pos = this.reader.tell();
11251 var c = this.reader.peek();
11252 var token = this.tokenizer.get();
11253 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11254 var npos = token.pos;
11255 if (this.tokenizer.peek().type == TOKEN_COLON) {
11256 this.tokenizer.get();
11257 var node = Node(NODE_SLICE);
11258 node.pos = npos;
11259 node.left = left;
11260 node.rlist = [NIL, NIL];
11261 var token = this.tokenizer.peek();
11262 if (token.type != TOKEN_SQCLOSE) {
11263 node.rlist[1] = this.parse_expr1();
11264 }
11265 var token = this.tokenizer.get();
11266 if (token.type != TOKEN_SQCLOSE) {
11267 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11268 }
11269 var left = node;
11270 }
11271 else {
11272 var right = this.parse_expr1();
11273 if (this.tokenizer.peek().type == TOKEN_COLON) {
11274 this.tokenizer.get();
11275 var node = Node(NODE_SLICE);
11276 node.pos = npos;
11277 node.left = left;
11278 node.rlist = [right, NIL];
11279 var token = this.tokenizer.peek();
11280 if (token.type != TOKEN_SQCLOSE) {
11281 node.rlist[1] = this.parse_expr1();
11282 }
11283 var token = this.tokenizer.get();
11284 if (token.type != TOKEN_SQCLOSE) {
11285 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11286 }
11287 var left = node;
11288 }
11289 else {
11290 var node = Node(NODE_SUBSCRIPT);
11291 node.pos = npos;
11292 node.left = left;
11293 node.right = right;
11294 var token = this.tokenizer.get();
11295 if (token.type != TOKEN_SQCLOSE) {
11296 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11297 }
11298 var left = node;
11299 }
11300 }
11301 delete node;
11302 }
11303 else if (token.type == TOKEN_ARROW) {
11304 var funcname_or_lambda = this.parse_expr9();
11305 var token = this.tokenizer.get();
11306 if (token.type != TOKEN_POPEN) {
11307 throw Err("E107: Missing parentheses: lambda", token.pos);
11308 }
11309 var right = Node(NODE_CALL);
11310 right.pos = token.pos;
11311 right.left = funcname_or_lambda;
11312 right.rlist = this.parse_rlist();
11313 var node = Node(NODE_METHOD);
11314 node.pos = token.pos;
11315 node.left = left;
11316 node.right = right;
11317 var left = node;
11318 delete node;
11319 }
11320 else if (token.type == TOKEN_POPEN) {
11321 var node = Node(NODE_CALL);
11322 node.pos = token.pos;
11323 node.left = left;
11324 node.rlist = this.parse_rlist();
11325 var left = node;
11326 delete node;
11327 }
11328 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11329 // TODO check scriptversion?
11330 var node = this.parse_dot(token, left);
11331 if (node === NIL) {
11332 this.reader.seek_set(pos);
11333 break;
11334 }
11335 var left = node;
11336 delete node;
11337 }
11338 else {
11339 this.reader.seek_set(pos);
11340 break;
11341 }
11342 }
11343 return left;
11344}
11345
11346ExprParser.prototype.parse_rlist = function() {
11347 var rlist = [];
11348 var token = this.tokenizer.peek();
11349 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11350 this.tokenizer.get();
11351 }
11352 else {
11353 while (TRUE) {
11354 viml_add(rlist, this.parse_expr1());
11355 var token = this.tokenizer.get();
11356 if (token.type == TOKEN_COMMA) {
11357 // XXX: Vim allows foo(a, b, ). Lint should warn it.
11358 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11359 this.tokenizer.get();
11360 break;
11361 }
11362 }
11363 else if (token.type == TOKEN_PCLOSE) {
11364 break;
11365 }
11366 else {
11367 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11368 }
11369 }
11370 }
11371 if (viml_len(rlist) > MAX_FUNC_ARGS) {
11372 // TODO: funcname E740: Too many arguments for function: %s
11373 throw Err("E740: Too many arguments for function", token.pos);
11374 }
11375 return rlist;
11376}
11377
11378// expr9: number
11379// "string"
11380// 'string'
11381// [expr1, ...]
11382// {expr1: expr1, ...}
11383// #{literal_key1: expr1, ...}
11384// {args -> expr1}
11385// &option
11386// (expr1)
11387// variable
11388// var{ria}ble
11389// $VAR
11390// @r
11391// function(expr1, ...)
11392// func{ti}on(expr1, ...)
11393ExprParser.prototype.parse_expr9 = function() {
11394 var pos = this.reader.tell();
11395 var token = this.tokenizer.get();
11396 var node = Node(-1);
11397 if (token.type == TOKEN_NUMBER) {
11398 var node = Node(NODE_NUMBER);
11399 node.pos = token.pos;
11400 node.value = token.value;
11401 }
11402 else if (token.type == TOKEN_BLOB) {
11403 var node = Node(NODE_BLOB);
11404 node.pos = token.pos;
11405 node.value = token.value;
11406 }
11407 else if (token.type == TOKEN_DQUOTE) {
11408 this.reader.seek_set(pos);
11409 var node = Node(NODE_STRING);
11410 node.pos = token.pos;
11411 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
11412 }
11413 else if (token.type == TOKEN_SQUOTE) {
11414 this.reader.seek_set(pos);
11415 var node = Node(NODE_STRING);
11416 node.pos = token.pos;
11417 node.value = "'" + this.tokenizer.get_sstring() + "'";
11418 }
11419 else if (token.type == TOKEN_SQOPEN) {
11420 var node = Node(NODE_LIST);
11421 node.pos = token.pos;
11422 node.value = [];
11423 var token = this.tokenizer.peek();
11424 if (token.type == TOKEN_SQCLOSE) {
11425 this.tokenizer.get();
11426 }
11427 else {
11428 while (TRUE) {
11429 viml_add(node.value, this.parse_expr1());
11430 var token = this.tokenizer.peek();
11431 if (token.type == TOKEN_COMMA) {
11432 this.tokenizer.get();
11433 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
11434 this.tokenizer.get();
11435 break;
11436 }
11437 }
11438 else if (token.type == TOKEN_SQCLOSE) {
11439 this.tokenizer.get();
11440 break;
11441 }
11442 else {
11443 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11444 }
11445 }
11446 }
11447 }
11448 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
11449 var is_litdict = token.type == TOKEN_LITCOPEN;
11450 var savepos = this.reader.tell();
11451 var nodepos = token.pos;
11452 var token = this.tokenizer.get();
11453 var lambda = token.type == TOKEN_ARROW;
11454 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
11455 // if the token type is stirng, we cannot peek next token and we can
11456 // assume it's not lambda.
11457 var token2 = this.tokenizer.peek();
11458 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
11459 }
11460 // fallback to dict or {expr} if true
11461 var fallback = FALSE;
11462 if (lambda) {
11463 // lambda {token,...} {->...} {token->...}
11464 var node = Node(NODE_LAMBDA);
11465 node.pos = nodepos;
11466 node.rlist = [];
11467 var named = {};
11468 while (TRUE) {
11469 if (token.type == TOKEN_ARROW) {
11470 break;
11471 }
11472 else if (token.type == TOKEN_IDENTIFIER) {
11473 if (!isargname(token.value)) {
11474 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
11475 }
11476 else if (viml_has_key(named, token.value)) {
11477 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
11478 }
11479 named[token.value] = 1;
11480 var varnode = Node(NODE_IDENTIFIER);
11481 varnode.pos = token.pos;
11482 varnode.value = token.value;
11483 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
11484 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
11485 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
11486 }
11487 var token = this.tokenizer.get();
11488 viml_add(node.rlist, varnode);
11489 if (token.type == TOKEN_COMMA) {
11490 // XXX: Vim allows last comma. {a, b, -> ...} => OK
11491 var token = this.tokenizer.peek();
11492 if (token.type == TOKEN_ARROW) {
11493 this.tokenizer.get();
11494 break;
11495 }
11496 }
11497 else if (token.type == TOKEN_ARROW) {
11498 break;
11499 }
11500 else {
11501 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
11502 }
11503 }
11504 else if (token.type == TOKEN_DOTDOTDOT) {
11505 var varnode = Node(NODE_IDENTIFIER);
11506 varnode.pos = token.pos;
11507 varnode.value = token.value;
11508 viml_add(node.rlist, varnode);
11509 var token = this.tokenizer.peek();
11510 if (token.type == TOKEN_ARROW) {
11511 this.tokenizer.get();
11512 break;
11513 }
11514 else {
11515 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11516 }
11517 }
11518 else {
11519 var fallback = TRUE;
11520 break;
11521 }
11522 var token = this.tokenizer.get();
11523 }
11524 if (!fallback) {
11525 node.left = this.parse_expr1();
11526 var token = this.tokenizer.get();
11527 if (token.type != TOKEN_CCLOSE) {
11528 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11529 }
11530 return node;
11531 }
11532 }
11533 // dict
11534 var node = Node(NODE_DICT);
11535 node.pos = nodepos;
11536 node.value = [];
11537 this.reader.seek_set(savepos);
11538 var token = this.tokenizer.peek();
11539 if (token.type == TOKEN_CCLOSE) {
11540 this.tokenizer.get();
11541 return node;
11542 }
11543 while (1) {
11544 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
11545 var token = this.tokenizer.get();
11546 if (token.type == TOKEN_CCLOSE) {
11547 if (!viml_empty(node.value)) {
11548 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11549 }
11550 this.reader.seek_set(pos);
11551 var node = this.parse_identifier();
11552 break;
11553 }
11554 if (token.type != TOKEN_COLON) {
11555 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11556 }
11557 var val = this.parse_expr1();
11558 viml_add(node.value, [key, val]);
11559 var token = this.tokenizer.get();
11560 if (token.type == TOKEN_COMMA) {
11561 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
11562 this.tokenizer.get();
11563 break;
11564 }
11565 }
11566 else if (token.type == TOKEN_CCLOSE) {
11567 break;
11568 }
11569 else {
11570 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11571 }
11572 }
11573 return node;
11574 }
11575 else if (token.type == TOKEN_POPEN) {
11576 var node = this.parse_expr1();
11577 var token = this.tokenizer.get();
11578 if (token.type != TOKEN_PCLOSE) {
11579 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11580 }
11581 }
11582 else if (token.type == TOKEN_OPTION) {
11583 var node = Node(NODE_OPTION);
11584 node.pos = token.pos;
11585 node.value = token.value;
11586 }
11587 else if (token.type == TOKEN_IDENTIFIER) {
11588 this.reader.seek_set(pos);
11589 var node = this.parse_identifier();
11590 }
11591 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
11592 // XXX: no parse error but invalid expression
11593 this.reader.seek_set(pos);
11594 var node = this.parse_identifier();
11595 }
11596 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11597 this.reader.seek_set(pos);
11598 var node = this.parse_identifier();
11599 }
11600 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
11601 this.reader.seek_set(pos);
11602 var node = this.parse_identifier();
11603 }
11604 else if (token.type == TOKEN_ENV) {
11605 var node = Node(NODE_ENV);
11606 node.pos = token.pos;
11607 node.value = token.value;
11608 }
11609 else if (token.type == TOKEN_REG) {
11610 var node = Node(NODE_REG);
11611 node.pos = token.pos;
11612 node.value = token.value;
11613 }
11614 else {
11615 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11616 }
11617 return node;
11618}
11619
11620// SUBSCRIPT or CONCAT
11621// dict "." [0-9A-Za-z_]+ => (subscript dict key)
11622// str "." expr6 => (concat str expr6)
11623ExprParser.prototype.parse_dot = function(token, left) {
11624 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) {
11625 return NIL;
11626 }
11627 if (!iswordc(this.reader.p(0))) {
11628 return NIL;
11629 }
11630 var pos = this.reader.getpos();
11631 var name = this.reader.read_word();
11632 if (isnamec(this.reader.p(0))) {
11633 // XXX: foo is str => ok, foo is obj => invalid expression
11634 // foo.s:bar or foo.bar#baz
11635 return NIL;
11636 }
11637 var node = Node(NODE_DOT);
11638 node.pos = token.pos;
11639 node.left = left;
11640 node.right = Node(NODE_IDENTIFIER);
11641 node.right.pos = pos;
11642 node.right.value = name;
11643 return node;
11644}
11645
11646// CONCAT
11647// str ".." expr6 => (concat str expr6)
11648ExprParser.prototype.parse_concat = function(token, left) {
11649 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) {
11650 return NIL;
11651 }
11652 if (!iswordc(this.reader.p(0))) {
11653 return NIL;
11654 }
11655 var pos = this.reader.getpos();
11656 var name = this.reader.read_word();
11657 if (isnamec(this.reader.p(0))) {
11658 // XXX: foo is str => ok, foo is obj => invalid expression
11659 // foo.s:bar or foo.bar#baz
11660 return NIL;
11661 }
11662 var node = Node(NODE_CONCAT);
11663 node.pos = token.pos;
11664 node.left = left;
11665 node.right = Node(NODE_IDENTIFIER);
11666 node.right.pos = pos;
11667 node.right.value = name;
11668 return node;
11669}
11670
11671ExprParser.prototype.parse_identifier = function() {
11672 this.reader.skip_white();
11673 var npos = this.reader.getpos();
11674 var curly_parts = this.parse_curly_parts();
11675 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
11676 var node = Node(NODE_IDENTIFIER);
11677 node.pos = npos;
11678 node.value = curly_parts[0].value;
11679 return node;
11680 }
11681 else {
11682 var node = Node(NODE_CURLYNAME);
11683 node.pos = npos;
11684 node.value = curly_parts;
11685 return node;
11686 }
11687}
11688
11689ExprParser.prototype.parse_curly_parts = function() {
11690 var curly_parts = [];
11691 var c = this.reader.peek();
11692 var pos = this.reader.getpos();
11693 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
11694 var name = this.reader.getn(5);
11695 var node = Node(NODE_CURLYNAMEPART);
11696 node.curly = FALSE;
11697 // Keep backword compatibility for the curly attribute
11698 node.pos = pos;
11699 node.value = name;
11700 viml_add(curly_parts, node);
11701 }
11702 while (TRUE) {
11703 var c = this.reader.peek();
11704 if (isnamec(c)) {
11705 var pos = this.reader.getpos();
11706 var name = this.reader.read_name();
11707 var node = Node(NODE_CURLYNAMEPART);
11708 node.curly = FALSE;
11709 // Keep backword compatibility for the curly attribute
11710 node.pos = pos;
11711 node.value = name;
11712 viml_add(curly_parts, node);
11713 }
11714 else if (c == "{") {
11715 this.reader.get();
11716 var pos = this.reader.getpos();
11717 var node = Node(NODE_CURLYNAMEEXPR);
11718 node.curly = TRUE;
11719 // Keep backword compatibility for the curly attribute
11720 node.pos = pos;
11721 node.value = this.parse_expr1();
11722 viml_add(curly_parts, node);
11723 this.reader.skip_white();
11724 var c = this.reader.p(0);
11725 if (c != "}") {
11726 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
11727 }
11728 this.reader.seek_cur(1);
11729 }
11730 else {
11731 break;
11732 }
11733 }
11734 return curly_parts;
11735}
11736
11737function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
11738LvalueParser.prototype = Object.create(ExprParser.prototype);
11739LvalueParser.prototype.parse = function() {
11740 return this.parse_lv8();
11741}
11742
11743// expr8: expr8[expr1]
11744// expr8[expr1 : expr1]
11745// expr8.name
11746LvalueParser.prototype.parse_lv8 = function() {
11747 var left = this.parse_lv9();
11748 while (TRUE) {
11749 var pos = this.reader.tell();
11750 var c = this.reader.peek();
11751 var token = this.tokenizer.get();
11752 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11753 var npos = token.pos;
11754 var node = Node(-1);
11755 if (this.tokenizer.peek().type == TOKEN_COLON) {
11756 this.tokenizer.get();
11757 var node = Node(NODE_SLICE);
11758 node.pos = npos;
11759 node.left = left;
11760 node.rlist = [NIL, NIL];
11761 var token = this.tokenizer.peek();
11762 if (token.type != TOKEN_SQCLOSE) {
11763 node.rlist[1] = this.parse_expr1();
11764 }
11765 var token = this.tokenizer.get();
11766 if (token.type != TOKEN_SQCLOSE) {
11767 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11768 }
11769 }
11770 else {
11771 var right = this.parse_expr1();
11772 if (this.tokenizer.peek().type == TOKEN_COLON) {
11773 this.tokenizer.get();
11774 var node = Node(NODE_SLICE);
11775 node.pos = npos;
11776 node.left = left;
11777 node.rlist = [right, NIL];
11778 var token = this.tokenizer.peek();
11779 if (token.type != TOKEN_SQCLOSE) {
11780 node.rlist[1] = this.parse_expr1();
11781 }
11782 var token = this.tokenizer.get();
11783 if (token.type != TOKEN_SQCLOSE) {
11784 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11785 }
11786 }
11787 else {
11788 var node = Node(NODE_SUBSCRIPT);
11789 node.pos = npos;
11790 node.left = left;
11791 node.right = right;
11792 var token = this.tokenizer.get();
11793 if (token.type != TOKEN_SQCLOSE) {
11794 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11795 }
11796 }
11797 }
11798 var left = node;
11799 delete node;
11800 }
11801 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11802 var node = this.parse_dot(token, left);
11803 if (node === NIL) {
11804 this.reader.seek_set(pos);
11805 break;
11806 }
11807 var left = node;
11808 delete node;
11809 }
11810 else {
11811 this.reader.seek_set(pos);
11812 break;
11813 }
11814 }
11815 return left;
11816}
11817
11818// expr9: &option
11819// variable
11820// var{ria}ble
11821// $VAR
11822// @r
11823LvalueParser.prototype.parse_lv9 = function() {
11824 var pos = this.reader.tell();
11825 var token = this.tokenizer.get();
11826 var node = Node(-1);
11827 if (token.type == TOKEN_COPEN) {
11828 this.reader.seek_set(pos);
11829 var node = this.parse_identifier();
11830 }
11831 else if (token.type == TOKEN_OPTION) {
11832 var node = Node(NODE_OPTION);
11833 node.pos = token.pos;
11834 node.value = token.value;
11835 }
11836 else if (token.type == TOKEN_IDENTIFIER) {
11837 this.reader.seek_set(pos);
11838 var node = this.parse_identifier();
11839 }
11840 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11841 this.reader.seek_set(pos);
11842 var node = this.parse_identifier();
11843 }
11844 else if (token.type == TOKEN_ENV) {
11845 var node = Node(NODE_ENV);
11846 node.pos = token.pos;
11847 node.value = token.value;
11848 }
11849 else if (token.type == TOKEN_REG) {
11850 var node = Node(NODE_REG);
11851 node.pos = token.pos;
11852 node.pos = token.pos;
11853 node.value = token.value;
11854 }
11855 else {
11856 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11857 }
11858 return node;
11859}
11860
11861function StringReader() { this.__init__.apply(this, arguments); }
11862StringReader.prototype.__init__ = function(lines) {
11863 this.buf = [];
11864 this.pos = [];
11865 var lnum = 0;
11866 var offset = 0;
11867 while (lnum < viml_len(lines)) {
11868 var col = 0;
11869 var __c7 = viml_split(lines[lnum], "\\zs");
11870 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11871 var c = __c7[__i7];
11872 viml_add(this.buf, c);
11873 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11874 col += viml_len(c);
11875 offset += viml_len(c);
11876 }
11877 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11878 var skip = TRUE;
11879 var col = 0;
11880 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11881 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11882 var c = __c8[__i8];
11883 if (skip) {
11884 if (c == "\\") {
11885 var skip = FALSE;
11886 }
11887 }
11888 else {
11889 viml_add(this.buf, c);
11890 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11891 }
11892 col += viml_len(c);
11893 offset += viml_len(c);
11894 }
11895 lnum += 1;
11896 offset += 1;
11897 }
11898 viml_add(this.buf, "<EOL>");
11899 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11900 lnum += 1;
11901 offset += 1;
11902 }
11903 // for <EOF>
11904 viml_add(this.pos, [lnum + 1, 0, offset]);
11905 this.i = 0;
11906}
11907
11908StringReader.prototype.eof = function() {
11909 return this.i >= viml_len(this.buf);
11910}
11911
11912StringReader.prototype.tell = function() {
11913 return this.i;
11914}
11915
11916StringReader.prototype.seek_set = function(i) {
11917 this.i = i;
11918}
11919
11920StringReader.prototype.seek_cur = function(i) {
11921 this.i = this.i + i;
11922}
11923
11924StringReader.prototype.seek_end = function(i) {
11925 this.i = viml_len(this.buf) + i;
11926}
11927
11928StringReader.prototype.p = function(i) {
11929 if (this.i >= viml_len(this.buf)) {
11930 return "<EOF>";
11931 }
11932 return this.buf[this.i + i];
11933}
11934
11935StringReader.prototype.peek = function() {
11936 if (this.i >= viml_len(this.buf)) {
11937 return "<EOF>";
11938 }
11939 return this.buf[this.i];
11940}
11941
11942StringReader.prototype.get = function() {
11943 if (this.i >= viml_len(this.buf)) {
11944 return "<EOF>";
11945 }
11946 this.i += 1;
11947 return this.buf[this.i - 1];
11948}
11949
11950StringReader.prototype.peekn = function(n) {
11951 var pos = this.tell();
11952 var r = this.getn(n);
11953 this.seek_set(pos);
11954 return r;
11955}
11956
11957StringReader.prototype.getn = function(n) {
11958 var r = "";
11959 var j = 0;
11960 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11961 var c = this.buf[this.i];
11962 if (c == "<EOL>") {
11963 break;
11964 }
11965 r += c;
11966 this.i += 1;
11967 j += 1;
11968 }
11969 return r;
11970}
11971
11972StringReader.prototype.peekline = function() {
11973 return this.peekn(-1);
11974}
11975
11976StringReader.prototype.readline = function() {
11977 var r = this.getn(-1);
11978 this.get();
11979 return r;
11980}
11981
11982StringReader.prototype.getstr = function(begin, end) {
11983 var r = "";
11984 var __c9 = viml_range(begin.i, end.i - 1);
11985 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11986 var i = __c9[__i9];
11987 if (i >= viml_len(this.buf)) {
11988 break;
11989 }
11990 var c = this.buf[i];
11991 if (c == "<EOL>") {
11992 var c = "\n";
11993 }
11994 r += c;
11995 }
11996 return r;
11997}
11998
11999StringReader.prototype.getpos = function() {
12000 var __tmp = this.pos[this.i];
12001 var lnum = __tmp[0];
12002 var col = __tmp[1];
12003 var offset = __tmp[2];
12004 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
12005}
12006
12007StringReader.prototype.setpos = function(pos) {
12008 this.i = pos.i;
12009}
12010
12011StringReader.prototype.read_alpha = function() {
12012 var r = "";
12013 while (isalpha(this.peekn(1))) {
12014 r += this.getn(1);
12015 }
12016 return r;
12017}
12018
12019StringReader.prototype.read_alnum = function() {
12020 var r = "";
12021 while (isalnum(this.peekn(1))) {
12022 r += this.getn(1);
12023 }
12024 return r;
12025}
12026
12027StringReader.prototype.read_digit = function() {
12028 var r = "";
12029 while (isdigit(this.peekn(1))) {
12030 r += this.getn(1);
12031 }
12032 return r;
12033}
12034
12035StringReader.prototype.read_odigit = function() {
12036 var r = "";
12037 while (isodigit(this.peekn(1))) {
12038 r += this.getn(1);
12039 }
12040 return r;
12041}
12042
12043StringReader.prototype.read_blob = function() {
12044 var r = "";
12045 while (1) {
12046 var s = this.peekn(2);
12047 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
12048 r += this.getn(2);
12049 }
12050 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
12051 r += this.getn(1);
12052 }
12053 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
12054 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
12055 }
12056 else {
12057 break;
12058 }
12059 }
12060 return r;
12061}
12062
12063StringReader.prototype.read_xdigit = function() {
12064 var r = "";
12065 while (isxdigit(this.peekn(1))) {
12066 r += this.getn(1);
12067 }
12068 return r;
12069}
12070
12071StringReader.prototype.read_bdigit = function() {
12072 var r = "";
12073 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
12074 r += this.getn(1);
12075 }
12076 return r;
12077}
12078
12079StringReader.prototype.read_integer = function() {
12080 var r = "";
12081 var c = this.peekn(1);
12082 if (c == "-" || c == "+") {
12083 var r = this.getn(1);
12084 }
12085 return r + this.read_digit();
12086}
12087
12088StringReader.prototype.read_word = function() {
12089 var r = "";
12090 while (iswordc(this.peekn(1))) {
12091 r += this.getn(1);
12092 }
12093 return r;
12094}
12095
12096StringReader.prototype.read_white = function() {
12097 var r = "";
12098 while (iswhite(this.peekn(1))) {
12099 r += this.getn(1);
12100 }
12101 return r;
12102}
12103
12104StringReader.prototype.read_nonwhite = function() {
12105 var r = "";
12106 var ch = this.peekn(1);
12107 while (!iswhite(ch) && ch != "") {
12108 r += this.getn(1);
12109 var ch = this.peekn(1);
12110 }
12111 return r;
12112}
12113
12114StringReader.prototype.read_name = function() {
12115 var r = "";
12116 while (isnamec(this.peekn(1))) {
12117 r += this.getn(1);
12118 }
12119 return r;
12120}
12121
12122StringReader.prototype.skip_white = function() {
12123 while (iswhite(this.peekn(1))) {
12124 this.seek_cur(1);
12125 }
12126}
12127
12128StringReader.prototype.skip_white_and_colon = function() {
12129 while (TRUE) {
12130 var c = this.peekn(1);
12131 if (!iswhite(c) && c != ":") {
12132 break;
12133 }
12134 this.seek_cur(1);
12135 }
12136}
12137
12138function Compiler() { this.__init__.apply(this, arguments); }
12139Compiler.prototype.__init__ = function() {
12140 this.indent = [""];
12141 this.lines = [];
12142}
12143
12144Compiler.prototype.out = function() {
12145 var a000 = Array.prototype.slice.call(arguments, 0);
12146 if (viml_len(a000) == 1) {
12147 if (a000[0][0] == ")") {
12148 this.lines[this.lines.length - 1] += a000[0];
12149 }
12150 else {
12151 viml_add(this.lines, this.indent[0] + a000[0]);
12152 }
12153 }
12154 else {
12155 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
12156 }
12157}
12158
12159Compiler.prototype.incindent = function(s) {
12160 viml_insert(this.indent, this.indent[0] + s);
12161}
12162
12163Compiler.prototype.decindent = function() {
12164 viml_remove(this.indent, 0);
12165}
12166
12167Compiler.prototype.compile = function(node) {
12168 if (node.type == NODE_TOPLEVEL) {
12169 return this.compile_toplevel(node);
12170 }
12171 else if (node.type == NODE_COMMENT) {
12172 this.compile_comment(node);
12173 return NIL;
12174 }
12175 else if (node.type == NODE_EXCMD) {
12176 this.compile_excmd(node);
12177 return NIL;
12178 }
12179 else if (node.type == NODE_FUNCTION) {
12180 this.compile_function(node);
12181 return NIL;
12182 }
12183 else if (node.type == NODE_DELFUNCTION) {
12184 this.compile_delfunction(node);
12185 return NIL;
12186 }
12187 else if (node.type == NODE_RETURN) {
12188 this.compile_return(node);
12189 return NIL;
12190 }
12191 else if (node.type == NODE_EXCALL) {
12192 this.compile_excall(node);
12193 return NIL;
12194 }
12195 else if (node.type == NODE_EVAL) {
12196 this.compile_eval(node);
12197 return NIL;
12198 }
12199 else if (node.type == NODE_LET) {
12200 this.compile_let(node);
12201 return NIL;
12202 }
12203 else if (node.type == NODE_CONST) {
12204 this.compile_const(node);
12205 return NIL;
12206 }
12207 else if (node.type == NODE_UNLET) {
12208 this.compile_unlet(node);
12209 return NIL;
12210 }
12211 else if (node.type == NODE_LOCKVAR) {
12212 this.compile_lockvar(node);
12213 return NIL;
12214 }
12215 else if (node.type == NODE_UNLOCKVAR) {
12216 this.compile_unlockvar(node);
12217 return NIL;
12218 }
12219 else if (node.type == NODE_IF) {
12220 this.compile_if(node);
12221 return NIL;
12222 }
12223 else if (node.type == NODE_WHILE) {
12224 this.compile_while(node);
12225 return NIL;
12226 }
12227 else if (node.type == NODE_FOR) {
12228 this.compile_for(node);
12229 return NIL;
12230 }
12231 else if (node.type == NODE_CONTINUE) {
12232 this.compile_continue(node);
12233 return NIL;
12234 }
12235 else if (node.type == NODE_BREAK) {
12236 this.compile_break(node);
12237 return NIL;
12238 }
12239 else if (node.type == NODE_TRY) {
12240 this.compile_try(node);
12241 return NIL;
12242 }
12243 else if (node.type == NODE_THROW) {
12244 this.compile_throw(node);
12245 return NIL;
12246 }
12247 else if (node.type == NODE_ECHO) {
12248 this.compile_echo(node);
12249 return NIL;
12250 }
12251 else if (node.type == NODE_ECHON) {
12252 this.compile_echon(node);
12253 return NIL;
12254 }
12255 else if (node.type == NODE_ECHOHL) {
12256 this.compile_echohl(node);
12257 return NIL;
12258 }
12259 else if (node.type == NODE_ECHOMSG) {
12260 this.compile_echomsg(node);
12261 return NIL;
12262 }
12263 else if (node.type == NODE_ECHOERR) {
12264 this.compile_echoerr(node);
12265 return NIL;
12266 }
12267 else if (node.type == NODE_EXECUTE) {
12268 this.compile_execute(node);
12269 return NIL;
12270 }
12271 else if (node.type == NODE_TERNARY) {
12272 return this.compile_ternary(node);
12273 }
12274 else if (node.type == NODE_OR) {
12275 return this.compile_or(node);
12276 }
12277 else if (node.type == NODE_AND) {
12278 return this.compile_and(node);
12279 }
12280 else if (node.type == NODE_EQUAL) {
12281 return this.compile_equal(node);
12282 }
12283 else if (node.type == NODE_EQUALCI) {
12284 return this.compile_equalci(node);
12285 }
12286 else if (node.type == NODE_EQUALCS) {
12287 return this.compile_equalcs(node);
12288 }
12289 else if (node.type == NODE_NEQUAL) {
12290 return this.compile_nequal(node);
12291 }
12292 else if (node.type == NODE_NEQUALCI) {
12293 return this.compile_nequalci(node);
12294 }
12295 else if (node.type == NODE_NEQUALCS) {
12296 return this.compile_nequalcs(node);
12297 }
12298 else if (node.type == NODE_GREATER) {
12299 return this.compile_greater(node);
12300 }
12301 else if (node.type == NODE_GREATERCI) {
12302 return this.compile_greaterci(node);
12303 }
12304 else if (node.type == NODE_GREATERCS) {
12305 return this.compile_greatercs(node);
12306 }
12307 else if (node.type == NODE_GEQUAL) {
12308 return this.compile_gequal(node);
12309 }
12310 else if (node.type == NODE_GEQUALCI) {
12311 return this.compile_gequalci(node);
12312 }
12313 else if (node.type == NODE_GEQUALCS) {
12314 return this.compile_gequalcs(node);
12315 }
12316 else if (node.type == NODE_SMALLER) {
12317 return this.compile_smaller(node);
12318 }
12319 else if (node.type == NODE_SMALLERCI) {
12320 return this.compile_smallerci(node);
12321 }
12322 else if (node.type == NODE_SMALLERCS) {
12323 return this.compile_smallercs(node);
12324 }
12325 else if (node.type == NODE_SEQUAL) {
12326 return this.compile_sequal(node);
12327 }
12328 else if (node.type == NODE_SEQUALCI) {
12329 return this.compile_sequalci(node);
12330 }
12331 else if (node.type == NODE_SEQUALCS) {
12332 return this.compile_sequalcs(node);
12333 }
12334 else if (node.type == NODE_MATCH) {
12335 return this.compile_match(node);
12336 }
12337 else if (node.type == NODE_MATCHCI) {
12338 return this.compile_matchci(node);
12339 }
12340 else if (node.type == NODE_MATCHCS) {
12341 return this.compile_matchcs(node);
12342 }
12343 else if (node.type == NODE_NOMATCH) {
12344 return this.compile_nomatch(node);
12345 }
12346 else if (node.type == NODE_NOMATCHCI) {
12347 return this.compile_nomatchci(node);
12348 }
12349 else if (node.type == NODE_NOMATCHCS) {
12350 return this.compile_nomatchcs(node);
12351 }
12352 else if (node.type == NODE_IS) {
12353 return this.compile_is(node);
12354 }
12355 else if (node.type == NODE_ISCI) {
12356 return this.compile_isci(node);
12357 }
12358 else if (node.type == NODE_ISCS) {
12359 return this.compile_iscs(node);
12360 }
12361 else if (node.type == NODE_ISNOT) {
12362 return this.compile_isnot(node);
12363 }
12364 else if (node.type == NODE_ISNOTCI) {
12365 return this.compile_isnotci(node);
12366 }
12367 else if (node.type == NODE_ISNOTCS) {
12368 return this.compile_isnotcs(node);
12369 }
12370 else if (node.type == NODE_ADD) {
12371 return this.compile_add(node);
12372 }
12373 else if (node.type == NODE_SUBTRACT) {
12374 return this.compile_subtract(node);
12375 }
12376 else if (node.type == NODE_CONCAT) {
12377 return this.compile_concat(node);
12378 }
12379 else if (node.type == NODE_MULTIPLY) {
12380 return this.compile_multiply(node);
12381 }
12382 else if (node.type == NODE_DIVIDE) {
12383 return this.compile_divide(node);
12384 }
12385 else if (node.type == NODE_REMAINDER) {
12386 return this.compile_remainder(node);
12387 }
12388 else if (node.type == NODE_NOT) {
12389 return this.compile_not(node);
12390 }
12391 else if (node.type == NODE_PLUS) {
12392 return this.compile_plus(node);
12393 }
12394 else if (node.type == NODE_MINUS) {
12395 return this.compile_minus(node);
12396 }
12397 else if (node.type == NODE_SUBSCRIPT) {
12398 return this.compile_subscript(node);
12399 }
12400 else if (node.type == NODE_SLICE) {
12401 return this.compile_slice(node);
12402 }
12403 else if (node.type == NODE_DOT) {
12404 return this.compile_dot(node);
12405 }
12406 else if (node.type == NODE_METHOD) {
12407 return this.compile_method(node);
12408 }
12409 else if (node.type == NODE_CALL) {
12410 return this.compile_call(node);
12411 }
12412 else if (node.type == NODE_NUMBER) {
12413 return this.compile_number(node);
12414 }
12415 else if (node.type == NODE_BLOB) {
12416 return this.compile_blob(node);
12417 }
12418 else if (node.type == NODE_STRING) {
12419 return this.compile_string(node);
12420 }
12421 else if (node.type == NODE_LIST) {
12422 return this.compile_list(node);
12423 }
12424 else if (node.type == NODE_DICT) {
12425 return this.compile_dict(node);
12426 }
12427 else if (node.type == NODE_OPTION) {
12428 return this.compile_option(node);
12429 }
12430 else if (node.type == NODE_IDENTIFIER) {
12431 return this.compile_identifier(node);
12432 }
12433 else if (node.type == NODE_CURLYNAME) {
12434 return this.compile_curlyname(node);
12435 }
12436 else if (node.type == NODE_ENV) {
12437 return this.compile_env(node);
12438 }
12439 else if (node.type == NODE_REG) {
12440 return this.compile_reg(node);
12441 }
12442 else if (node.type == NODE_CURLYNAMEPART) {
12443 return this.compile_curlynamepart(node);
12444 }
12445 else if (node.type == NODE_CURLYNAMEEXPR) {
12446 return this.compile_curlynameexpr(node);
12447 }
12448 else if (node.type == NODE_LAMBDA) {
12449 return this.compile_lambda(node);
12450 }
12451 else if (node.type == NODE_HEREDOC) {
12452 return this.compile_heredoc(node);
12453 }
12454 else {
12455 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
12456 }
12457 return NIL;
12458}
12459
12460Compiler.prototype.compile_body = function(body) {
12461 var __c10 = body;
12462 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
12463 var node = __c10[__i10];
12464 this.compile(node);
12465 }
12466}
12467
12468Compiler.prototype.compile_toplevel = function(node) {
12469 this.compile_body(node.body);
12470 return this.lines;
12471}
12472
12473Compiler.prototype.compile_comment = function(node) {
12474 this.out(";%s", node.str);
12475}
12476
12477Compiler.prototype.compile_excmd = function(node) {
12478 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
12479}
12480
12481Compiler.prototype.compile_function = function(node) {
12482 var left = this.compile(node.left);
12483 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12484 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
12485 if (!viml_empty(rlist)) {
12486 var remaining = FALSE;
12487 if (rlist[rlist.length - 1] == "...") {
12488 viml_remove(rlist, -1);
12489 var remaining = TRUE;
12490 }
12491 var __c11 = viml_range(viml_len(rlist));
12492 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
12493 var i = __c11[__i11];
12494 if (i < viml_len(rlist) - viml_len(default_args)) {
12495 left += viml_printf(" %s", rlist[i]);
12496 }
12497 else {
12498 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
12499 }
12500 }
12501 if (remaining) {
12502 left += " . ...";
12503 }
12504 }
12505 this.out("(function (%s)", left);
12506 this.incindent(" ");
12507 this.compile_body(node.body);
12508 this.out(")");
12509 this.decindent();
12510}
12511
12512Compiler.prototype.compile_delfunction = function(node) {
12513 this.out("(delfunction %s)", this.compile(node.left));
12514}
12515
12516Compiler.prototype.compile_return = function(node) {
12517 if (node.left === NIL) {
12518 this.out("(return)");
12519 }
12520 else {
12521 this.out("(return %s)", this.compile(node.left));
12522 }
12523}
12524
12525Compiler.prototype.compile_excall = function(node) {
12526 this.out("(call %s)", this.compile(node.left));
12527}
12528
12529Compiler.prototype.compile_eval = function(node) {
12530 this.out("(eval %s)", this.compile(node.left));
12531}
12532
12533Compiler.prototype.compile_let = function(node) {
12534 var left = "";
12535 if (node.left !== NIL) {
12536 var left = this.compile(node.left);
12537 }
12538 else {
12539 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12540 if (node.rest !== NIL) {
12541 left += " . " + this.compile(node.rest);
12542 }
12543 var left = "(" + left + ")";
12544 }
12545 var right = this.compile(node.right);
12546 this.out("(let %s %s %s)", node.op, left, right);
12547}
12548
12549// TODO: merge with s:Compiler.compile_let() ?
12550Compiler.prototype.compile_const = function(node) {
12551 var left = "";
12552 if (node.left !== NIL) {
12553 var left = this.compile(node.left);
12554 }
12555 else {
12556 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12557 if (node.rest !== NIL) {
12558 left += " . " + this.compile(node.rest);
12559 }
12560 var left = "(" + left + ")";
12561 }
12562 var right = this.compile(node.right);
12563 this.out("(const %s %s %s)", node.op, left, right);
12564}
12565
12566Compiler.prototype.compile_unlet = function(node) {
12567 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12568 this.out("(unlet %s)", viml_join(list, " "));
12569}
12570
12571Compiler.prototype.compile_lockvar = function(node) {
12572 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12573 if (node.depth === NIL) {
12574 this.out("(lockvar %s)", viml_join(list, " "));
12575 }
12576 else {
12577 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
12578 }
12579}
12580
12581Compiler.prototype.compile_unlockvar = function(node) {
12582 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12583 if (node.depth === NIL) {
12584 this.out("(unlockvar %s)", viml_join(list, " "));
12585 }
12586 else {
12587 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
12588 }
12589}
12590
12591Compiler.prototype.compile_if = function(node) {
12592 this.out("(if %s", this.compile(node.cond));
12593 this.incindent(" ");
12594 this.compile_body(node.body);
12595 this.decindent();
12596 var __c12 = node.elseif;
12597 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
12598 var enode = __c12[__i12];
12599 this.out(" elseif %s", this.compile(enode.cond));
12600 this.incindent(" ");
12601 this.compile_body(enode.body);
12602 this.decindent();
12603 }
12604 if (node._else !== NIL) {
12605 this.out(" else");
12606 this.incindent(" ");
12607 this.compile_body(node._else.body);
12608 this.decindent();
12609 }
12610 this.incindent(" ");
12611 this.out(")");
12612 this.decindent();
12613}
12614
12615Compiler.prototype.compile_while = function(node) {
12616 this.out("(while %s", this.compile(node.cond));
12617 this.incindent(" ");
12618 this.compile_body(node.body);
12619 this.out(")");
12620 this.decindent();
12621}
12622
12623Compiler.prototype.compile_for = function(node) {
12624 var left = "";
12625 if (node.left !== NIL) {
12626 var left = this.compile(node.left);
12627 }
12628 else {
12629 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12630 if (node.rest !== NIL) {
12631 left += " . " + this.compile(node.rest);
12632 }
12633 var left = "(" + left + ")";
12634 }
12635 var right = this.compile(node.right);
12636 this.out("(for %s %s", left, right);
12637 this.incindent(" ");
12638 this.compile_body(node.body);
12639 this.out(")");
12640 this.decindent();
12641}
12642
12643Compiler.prototype.compile_continue = function(node) {
12644 this.out("(continue)");
12645}
12646
12647Compiler.prototype.compile_break = function(node) {
12648 this.out("(break)");
12649}
12650
12651Compiler.prototype.compile_try = function(node) {
12652 this.out("(try");
12653 this.incindent(" ");
12654 this.compile_body(node.body);
12655 var __c13 = node.catch;
12656 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
12657 var cnode = __c13[__i13];
12658 if (cnode.pattern !== NIL) {
12659 this.decindent();
12660 this.out(" catch /%s/", cnode.pattern);
12661 this.incindent(" ");
12662 this.compile_body(cnode.body);
12663 }
12664 else {
12665 this.decindent();
12666 this.out(" catch");
12667 this.incindent(" ");
12668 this.compile_body(cnode.body);
12669 }
12670 }
12671 if (node._finally !== NIL) {
12672 this.decindent();
12673 this.out(" finally");
12674 this.incindent(" ");
12675 this.compile_body(node._finally.body);
12676 }
12677 this.out(")");
12678 this.decindent();
12679}
12680
12681Compiler.prototype.compile_throw = function(node) {
12682 this.out("(throw %s)", this.compile(node.left));
12683}
12684
12685Compiler.prototype.compile_echo = function(node) {
12686 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12687 this.out("(echo %s)", viml_join(list, " "));
12688}
12689
12690Compiler.prototype.compile_echon = function(node) {
12691 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12692 this.out("(echon %s)", viml_join(list, " "));
12693}
12694
12695Compiler.prototype.compile_echohl = function(node) {
12696 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
12697}
12698
12699Compiler.prototype.compile_echomsg = function(node) {
12700 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12701 this.out("(echomsg %s)", viml_join(list, " "));
12702}
12703
12704Compiler.prototype.compile_echoerr = function(node) {
12705 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12706 this.out("(echoerr %s)", viml_join(list, " "));
12707}
12708
12709Compiler.prototype.compile_execute = function(node) {
12710 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12711 this.out("(execute %s)", viml_join(list, " "));
12712}
12713
12714Compiler.prototype.compile_ternary = function(node) {
12715 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
12716}
12717
12718Compiler.prototype.compile_or = function(node) {
12719 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
12720}
12721
12722Compiler.prototype.compile_and = function(node) {
12723 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
12724}
12725
12726Compiler.prototype.compile_equal = function(node) {
12727 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
12728}
12729
12730Compiler.prototype.compile_equalci = function(node) {
12731 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
12732}
12733
12734Compiler.prototype.compile_equalcs = function(node) {
12735 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
12736}
12737
12738Compiler.prototype.compile_nequal = function(node) {
12739 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
12740}
12741
12742Compiler.prototype.compile_nequalci = function(node) {
12743 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
12744}
12745
12746Compiler.prototype.compile_nequalcs = function(node) {
12747 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
12748}
12749
12750Compiler.prototype.compile_greater = function(node) {
12751 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
12752}
12753
12754Compiler.prototype.compile_greaterci = function(node) {
12755 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
12756}
12757
12758Compiler.prototype.compile_greatercs = function(node) {
12759 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
12760}
12761
12762Compiler.prototype.compile_gequal = function(node) {
12763 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
12764}
12765
12766Compiler.prototype.compile_gequalci = function(node) {
12767 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
12768}
12769
12770Compiler.prototype.compile_gequalcs = function(node) {
12771 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
12772}
12773
12774Compiler.prototype.compile_smaller = function(node) {
12775 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
12776}
12777
12778Compiler.prototype.compile_smallerci = function(node) {
12779 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
12780}
12781
12782Compiler.prototype.compile_smallercs = function(node) {
12783 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
12784}
12785
12786Compiler.prototype.compile_sequal = function(node) {
12787 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
12788}
12789
12790Compiler.prototype.compile_sequalci = function(node) {
12791 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
12792}
12793
12794Compiler.prototype.compile_sequalcs = function(node) {
12795 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
12796}
12797
12798Compiler.prototype.compile_match = function(node) {
12799 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
12800}
12801
12802Compiler.prototype.compile_matchci = function(node) {
12803 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
12804}
12805
12806Compiler.prototype.compile_matchcs = function(node) {
12807 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
12808}
12809
12810Compiler.prototype.compile_nomatch = function(node) {
12811 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
12812}
12813
12814Compiler.prototype.compile_nomatchci = function(node) {
12815 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
12816}
12817
12818Compiler.prototype.compile_nomatchcs = function(node) {
12819 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
12820}
12821
12822Compiler.prototype.compile_is = function(node) {
12823 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
12824}
12825
12826Compiler.prototype.compile_isci = function(node) {
12827 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
12828}
12829
12830Compiler.prototype.compile_iscs = function(node) {
12831 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
12832}
12833
12834Compiler.prototype.compile_isnot = function(node) {
12835 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
12836}
12837
12838Compiler.prototype.compile_isnotci = function(node) {
12839 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
12840}
12841
12842Compiler.prototype.compile_isnotcs = function(node) {
12843 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
12844}
12845
12846Compiler.prototype.compile_add = function(node) {
12847 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
12848}
12849
12850Compiler.prototype.compile_subtract = function(node) {
12851 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
12852}
12853
12854Compiler.prototype.compile_concat = function(node) {
12855 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
12856}
12857
12858Compiler.prototype.compile_multiply = function(node) {
12859 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
12860}
12861
12862Compiler.prototype.compile_divide = function(node) {
12863 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12864}
12865
12866Compiler.prototype.compile_remainder = function(node) {
12867 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12868}
12869
12870Compiler.prototype.compile_not = function(node) {
12871 return viml_printf("(! %s)", this.compile(node.left));
12872}
12873
12874Compiler.prototype.compile_plus = function(node) {
12875 return viml_printf("(+ %s)", this.compile(node.left));
12876}
12877
12878Compiler.prototype.compile_minus = function(node) {
12879 return viml_printf("(- %s)", this.compile(node.left));
12880}
12881
12882Compiler.prototype.compile_subscript = function(node) {
12883 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12884}
12885
12886Compiler.prototype.compile_slice = function(node) {
12887 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12888 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12889 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12890}
12891
12892Compiler.prototype.compile_dot = function(node) {
12893 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12894}
12895
12896Compiler.prototype.compile_method = function(node) {
12897 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12898}
12899
12900Compiler.prototype.compile_call = function(node) {
12901 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12902 if (viml_empty(rlist)) {
12903 return viml_printf("(%s)", this.compile(node.left));
12904 }
12905 else {
12906 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12907 }
12908}
12909
12910Compiler.prototype.compile_number = function(node) {
12911 return node.value;
12912}
12913
12914Compiler.prototype.compile_blob = function(node) {
12915 return node.value;
12916}
12917
12918Compiler.prototype.compile_string = function(node) {
12919 return node.value;
12920}
12921
12922Compiler.prototype.compile_list = function(node) {
12923 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12924 if (viml_empty(value)) {
12925 return "(list)";
12926 }
12927 else {
12928 return viml_printf("(list %s)", viml_join(value, " "));
12929 }
12930}
12931
12932Compiler.prototype.compile_dict = function(node) {
12933 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12934 if (viml_empty(value)) {
12935 return "(dict)";
12936 }
12937 else {
12938 return viml_printf("(dict %s)", viml_join(value, " "));
12939 }
12940}
12941
12942Compiler.prototype.compile_option = function(node) {
12943 return node.value;
12944}
12945
12946Compiler.prototype.compile_identifier = function(node) {
12947 return node.value;
12948}
12949
12950Compiler.prototype.compile_curlyname = function(node) {
12951 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12952}
12953
12954Compiler.prototype.compile_env = function(node) {
12955 return node.value;
12956}
12957
12958Compiler.prototype.compile_reg = function(node) {
12959 return node.value;
12960}
12961
12962Compiler.prototype.compile_curlynamepart = function(node) {
12963 return node.value;
12964}
12965
12966Compiler.prototype.compile_curlynameexpr = function(node) {
12967 return "{" + this.compile(node.value) + "}";
12968}
12969
12970Compiler.prototype.escape_string = function(str) {
12971 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12972 var out = "\"";
12973 var __c14 = viml_range(viml_len(str));
12974 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12975 var i = __c14[__i14];
12976 var c = str[i];
12977 if (viml_has_key(m, c)) {
12978 out += m[c];
12979 }
12980 else {
12981 out += c;
12982 }
12983 }
12984 out += "\"";
12985 return out;
12986}
12987
12988Compiler.prototype.compile_lambda = function(node) {
12989 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12990 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12991}
12992
12993Compiler.prototype.compile_heredoc = function(node) {
12994 if (viml_empty(node.rlist)) {
12995 var rlist = "(list)";
12996 }
12997 else {
12998 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12999 }
13000 if (viml_empty(node.body)) {
13001 var body = "(list)";
13002 }
13003 else {
13004 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
13005 }
13006 var op = this.escape_string(node.op);
13007 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
13008}
13009
13010// TODO: under construction
13011function RegexpParser() { this.__init__.apply(this, arguments); }
13012RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
13013RegexpParser.prototype.RE_NOMAGIC = 2;
13014RegexpParser.prototype.RE_MAGIC = 3;
13015RegexpParser.prototype.RE_VERY_MAGIC = 4;
13016RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
13017 this.reader = reader;
13018 this.cmd = cmd;
13019 this.delim = delim;
13020 this.reg_magic = this.RE_MAGIC;
13021}
13022
13023RegexpParser.prototype.isend = function(c) {
13024 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
13025}
13026
13027RegexpParser.prototype.parse_regexp = function() {
13028 var prevtoken = "";
13029 var ntoken = "";
13030 var ret = [];
13031 if (this.reader.peekn(4) == "\\%#=") {
13032 var epos = this.reader.getpos();
13033 var token = this.reader.getn(5);
13034 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
13035 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
13036 }
13037 viml_add(ret, token);
13038 }
13039 while (!this.isend(this.reader.peek())) {
13040 var prevtoken = ntoken;
13041 var __tmp = this.get_token();
13042 var token = __tmp[0];
13043 var ntoken = __tmp[1];
13044 if (ntoken == "\\m") {
13045 this.reg_magic = this.RE_MAGIC;
13046 }
13047 else if (ntoken == "\\M") {
13048 this.reg_magic = this.RE_NOMAGIC;
13049 }
13050 else if (ntoken == "\\v") {
13051 this.reg_magic = this.RE_VERY_MAGIC;
13052 }
13053 else if (ntoken == "\\V") {
13054 this.reg_magic = this.RE_VERY_NOMAGIC;
13055 }
13056 else if (ntoken == "\\*") {
13057 // '*' is not magic as the very first character.
13058 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
13059 var ntoken = "*";
13060 }
13061 }
13062 else if (ntoken == "\\^") {
13063 // '^' is only magic as the very first character.
13064 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
13065 var ntoken = "^";
13066 }
13067 }
13068 else if (ntoken == "\\$") {
13069 // '$' is only magic as the very last character
13070 var pos = this.reader.tell();
13071 if (this.reg_magic != this.RE_VERY_MAGIC) {
13072 while (!this.isend(this.reader.peek())) {
13073 var __tmp = this.get_token();
13074 var t = __tmp[0];
13075 var n = __tmp[1];
13076 // XXX: Vim doesn't check \v and \V?
13077 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
13078 continue;
13079 }
13080 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
13081 var ntoken = "$";
13082 }
13083 break;
13084 }
13085 }
13086 this.reader.seek_set(pos);
13087 }
13088 else if (ntoken == "\\?") {
13089 // '?' is literal in '?' command.
13090 if (this.cmd == "?") {
13091 var ntoken = "?";
13092 }
13093 }
13094 viml_add(ret, ntoken);
13095 }
13096 return ret;
13097}
13098
13099// @return [actual_token, normalized_token]
13100RegexpParser.prototype.get_token = function() {
13101 if (this.reg_magic == this.RE_VERY_MAGIC) {
13102 return this.get_token_very_magic();
13103 }
13104 else if (this.reg_magic == this.RE_MAGIC) {
13105 return this.get_token_magic();
13106 }
13107 else if (this.reg_magic == this.RE_NOMAGIC) {
13108 return this.get_token_nomagic();
13109 }
13110 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
13111 return this.get_token_very_nomagic();
13112 }
13113}
13114
13115RegexpParser.prototype.get_token_very_magic = function() {
13116 if (this.isend(this.reader.peek())) {
13117 return ["<END>", "<END>"];
13118 }
13119 var c = this.reader.get();
13120 if (c == "\\") {
13121 return this.get_token_backslash_common();
13122 }
13123 else if (c == "*") {
13124 return ["*", "\\*"];
13125 }
13126 else if (c == "+") {
13127 return ["+", "\\+"];
13128 }
13129 else if (c == "=") {
13130 return ["=", "\\="];
13131 }
13132 else if (c == "?") {
13133 return ["?", "\\?"];
13134 }
13135 else if (c == "{") {
13136 return this.get_token_brace("{");
13137 }
13138 else if (c == "@") {
13139 return this.get_token_at("@");
13140 }
13141 else if (c == "^") {
13142 return ["^", "\\^"];
13143 }
13144 else if (c == "$") {
13145 return ["$", "\\$"];
13146 }
13147 else if (c == ".") {
13148 return [".", "\\."];
13149 }
13150 else if (c == "<") {
13151 return ["<", "\\<"];
13152 }
13153 else if (c == ">") {
13154 return [">", "\\>"];
13155 }
13156 else if (c == "%") {
13157 return this.get_token_percent("%");
13158 }
13159 else if (c == "[") {
13160 return this.get_token_sq("[");
13161 }
13162 else if (c == "~") {
13163 return ["~", "\\~"];
13164 }
13165 else if (c == "|") {
13166 return ["|", "\\|"];
13167 }
13168 else if (c == "&") {
13169 return ["&", "\\&"];
13170 }
13171 else if (c == "(") {
13172 return ["(", "\\("];
13173 }
13174 else if (c == ")") {
13175 return [")", "\\)"];
13176 }
13177 return [c, c];
13178}
13179
13180RegexpParser.prototype.get_token_magic = function() {
13181 if (this.isend(this.reader.peek())) {
13182 return ["<END>", "<END>"];
13183 }
13184 var c = this.reader.get();
13185 if (c == "\\") {
13186 var pos = this.reader.tell();
13187 var c = this.reader.get();
13188 if (c == "+") {
13189 return ["\\+", "\\+"];
13190 }
13191 else if (c == "=") {
13192 return ["\\=", "\\="];
13193 }
13194 else if (c == "?") {
13195 return ["\\?", "\\?"];
13196 }
13197 else if (c == "{") {
13198 return this.get_token_brace("\\{");
13199 }
13200 else if (c == "@") {
13201 return this.get_token_at("\\@");
13202 }
13203 else if (c == "<") {
13204 return ["\\<", "\\<"];
13205 }
13206 else if (c == ">") {
13207 return ["\\>", "\\>"];
13208 }
13209 else if (c == "%") {
13210 return this.get_token_percent("\\%");
13211 }
13212 else if (c == "|") {
13213 return ["\\|", "\\|"];
13214 }
13215 else if (c == "&") {
13216 return ["\\&", "\\&"];
13217 }
13218 else if (c == "(") {
13219 return ["\\(", "\\("];
13220 }
13221 else if (c == ")") {
13222 return ["\\)", "\\)"];
13223 }
13224 this.reader.seek_set(pos);
13225 return this.get_token_backslash_common();
13226 }
13227 else if (c == "*") {
13228 return ["*", "\\*"];
13229 }
13230 else if (c == "^") {
13231 return ["^", "\\^"];
13232 }
13233 else if (c == "$") {
13234 return ["$", "\\$"];
13235 }
13236 else if (c == ".") {
13237 return [".", "\\."];
13238 }
13239 else if (c == "[") {
13240 return this.get_token_sq("[");
13241 }
13242 else if (c == "~") {
13243 return ["~", "\\~"];
13244 }
13245 return [c, c];
13246}
13247
13248RegexpParser.prototype.get_token_nomagic = function() {
13249 if (this.isend(this.reader.peek())) {
13250 return ["<END>", "<END>"];
13251 }
13252 var c = this.reader.get();
13253 if (c == "\\") {
13254 var pos = this.reader.tell();
13255 var c = this.reader.get();
13256 if (c == "*") {
13257 return ["\\*", "\\*"];
13258 }
13259 else if (c == "+") {
13260 return ["\\+", "\\+"];
13261 }
13262 else if (c == "=") {
13263 return ["\\=", "\\="];
13264 }
13265 else if (c == "?") {
13266 return ["\\?", "\\?"];
13267 }
13268 else if (c == "{") {
13269 return this.get_token_brace("\\{");
13270 }
13271 else if (c == "@") {
13272 return this.get_token_at("\\@");
13273 }
13274 else if (c == ".") {
13275 return ["\\.", "\\."];
13276 }
13277 else if (c == "<") {
13278 return ["\\<", "\\<"];
13279 }
13280 else if (c == ">") {
13281 return ["\\>", "\\>"];
13282 }
13283 else if (c == "%") {
13284 return this.get_token_percent("\\%");
13285 }
13286 else if (c == "~") {
13287 return ["\\~", "\\^"];
13288 }
13289 else if (c == "[") {
13290 return this.get_token_sq("\\[");
13291 }
13292 else if (c == "|") {
13293 return ["\\|", "\\|"];
13294 }
13295 else if (c == "&") {
13296 return ["\\&", "\\&"];
13297 }
13298 else if (c == "(") {
13299 return ["\\(", "\\("];
13300 }
13301 else if (c == ")") {
13302 return ["\\)", "\\)"];
13303 }
13304 this.reader.seek_set(pos);
13305 return this.get_token_backslash_common();
13306 }
13307 else if (c == "^") {
13308 return ["^", "\\^"];
13309 }
13310 else if (c == "$") {
13311 return ["$", "\\$"];
13312 }
13313 return [c, c];
13314}
13315
13316RegexpParser.prototype.get_token_very_nomagic = function() {
13317 if (this.isend(this.reader.peek())) {
13318 return ["<END>", "<END>"];
13319 }
13320 var c = this.reader.get();
13321 if (c == "\\") {
13322 var pos = this.reader.tell();
13323 var c = this.reader.get();
13324 if (c == "*") {
13325 return ["\\*", "\\*"];
13326 }
13327 else if (c == "+") {
13328 return ["\\+", "\\+"];
13329 }
13330 else if (c == "=") {
13331 return ["\\=", "\\="];
13332 }
13333 else if (c == "?") {
13334 return ["\\?", "\\?"];
13335 }
13336 else if (c == "{") {
13337 return this.get_token_brace("\\{");
13338 }
13339 else if (c == "@") {
13340 return this.get_token_at("\\@");
13341 }
13342 else if (c == "^") {
13343 return ["\\^", "\\^"];
13344 }
13345 else if (c == "$") {
13346 return ["\\$", "\\$"];
13347 }
13348 else if (c == "<") {
13349 return ["\\<", "\\<"];
13350 }
13351 else if (c == ">") {
13352 return ["\\>", "\\>"];
13353 }
13354 else if (c == "%") {
13355 return this.get_token_percent("\\%");
13356 }
13357 else if (c == "~") {
13358 return ["\\~", "\\~"];
13359 }
13360 else if (c == "[") {
13361 return this.get_token_sq("\\[");
13362 }
13363 else if (c == "|") {
13364 return ["\\|", "\\|"];
13365 }
13366 else if (c == "&") {
13367 return ["\\&", "\\&"];
13368 }
13369 else if (c == "(") {
13370 return ["\\(", "\\("];
13371 }
13372 else if (c == ")") {
13373 return ["\\)", "\\)"];
13374 }
13375 this.reader.seek_set(pos);
13376 return this.get_token_backslash_common();
13377 }
13378 return [c, c];
13379}
13380
13381RegexpParser.prototype.get_token_backslash_common = function() {
13382 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
13383 var c = this.reader.get();
13384 if (c == "\\") {
13385 return ["\\\\", "\\\\"];
13386 }
13387 else if (viml_stridx(cclass, c) != -1) {
13388 return ["\\" + c, "\\" + c];
13389 }
13390 else if (c == "_") {
13391 var epos = this.reader.getpos();
13392 var c = this.reader.get();
13393 if (viml_stridx(cclass, c) != -1) {
13394 return ["\\_" + c, "\\_ . c"];
13395 }
13396 else if (c == "^") {
13397 return ["\\_^", "\\_^"];
13398 }
13399 else if (c == "$") {
13400 return ["\\_$", "\\_$"];
13401 }
13402 else if (c == ".") {
13403 return ["\\_.", "\\_."];
13404 }
13405 else if (c == "[") {
13406 return this.get_token_sq("\\_[");
13407 }
13408 throw Err("E63: Invalid use of \\_", epos);
13409 }
13410 else if (viml_stridx("etrb", c) != -1) {
13411 return ["\\" + c, "\\" + c];
13412 }
13413 else if (viml_stridx("123456789", c) != -1) {
13414 return ["\\" + c, "\\" + c];
13415 }
13416 else if (c == "z") {
13417 var epos = this.reader.getpos();
13418 var c = this.reader.get();
13419 if (viml_stridx("123456789", c) != -1) {
13420 return ["\\z" + c, "\\z" + c];
13421 }
13422 else if (c == "s") {
13423 return ["\\zs", "\\zs"];
13424 }
13425 else if (c == "e") {
13426 return ["\\ze", "\\ze"];
13427 }
13428 else if (c == "(") {
13429 return ["\\z(", "\\z("];
13430 }
13431 throw Err("E68: Invalid character after \\z", epos);
13432 }
13433 else if (viml_stridx("cCmMvVZ", c) != -1) {
13434 return ["\\" + c, "\\" + c];
13435 }
13436 else if (c == "%") {
13437 var epos = this.reader.getpos();
13438 var c = this.reader.get();
13439 if (c == "d") {
13440 var r = this.getdecchrs();
13441 if (r != "") {
13442 return ["\\%d" + r, "\\%d" + r];
13443 }
13444 }
13445 else if (c == "o") {
13446 var r = this.getoctchrs();
13447 if (r != "") {
13448 return ["\\%o" + r, "\\%o" + r];
13449 }
13450 }
13451 else if (c == "x") {
13452 var r = this.gethexchrs(2);
13453 if (r != "") {
13454 return ["\\%x" + r, "\\%x" + r];
13455 }
13456 }
13457 else if (c == "u") {
13458 var r = this.gethexchrs(4);
13459 if (r != "") {
13460 return ["\\%u" + r, "\\%u" + r];
13461 }
13462 }
13463 else if (c == "U") {
13464 var r = this.gethexchrs(8);
13465 if (r != "") {
13466 return ["\\%U" + r, "\\%U" + r];
13467 }
13468 }
13469 throw Err("E678: Invalid character after \\%[dxouU]", epos);
13470 }
13471 return ["\\" + c, c];
13472}
13473
13474// \{}
13475RegexpParser.prototype.get_token_brace = function(pre) {
13476 var r = "";
13477 var minus = "";
13478 var comma = "";
13479 var n = "";
13480 var m = "";
13481 if (this.reader.p(0) == "-") {
13482 var minus = this.reader.get();
13483 r += minus;
13484 }
13485 if (isdigit(this.reader.p(0))) {
13486 var n = this.reader.read_digit();
13487 r += n;
13488 }
13489 if (this.reader.p(0) == ",") {
13490 var comma = this.rader.get();
13491 r += comma;
13492 }
13493 if (isdigit(this.reader.p(0))) {
13494 var m = this.reader.read_digit();
13495 r += m;
13496 }
13497 if (this.reader.p(0) == "\\") {
13498 r += this.reader.get();
13499 }
13500 if (this.reader.p(0) != "}") {
13501 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
13502 }
13503 this.reader.get();
13504 return [pre + r, "\\{" + minus + n + comma + m + "}"];
13505}
13506
13507// \[]
13508RegexpParser.prototype.get_token_sq = function(pre) {
13509 var start = this.reader.tell();
13510 var r = "";
13511 // Complement of range
13512 if (this.reader.p(0) == "^") {
13513 r += this.reader.get();
13514 }
13515 // At the start ']' and '-' mean the literal character.
13516 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
13517 r += this.reader.get();
13518 }
13519 while (TRUE) {
13520 var startc = 0;
13521 var c = this.reader.p(0);
13522 if (this.isend(c)) {
13523 // If there is no matching ']', we assume the '[' is a normal character.
13524 this.reader.seek_set(start);
13525 return [pre, "["];
13526 }
13527 else if (c == "]") {
13528 this.reader.seek_cur(1);
13529 return [pre + r + "]", "\\[" + r + "]"];
13530 }
13531 else if (c == "[") {
13532 var e = this.get_token_sq_char_class();
13533 if (e == "") {
13534 var e = this.get_token_sq_equi_class();
13535 if (e == "") {
13536 var e = this.get_token_sq_coll_element();
13537 if (e == "") {
13538 var __tmp = this.get_token_sq_c();
13539 var e = __tmp[0];
13540 var startc = __tmp[1];
13541 }
13542 }
13543 }
13544 r += e;
13545 }
13546 else {
13547 var __tmp = this.get_token_sq_c();
13548 var e = __tmp[0];
13549 var startc = __tmp[1];
13550 r += e;
13551 }
13552 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
13553 this.reader.seek_cur(1);
13554 r += "-";
13555 var c = this.reader.p(0);
13556 if (c == "[") {
13557 var e = this.get_token_sq_coll_element();
13558 if (e != "") {
13559 var endc = viml_char2nr(e[2]);
13560 }
13561 else {
13562 var __tmp = this.get_token_sq_c();
13563 var e = __tmp[0];
13564 var endc = __tmp[1];
13565 }
13566 r += e;
13567 }
13568 else {
13569 var __tmp = this.get_token_sq_c();
13570 var e = __tmp[0];
13571 var endc = __tmp[1];
13572 r += e;
13573 }
13574 if (startc > endc || endc > startc + 256) {
13575 throw Err("E16: Invalid range", this.reader.getpos());
13576 }
13577 }
13578 }
13579}
13580
13581// [c]
13582RegexpParser.prototype.get_token_sq_c = function() {
13583 var c = this.reader.p(0);
13584 if (c == "\\") {
13585 this.reader.seek_cur(1);
13586 var c = this.reader.p(0);
13587 if (c == "n") {
13588 this.reader.seek_cur(1);
13589 return ["\\n", 0];
13590 }
13591 else if (c == "r") {
13592 this.reader.seek_cur(1);
13593 return ["\\r", 13];
13594 }
13595 else if (c == "t") {
13596 this.reader.seek_cur(1);
13597 return ["\\t", 9];
13598 }
13599 else if (c == "e") {
13600 this.reader.seek_cur(1);
13601 return ["\\e", 27];
13602 }
13603 else if (c == "b") {
13604 this.reader.seek_cur(1);
13605 return ["\\b", 8];
13606 }
13607 else if (viml_stridx("]^-\\", c) != -1) {
13608 this.reader.seek_cur(1);
13609 return ["\\" + c, viml_char2nr(c)];
13610 }
13611 else if (viml_stridx("doxuU", c) != -1) {
13612 var __tmp = this.get_token_sq_coll_char();
13613 var c = __tmp[0];
13614 var n = __tmp[1];
13615 return [c, n];
13616 }
13617 else {
13618 return ["\\", viml_char2nr("\\")];
13619 }
13620 }
13621 else if (c == "-") {
13622 this.reader.seek_cur(1);
13623 return ["-", viml_char2nr("-")];
13624 }
13625 else {
13626 this.reader.seek_cur(1);
13627 return [c, viml_char2nr(c)];
13628 }
13629}
13630
13631// [\d123]
13632RegexpParser.prototype.get_token_sq_coll_char = function() {
13633 var pos = this.reader.tell();
13634 var c = this.reader.get();
13635 if (c == "d") {
13636 var r = this.getdecchrs();
13637 var n = viml_str2nr(r, 10);
13638 }
13639 else if (c == "o") {
13640 var r = this.getoctchrs();
13641 var n = viml_str2nr(r, 8);
13642 }
13643 else if (c == "x") {
13644 var r = this.gethexchrs(2);
13645 var n = viml_str2nr(r, 16);
13646 }
13647 else if (c == "u") {
13648 var r = this.gethexchrs(4);
13649 var n = viml_str2nr(r, 16);
13650 }
13651 else if (c == "U") {
13652 var r = this.gethexchrs(8);
13653 var n = viml_str2nr(r, 16);
13654 }
13655 else {
13656 var r = "";
13657 }
13658 if (r == "") {
13659 this.reader.seek_set(pos);
13660 return "\\";
13661 }
13662 return ["\\" + c + r, n];
13663}
13664
13665// [[.a.]]
13666RegexpParser.prototype.get_token_sq_coll_element = function() {
13667 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
13668 return this.reader.getn(5);
13669 }
13670 return "";
13671}
13672
13673// [[=a=]]
13674RegexpParser.prototype.get_token_sq_equi_class = function() {
13675 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
13676 return this.reader.getn(5);
13677 }
13678 return "";
13679}
13680
13681// [[:alpha:]]
13682RegexpParser.prototype.get_token_sq_char_class = function() {
13683 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
13684 var pos = this.reader.tell();
13685 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
13686 this.reader.seek_cur(2);
13687 var r = this.reader.read_alpha();
13688 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
13689 this.reader.seek_cur(2);
13690 var __c15 = class_names;
13691 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
13692 var name = __c15[__i15];
13693 if (r == name) {
13694 return "[:" + name + ":]";
13695 }
13696 }
13697 }
13698 }
13699 this.reader.seek_set(pos);
13700 return "";
13701}
13702
13703// \@...
13704RegexpParser.prototype.get_token_at = function(pre) {
13705 var epos = this.reader.getpos();
13706 var c = this.reader.get();
13707 if (c == ">") {
13708 return [pre + ">", "\\@>"];
13709 }
13710 else if (c == "=") {
13711 return [pre + "=", "\\@="];
13712 }
13713 else if (c == "!") {
13714 return [pre + "!", "\\@!"];
13715 }
13716 else if (c == "<") {
13717 var c = this.reader.get();
13718 if (c == "=") {
13719 return [pre + "<=", "\\@<="];
13720 }
13721 else if (c == "!") {
13722 return [pre + "<!", "\\@<!"];
13723 }
13724 }
13725 throw Err("E64: @ follows nothing", epos);
13726}
13727
13728// \%...
13729RegexpParser.prototype.get_token_percent = function(pre) {
13730 var c = this.reader.get();
13731 if (c == "^") {
13732 return [pre + "^", "\\%^"];
13733 }
13734 else if (c == "$") {
13735 return [pre + "$", "\\%$"];
13736 }
13737 else if (c == "V") {
13738 return [pre + "V", "\\%V"];
13739 }
13740 else if (c == "#") {
13741 return [pre + "#", "\\%#"];
13742 }
13743 else if (c == "[") {
13744 return this.get_token_percent_sq(pre + "[");
13745 }
13746 else if (c == "(") {
13747 return [pre + "(", "\\%("];
13748 }
13749 else {
13750 return this.get_token_mlcv(pre);
13751 }
13752}
13753
13754// \%[]
13755RegexpParser.prototype.get_token_percent_sq = function(pre) {
13756 var r = "";
13757 while (TRUE) {
13758 var c = this.reader.peek();
13759 if (this.isend(c)) {
13760 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
13761 }
13762 else if (c == "]") {
13763 if (r == "") {
13764 throw Err("E70: Empty \\%[", this.reader.getpos());
13765 }
13766 this.reader.seek_cur(1);
13767 break;
13768 }
13769 this.reader.seek_cur(1);
13770 r += c;
13771 }
13772 return [pre + r + "]", "\\%[" + r + "]"];
13773}
13774
13775// \%'m \%l \%c \%v
13776RegexpParser.prototype.get_token_mlvc = function(pre) {
13777 var r = "";
13778 var cmp = "";
13779 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
13780 var cmp = this.reader.get();
13781 r += cmp;
13782 }
13783 if (this.reader.p(0) == "'") {
13784 r += this.reader.get();
13785 var c = this.reader.p(0);
13786 if (this.isend(c)) {
13787 // FIXME: Should be error? Vim allow this.
13788 var c = "";
13789 }
13790 else {
13791 var c = this.reader.get();
13792 }
13793 return [pre + r + c, "\\%" + cmp + "'" + c];
13794 }
13795 else if (isdigit(this.reader.p(0))) {
13796 var d = this.reader.read_digit();
13797 r += d;
13798 var c = this.reader.p(0);
13799 if (c == "l") {
13800 this.reader.get();
13801 return [pre + r + "l", "\\%" + cmp + d + "l"];
13802 }
13803 else if (c == "c") {
13804 this.reader.get();
13805 return [pre + r + "c", "\\%" + cmp + d + "c"];
13806 }
13807 else if (c == "v") {
13808 this.reader.get();
13809 return [pre + r + "v", "\\%" + cmp + d + "v"];
13810 }
13811 }
13812 throw Err("E71: Invalid character after %", this.reader.getpos());
13813}
13814
13815RegexpParser.prototype.getdecchrs = function() {
13816 return this.reader.read_digit();
13817}
13818
13819RegexpParser.prototype.getoctchrs = function() {
13820 return this.reader.read_odigit();
13821}
13822
13823RegexpParser.prototype.gethexchrs = function(n) {
13824 var r = "";
13825 var __c16 = viml_range(n);
13826 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
13827 var i = __c16[__i16];
13828 var c = this.reader.peek();
13829 if (!isxdigit(c)) {
13830 break;
13831 }
13832 r += this.reader.get();
13833 }
13834 return r;
13835}
13836
13837if (__webpack_require__.c[__webpack_require__.s] === module) {
13838 main();
13839}
13840else {
13841 module.exports = {
13842 VimLParser: VimLParser,
13843 StringReader: StringReader,
13844 Compiler: Compiler
13845 };
13846}
13847
13848/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(53)(module)))
13849
13850/***/ }),
13851/* 53 */
13852/***/ (function(module, exports) {
13853
13854module.exports = function(module) {
13855 if (!module.webpackPolyfill) {
13856 module.deprecate = function() {};
13857 module.paths = [];
13858 // module.parent = undefined by default
13859 if (!module.children) module.children = [];
13860 Object.defineProperty(module, "loaded", {
13861 enumerable: true,
13862 get: function() {
13863 return module.l;
13864 }
13865 });
13866 Object.defineProperty(module, "id", {
13867 enumerable: true,
13868 get: function() {
13869 return module.i;
13870 }
13871 });
13872 module.webpackPolyfill = 1;
13873 }
13874 return module;
13875};
13876
13877
13878/***/ }),
13879/* 54 */
13880/***/ (function(module, exports, __webpack_require__) {
13881
13882"use strict";
13883
13884Object.defineProperty(exports, "__esModule", { value: true });
13885exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13886exports.commentPattern = /^[ \t]*("|')/;
13887exports.keywordPattern = /[\w#&$<>.:]/;
13888exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13889exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13890exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13891exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13892exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13893exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13894exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13895exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13896exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13897exports.builtinVariablePattern = [
13898 /\bv:\w*$/,
13899];
13900exports.optionPattern = [
13901 /(^|[ \t]+)&\w*$/,
13902 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13903];
13904exports.notFunctionPattern = [
13905 /^[ \t]*\\$/,
13906 /^[ \t]*\w+$/,
13907 /^[ \t]*"/,
13908 /(let|set|colorscheme)[ \t][^ \t]*$/,
13909 /[^([,\\ \t\w#>]\w*$/,
13910 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13911 exports.autocmdPattern,
13912];
13913exports.commandPattern = [
13914 /(^|[ \t]):\w+$/,
13915 /^[ \t]*\w+$/,
13916 /:?silent!?[ \t]\w+/,
13917];
13918exports.featurePattern = [
13919 /\bhas\([ \t]*["']\w*/,
13920];
13921exports.expandPattern = [
13922 /\bexpand\(['"]<\w*$/,
13923 /\bexpand\([ \t]*['"]\w*$/,
13924];
13925exports.notIdentifierPattern = [
13926 exports.commentPattern,
13927 /("|'):\w*$/,
13928 /^[ \t]*\\$/,
13929 /^[ \t]*call[ \t]+[^ \t()]*$/,
13930 /('|"|#|&|\$|<)\w*$/,
13931];
13932
13933
13934/***/ }),
13935/* 55 */,
13936/* 56 */,
13937/* 57 */,
13938/* 58 */,
13939/* 59 */,
13940/* 60 */
13941/***/ (function(module, exports, __webpack_require__) {
13942
13943"use strict";
13944
13945const taskManager = __webpack_require__(61);
13946const async_1 = __webpack_require__(98);
13947const stream_1 = __webpack_require__(133);
13948const sync_1 = __webpack_require__(134);
13949const settings_1 = __webpack_require__(136);
13950const utils = __webpack_require__(62);
13951async function FastGlob(source, options) {
13952 assertPatternsInput(source);
13953 const works = getWorks(source, async_1.default, options);
13954 const result = await Promise.all(works);
13955 return utils.array.flatten(result);
13956}
13957// https://github.com/typescript-eslint/typescript-eslint/issues/60
13958// eslint-disable-next-line no-redeclare
13959(function (FastGlob) {
13960 function sync(source, options) {
13961 assertPatternsInput(source);
13962 const works = getWorks(source, sync_1.default, options);
13963 return utils.array.flatten(works);
13964 }
13965 FastGlob.sync = sync;
13966 function stream(source, options) {
13967 assertPatternsInput(source);
13968 const works = getWorks(source, stream_1.default, options);
13969 /**
13970 * The stream returned by the provider cannot work with an asynchronous iterator.
13971 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13972 * This affects performance (+25%). I don't see best solution right now.
13973 */
13974 return utils.stream.merge(works);
13975 }
13976 FastGlob.stream = stream;
13977 function generateTasks(source, options) {
13978 assertPatternsInput(source);
13979 const patterns = [].concat(source);
13980 const settings = new settings_1.default(options);
13981 return taskManager.generate(patterns, settings);
13982 }
13983 FastGlob.generateTasks = generateTasks;
13984 function isDynamicPattern(source, options) {
13985 assertPatternsInput(source);
13986 const settings = new settings_1.default(options);
13987 return utils.pattern.isDynamicPattern(source, settings);
13988 }
13989 FastGlob.isDynamicPattern = isDynamicPattern;
13990 function escapePath(source) {
13991 assertPatternsInput(source);
13992 return utils.path.escape(source);
13993 }
13994 FastGlob.escapePath = escapePath;
13995})(FastGlob || (FastGlob = {}));
13996function getWorks(source, _Provider, options) {
13997 const patterns = [].concat(source);
13998 const settings = new settings_1.default(options);
13999 const tasks = taskManager.generate(patterns, settings);
14000 const provider = new _Provider(settings);
14001 return tasks.map(provider.read, provider);
14002}
14003function assertPatternsInput(input) {
14004 const source = [].concat(input);
14005 const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
14006 if (!isValidSource) {
14007 throw new TypeError('Patterns must be a string (non empty) or an array of strings');
14008 }
14009}
14010module.exports = FastGlob;
14011
14012
14013/***/ }),
14014/* 61 */
14015/***/ (function(module, exports, __webpack_require__) {
14016
14017"use strict";
14018
14019Object.defineProperty(exports, "__esModule", { value: true });
14020const utils = __webpack_require__(62);
14021function generate(patterns, settings) {
14022 const positivePatterns = getPositivePatterns(patterns);
14023 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
14024 const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
14025 const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
14026 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
14027 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
14028 return staticTasks.concat(dynamicTasks);
14029}
14030exports.generate = generate;
14031function convertPatternsToTasks(positive, negative, dynamic) {
14032 const positivePatternsGroup = groupPatternsByBaseDirectory(positive);
14033 // When we have a global group – there is no reason to divide the patterns into independent tasks.
14034 // In this case, the global task covers the rest.
14035 if ('.' in positivePatternsGroup) {
14036 const task = convertPatternGroupToTask('.', positive, negative, dynamic);
14037 return [task];
14038 }
14039 return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
14040}
14041exports.convertPatternsToTasks = convertPatternsToTasks;
14042function getPositivePatterns(patterns) {
14043 return utils.pattern.getPositivePatterns(patterns);
14044}
14045exports.getPositivePatterns = getPositivePatterns;
14046function getNegativePatternsAsPositive(patterns, ignore) {
14047 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
14048 const positive = negative.map(utils.pattern.convertToPositivePattern);
14049 return positive;
14050}
14051exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
14052function groupPatternsByBaseDirectory(patterns) {
14053 const group = {};
14054 return patterns.reduce((collection, pattern) => {
14055 const base = utils.pattern.getBaseDirectory(pattern);
14056 if (base in collection) {
14057 collection[base].push(pattern);
14058 }
14059 else {
14060 collection[base] = [pattern];
14061 }
14062 return collection;
14063 }, group);
14064}
14065exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
14066function convertPatternGroupsToTasks(positive, negative, dynamic) {
14067 return Object.keys(positive).map((base) => {
14068 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
14069 });
14070}
14071exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
14072function convertPatternGroupToTask(base, positive, negative, dynamic) {
14073 return {
14074 dynamic,
14075 positive,
14076 negative,
14077 base,
14078 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
14079 };
14080}
14081exports.convertPatternGroupToTask = convertPatternGroupToTask;
14082
14083
14084/***/ }),
14085/* 62 */
14086/***/ (function(module, exports, __webpack_require__) {
14087
14088"use strict";
14089
14090Object.defineProperty(exports, "__esModule", { value: true });
14091const array = __webpack_require__(63);
14092exports.array = array;
14093const errno = __webpack_require__(64);
14094exports.errno = errno;
14095const fs = __webpack_require__(65);
14096exports.fs = fs;
14097const path = __webpack_require__(66);
14098exports.path = path;
14099const pattern = __webpack_require__(67);
14100exports.pattern = pattern;
14101const stream = __webpack_require__(94);
14102exports.stream = stream;
14103const string = __webpack_require__(97);
14104exports.string = string;
14105
14106
14107/***/ }),
14108/* 63 */
14109/***/ (function(module, exports, __webpack_require__) {
14110
14111"use strict";
14112
14113Object.defineProperty(exports, "__esModule", { value: true });
14114function flatten(items) {
14115 return items.reduce((collection, item) => [].concat(collection, item), []);
14116}
14117exports.flatten = flatten;
14118function splitWhen(items, predicate) {
14119 const result = [[]];
14120 let groupIndex = 0;
14121 for (const item of items) {
14122 if (predicate(item)) {
14123 groupIndex++;
14124 result[groupIndex] = [];
14125 }
14126 else {
14127 result[groupIndex].push(item);
14128 }
14129 }
14130 return result;
14131}
14132exports.splitWhen = splitWhen;
14133
14134
14135/***/ }),
14136/* 64 */
14137/***/ (function(module, exports, __webpack_require__) {
14138
14139"use strict";
14140
14141Object.defineProperty(exports, "__esModule", { value: true });
14142function isEnoentCodeError(error) {
14143 return error.code === 'ENOENT';
14144}
14145exports.isEnoentCodeError = isEnoentCodeError;
14146
14147
14148/***/ }),
14149/* 65 */
14150/***/ (function(module, exports, __webpack_require__) {
14151
14152"use strict";
14153
14154Object.defineProperty(exports, "__esModule", { value: true });
14155class DirentFromStats {
14156 constructor(name, stats) {
14157 this.name = name;
14158 this.isBlockDevice = stats.isBlockDevice.bind(stats);
14159 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
14160 this.isDirectory = stats.isDirectory.bind(stats);
14161 this.isFIFO = stats.isFIFO.bind(stats);
14162 this.isFile = stats.isFile.bind(stats);
14163 this.isSocket = stats.isSocket.bind(stats);
14164 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
14165 }
14166}
14167function createDirentFromStats(name, stats) {
14168 return new DirentFromStats(name, stats);
14169}
14170exports.createDirentFromStats = createDirentFromStats;
14171
14172
14173/***/ }),
14174/* 66 */
14175/***/ (function(module, exports, __webpack_require__) {
14176
14177"use strict";
14178
14179Object.defineProperty(exports, "__esModule", { value: true });
14180const path = __webpack_require__(13);
14181const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
14182const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
14183/**
14184 * Designed to work only with simple paths: `dir\\file`.
14185 */
14186function unixify(filepath) {
14187 return filepath.replace(/\\/g, '/');
14188}
14189exports.unixify = unixify;
14190function makeAbsolute(cwd, filepath) {
14191 return path.resolve(cwd, filepath);
14192}
14193exports.makeAbsolute = makeAbsolute;
14194function escape(pattern) {
14195 return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
14196}
14197exports.escape = escape;
14198function removeLeadingDotSegment(entry) {
14199 // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
14200 // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
14201 if (entry.charAt(0) === '.') {
14202 const secondCharactery = entry.charAt(1);
14203 if (secondCharactery === '/' || secondCharactery === '\\') {
14204 return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
14205 }
14206 }
14207 return entry;
14208}
14209exports.removeLeadingDotSegment = removeLeadingDotSegment;
14210
14211
14212/***/ }),
14213/* 67 */
14214/***/ (function(module, exports, __webpack_require__) {
14215
14216"use strict";
14217
14218Object.defineProperty(exports, "__esModule", { value: true });
14219const path = __webpack_require__(13);
14220const globParent = __webpack_require__(68);
14221const micromatch = __webpack_require__(71);
14222const picomatch = __webpack_require__(88);
14223const GLOBSTAR = '**';
14224const ESCAPE_SYMBOL = '\\';
14225const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
14226const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/;
14227const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/;
14228const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/;
14229const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/;
14230function isStaticPattern(pattern, options = {}) {
14231 return !isDynamicPattern(pattern, options);
14232}
14233exports.isStaticPattern = isStaticPattern;
14234function isDynamicPattern(pattern, options = {}) {
14235 /**
14236 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
14237 * filepath directly (without read directory).
14238 */
14239 if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
14240 return true;
14241 }
14242 if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
14243 return true;
14244 }
14245 if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
14246 return true;
14247 }
14248 if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) {
14249 return true;
14250 }
14251 return false;
14252}
14253exports.isDynamicPattern = isDynamicPattern;
14254function convertToPositivePattern(pattern) {
14255 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
14256}
14257exports.convertToPositivePattern = convertToPositivePattern;
14258function convertToNegativePattern(pattern) {
14259 return '!' + pattern;
14260}
14261exports.convertToNegativePattern = convertToNegativePattern;
14262function isNegativePattern(pattern) {
14263 return pattern.startsWith('!') && pattern[1] !== '(';
14264}
14265exports.isNegativePattern = isNegativePattern;
14266function isPositivePattern(pattern) {
14267 return !isNegativePattern(pattern);
14268}
14269exports.isPositivePattern = isPositivePattern;
14270function getNegativePatterns(patterns) {
14271 return patterns.filter(isNegativePattern);
14272}
14273exports.getNegativePatterns = getNegativePatterns;
14274function getPositivePatterns(patterns) {
14275 return patterns.filter(isPositivePattern);
14276}
14277exports.getPositivePatterns = getPositivePatterns;
14278function getBaseDirectory(pattern) {
14279 return globParent(pattern, { flipBackslashes: false });
14280}
14281exports.getBaseDirectory = getBaseDirectory;
14282function hasGlobStar(pattern) {
14283 return pattern.includes(GLOBSTAR);
14284}
14285exports.hasGlobStar = hasGlobStar;
14286function endsWithSlashGlobStar(pattern) {
14287 return pattern.endsWith('/' + GLOBSTAR);
14288}
14289exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
14290function isAffectDepthOfReadingPattern(pattern) {
14291 const basename = path.basename(pattern);
14292 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
14293}
14294exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
14295function expandPatternsWithBraceExpansion(patterns) {
14296 return patterns.reduce((collection, pattern) => {
14297 return collection.concat(expandBraceExpansion(pattern));
14298 }, []);
14299}
14300exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
14301function expandBraceExpansion(pattern) {
14302 return micromatch.braces(pattern, {
14303 expand: true,
14304 nodupes: true
14305 });
14306}
14307exports.expandBraceExpansion = expandBraceExpansion;
14308function getPatternParts(pattern, options) {
14309 const info = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
14310 // See micromatch/picomatch#58 for more details
14311 if (info.parts.length === 0) {
14312 return [pattern];
14313 }
14314 return info.parts;
14315}
14316exports.getPatternParts = getPatternParts;
14317function makeRe(pattern, options) {
14318 return micromatch.makeRe(pattern, options);
14319}
14320exports.makeRe = makeRe;
14321function convertPatternsToRe(patterns, options) {
14322 return patterns.map((pattern) => makeRe(pattern, options));
14323}
14324exports.convertPatternsToRe = convertPatternsToRe;
14325function matchAny(entry, patternsRe) {
14326 return patternsRe.some((patternRe) => patternRe.test(entry));
14327}
14328exports.matchAny = matchAny;
14329
14330
14331/***/ }),
14332/* 68 */
14333/***/ (function(module, exports, __webpack_require__) {
14334
14335"use strict";
14336
14337
14338var isGlob = __webpack_require__(69);
14339var pathPosixDirname = __webpack_require__(13).posix.dirname;
14340var isWin32 = __webpack_require__(14).platform() === 'win32';
14341
14342var slash = '/';
14343var backslash = /\\/g;
14344var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
14345var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
14346var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
14347
14348/**
14349 * @param {string} str
14350 * @param {Object} opts
14351 * @param {boolean} [opts.flipBackslashes=true]
14352 */
14353module.exports = function globParent(str, opts) {
14354 var options = Object.assign({ flipBackslashes: true }, opts);
14355
14356 // flip windows path separators
14357 if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
14358 str = str.replace(backslash, slash);
14359 }
14360
14361 // special case for strings ending in enclosure containing path separator
14362 if (enclosure.test(str)) {
14363 str += slash;
14364 }
14365
14366 // preserves full path in case of trailing path separator
14367 str += 'a';
14368
14369 // remove path parts that are globby
14370 do {
14371 str = pathPosixDirname(str);
14372 } while (isGlob(str) || globby.test(str));
14373
14374 // remove escape chars and return result
14375 return str.replace(escaped, '$1');
14376};
14377
14378
14379/***/ }),
14380/* 69 */
14381/***/ (function(module, exports, __webpack_require__) {
14382
14383/*!
14384 * is-glob <https://github.com/jonschlinkert/is-glob>
14385 *
14386 * Copyright (c) 2014-2017, Jon Schlinkert.
14387 * Released under the MIT License.
14388 */
14389
14390var isExtglob = __webpack_require__(70);
14391var chars = { '{': '}', '(': ')', '[': ']'};
14392var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
14393var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
14394
14395module.exports = function isGlob(str, options) {
14396 if (typeof str !== 'string' || str === '') {
14397 return false;
14398 }
14399
14400 if (isExtglob(str)) {
14401 return true;
14402 }
14403
14404 var regex = strictRegex;
14405 var match;
14406
14407 // optionally relax regex
14408 if (options && options.strict === false) {
14409 regex = relaxedRegex;
14410 }
14411
14412 while ((match = regex.exec(str))) {
14413 if (match[2]) return true;
14414 var idx = match.index + match[0].length;
14415
14416 // if an open bracket/brace/paren is escaped,
14417 // set the index to the next closing character
14418 var open = match[1];
14419 var close = open ? chars[open] : null;
14420 if (open && close) {
14421 var n = str.indexOf(close, idx);
14422 if (n !== -1) {
14423 idx = n + 1;
14424 }
14425 }
14426
14427 str = str.slice(idx);
14428 }
14429 return false;
14430};
14431
14432
14433/***/ }),
14434/* 70 */
14435/***/ (function(module, exports) {
14436
14437/*!
14438 * is-extglob <https://github.com/jonschlinkert/is-extglob>
14439 *
14440 * Copyright (c) 2014-2016, Jon Schlinkert.
14441 * Licensed under the MIT License.
14442 */
14443
14444module.exports = function isExtglob(str) {
14445 if (typeof str !== 'string' || str === '') {
14446 return false;
14447 }
14448
14449 var match;
14450 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
14451 if (match[2]) return true;
14452 str = str.slice(match.index + match[0].length);
14453 }
14454
14455 return false;
14456};
14457
14458
14459/***/ }),
14460/* 71 */
14461/***/ (function(module, exports, __webpack_require__) {
14462
14463"use strict";
14464
14465
14466const util = __webpack_require__(48);
14467const braces = __webpack_require__(72);
14468const picomatch = __webpack_require__(82);
14469const utils = __webpack_require__(85);
14470const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
14471
14472/**
14473 * Returns an array of strings that match one or more glob patterns.
14474 *
14475 * ```js
14476 * const mm = require('micromatch');
14477 * // mm(list, patterns[, options]);
14478 *
14479 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
14480 * //=> [ 'a.js' ]
14481 * ```
14482 * @param {String|Array<string>} list List of strings to match.
14483 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
14484 * @param {Object} options See available [options](#options)
14485 * @return {Array} Returns an array of matches
14486 * @summary false
14487 * @api public
14488 */
14489
14490const micromatch = (list, patterns, options) => {
14491 patterns = [].concat(patterns);
14492 list = [].concat(list);
14493
14494 let omit = new Set();
14495 let keep = new Set();
14496 let items = new Set();
14497 let negatives = 0;
14498
14499 let onResult = state => {
14500 items.add(state.output);
14501 if (options && options.onResult) {
14502 options.onResult(state);
14503 }
14504 };
14505
14506 for (let i = 0; i < patterns.length; i++) {
14507 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
14508 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
14509 if (negated) negatives++;
14510
14511 for (let item of list) {
14512 let matched = isMatch(item, true);
14513
14514 let match = negated ? !matched.isMatch : matched.isMatch;
14515 if (!match) continue;
14516
14517 if (negated) {
14518 omit.add(matched.output);
14519 } else {
14520 omit.delete(matched.output);
14521 keep.add(matched.output);
14522 }
14523 }
14524 }
14525
14526 let result = negatives === patterns.length ? [...items] : [...keep];
14527 let matches = result.filter(item => !omit.has(item));
14528
14529 if (options && matches.length === 0) {
14530 if (options.failglob === true) {
14531 throw new Error(`No matches found for "${patterns.join(', ')}"`);
14532 }
14533
14534 if (options.nonull === true || options.nullglob === true) {
14535 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
14536 }
14537 }
14538
14539 return matches;
14540};
14541
14542/**
14543 * Backwards compatibility
14544 */
14545
14546micromatch.match = micromatch;
14547
14548/**
14549 * Returns a matcher function from the given glob `pattern` and `options`.
14550 * The returned function takes a string to match as its only argument and returns
14551 * true if the string is a match.
14552 *
14553 * ```js
14554 * const mm = require('micromatch');
14555 * // mm.matcher(pattern[, options]);
14556 *
14557 * const isMatch = mm.matcher('*.!(*a)');
14558 * console.log(isMatch('a.a')); //=> false
14559 * console.log(isMatch('a.b')); //=> true
14560 * ```
14561 * @param {String} `pattern` Glob pattern
14562 * @param {Object} `options`
14563 * @return {Function} Returns a matcher function.
14564 * @api public
14565 */
14566
14567micromatch.matcher = (pattern, options) => picomatch(pattern, options);
14568
14569/**
14570 * Returns true if **any** of the given glob `patterns` match the specified `string`.
14571 *
14572 * ```js
14573 * const mm = require('micromatch');
14574 * // mm.isMatch(string, patterns[, options]);
14575 *
14576 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
14577 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
14578 * ```
14579 * @param {String} str The string to test.
14580 * @param {String|Array} patterns One or more glob patterns to use for matching.
14581 * @param {Object} [options] See available [options](#options).
14582 * @return {Boolean} Returns true if any patterns match `str`
14583 * @api public
14584 */
14585
14586micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
14587
14588/**
14589 * Backwards compatibility
14590 */
14591
14592micromatch.any = micromatch.isMatch;
14593
14594/**
14595 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
14596 *
14597 * ```js
14598 * const mm = require('micromatch');
14599 * // mm.not(list, patterns[, options]);
14600 *
14601 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
14602 * //=> ['b.b', 'c.c']
14603 * ```
14604 * @param {Array} `list` Array of strings to match.
14605 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
14606 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14607 * @return {Array} Returns an array of strings that **do not match** the given patterns.
14608 * @api public
14609 */
14610
14611micromatch.not = (list, patterns, options = {}) => {
14612 patterns = [].concat(patterns).map(String);
14613 let result = new Set();
14614 let items = [];
14615
14616 let onResult = state => {
14617 if (options.onResult) options.onResult(state);
14618 items.push(state.output);
14619 };
14620
14621 let matches = micromatch(list, patterns, { ...options, onResult });
14622
14623 for (let item of items) {
14624 if (!matches.includes(item)) {
14625 result.add(item);
14626 }
14627 }
14628 return [...result];
14629};
14630
14631/**
14632 * Returns true if the given `string` contains the given pattern. Similar
14633 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
14634 *
14635 * ```js
14636 * var mm = require('micromatch');
14637 * // mm.contains(string, pattern[, options]);
14638 *
14639 * console.log(mm.contains('aa/bb/cc', '*b'));
14640 * //=> true
14641 * console.log(mm.contains('aa/bb/cc', '*d'));
14642 * //=> false
14643 * ```
14644 * @param {String} `str` The string to match.
14645 * @param {String|Array} `patterns` Glob pattern to use for matching.
14646 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14647 * @return {Boolean} Returns true if the patter matches any part of `str`.
14648 * @api public
14649 */
14650
14651micromatch.contains = (str, pattern, options) => {
14652 if (typeof str !== 'string') {
14653 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14654 }
14655
14656 if (Array.isArray(pattern)) {
14657 return pattern.some(p => micromatch.contains(str, p, options));
14658 }
14659
14660 if (typeof pattern === 'string') {
14661 if (isEmptyString(str) || isEmptyString(pattern)) {
14662 return false;
14663 }
14664
14665 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
14666 return true;
14667 }
14668 }
14669
14670 return micromatch.isMatch(str, pattern, { ...options, contains: true });
14671};
14672
14673/**
14674 * Filter the keys of the given object with the given `glob` pattern
14675 * and `options`. Does not attempt to match nested keys. If you need this feature,
14676 * use [glob-object][] instead.
14677 *
14678 * ```js
14679 * const mm = require('micromatch');
14680 * // mm.matchKeys(object, patterns[, options]);
14681 *
14682 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
14683 * console.log(mm.matchKeys(obj, '*b'));
14684 * //=> { ab: 'b' }
14685 * ```
14686 * @param {Object} `object` The object with keys to filter.
14687 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14688 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14689 * @return {Object} Returns an object with only keys that match the given patterns.
14690 * @api public
14691 */
14692
14693micromatch.matchKeys = (obj, patterns, options) => {
14694 if (!utils.isObject(obj)) {
14695 throw new TypeError('Expected the first argument to be an object');
14696 }
14697 let keys = micromatch(Object.keys(obj), patterns, options);
14698 let res = {};
14699 for (let key of keys) res[key] = obj[key];
14700 return res;
14701};
14702
14703/**
14704 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
14705 *
14706 * ```js
14707 * const mm = require('micromatch');
14708 * // mm.some(list, patterns[, options]);
14709 *
14710 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14711 * // true
14712 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
14713 * // false
14714 * ```
14715 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
14716 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14717 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14718 * @return {Boolean} Returns true if any patterns match `str`
14719 * @api public
14720 */
14721
14722micromatch.some = (list, patterns, options) => {
14723 let items = [].concat(list);
14724
14725 for (let pattern of [].concat(patterns)) {
14726 let isMatch = picomatch(String(pattern), options);
14727 if (items.some(item => isMatch(item))) {
14728 return true;
14729 }
14730 }
14731 return false;
14732};
14733
14734/**
14735 * Returns true if every string in the given `list` matches
14736 * any of the given glob `patterns`.
14737 *
14738 * ```js
14739 * const mm = require('micromatch');
14740 * // mm.every(list, patterns[, options]);
14741 *
14742 * console.log(mm.every('foo.js', ['foo.js']));
14743 * // true
14744 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
14745 * // true
14746 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14747 * // false
14748 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
14749 * // false
14750 * ```
14751 * @param {String|Array} `list` The string or array of strings to test.
14752 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14753 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14754 * @return {Boolean} Returns true if any patterns match `str`
14755 * @api public
14756 */
14757
14758micromatch.every = (list, patterns, options) => {
14759 let items = [].concat(list);
14760
14761 for (let pattern of [].concat(patterns)) {
14762 let isMatch = picomatch(String(pattern), options);
14763 if (!items.every(item => isMatch(item))) {
14764 return false;
14765 }
14766 }
14767 return true;
14768};
14769
14770/**
14771 * Returns true if **all** of the given `patterns` match
14772 * the specified string.
14773 *
14774 * ```js
14775 * const mm = require('micromatch');
14776 * // mm.all(string, patterns[, options]);
14777 *
14778 * console.log(mm.all('foo.js', ['foo.js']));
14779 * // true
14780 *
14781 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
14782 * // false
14783 *
14784 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
14785 * // true
14786 *
14787 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
14788 * // true
14789 * ```
14790 * @param {String|Array} `str` The string to test.
14791 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14792 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14793 * @return {Boolean} Returns true if any patterns match `str`
14794 * @api public
14795 */
14796
14797micromatch.all = (str, patterns, options) => {
14798 if (typeof str !== 'string') {
14799 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14800 }
14801
14802 return [].concat(patterns).every(p => picomatch(p, options)(str));
14803};
14804
14805/**
14806 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
14807 *
14808 * ```js
14809 * const mm = require('micromatch');
14810 * // mm.capture(pattern, string[, options]);
14811 *
14812 * console.log(mm.capture('test/*.js', 'test/foo.js'));
14813 * //=> ['foo']
14814 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
14815 * //=> null
14816 * ```
14817 * @param {String} `glob` Glob pattern to use for matching.
14818 * @param {String} `input` String to match
14819 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14820 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
14821 * @api public
14822 */
14823
14824micromatch.capture = (glob, input, options) => {
14825 let posix = utils.isWindows(options);
14826 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
14827 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
14828
14829 if (match) {
14830 return match.slice(1).map(v => v === void 0 ? '' : v);
14831 }
14832};
14833
14834/**
14835 * Create a regular expression from the given glob `pattern`.
14836 *
14837 * ```js
14838 * const mm = require('micromatch');
14839 * // mm.makeRe(pattern[, options]);
14840 *
14841 * console.log(mm.makeRe('*.js'));
14842 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
14843 * ```
14844 * @param {String} `pattern` A glob pattern to convert to regex.
14845 * @param {Object} `options`
14846 * @return {RegExp} Returns a regex created from the given pattern.
14847 * @api public
14848 */
14849
14850micromatch.makeRe = (...args) => picomatch.makeRe(...args);
14851
14852/**
14853 * Scan a glob pattern to separate the pattern into segments. Used
14854 * by the [split](#split) method.
14855 *
14856 * ```js
14857 * const mm = require('micromatch');
14858 * const state = mm.scan(pattern[, options]);
14859 * ```
14860 * @param {String} `pattern`
14861 * @param {Object} `options`
14862 * @return {Object} Returns an object with
14863 * @api public
14864 */
14865
14866micromatch.scan = (...args) => picomatch.scan(...args);
14867
14868/**
14869 * Parse a glob pattern to create the source string for a regular
14870 * expression.
14871 *
14872 * ```js
14873 * const mm = require('micromatch');
14874 * const state = mm(pattern[, options]);
14875 * ```
14876 * @param {String} `glob`
14877 * @param {Object} `options`
14878 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
14879 * @api public
14880 */
14881
14882micromatch.parse = (patterns, options) => {
14883 let res = [];
14884 for (let pattern of [].concat(patterns || [])) {
14885 for (let str of braces(String(pattern), options)) {
14886 res.push(picomatch.parse(str, options));
14887 }
14888 }
14889 return res;
14890};
14891
14892/**
14893 * Process the given brace `pattern`.
14894 *
14895 * ```js
14896 * const { braces } = require('micromatch');
14897 * console.log(braces('foo/{a,b,c}/bar'));
14898 * //=> [ 'foo/(a|b|c)/bar' ]
14899 *
14900 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
14901 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
14902 * ```
14903 * @param {String} `pattern` String with brace pattern to process.
14904 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
14905 * @return {Array}
14906 * @api public
14907 */
14908
14909micromatch.braces = (pattern, options) => {
14910 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14911 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
14912 return [pattern];
14913 }
14914 return braces(pattern, options);
14915};
14916
14917/**
14918 * Expand braces
14919 */
14920
14921micromatch.braceExpand = (pattern, options) => {
14922 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14923 return micromatch.braces(pattern, { ...options, expand: true });
14924};
14925
14926/**
14927 * Expose micromatch
14928 */
14929
14930module.exports = micromatch;
14931
14932
14933/***/ }),
14934/* 72 */
14935/***/ (function(module, exports, __webpack_require__) {
14936
14937"use strict";
14938
14939
14940const stringify = __webpack_require__(73);
14941const compile = __webpack_require__(75);
14942const expand = __webpack_require__(79);
14943const parse = __webpack_require__(80);
14944
14945/**
14946 * Expand the given pattern or create a regex-compatible string.
14947 *
14948 * ```js
14949 * const braces = require('braces');
14950 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14951 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14952 * ```
14953 * @param {String} `str`
14954 * @param {Object} `options`
14955 * @return {String}
14956 * @api public
14957 */
14958
14959const braces = (input, options = {}) => {
14960 let output = [];
14961
14962 if (Array.isArray(input)) {
14963 for (let pattern of input) {
14964 let result = braces.create(pattern, options);
14965 if (Array.isArray(result)) {
14966 output.push(...result);
14967 } else {
14968 output.push(result);
14969 }
14970 }
14971 } else {
14972 output = [].concat(braces.create(input, options));
14973 }
14974
14975 if (options && options.expand === true && options.nodupes === true) {
14976 output = [...new Set(output)];
14977 }
14978 return output;
14979};
14980
14981/**
14982 * Parse the given `str` with the given `options`.
14983 *
14984 * ```js
14985 * // braces.parse(pattern, [, options]);
14986 * const ast = braces.parse('a/{b,c}/d');
14987 * console.log(ast);
14988 * ```
14989 * @param {String} pattern Brace pattern to parse
14990 * @param {Object} options
14991 * @return {Object} Returns an AST
14992 * @api public
14993 */
14994
14995braces.parse = (input, options = {}) => parse(input, options);
14996
14997/**
14998 * Creates a braces string from an AST, or an AST node.
14999 *
15000 * ```js
15001 * const braces = require('braces');
15002 * let ast = braces.parse('foo/{a,b}/bar');
15003 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
15004 * ```
15005 * @param {String} `input` Brace pattern or AST.
15006 * @param {Object} `options`
15007 * @return {Array} Returns an array of expanded values.
15008 * @api public
15009 */
15010
15011braces.stringify = (input, options = {}) => {
15012 if (typeof input === 'string') {
15013 return stringify(braces.parse(input, options), options);
15014 }
15015 return stringify(input, options);
15016};
15017
15018/**
15019 * Compiles a brace pattern into a regex-compatible, optimized string.
15020 * This method is called by the main [braces](#braces) function by default.
15021 *
15022 * ```js
15023 * const braces = require('braces');
15024 * console.log(braces.compile('a/{b,c}/d'));
15025 * //=> ['a/(b|c)/d']
15026 * ```
15027 * @param {String} `input` Brace pattern or AST.
15028 * @param {Object} `options`
15029 * @return {Array} Returns an array of expanded values.
15030 * @api public
15031 */
15032
15033braces.compile = (input, options = {}) => {
15034 if (typeof input === 'string') {
15035 input = braces.parse(input, options);
15036 }
15037 return compile(input, options);
15038};
15039
15040/**
15041 * Expands a brace pattern into an array. This method is called by the
15042 * main [braces](#braces) function when `options.expand` is true. Before
15043 * using this method it's recommended that you read the [performance notes](#performance))
15044 * and advantages of using [.compile](#compile) instead.
15045 *
15046 * ```js
15047 * const braces = require('braces');
15048 * console.log(braces.expand('a/{b,c}/d'));
15049 * //=> ['a/b/d', 'a/c/d'];
15050 * ```
15051 * @param {String} `pattern` Brace pattern
15052 * @param {Object} `options`
15053 * @return {Array} Returns an array of expanded values.
15054 * @api public
15055 */
15056
15057braces.expand = (input, options = {}) => {
15058 if (typeof input === 'string') {
15059 input = braces.parse(input, options);
15060 }
15061
15062 let result = expand(input, options);
15063
15064 // filter out empty strings if specified
15065 if (options.noempty === true) {
15066 result = result.filter(Boolean);
15067 }
15068
15069 // filter out duplicates if specified
15070 if (options.nodupes === true) {
15071 result = [...new Set(result)];
15072 }
15073
15074 return result;
15075};
15076
15077/**
15078 * Processes a brace pattern and returns either an expanded array
15079 * (if `options.expand` is true), a highly optimized regex-compatible string.
15080 * This method is called by the main [braces](#braces) function.
15081 *
15082 * ```js
15083 * const braces = require('braces');
15084 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
15085 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
15086 * ```
15087 * @param {String} `pattern` Brace pattern
15088 * @param {Object} `options`
15089 * @return {Array} Returns an array of expanded values.
15090 * @api public
15091 */
15092
15093braces.create = (input, options = {}) => {
15094 if (input === '' || input.length < 3) {
15095 return [input];
15096 }
15097
15098 return options.expand !== true
15099 ? braces.compile(input, options)
15100 : braces.expand(input, options);
15101};
15102
15103/**
15104 * Expose "braces"
15105 */
15106
15107module.exports = braces;
15108
15109
15110/***/ }),
15111/* 73 */
15112/***/ (function(module, exports, __webpack_require__) {
15113
15114"use strict";
15115
15116
15117const utils = __webpack_require__(74);
15118
15119module.exports = (ast, options = {}) => {
15120 let stringify = (node, parent = {}) => {
15121 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
15122 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15123 let output = '';
15124
15125 if (node.value) {
15126 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
15127 return '\\' + node.value;
15128 }
15129 return node.value;
15130 }
15131
15132 if (node.value) {
15133 return node.value;
15134 }
15135
15136 if (node.nodes) {
15137 for (let child of node.nodes) {
15138 output += stringify(child);
15139 }
15140 }
15141 return output;
15142 };
15143
15144 return stringify(ast);
15145};
15146
15147
15148
15149/***/ }),
15150/* 74 */
15151/***/ (function(module, exports, __webpack_require__) {
15152
15153"use strict";
15154
15155
15156exports.isInteger = num => {
15157 if (typeof num === 'number') {
15158 return Number.isInteger(num);
15159 }
15160 if (typeof num === 'string' && num.trim() !== '') {
15161 return Number.isInteger(Number(num));
15162 }
15163 return false;
15164};
15165
15166/**
15167 * Find a node of the given type
15168 */
15169
15170exports.find = (node, type) => node.nodes.find(node => node.type === type);
15171
15172/**
15173 * Find a node of the given type
15174 */
15175
15176exports.exceedsLimit = (min, max, step = 1, limit) => {
15177 if (limit === false) return false;
15178 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
15179 return ((Number(max) - Number(min)) / Number(step)) >= limit;
15180};
15181
15182/**
15183 * Escape the given node with '\\' before node.value
15184 */
15185
15186exports.escapeNode = (block, n = 0, type) => {
15187 let node = block.nodes[n];
15188 if (!node) return;
15189
15190 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
15191 if (node.escaped !== true) {
15192 node.value = '\\' + node.value;
15193 node.escaped = true;
15194 }
15195 }
15196};
15197
15198/**
15199 * Returns true if the given brace node should be enclosed in literal braces
15200 */
15201
15202exports.encloseBrace = node => {
15203 if (node.type !== 'brace') return false;
15204 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
15205 node.invalid = true;
15206 return true;
15207 }
15208 return false;
15209};
15210
15211/**
15212 * Returns true if a brace node is invalid.
15213 */
15214
15215exports.isInvalidBrace = block => {
15216 if (block.type !== 'brace') return false;
15217 if (block.invalid === true || block.dollar) return true;
15218 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
15219 block.invalid = true;
15220 return true;
15221 }
15222 if (block.open !== true || block.close !== true) {
15223 block.invalid = true;
15224 return true;
15225 }
15226 return false;
15227};
15228
15229/**
15230 * Returns true if a node is an open or close node
15231 */
15232
15233exports.isOpenOrClose = node => {
15234 if (node.type === 'open' || node.type === 'close') {
15235 return true;
15236 }
15237 return node.open === true || node.close === true;
15238};
15239
15240/**
15241 * Reduce an array of text nodes.
15242 */
15243
15244exports.reduce = nodes => nodes.reduce((acc, node) => {
15245 if (node.type === 'text') acc.push(node.value);
15246 if (node.type === 'range') node.type = 'text';
15247 return acc;
15248}, []);
15249
15250/**
15251 * Flatten an array
15252 */
15253
15254exports.flatten = (...args) => {
15255 const result = [];
15256 const flat = arr => {
15257 for (let i = 0; i < arr.length; i++) {
15258 let ele = arr[i];
15259 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
15260 }
15261 return result;
15262 };
15263 flat(args);
15264 return result;
15265};
15266
15267
15268/***/ }),
15269/* 75 */
15270/***/ (function(module, exports, __webpack_require__) {
15271
15272"use strict";
15273
15274
15275const fill = __webpack_require__(76);
15276const utils = __webpack_require__(74);
15277
15278const compile = (ast, options = {}) => {
15279 let walk = (node, parent = {}) => {
15280 let invalidBlock = utils.isInvalidBrace(parent);
15281 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15282 let invalid = invalidBlock === true || invalidNode === true;
15283 let prefix = options.escapeInvalid === true ? '\\' : '';
15284 let output = '';
15285
15286 if (node.isOpen === true) {
15287 return prefix + node.value;
15288 }
15289 if (node.isClose === true) {
15290 return prefix + node.value;
15291 }
15292
15293 if (node.type === 'open') {
15294 return invalid ? (prefix + node.value) : '(';
15295 }
15296
15297 if (node.type === 'close') {
15298 return invalid ? (prefix + node.value) : ')';
15299 }
15300
15301 if (node.type === 'comma') {
15302 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
15303 }
15304
15305 if (node.value) {
15306 return node.value;
15307 }
15308
15309 if (node.nodes && node.ranges > 0) {
15310 let args = utils.reduce(node.nodes);
15311 let range = fill(...args, { ...options, wrap: false, toRegex: true });
15312
15313 if (range.length !== 0) {
15314 return args.length > 1 && range.length > 1 ? `(${range})` : range;
15315 }
15316 }
15317
15318 if (node.nodes) {
15319 for (let child of node.nodes) {
15320 output += walk(child, node);
15321 }
15322 }
15323 return output;
15324 };
15325
15326 return walk(ast);
15327};
15328
15329module.exports = compile;
15330
15331
15332/***/ }),
15333/* 76 */
15334/***/ (function(module, exports, __webpack_require__) {
15335
15336"use strict";
15337/*!
15338 * fill-range <https://github.com/jonschlinkert/fill-range>
15339 *
15340 * Copyright (c) 2014-present, Jon Schlinkert.
15341 * Licensed under the MIT License.
15342 */
15343
15344
15345
15346const util = __webpack_require__(48);
15347const toRegexRange = __webpack_require__(77);
15348
15349const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
15350
15351const transform = toNumber => {
15352 return value => toNumber === true ? Number(value) : String(value);
15353};
15354
15355const isValidValue = value => {
15356 return typeof value === 'number' || (typeof value === 'string' && value !== '');
15357};
15358
15359const isNumber = num => Number.isInteger(+num);
15360
15361const zeros = input => {
15362 let value = `${input}`;
15363 let index = -1;
15364 if (value[0] === '-') value = value.slice(1);
15365 if (value === '0') return false;
15366 while (value[++index] === '0');
15367 return index > 0;
15368};
15369
15370const stringify = (start, end, options) => {
15371 if (typeof start === 'string' || typeof end === 'string') {
15372 return true;
15373 }
15374 return options.stringify === true;
15375};
15376
15377const pad = (input, maxLength, toNumber) => {
15378 if (maxLength > 0) {
15379 let dash = input[0] === '-' ? '-' : '';
15380 if (dash) input = input.slice(1);
15381 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
15382 }
15383 if (toNumber === false) {
15384 return String(input);
15385 }
15386 return input;
15387};
15388
15389const toMaxLen = (input, maxLength) => {
15390 let negative = input[0] === '-' ? '-' : '';
15391 if (negative) {
15392 input = input.slice(1);
15393 maxLength--;
15394 }
15395 while (input.length < maxLength) input = '0' + input;
15396 return negative ? ('-' + input) : input;
15397};
15398
15399const toSequence = (parts, options) => {
15400 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15401 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15402
15403 let prefix = options.capture ? '' : '?:';
15404 let positives = '';
15405 let negatives = '';
15406 let result;
15407
15408 if (parts.positives.length) {
15409 positives = parts.positives.join('|');
15410 }
15411
15412 if (parts.negatives.length) {
15413 negatives = `-(${prefix}${parts.negatives.join('|')})`;
15414 }
15415
15416 if (positives && negatives) {
15417 result = `${positives}|${negatives}`;
15418 } else {
15419 result = positives || negatives;
15420 }
15421
15422 if (options.wrap) {
15423 return `(${prefix}${result})`;
15424 }
15425
15426 return result;
15427};
15428
15429const toRange = (a, b, isNumbers, options) => {
15430 if (isNumbers) {
15431 return toRegexRange(a, b, { wrap: false, ...options });
15432 }
15433
15434 let start = String.fromCharCode(a);
15435 if (a === b) return start;
15436
15437 let stop = String.fromCharCode(b);
15438 return `[${start}-${stop}]`;
15439};
15440
15441const toRegex = (start, end, options) => {
15442 if (Array.isArray(start)) {
15443 let wrap = options.wrap === true;
15444 let prefix = options.capture ? '' : '?:';
15445 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
15446 }
15447 return toRegexRange(start, end, options);
15448};
15449
15450const rangeError = (...args) => {
15451 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
15452};
15453
15454const invalidRange = (start, end, options) => {
15455 if (options.strictRanges === true) throw rangeError([start, end]);
15456 return [];
15457};
15458
15459const invalidStep = (step, options) => {
15460 if (options.strictRanges === true) {
15461 throw new TypeError(`Expected step "${step}" to be a number`);
15462 }
15463 return [];
15464};
15465
15466const fillNumbers = (start, end, step = 1, options = {}) => {
15467 let a = Number(start);
15468 let b = Number(end);
15469
15470 if (!Number.isInteger(a) || !Number.isInteger(b)) {
15471 if (options.strictRanges === true) throw rangeError([start, end]);
15472 return [];
15473 }
15474
15475 // fix negative zero
15476 if (a === 0) a = 0;
15477 if (b === 0) b = 0;
15478
15479 let descending = a > b;
15480 let startString = String(start);
15481 let endString = String(end);
15482 let stepString = String(step);
15483 step = Math.max(Math.abs(step), 1);
15484
15485 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
15486 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
15487 let toNumber = padded === false && stringify(start, end, options) === false;
15488 let format = options.transform || transform(toNumber);
15489
15490 if (options.toRegex && step === 1) {
15491 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
15492 }
15493
15494 let parts = { negatives: [], positives: [] };
15495 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
15496 let range = [];
15497 let index = 0;
15498
15499 while (descending ? a >= b : a <= b) {
15500 if (options.toRegex === true && step > 1) {
15501 push(a);
15502 } else {
15503 range.push(pad(format(a, index), maxLen, toNumber));
15504 }
15505 a = descending ? a - step : a + step;
15506 index++;
15507 }
15508
15509 if (options.toRegex === true) {
15510 return step > 1
15511 ? toSequence(parts, options)
15512 : toRegex(range, null, { wrap: false, ...options });
15513 }
15514
15515 return range;
15516};
15517
15518const fillLetters = (start, end, step = 1, options = {}) => {
15519 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
15520 return invalidRange(start, end, options);
15521 }
15522
15523
15524 let format = options.transform || (val => String.fromCharCode(val));
15525 let a = `${start}`.charCodeAt(0);
15526 let b = `${end}`.charCodeAt(0);
15527
15528 let descending = a > b;
15529 let min = Math.min(a, b);
15530 let max = Math.max(a, b);
15531
15532 if (options.toRegex && step === 1) {
15533 return toRange(min, max, false, options);
15534 }
15535
15536 let range = [];
15537 let index = 0;
15538
15539 while (descending ? a >= b : a <= b) {
15540 range.push(format(a, index));
15541 a = descending ? a - step : a + step;
15542 index++;
15543 }
15544
15545 if (options.toRegex === true) {
15546 return toRegex(range, null, { wrap: false, options });
15547 }
15548
15549 return range;
15550};
15551
15552const fill = (start, end, step, options = {}) => {
15553 if (end == null && isValidValue(start)) {
15554 return [start];
15555 }
15556
15557 if (!isValidValue(start) || !isValidValue(end)) {
15558 return invalidRange(start, end, options);
15559 }
15560
15561 if (typeof step === 'function') {
15562 return fill(start, end, 1, { transform: step });
15563 }
15564
15565 if (isObject(step)) {
15566 return fill(start, end, 0, step);
15567 }
15568
15569 let opts = { ...options };
15570 if (opts.capture === true) opts.wrap = true;
15571 step = step || opts.step || 1;
15572
15573 if (!isNumber(step)) {
15574 if (step != null && !isObject(step)) return invalidStep(step, opts);
15575 return fill(start, end, 1, step);
15576 }
15577
15578 if (isNumber(start) && isNumber(end)) {
15579 return fillNumbers(start, end, step, opts);
15580 }
15581
15582 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
15583};
15584
15585module.exports = fill;
15586
15587
15588/***/ }),
15589/* 77 */
15590/***/ (function(module, exports, __webpack_require__) {
15591
15592"use strict";
15593/*!
15594 * to-regex-range <https://github.com/micromatch/to-regex-range>
15595 *
15596 * Copyright (c) 2015-present, Jon Schlinkert.
15597 * Released under the MIT License.
15598 */
15599
15600
15601
15602const isNumber = __webpack_require__(78);
15603
15604const toRegexRange = (min, max, options) => {
15605 if (isNumber(min) === false) {
15606 throw new TypeError('toRegexRange: expected the first argument to be a number');
15607 }
15608
15609 if (max === void 0 || min === max) {
15610 return String(min);
15611 }
15612
15613 if (isNumber(max) === false) {
15614 throw new TypeError('toRegexRange: expected the second argument to be a number.');
15615 }
15616
15617 let opts = { relaxZeros: true, ...options };
15618 if (typeof opts.strictZeros === 'boolean') {
15619 opts.relaxZeros = opts.strictZeros === false;
15620 }
15621
15622 let relax = String(opts.relaxZeros);
15623 let shorthand = String(opts.shorthand);
15624 let capture = String(opts.capture);
15625 let wrap = String(opts.wrap);
15626 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
15627
15628 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
15629 return toRegexRange.cache[cacheKey].result;
15630 }
15631
15632 let a = Math.min(min, max);
15633 let b = Math.max(min, max);
15634
15635 if (Math.abs(a - b) === 1) {
15636 let result = min + '|' + max;
15637 if (opts.capture) {
15638 return `(${result})`;
15639 }
15640 if (opts.wrap === false) {
15641 return result;
15642 }
15643 return `(?:${result})`;
15644 }
15645
15646 let isPadded = hasPadding(min) || hasPadding(max);
15647 let state = { min, max, a, b };
15648 let positives = [];
15649 let negatives = [];
15650
15651 if (isPadded) {
15652 state.isPadded = isPadded;
15653 state.maxLen = String(state.max).length;
15654 }
15655
15656 if (a < 0) {
15657 let newMin = b < 0 ? Math.abs(b) : 1;
15658 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
15659 a = state.a = 0;
15660 }
15661
15662 if (b >= 0) {
15663 positives = splitToPatterns(a, b, state, opts);
15664 }
15665
15666 state.negatives = negatives;
15667 state.positives = positives;
15668 state.result = collatePatterns(negatives, positives, opts);
15669
15670 if (opts.capture === true) {
15671 state.result = `(${state.result})`;
15672 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
15673 state.result = `(?:${state.result})`;
15674 }
15675
15676 toRegexRange.cache[cacheKey] = state;
15677 return state.result;
15678};
15679
15680function collatePatterns(neg, pos, options) {
15681 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
15682 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
15683 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
15684 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
15685 return subpatterns.join('|');
15686}
15687
15688function splitToRanges(min, max) {
15689 let nines = 1;
15690 let zeros = 1;
15691
15692 let stop = countNines(min, nines);
15693 let stops = new Set([max]);
15694
15695 while (min <= stop && stop <= max) {
15696 stops.add(stop);
15697 nines += 1;
15698 stop = countNines(min, nines);
15699 }
15700
15701 stop = countZeros(max + 1, zeros) - 1;
15702
15703 while (min < stop && stop <= max) {
15704 stops.add(stop);
15705 zeros += 1;
15706 stop = countZeros(max + 1, zeros) - 1;
15707 }
15708
15709 stops = [...stops];
15710 stops.sort(compare);
15711 return stops;
15712}
15713
15714/**
15715 * Convert a range to a regex pattern
15716 * @param {Number} `start`
15717 * @param {Number} `stop`
15718 * @return {String}
15719 */
15720
15721function rangeToPattern(start, stop, options) {
15722 if (start === stop) {
15723 return { pattern: start, count: [], digits: 0 };
15724 }
15725
15726 let zipped = zip(start, stop);
15727 let digits = zipped.length;
15728 let pattern = '';
15729 let count = 0;
15730
15731 for (let i = 0; i < digits; i++) {
15732 let [startDigit, stopDigit] = zipped[i];
15733
15734 if (startDigit === stopDigit) {
15735 pattern += startDigit;
15736
15737 } else if (startDigit !== '0' || stopDigit !== '9') {
15738 pattern += toCharacterClass(startDigit, stopDigit, options);
15739
15740 } else {
15741 count++;
15742 }
15743 }
15744
15745 if (count) {
15746 pattern += options.shorthand === true ? '\\d' : '[0-9]';
15747 }
15748
15749 return { pattern, count: [count], digits };
15750}
15751
15752function splitToPatterns(min, max, tok, options) {
15753 let ranges = splitToRanges(min, max);
15754 let tokens = [];
15755 let start = min;
15756 let prev;
15757
15758 for (let i = 0; i < ranges.length; i++) {
15759 let max = ranges[i];
15760 let obj = rangeToPattern(String(start), String(max), options);
15761 let zeros = '';
15762
15763 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
15764 if (prev.count.length > 1) {
15765 prev.count.pop();
15766 }
15767
15768 prev.count.push(obj.count[0]);
15769 prev.string = prev.pattern + toQuantifier(prev.count);
15770 start = max + 1;
15771 continue;
15772 }
15773
15774 if (tok.isPadded) {
15775 zeros = padZeros(max, tok, options);
15776 }
15777
15778 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
15779 tokens.push(obj);
15780 start = max + 1;
15781 prev = obj;
15782 }
15783
15784 return tokens;
15785}
15786
15787function filterPatterns(arr, comparison, prefix, intersection, options) {
15788 let result = [];
15789
15790 for (let ele of arr) {
15791 let { string } = ele;
15792
15793 // only push if _both_ are negative...
15794 if (!intersection && !contains(comparison, 'string', string)) {
15795 result.push(prefix + string);
15796 }
15797
15798 // or _both_ are positive
15799 if (intersection && contains(comparison, 'string', string)) {
15800 result.push(prefix + string);
15801 }
15802 }
15803 return result;
15804}
15805
15806/**
15807 * Zip strings
15808 */
15809
15810function zip(a, b) {
15811 let arr = [];
15812 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
15813 return arr;
15814}
15815
15816function compare(a, b) {
15817 return a > b ? 1 : b > a ? -1 : 0;
15818}
15819
15820function contains(arr, key, val) {
15821 return arr.some(ele => ele[key] === val);
15822}
15823
15824function countNines(min, len) {
15825 return Number(String(min).slice(0, -len) + '9'.repeat(len));
15826}
15827
15828function countZeros(integer, zeros) {
15829 return integer - (integer % Math.pow(10, zeros));
15830}
15831
15832function toQuantifier(digits) {
15833 let [start = 0, stop = ''] = digits;
15834 if (stop || start > 1) {
15835 return `{${start + (stop ? ',' + stop : '')}}`;
15836 }
15837 return '';
15838}
15839
15840function toCharacterClass(a, b, options) {
15841 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
15842}
15843
15844function hasPadding(str) {
15845 return /^-?(0+)\d/.test(str);
15846}
15847
15848function padZeros(value, tok, options) {
15849 if (!tok.isPadded) {
15850 return value;
15851 }
15852
15853 let diff = Math.abs(tok.maxLen - String(value).length);
15854 let relax = options.relaxZeros !== false;
15855
15856 switch (diff) {
15857 case 0:
15858 return '';
15859 case 1:
15860 return relax ? '0?' : '0';
15861 case 2:
15862 return relax ? '0{0,2}' : '00';
15863 default: {
15864 return relax ? `0{0,${diff}}` : `0{${diff}}`;
15865 }
15866 }
15867}
15868
15869/**
15870 * Cache
15871 */
15872
15873toRegexRange.cache = {};
15874toRegexRange.clearCache = () => (toRegexRange.cache = {});
15875
15876/**
15877 * Expose `toRegexRange`
15878 */
15879
15880module.exports = toRegexRange;
15881
15882
15883/***/ }),
15884/* 78 */
15885/***/ (function(module, exports, __webpack_require__) {
15886
15887"use strict";
15888/*!
15889 * is-number <https://github.com/jonschlinkert/is-number>
15890 *
15891 * Copyright (c) 2014-present, Jon Schlinkert.
15892 * Released under the MIT License.
15893 */
15894
15895
15896
15897module.exports = function(num) {
15898 if (typeof num === 'number') {
15899 return num - num === 0;
15900 }
15901 if (typeof num === 'string' && num.trim() !== '') {
15902 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
15903 }
15904 return false;
15905};
15906
15907
15908/***/ }),
15909/* 79 */
15910/***/ (function(module, exports, __webpack_require__) {
15911
15912"use strict";
15913
15914
15915const fill = __webpack_require__(76);
15916const stringify = __webpack_require__(73);
15917const utils = __webpack_require__(74);
15918
15919const append = (queue = '', stash = '', enclose = false) => {
15920 let result = [];
15921
15922 queue = [].concat(queue);
15923 stash = [].concat(stash);
15924
15925 if (!stash.length) return queue;
15926 if (!queue.length) {
15927 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
15928 }
15929
15930 for (let item of queue) {
15931 if (Array.isArray(item)) {
15932 for (let value of item) {
15933 result.push(append(value, stash, enclose));
15934 }
15935 } else {
15936 for (let ele of stash) {
15937 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15938 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15939 }
15940 }
15941 }
15942 return utils.flatten(result);
15943};
15944
15945const expand = (ast, options = {}) => {
15946 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15947
15948 let walk = (node, parent = {}) => {
15949 node.queue = [];
15950
15951 let p = parent;
15952 let q = parent.queue;
15953
15954 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15955 p = p.parent;
15956 q = p.queue;
15957 }
15958
15959 if (node.invalid || node.dollar) {
15960 q.push(append(q.pop(), stringify(node, options)));
15961 return;
15962 }
15963
15964 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15965 q.push(append(q.pop(), ['{}']));
15966 return;
15967 }
15968
15969 if (node.nodes && node.ranges > 0) {
15970 let args = utils.reduce(node.nodes);
15971
15972 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15973 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
15974 }
15975
15976 let range = fill(...args, options);
15977 if (range.length === 0) {
15978 range = stringify(node, options);
15979 }
15980
15981 q.push(append(q.pop(), range));
15982 node.nodes = [];
15983 return;
15984 }
15985
15986 let enclose = utils.encloseBrace(node);
15987 let queue = node.queue;
15988 let block = node;
15989
15990 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
15991 block = block.parent;
15992 queue = block.queue;
15993 }
15994
15995 for (let i = 0; i < node.nodes.length; i++) {
15996 let child = node.nodes[i];
15997
15998 if (child.type === 'comma' && node.type === 'brace') {
15999 if (i === 1) queue.push('');
16000 queue.push('');
16001 continue;
16002 }
16003
16004 if (child.type === 'close') {
16005 q.push(append(q.pop(), queue, enclose));
16006 continue;
16007 }
16008
16009 if (child.value && child.type !== 'open') {
16010 queue.push(append(queue.pop(), child.value));
16011 continue;
16012 }
16013
16014 if (child.nodes) {
16015 walk(child, node);
16016 }
16017 }
16018
16019 return queue;
16020 };
16021
16022 return utils.flatten(walk(ast));
16023};
16024
16025module.exports = expand;
16026
16027
16028/***/ }),
16029/* 80 */
16030/***/ (function(module, exports, __webpack_require__) {
16031
16032"use strict";
16033
16034
16035const stringify = __webpack_require__(73);
16036
16037/**
16038 * Constants
16039 */
16040
16041const {
16042 MAX_LENGTH,
16043 CHAR_BACKSLASH, /* \ */
16044 CHAR_BACKTICK, /* ` */
16045 CHAR_COMMA, /* , */
16046 CHAR_DOT, /* . */
16047 CHAR_LEFT_PARENTHESES, /* ( */
16048 CHAR_RIGHT_PARENTHESES, /* ) */
16049 CHAR_LEFT_CURLY_BRACE, /* { */
16050 CHAR_RIGHT_CURLY_BRACE, /* } */
16051 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16052 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
16053 CHAR_DOUBLE_QUOTE, /* " */
16054 CHAR_SINGLE_QUOTE, /* ' */
16055 CHAR_NO_BREAK_SPACE,
16056 CHAR_ZERO_WIDTH_NOBREAK_SPACE
16057} = __webpack_require__(81);
16058
16059/**
16060 * parse
16061 */
16062
16063const parse = (input, options = {}) => {
16064 if (typeof input !== 'string') {
16065 throw new TypeError('Expected a string');
16066 }
16067
16068 let opts = options || {};
16069 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16070 if (input.length > max) {
16071 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
16072 }
16073
16074 let ast = { type: 'root', input, nodes: [] };
16075 let stack = [ast];
16076 let block = ast;
16077 let prev = ast;
16078 let brackets = 0;
16079 let length = input.length;
16080 let index = 0;
16081 let depth = 0;
16082 let value;
16083 let memo = {};
16084
16085 /**
16086 * Helpers
16087 */
16088
16089 const advance = () => input[index++];
16090 const push = node => {
16091 if (node.type === 'text' && prev.type === 'dot') {
16092 prev.type = 'text';
16093 }
16094
16095 if (prev && prev.type === 'text' && node.type === 'text') {
16096 prev.value += node.value;
16097 return;
16098 }
16099
16100 block.nodes.push(node);
16101 node.parent = block;
16102 node.prev = prev;
16103 prev = node;
16104 return node;
16105 };
16106
16107 push({ type: 'bos' });
16108
16109 while (index < length) {
16110 block = stack[stack.length - 1];
16111 value = advance();
16112
16113 /**
16114 * Invalid chars
16115 */
16116
16117 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
16118 continue;
16119 }
16120
16121 /**
16122 * Escaped chars
16123 */
16124
16125 if (value === CHAR_BACKSLASH) {
16126 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
16127 continue;
16128 }
16129
16130 /**
16131 * Right square bracket (literal): ']'
16132 */
16133
16134 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
16135 push({ type: 'text', value: '\\' + value });
16136 continue;
16137 }
16138
16139 /**
16140 * Left square bracket: '['
16141 */
16142
16143 if (value === CHAR_LEFT_SQUARE_BRACKET) {
16144 brackets++;
16145
16146 let closed = true;
16147 let next;
16148
16149 while (index < length && (next = advance())) {
16150 value += next;
16151
16152 if (next === CHAR_LEFT_SQUARE_BRACKET) {
16153 brackets++;
16154 continue;
16155 }
16156
16157 if (next === CHAR_BACKSLASH) {
16158 value += advance();
16159 continue;
16160 }
16161
16162 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16163 brackets--;
16164
16165 if (brackets === 0) {
16166 break;
16167 }
16168 }
16169 }
16170
16171 push({ type: 'text', value });
16172 continue;
16173 }
16174
16175 /**
16176 * Parentheses
16177 */
16178
16179 if (value === CHAR_LEFT_PARENTHESES) {
16180 block = push({ type: 'paren', nodes: [] });
16181 stack.push(block);
16182 push({ type: 'text', value });
16183 continue;
16184 }
16185
16186 if (value === CHAR_RIGHT_PARENTHESES) {
16187 if (block.type !== 'paren') {
16188 push({ type: 'text', value });
16189 continue;
16190 }
16191 block = stack.pop();
16192 push({ type: 'text', value });
16193 block = stack[stack.length - 1];
16194 continue;
16195 }
16196
16197 /**
16198 * Quotes: '|"|`
16199 */
16200
16201 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
16202 let open = value;
16203 let next;
16204
16205 if (options.keepQuotes !== true) {
16206 value = '';
16207 }
16208
16209 while (index < length && (next = advance())) {
16210 if (next === CHAR_BACKSLASH) {
16211 value += next + advance();
16212 continue;
16213 }
16214
16215 if (next === open) {
16216 if (options.keepQuotes === true) value += next;
16217 break;
16218 }
16219
16220 value += next;
16221 }
16222
16223 push({ type: 'text', value });
16224 continue;
16225 }
16226
16227 /**
16228 * Left curly brace: '{'
16229 */
16230
16231 if (value === CHAR_LEFT_CURLY_BRACE) {
16232 depth++;
16233
16234 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
16235 let brace = {
16236 type: 'brace',
16237 open: true,
16238 close: false,
16239 dollar,
16240 depth,
16241 commas: 0,
16242 ranges: 0,
16243 nodes: []
16244 };
16245
16246 block = push(brace);
16247 stack.push(block);
16248 push({ type: 'open', value });
16249 continue;
16250 }
16251
16252 /**
16253 * Right curly brace: '}'
16254 */
16255
16256 if (value === CHAR_RIGHT_CURLY_BRACE) {
16257 if (block.type !== 'brace') {
16258 push({ type: 'text', value });
16259 continue;
16260 }
16261
16262 let type = 'close';
16263 block = stack.pop();
16264 block.close = true;
16265
16266 push({ type, value });
16267 depth--;
16268
16269 block = stack[stack.length - 1];
16270 continue;
16271 }
16272
16273 /**
16274 * Comma: ','
16275 */
16276
16277 if (value === CHAR_COMMA && depth > 0) {
16278 if (block.ranges > 0) {
16279 block.ranges = 0;
16280 let open = block.nodes.shift();
16281 block.nodes = [open, { type: 'text', value: stringify(block) }];
16282 }
16283
16284 push({ type: 'comma', value });
16285 block.commas++;
16286 continue;
16287 }
16288
16289 /**
16290 * Dot: '.'
16291 */
16292
16293 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
16294 let siblings = block.nodes;
16295
16296 if (depth === 0 || siblings.length === 0) {
16297 push({ type: 'text', value });
16298 continue;
16299 }
16300
16301 if (prev.type === 'dot') {
16302 block.range = [];
16303 prev.value += value;
16304 prev.type = 'range';
16305
16306 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
16307 block.invalid = true;
16308 block.ranges = 0;
16309 prev.type = 'text';
16310 continue;
16311 }
16312
16313 block.ranges++;
16314 block.args = [];
16315 continue;
16316 }
16317
16318 if (prev.type === 'range') {
16319 siblings.pop();
16320
16321 let before = siblings[siblings.length - 1];
16322 before.value += prev.value + value;
16323 prev = before;
16324 block.ranges--;
16325 continue;
16326 }
16327
16328 push({ type: 'dot', value });
16329 continue;
16330 }
16331
16332 /**
16333 * Text
16334 */
16335
16336 push({ type: 'text', value });
16337 }
16338
16339 // Mark imbalanced braces and brackets as invalid
16340 do {
16341 block = stack.pop();
16342
16343 if (block.type !== 'root') {
16344 block.nodes.forEach(node => {
16345 if (!node.nodes) {
16346 if (node.type === 'open') node.isOpen = true;
16347 if (node.type === 'close') node.isClose = true;
16348 if (!node.nodes) node.type = 'text';
16349 node.invalid = true;
16350 }
16351 });
16352
16353 // get the location of the block on parent.nodes (block's siblings)
16354 let parent = stack[stack.length - 1];
16355 let index = parent.nodes.indexOf(block);
16356 // replace the (invalid) block with it's nodes
16357 parent.nodes.splice(index, 1, ...block.nodes);
16358 }
16359 } while (stack.length > 0);
16360
16361 push({ type: 'eos' });
16362 return ast;
16363};
16364
16365module.exports = parse;
16366
16367
16368/***/ }),
16369/* 81 */
16370/***/ (function(module, exports, __webpack_require__) {
16371
16372"use strict";
16373
16374
16375module.exports = {
16376 MAX_LENGTH: 1024 * 64,
16377
16378 // Digits
16379 CHAR_0: '0', /* 0 */
16380 CHAR_9: '9', /* 9 */
16381
16382 // Alphabet chars.
16383 CHAR_UPPERCASE_A: 'A', /* A */
16384 CHAR_LOWERCASE_A: 'a', /* a */
16385 CHAR_UPPERCASE_Z: 'Z', /* Z */
16386 CHAR_LOWERCASE_Z: 'z', /* z */
16387
16388 CHAR_LEFT_PARENTHESES: '(', /* ( */
16389 CHAR_RIGHT_PARENTHESES: ')', /* ) */
16390
16391 CHAR_ASTERISK: '*', /* * */
16392
16393 // Non-alphabetic chars.
16394 CHAR_AMPERSAND: '&', /* & */
16395 CHAR_AT: '@', /* @ */
16396 CHAR_BACKSLASH: '\\', /* \ */
16397 CHAR_BACKTICK: '`', /* ` */
16398 CHAR_CARRIAGE_RETURN: '\r', /* \r */
16399 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
16400 CHAR_COLON: ':', /* : */
16401 CHAR_COMMA: ',', /* , */
16402 CHAR_DOLLAR: '$', /* . */
16403 CHAR_DOT: '.', /* . */
16404 CHAR_DOUBLE_QUOTE: '"', /* " */
16405 CHAR_EQUAL: '=', /* = */
16406 CHAR_EXCLAMATION_MARK: '!', /* ! */
16407 CHAR_FORM_FEED: '\f', /* \f */
16408 CHAR_FORWARD_SLASH: '/', /* / */
16409 CHAR_HASH: '#', /* # */
16410 CHAR_HYPHEN_MINUS: '-', /* - */
16411 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
16412 CHAR_LEFT_CURLY_BRACE: '{', /* { */
16413 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
16414 CHAR_LINE_FEED: '\n', /* \n */
16415 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
16416 CHAR_PERCENT: '%', /* % */
16417 CHAR_PLUS: '+', /* + */
16418 CHAR_QUESTION_MARK: '?', /* ? */
16419 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
16420 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
16421 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
16422 CHAR_SEMICOLON: ';', /* ; */
16423 CHAR_SINGLE_QUOTE: '\'', /* ' */
16424 CHAR_SPACE: ' ', /* */
16425 CHAR_TAB: '\t', /* \t */
16426 CHAR_UNDERSCORE: '_', /* _ */
16427 CHAR_VERTICAL_LINE: '|', /* | */
16428 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
16429};
16430
16431
16432/***/ }),
16433/* 82 */
16434/***/ (function(module, exports, __webpack_require__) {
16435
16436"use strict";
16437
16438
16439module.exports = __webpack_require__(83);
16440
16441
16442/***/ }),
16443/* 83 */
16444/***/ (function(module, exports, __webpack_require__) {
16445
16446"use strict";
16447
16448
16449const path = __webpack_require__(13);
16450const scan = __webpack_require__(84);
16451const parse = __webpack_require__(87);
16452const utils = __webpack_require__(85);
16453
16454/**
16455 * Creates a matcher function from one or more glob patterns. The
16456 * returned function takes a string to match as its first argument,
16457 * and returns true if the string is a match. The returned matcher
16458 * function also takes a boolean as the second argument that, when true,
16459 * returns an object with additional information.
16460 *
16461 * ```js
16462 * const picomatch = require('picomatch');
16463 * // picomatch(glob[, options]);
16464 *
16465 * const isMatch = picomatch('*.!(*a)');
16466 * console.log(isMatch('a.a')); //=> false
16467 * console.log(isMatch('a.b')); //=> true
16468 * ```
16469 * @name picomatch
16470 * @param {String|Array} `globs` One or more glob patterns.
16471 * @param {Object=} `options`
16472 * @return {Function=} Returns a matcher function.
16473 * @api public
16474 */
16475
16476const picomatch = (glob, options, returnState = false) => {
16477 if (Array.isArray(glob)) {
16478 let fns = glob.map(input => picomatch(input, options, returnState));
16479 return str => {
16480 for (let isMatch of fns) {
16481 let state = isMatch(str);
16482 if (state) return state;
16483 }
16484 return false;
16485 };
16486 }
16487
16488 if (typeof glob !== 'string' || glob === '') {
16489 throw new TypeError('Expected pattern to be a non-empty string');
16490 }
16491
16492 let opts = options || {};
16493 let posix = utils.isWindows(options);
16494 let regex = picomatch.makeRe(glob, options, false, true);
16495 let state = regex.state;
16496 delete regex.state;
16497
16498 let isIgnored = () => false;
16499 if (opts.ignore) {
16500 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
16501 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
16502 }
16503
16504 const matcher = (input, returnObject = false) => {
16505 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
16506 let result = { glob, state, regex, posix, input, output, match, isMatch };
16507
16508 if (typeof opts.onResult === 'function') {
16509 opts.onResult(result);
16510 }
16511
16512 if (isMatch === false) {
16513 result.isMatch = false;
16514 return returnObject ? result : false;
16515 }
16516
16517 if (isIgnored(input)) {
16518 if (typeof opts.onIgnore === 'function') {
16519 opts.onIgnore(result);
16520 }
16521 result.isMatch = false;
16522 return returnObject ? result : false;
16523 }
16524
16525 if (typeof opts.onMatch === 'function') {
16526 opts.onMatch(result);
16527 }
16528 return returnObject ? result : true;
16529 };
16530
16531 if (returnState) {
16532 matcher.state = state;
16533 }
16534
16535 return matcher;
16536};
16537
16538/**
16539 * Test `input` with the given `regex`. This is used by the main
16540 * `picomatch()` function to test the input string.
16541 *
16542 * ```js
16543 * const picomatch = require('picomatch');
16544 * // picomatch.test(input, regex[, options]);
16545 *
16546 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
16547 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
16548 * ```
16549 * @param {String} `input` String to test.
16550 * @param {RegExp} `regex`
16551 * @return {Object} Returns an object with matching info.
16552 * @api public
16553 */
16554
16555picomatch.test = (input, regex, options, { glob, posix } = {}) => {
16556 if (typeof input !== 'string') {
16557 throw new TypeError('Expected input to be a string');
16558 }
16559
16560 if (input === '') {
16561 return { isMatch: false, output: '' };
16562 }
16563
16564 let opts = options || {};
16565 let format = opts.format || (posix ? utils.toPosixSlashes : null);
16566 let match = input === glob;
16567 let output = (match && format) ? format(input) : input;
16568
16569 if (match === false) {
16570 output = format ? format(input) : input;
16571 match = output === glob;
16572 }
16573
16574 if (match === false || opts.capture === true) {
16575 if (opts.matchBase === true || opts.basename === true) {
16576 match = picomatch.matchBase(input, regex, options, posix);
16577 } else {
16578 match = regex.exec(output);
16579 }
16580 }
16581
16582 return { isMatch: !!match, match, output };
16583};
16584
16585/**
16586 * Match the basename of a filepath.
16587 *
16588 * ```js
16589 * const picomatch = require('picomatch');
16590 * // picomatch.matchBase(input, glob[, options]);
16591 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
16592 * ```
16593 * @param {String} `input` String to test.
16594 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
16595 * @return {Boolean}
16596 * @api public
16597 */
16598
16599picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
16600 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
16601 return regex.test(path.basename(input));
16602};
16603
16604/**
16605 * Returns true if **any** of the given glob `patterns` match the specified `string`.
16606 *
16607 * ```js
16608 * const picomatch = require('picomatch');
16609 * // picomatch.isMatch(string, patterns[, options]);
16610 *
16611 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
16612 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
16613 * ```
16614 * @param {String|Array} str The string to test.
16615 * @param {String|Array} patterns One or more glob patterns to use for matching.
16616 * @param {Object} [options] See available [options](#options).
16617 * @return {Boolean} Returns true if any patterns match `str`
16618 * @api public
16619 */
16620
16621picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
16622
16623/**
16624 * Parse a glob pattern to create the source string for a regular
16625 * expression.
16626 *
16627 * ```js
16628 * const picomatch = require('picomatch');
16629 * const result = picomatch.parse(glob[, options]);
16630 * ```
16631 * @param {String} `glob`
16632 * @param {Object} `options`
16633 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
16634 * @api public
16635 */
16636
16637picomatch.parse = (glob, options) => parse(glob, options);
16638
16639/**
16640 * Scan a glob pattern to separate the pattern into segments.
16641 *
16642 * ```js
16643 * const picomatch = require('picomatch');
16644 * // picomatch.scan(input[, options]);
16645 *
16646 * const result = picomatch.scan('!./foo/*.js');
16647 * console.log(result);
16648 * // { prefix: '!./',
16649 * // input: '!./foo/*.js',
16650 * // base: 'foo',
16651 * // glob: '*.js',
16652 * // negated: true,
16653 * // isGlob: true }
16654 * ```
16655 * @param {String} `input` Glob pattern to scan.
16656 * @param {Object} `options`
16657 * @return {Object} Returns an object with
16658 * @api public
16659 */
16660
16661picomatch.scan = (input, options) => scan(input, options);
16662
16663/**
16664 * Create a regular expression from a glob pattern.
16665 *
16666 * ```js
16667 * const picomatch = require('picomatch');
16668 * // picomatch.makeRe(input[, options]);
16669 *
16670 * console.log(picomatch.makeRe('*.js'));
16671 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16672 * ```
16673 * @param {String} `input` A glob pattern to convert to regex.
16674 * @param {Object} `options`
16675 * @return {RegExp} Returns a regex created from the given pattern.
16676 * @api public
16677 */
16678
16679picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
16680 if (!input || typeof input !== 'string') {
16681 throw new TypeError('Expected a non-empty string');
16682 }
16683
16684 let opts = options || {};
16685 let prepend = opts.contains ? '' : '^';
16686 let append = opts.contains ? '' : '$';
16687 let state = { negated: false, fastpaths: true };
16688 let prefix = '';
16689 let output;
16690
16691 if (input.startsWith('./')) {
16692 input = input.slice(2);
16693 prefix = state.prefix = './';
16694 }
16695
16696 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
16697 output = parse.fastpaths(input, options);
16698 }
16699
16700 if (output === void 0) {
16701 state = picomatch.parse(input, options);
16702 state.prefix = prefix + (state.prefix || '');
16703 output = state.output;
16704 }
16705
16706 if (returnOutput === true) {
16707 return output;
16708 }
16709
16710 let source = `${prepend}(?:${output})${append}`;
16711 if (state && state.negated === true) {
16712 source = `^(?!${source}).*$`;
16713 }
16714
16715 let regex = picomatch.toRegex(source, options);
16716 if (returnState === true) {
16717 regex.state = state;
16718 }
16719
16720 return regex;
16721};
16722
16723/**
16724 * Create a regular expression from the given regex source string.
16725 *
16726 * ```js
16727 * const picomatch = require('picomatch');
16728 * // picomatch.toRegex(source[, options]);
16729 *
16730 * const { output } = picomatch.parse('*.js');
16731 * console.log(picomatch.toRegex(output));
16732 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16733 * ```
16734 * @param {String} `source` Regular expression source string.
16735 * @param {Object} `options`
16736 * @return {RegExp}
16737 * @api public
16738 */
16739
16740picomatch.toRegex = (source, options) => {
16741 try {
16742 let opts = options || {};
16743 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
16744 } catch (err) {
16745 if (options && options.debug === true) throw err;
16746 return /$^/;
16747 }
16748};
16749
16750/**
16751 * Picomatch constants.
16752 * @return {Object}
16753 */
16754
16755picomatch.constants = __webpack_require__(86);
16756
16757/**
16758 * Expose "picomatch"
16759 */
16760
16761module.exports = picomatch;
16762
16763
16764/***/ }),
16765/* 84 */
16766/***/ (function(module, exports, __webpack_require__) {
16767
16768"use strict";
16769
16770
16771const utils = __webpack_require__(85);
16772
16773const {
16774 CHAR_ASTERISK, /* * */
16775 CHAR_AT, /* @ */
16776 CHAR_BACKWARD_SLASH, /* \ */
16777 CHAR_COMMA, /* , */
16778 CHAR_DOT, /* . */
16779 CHAR_EXCLAMATION_MARK, /* ! */
16780 CHAR_FORWARD_SLASH, /* / */
16781 CHAR_LEFT_CURLY_BRACE, /* { */
16782 CHAR_LEFT_PARENTHESES, /* ( */
16783 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16784 CHAR_PLUS, /* + */
16785 CHAR_QUESTION_MARK, /* ? */
16786 CHAR_RIGHT_CURLY_BRACE, /* } */
16787 CHAR_RIGHT_PARENTHESES, /* ) */
16788 CHAR_RIGHT_SQUARE_BRACKET /* ] */
16789} = __webpack_require__(86);
16790
16791const isPathSeparator = code => {
16792 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
16793};
16794
16795/**
16796 * Quickly scans a glob pattern and returns an object with a handful of
16797 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
16798 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
16799 *
16800 * ```js
16801 * const pm = require('picomatch');
16802 * console.log(pm.scan('foo/bar/*.js'));
16803 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
16804 * ```
16805 * @param {String} `str`
16806 * @param {Object} `options`
16807 * @return {Object} Returns an object with tokens and regex source string.
16808 * @api public
16809 */
16810
16811module.exports = (input, options) => {
16812 let opts = options || {};
16813 let length = input.length - 1;
16814 let index = -1;
16815 let start = 0;
16816 let lastIndex = 0;
16817 let isGlob = false;
16818 let backslashes = false;
16819 let negated = false;
16820 let braces = 0;
16821 let prev;
16822 let code;
16823
16824 let braceEscaped = false;
16825
16826 let eos = () => index >= length;
16827 let advance = () => {
16828 prev = code;
16829 return input.charCodeAt(++index);
16830 };
16831
16832 while (index < length) {
16833 code = advance();
16834 let next;
16835
16836 if (code === CHAR_BACKWARD_SLASH) {
16837 backslashes = true;
16838 next = advance();
16839
16840 if (next === CHAR_LEFT_CURLY_BRACE) {
16841 braceEscaped = true;
16842 }
16843 continue;
16844 }
16845
16846 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
16847 braces++;
16848
16849 while (!eos() && (next = advance())) {
16850 if (next === CHAR_BACKWARD_SLASH) {
16851 backslashes = true;
16852 next = advance();
16853 continue;
16854 }
16855
16856 if (next === CHAR_LEFT_CURLY_BRACE) {
16857 braces++;
16858 continue;
16859 }
16860
16861 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
16862 isGlob = true;
16863 break;
16864 }
16865
16866 if (!braceEscaped && next === CHAR_COMMA) {
16867 isGlob = true;
16868 break;
16869 }
16870
16871 if (next === CHAR_RIGHT_CURLY_BRACE) {
16872 braces--;
16873 if (braces === 0) {
16874 braceEscaped = false;
16875 break;
16876 }
16877 }
16878 }
16879 }
16880
16881 if (code === CHAR_FORWARD_SLASH) {
16882 if (prev === CHAR_DOT && index === (start + 1)) {
16883 start += 2;
16884 continue;
16885 }
16886
16887 lastIndex = index + 1;
16888 continue;
16889 }
16890
16891 if (code === CHAR_ASTERISK) {
16892 isGlob = true;
16893 break;
16894 }
16895
16896 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
16897 isGlob = true;
16898 break;
16899 }
16900
16901 if (code === CHAR_LEFT_SQUARE_BRACKET) {
16902 while (!eos() && (next = advance())) {
16903 if (next === CHAR_BACKWARD_SLASH) {
16904 backslashes = true;
16905 next = advance();
16906 continue;
16907 }
16908
16909 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16910 isGlob = true;
16911 break;
16912 }
16913 }
16914 }
16915
16916 let isExtglobChar = code === CHAR_PLUS
16917 || code === CHAR_AT
16918 || code === CHAR_EXCLAMATION_MARK;
16919
16920 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
16921 isGlob = true;
16922 break;
16923 }
16924
16925 if (code === CHAR_EXCLAMATION_MARK && index === start) {
16926 negated = true;
16927 start++;
16928 continue;
16929 }
16930
16931 if (code === CHAR_LEFT_PARENTHESES) {
16932 while (!eos() && (next = advance())) {
16933 if (next === CHAR_BACKWARD_SLASH) {
16934 backslashes = true;
16935 next = advance();
16936 continue;
16937 }
16938
16939 if (next === CHAR_RIGHT_PARENTHESES) {
16940 isGlob = true;
16941 break;
16942 }
16943 }
16944 }
16945
16946 if (isGlob) {
16947 break;
16948 }
16949 }
16950
16951 let prefix = '';
16952 let orig = input;
16953 let base = input;
16954 let glob = '';
16955
16956 if (start > 0) {
16957 prefix = input.slice(0, start);
16958 input = input.slice(start);
16959 lastIndex -= start;
16960 }
16961
16962 if (base && isGlob === true && lastIndex > 0) {
16963 base = input.slice(0, lastIndex);
16964 glob = input.slice(lastIndex);
16965 } else if (isGlob === true) {
16966 base = '';
16967 glob = input;
16968 } else {
16969 base = input;
16970 }
16971
16972 if (base && base !== '' && base !== '/' && base !== input) {
16973 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
16974 base = base.slice(0, -1);
16975 }
16976 }
16977
16978 if (opts.unescape === true) {
16979 if (glob) glob = utils.removeBackslashes(glob);
16980
16981 if (base && backslashes === true) {
16982 base = utils.removeBackslashes(base);
16983 }
16984 }
16985
16986 return { prefix, input: orig, base, glob, negated, isGlob };
16987};
16988
16989
16990/***/ }),
16991/* 85 */
16992/***/ (function(module, exports, __webpack_require__) {
16993
16994"use strict";
16995
16996
16997const path = __webpack_require__(13);
16998const win32 = process.platform === 'win32';
16999const {
17000 REGEX_SPECIAL_CHARS,
17001 REGEX_SPECIAL_CHARS_GLOBAL,
17002 REGEX_REMOVE_BACKSLASH
17003} = __webpack_require__(86);
17004
17005exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
17006exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
17007exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
17008exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
17009exports.toPosixSlashes = str => str.replace(/\\/g, '/');
17010
17011exports.removeBackslashes = str => {
17012 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
17013 return match === '\\' ? '' : match;
17014 });
17015}
17016
17017exports.supportsLookbehinds = () => {
17018 let segs = process.version.slice(1).split('.');
17019 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
17020 return true;
17021 }
17022 return false;
17023};
17024
17025exports.isWindows = options => {
17026 if (options && typeof options.windows === 'boolean') {
17027 return options.windows;
17028 }
17029 return win32 === true || path.sep === '\\';
17030};
17031
17032exports.escapeLast = (input, char, lastIdx) => {
17033 let idx = input.lastIndexOf(char, lastIdx);
17034 if (idx === -1) return input;
17035 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
17036 return input.slice(0, idx) + '\\' + input.slice(idx);
17037};
17038
17039
17040/***/ }),
17041/* 86 */
17042/***/ (function(module, exports, __webpack_require__) {
17043
17044"use strict";
17045
17046
17047const path = __webpack_require__(13);
17048const WIN_SLASH = '\\\\/';
17049const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
17050
17051/**
17052 * Posix glob regex
17053 */
17054
17055const DOT_LITERAL = '\\.';
17056const PLUS_LITERAL = '\\+';
17057const QMARK_LITERAL = '\\?';
17058const SLASH_LITERAL = '\\/';
17059const ONE_CHAR = '(?=.)';
17060const QMARK = '[^/]';
17061const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
17062const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
17063const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
17064const NO_DOT = `(?!${DOT_LITERAL})`;
17065const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
17066const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
17067const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
17068const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
17069const STAR = `${QMARK}*?`;
17070
17071const POSIX_CHARS = {
17072 DOT_LITERAL,
17073 PLUS_LITERAL,
17074 QMARK_LITERAL,
17075 SLASH_LITERAL,
17076 ONE_CHAR,
17077 QMARK,
17078 END_ANCHOR,
17079 DOTS_SLASH,
17080 NO_DOT,
17081 NO_DOTS,
17082 NO_DOT_SLASH,
17083 NO_DOTS_SLASH,
17084 QMARK_NO_DOT,
17085 STAR,
17086 START_ANCHOR
17087};
17088
17089/**
17090 * Windows glob regex
17091 */
17092
17093const WINDOWS_CHARS = {
17094 ...POSIX_CHARS,
17095
17096 SLASH_LITERAL: `[${WIN_SLASH}]`,
17097 QMARK: WIN_NO_SLASH,
17098 STAR: `${WIN_NO_SLASH}*?`,
17099 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
17100 NO_DOT: `(?!${DOT_LITERAL})`,
17101 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17102 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
17103 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17104 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
17105 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
17106 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
17107};
17108
17109/**
17110 * POSIX Bracket Regex
17111 */
17112
17113const POSIX_REGEX_SOURCE = {
17114 alnum: 'a-zA-Z0-9',
17115 alpha: 'a-zA-Z',
17116 ascii: '\\x00-\\x7F',
17117 blank: ' \\t',
17118 cntrl: '\\x00-\\x1F\\x7F',
17119 digit: '0-9',
17120 graph: '\\x21-\\x7E',
17121 lower: 'a-z',
17122 print: '\\x20-\\x7E ',
17123 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
17124 space: ' \\t\\r\\n\\v\\f',
17125 upper: 'A-Z',
17126 word: 'A-Za-z0-9_',
17127 xdigit: 'A-Fa-f0-9'
17128};
17129
17130module.exports = {
17131 MAX_LENGTH: 1024 * 64,
17132 POSIX_REGEX_SOURCE,
17133
17134 // regular expressions
17135 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
17136 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
17137 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
17138 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
17139 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
17140 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
17141
17142 // Replace globs with equivalent patterns to reduce parsing time.
17143 REPLACEMENTS: {
17144 '***': '*',
17145 '**/**': '**',
17146 '**/**/**': '**'
17147 },
17148
17149 // Digits
17150 CHAR_0: 48, /* 0 */
17151 CHAR_9: 57, /* 9 */
17152
17153 // Alphabet chars.
17154 CHAR_UPPERCASE_A: 65, /* A */
17155 CHAR_LOWERCASE_A: 97, /* a */
17156 CHAR_UPPERCASE_Z: 90, /* Z */
17157 CHAR_LOWERCASE_Z: 122, /* z */
17158
17159 CHAR_LEFT_PARENTHESES: 40, /* ( */
17160 CHAR_RIGHT_PARENTHESES: 41, /* ) */
17161
17162 CHAR_ASTERISK: 42, /* * */
17163
17164 // Non-alphabetic chars.
17165 CHAR_AMPERSAND: 38, /* & */
17166 CHAR_AT: 64, /* @ */
17167 CHAR_BACKWARD_SLASH: 92, /* \ */
17168 CHAR_CARRIAGE_RETURN: 13, /* \r */
17169 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
17170 CHAR_COLON: 58, /* : */
17171 CHAR_COMMA: 44, /* , */
17172 CHAR_DOT: 46, /* . */
17173 CHAR_DOUBLE_QUOTE: 34, /* " */
17174 CHAR_EQUAL: 61, /* = */
17175 CHAR_EXCLAMATION_MARK: 33, /* ! */
17176 CHAR_FORM_FEED: 12, /* \f */
17177 CHAR_FORWARD_SLASH: 47, /* / */
17178 CHAR_GRAVE_ACCENT: 96, /* ` */
17179 CHAR_HASH: 35, /* # */
17180 CHAR_HYPHEN_MINUS: 45, /* - */
17181 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
17182 CHAR_LEFT_CURLY_BRACE: 123, /* { */
17183 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
17184 CHAR_LINE_FEED: 10, /* \n */
17185 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
17186 CHAR_PERCENT: 37, /* % */
17187 CHAR_PLUS: 43, /* + */
17188 CHAR_QUESTION_MARK: 63, /* ? */
17189 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
17190 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
17191 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
17192 CHAR_SEMICOLON: 59, /* ; */
17193 CHAR_SINGLE_QUOTE: 39, /* ' */
17194 CHAR_SPACE: 32, /* */
17195 CHAR_TAB: 9, /* \t */
17196 CHAR_UNDERSCORE: 95, /* _ */
17197 CHAR_VERTICAL_LINE: 124, /* | */
17198 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
17199
17200 SEP: path.sep,
17201
17202 /**
17203 * Create EXTGLOB_CHARS
17204 */
17205
17206 extglobChars(chars) {
17207 return {
17208 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
17209 '?': { type: 'qmark', open: '(?:', close: ')?' },
17210 '+': { type: 'plus', open: '(?:', close: ')+' },
17211 '*': { type: 'star', open: '(?:', close: ')*' },
17212 '@': { type: 'at', open: '(?:', close: ')' }
17213 };
17214 },
17215
17216 /**
17217 * Create GLOB_CHARS
17218 */
17219
17220 globChars(win32) {
17221 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
17222 }
17223};
17224
17225
17226/***/ }),
17227/* 87 */
17228/***/ (function(module, exports, __webpack_require__) {
17229
17230"use strict";
17231
17232
17233const utils = __webpack_require__(85);
17234const constants = __webpack_require__(86);
17235
17236/**
17237 * Constants
17238 */
17239
17240const {
17241 MAX_LENGTH,
17242 POSIX_REGEX_SOURCE,
17243 REGEX_NON_SPECIAL_CHAR,
17244 REGEX_SPECIAL_CHARS_BACKREF,
17245 REPLACEMENTS
17246} = constants;
17247
17248/**
17249 * Helpers
17250 */
17251
17252const expandRange = (args, options) => {
17253 if (typeof options.expandRange === 'function') {
17254 return options.expandRange(...args, options);
17255 }
17256
17257 args.sort();
17258 let value = `[${args.join('-')}]`;
17259
17260 try {
17261 /* eslint-disable no-new */
17262 new RegExp(value);
17263 } catch (ex) {
17264 return args.map(v => utils.escapeRegex(v)).join('..');
17265 }
17266
17267 return value;
17268};
17269
17270const negate = state => {
17271 let count = 1;
17272
17273 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
17274 state.advance();
17275 state.start++;
17276 count++;
17277 }
17278
17279 if (count % 2 === 0) {
17280 return false;
17281 }
17282
17283 state.negated = true;
17284 state.start++;
17285 return true;
17286};
17287
17288/**
17289 * Create the message for a syntax error
17290 */
17291
17292const syntaxError = (type, char) => {
17293 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
17294};
17295
17296/**
17297 * Parse the given input string.
17298 * @param {String} input
17299 * @param {Object} options
17300 * @return {Object}
17301 */
17302
17303const parse = (input, options) => {
17304 if (typeof input !== 'string') {
17305 throw new TypeError('Expected a string');
17306 }
17307
17308 input = REPLACEMENTS[input] || input;
17309
17310 let opts = { ...options };
17311 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17312 let len = input.length;
17313 if (len > max) {
17314 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17315 }
17316
17317 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
17318 let tokens = [bos];
17319
17320 let capture = opts.capture ? '' : '?:';
17321 let win32 = utils.isWindows(options);
17322
17323 // create constants based on platform, for windows or posix
17324 const PLATFORM_CHARS = constants.globChars(win32);
17325 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
17326
17327 const {
17328 DOT_LITERAL,
17329 PLUS_LITERAL,
17330 SLASH_LITERAL,
17331 ONE_CHAR,
17332 DOTS_SLASH,
17333 NO_DOT,
17334 NO_DOT_SLASH,
17335 NO_DOTS_SLASH,
17336 QMARK,
17337 QMARK_NO_DOT,
17338 STAR,
17339 START_ANCHOR
17340 } = PLATFORM_CHARS;
17341
17342 const globstar = (opts) => {
17343 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17344 };
17345
17346 let nodot = opts.dot ? '' : NO_DOT;
17347 let star = opts.bash === true ? globstar(opts) : STAR;
17348 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
17349
17350 if (opts.capture) {
17351 star = `(${star})`;
17352 }
17353
17354 // minimatch options support
17355 if (typeof opts.noext === 'boolean') {
17356 opts.noextglob = opts.noext;
17357 }
17358
17359 let state = {
17360 index: -1,
17361 start: 0,
17362 consumed: '',
17363 output: '',
17364 backtrack: false,
17365 brackets: 0,
17366 braces: 0,
17367 parens: 0,
17368 quotes: 0,
17369 tokens
17370 };
17371
17372 let extglobs = [];
17373 let stack = [];
17374 let prev = bos;
17375 let value;
17376
17377 /**
17378 * Tokenizing helpers
17379 */
17380
17381 const eos = () => state.index === len - 1;
17382 const peek = state.peek = (n = 1) => input[state.index + n];
17383 const advance = state.advance = () => input[++state.index];
17384 const append = token => {
17385 state.output += token.output != null ? token.output : token.value;
17386 state.consumed += token.value || '';
17387 };
17388
17389 const increment = type => {
17390 state[type]++;
17391 stack.push(type);
17392 };
17393
17394 const decrement = type => {
17395 state[type]--;
17396 stack.pop();
17397 };
17398
17399 /**
17400 * Push tokens onto the tokens array. This helper speeds up
17401 * tokenizing by 1) helping us avoid backtracking as much as possible,
17402 * and 2) helping us avoid creating extra tokens when consecutive
17403 * characters are plain text. This improves performance and simplifies
17404 * lookbehinds.
17405 */
17406
17407 const push = tok => {
17408 if (prev.type === 'globstar') {
17409 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
17410 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
17411 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
17412 state.output = state.output.slice(0, -prev.output.length);
17413 prev.type = 'star';
17414 prev.value = '*';
17415 prev.output = star;
17416 state.output += prev.output;
17417 }
17418 }
17419
17420 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
17421 extglobs[extglobs.length - 1].inner += tok.value;
17422 }
17423
17424 if (tok.value || tok.output) append(tok);
17425 if (prev && prev.type === 'text' && tok.type === 'text') {
17426 prev.value += tok.value;
17427 return;
17428 }
17429
17430 tok.prev = prev;
17431 tokens.push(tok);
17432 prev = tok;
17433 };
17434
17435 const extglobOpen = (type, value) => {
17436 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
17437
17438 token.prev = prev;
17439 token.parens = state.parens;
17440 token.output = state.output;
17441 let output = (opts.capture ? '(' : '') + token.open;
17442
17443 push({ type, value, output: state.output ? '' : ONE_CHAR });
17444 push({ type: 'paren', extglob: true, value: advance(), output });
17445 increment('parens');
17446 extglobs.push(token);
17447 };
17448
17449 const extglobClose = token => {
17450 let output = token.close + (opts.capture ? ')' : '');
17451
17452 if (token.type === 'negate') {
17453 let extglobStar = star;
17454
17455 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
17456 extglobStar = globstar(opts);
17457 }
17458
17459 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
17460 output = token.close = ')$))' + extglobStar;
17461 }
17462
17463 if (token.prev.type === 'bos' && eos()) {
17464 state.negatedExtglob = true;
17465 }
17466 }
17467
17468 push({ type: 'paren', extglob: true, value, output });
17469 decrement('parens');
17470 };
17471
17472 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
17473 let backslashes = false;
17474
17475 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17476 if (first === '\\') {
17477 backslashes = true;
17478 return m;
17479 }
17480
17481 if (first === '?') {
17482 if (esc) {
17483 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
17484 }
17485 if (index === 0) {
17486 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
17487 }
17488 return QMARK.repeat(chars.length);
17489 }
17490
17491 if (first === '.') {
17492 return DOT_LITERAL.repeat(chars.length);
17493 }
17494
17495 if (first === '*') {
17496 if (esc) {
17497 return esc + first + (rest ? star : '');
17498 }
17499 return star;
17500 }
17501 return esc ? m : '\\' + m;
17502 });
17503
17504 if (backslashes === true) {
17505 if (opts.unescape === true) {
17506 output = output.replace(/\\/g, '');
17507 } else {
17508 output = output.replace(/\\+/g, m => {
17509 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
17510 });
17511 }
17512 }
17513
17514 state.output = output;
17515 return state;
17516 }
17517
17518 /**
17519 * Tokenize input until we reach end-of-string
17520 */
17521
17522 while (!eos()) {
17523 value = advance();
17524
17525 if (value === '\u0000') {
17526 continue;
17527 }
17528
17529 /**
17530 * Escaped characters
17531 */
17532
17533 if (value === '\\') {
17534 let next = peek();
17535
17536 if (next === '/' && opts.bash !== true) {
17537 continue;
17538 }
17539
17540 if (next === '.' || next === ';') {
17541 continue;
17542 }
17543
17544 if (!next) {
17545 value += '\\';
17546 push({ type: 'text', value });
17547 continue;
17548 }
17549
17550 // collapse slashes to reduce potential for exploits
17551 let match = /^\\+/.exec(input.slice(state.index + 1));
17552 let slashes = 0;
17553
17554 if (match && match[0].length > 2) {
17555 slashes = match[0].length;
17556 state.index += slashes;
17557 if (slashes % 2 !== 0) {
17558 value += '\\';
17559 }
17560 }
17561
17562 if (opts.unescape === true) {
17563 value = advance() || '';
17564 } else {
17565 value += advance() || '';
17566 }
17567
17568 if (state.brackets === 0) {
17569 push({ type: 'text', value });
17570 continue;
17571 }
17572 }
17573
17574 /**
17575 * If we're inside a regex character class, continue
17576 * until we reach the closing bracket.
17577 */
17578
17579 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
17580 if (opts.posix !== false && value === ':') {
17581 let inner = prev.value.slice(1);
17582 if (inner.includes('[')) {
17583 prev.posix = true;
17584
17585 if (inner.includes(':')) {
17586 let idx = prev.value.lastIndexOf('[');
17587 let pre = prev.value.slice(0, idx);
17588 let rest = prev.value.slice(idx + 2);
17589 let posix = POSIX_REGEX_SOURCE[rest];
17590 if (posix) {
17591 prev.value = pre + posix;
17592 state.backtrack = true;
17593 advance();
17594
17595 if (!bos.output && tokens.indexOf(prev) === 1) {
17596 bos.output = ONE_CHAR;
17597 }
17598 continue;
17599 }
17600 }
17601 }
17602 }
17603
17604 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
17605 value = '\\' + value;
17606 }
17607
17608 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
17609 value = '\\' + value;
17610 }
17611
17612 if (opts.posix === true && value === '!' && prev.value === '[') {
17613 value = '^';
17614 }
17615
17616 prev.value += value;
17617 append({ value });
17618 continue;
17619 }
17620
17621 /**
17622 * If we're inside a quoted string, continue
17623 * until we reach the closing double quote.
17624 */
17625
17626 if (state.quotes === 1 && value !== '"') {
17627 value = utils.escapeRegex(value);
17628 prev.value += value;
17629 append({ value });
17630 continue;
17631 }
17632
17633 /**
17634 * Double quotes
17635 */
17636
17637 if (value === '"') {
17638 state.quotes = state.quotes === 1 ? 0 : 1;
17639 if (opts.keepQuotes === true) {
17640 push({ type: 'text', value });
17641 }
17642 continue;
17643 }
17644
17645 /**
17646 * Parentheses
17647 */
17648
17649 if (value === '(') {
17650 push({ type: 'paren', value });
17651 increment('parens');
17652 continue;
17653 }
17654
17655 if (value === ')') {
17656 if (state.parens === 0 && opts.strictBrackets === true) {
17657 throw new SyntaxError(syntaxError('opening', '('));
17658 }
17659
17660 let extglob = extglobs[extglobs.length - 1];
17661 if (extglob && state.parens === extglob.parens + 1) {
17662 extglobClose(extglobs.pop());
17663 continue;
17664 }
17665
17666 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
17667 decrement('parens');
17668 continue;
17669 }
17670
17671 /**
17672 * Brackets
17673 */
17674
17675 if (value === '[') {
17676 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
17677 if (opts.nobracket !== true && opts.strictBrackets === true) {
17678 throw new SyntaxError(syntaxError('closing', ']'));
17679 }
17680
17681 value = '\\' + value;
17682 } else {
17683 increment('brackets');
17684 }
17685
17686 push({ type: 'bracket', value });
17687 continue;
17688 }
17689
17690 if (value === ']') {
17691 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
17692 push({ type: 'text', value, output: '\\' + value });
17693 continue;
17694 }
17695
17696 if (state.brackets === 0) {
17697 if (opts.strictBrackets === true) {
17698 throw new SyntaxError(syntaxError('opening', '['));
17699 }
17700
17701 push({ type: 'text', value, output: '\\' + value });
17702 continue;
17703 }
17704
17705 decrement('brackets');
17706
17707 let prevValue = prev.value.slice(1);
17708 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
17709 value = '/' + value;
17710 }
17711
17712 prev.value += value;
17713 append({ value });
17714
17715 // when literal brackets are explicitly disabled
17716 // assume we should match with a regex character class
17717 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
17718 continue;
17719 }
17720
17721 let escaped = utils.escapeRegex(prev.value);
17722 state.output = state.output.slice(0, -prev.value.length);
17723
17724 // when literal brackets are explicitly enabled
17725 // assume we should escape the brackets to match literal characters
17726 if (opts.literalBrackets === true) {
17727 state.output += escaped;
17728 prev.value = escaped;
17729 continue;
17730 }
17731
17732 // when the user specifies nothing, try to match both
17733 prev.value = `(${capture}${escaped}|${prev.value})`;
17734 state.output += prev.value;
17735 continue;
17736 }
17737
17738 /**
17739 * Braces
17740 */
17741
17742 if (value === '{' && opts.nobrace !== true) {
17743 push({ type: 'brace', value, output: '(' });
17744 increment('braces');
17745 continue;
17746 }
17747
17748 if (value === '}') {
17749 if (opts.nobrace === true || state.braces === 0) {
17750 push({ type: 'text', value, output: '\\' + value });
17751 continue;
17752 }
17753
17754 let output = ')';
17755
17756 if (state.dots === true) {
17757 let arr = tokens.slice();
17758 let range = [];
17759
17760 for (let i = arr.length - 1; i >= 0; i--) {
17761 tokens.pop();
17762 if (arr[i].type === 'brace') {
17763 break;
17764 }
17765 if (arr[i].type !== 'dots') {
17766 range.unshift(arr[i].value);
17767 }
17768 }
17769
17770 output = expandRange(range, opts);
17771 state.backtrack = true;
17772 }
17773
17774 push({ type: 'brace', value, output });
17775 decrement('braces');
17776 continue;
17777 }
17778
17779 /**
17780 * Pipes
17781 */
17782
17783 if (value === '|') {
17784 if (extglobs.length > 0) {
17785 extglobs[extglobs.length - 1].conditions++;
17786 }
17787 push({ type: 'text', value });
17788 continue;
17789 }
17790
17791 /**
17792 * Commas
17793 */
17794
17795 if (value === ',') {
17796 let output = value;
17797
17798 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
17799 output = '|';
17800 }
17801
17802 push({ type: 'comma', value, output });
17803 continue;
17804 }
17805
17806 /**
17807 * Slashes
17808 */
17809
17810 if (value === '/') {
17811 // if the beginning of the glob is "./", advance the start
17812 // to the current index, and don't add the "./" characters
17813 // to the state. This greatly simplifies lookbehinds when
17814 // checking for BOS characters like "!" and "." (not "./")
17815 if (prev.type === 'dot' && state.index === 1) {
17816 state.start = state.index + 1;
17817 state.consumed = '';
17818 state.output = '';
17819 tokens.pop();
17820 prev = bos; // reset "prev" to the first token
17821 continue;
17822 }
17823
17824 push({ type: 'slash', value, output: SLASH_LITERAL });
17825 continue;
17826 }
17827
17828 /**
17829 * Dots
17830 */
17831
17832 if (value === '.') {
17833 if (state.braces > 0 && prev.type === 'dot') {
17834 if (prev.value === '.') prev.output = DOT_LITERAL;
17835 prev.type = 'dots';
17836 prev.output += value;
17837 prev.value += value;
17838 state.dots = true;
17839 continue;
17840 }
17841
17842 push({ type: 'dot', value, output: DOT_LITERAL });
17843 continue;
17844 }
17845
17846 /**
17847 * Question marks
17848 */
17849
17850 if (value === '?') {
17851 if (prev && prev.type === 'paren') {
17852 let next = peek();
17853 let output = value;
17854
17855 if (next === '<' && !utils.supportsLookbehinds()) {
17856 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
17857 }
17858
17859 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
17860 output = '\\' + value;
17861 }
17862
17863 push({ type: 'text', value, output });
17864 continue;
17865 }
17866
17867 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17868 extglobOpen('qmark', value);
17869 continue;
17870 }
17871
17872 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
17873 push({ type: 'qmark', value, output: QMARK_NO_DOT });
17874 continue;
17875 }
17876
17877 push({ type: 'qmark', value, output: QMARK });
17878 continue;
17879 }
17880
17881 /**
17882 * Exclamation
17883 */
17884
17885 if (value === '!') {
17886 if (opts.noextglob !== true && peek() === '(') {
17887 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
17888 extglobOpen('negate', value);
17889 continue;
17890 }
17891 }
17892
17893 if (opts.nonegate !== true && state.index === 0) {
17894 negate(state);
17895 continue;
17896 }
17897 }
17898
17899 /**
17900 * Plus
17901 */
17902
17903 if (value === '+') {
17904 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17905 extglobOpen('plus', value);
17906 continue;
17907 }
17908
17909 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
17910 let output = prev.extglob === true ? '\\' + value : value;
17911 push({ type: 'plus', value, output });
17912 continue;
17913 }
17914
17915 // use regex behavior inside parens
17916 if (state.parens > 0 && opts.regex !== false) {
17917 push({ type: 'plus', value });
17918 continue;
17919 }
17920
17921 push({ type: 'plus', value: PLUS_LITERAL });
17922 continue;
17923 }
17924
17925 /**
17926 * Plain text
17927 */
17928
17929 if (value === '@') {
17930 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17931 push({ type: 'at', value, output: '' });
17932 continue;
17933 }
17934
17935 push({ type: 'text', value });
17936 continue;
17937 }
17938
17939 /**
17940 * Plain text
17941 */
17942
17943 if (value !== '*') {
17944 if (value === '$' || value === '^') {
17945 value = '\\' + value;
17946 }
17947
17948 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17949 if (match) {
17950 value += match[0];
17951 state.index += match[0].length;
17952 }
17953
17954 push({ type: 'text', value });
17955 continue;
17956 }
17957
17958 /**
17959 * Stars
17960 */
17961
17962 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17963 prev.type = 'star';
17964 prev.star = true;
17965 prev.value += value;
17966 prev.output = star;
17967 state.backtrack = true;
17968 state.consumed += value;
17969 continue;
17970 }
17971
17972 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17973 extglobOpen('star', value);
17974 continue;
17975 }
17976
17977 if (prev.type === 'star') {
17978 if (opts.noglobstar === true) {
17979 state.consumed += value;
17980 continue;
17981 }
17982
17983 let prior = prev.prev;
17984 let before = prior.prev;
17985 let isStart = prior.type === 'slash' || prior.type === 'bos';
17986 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
17987
17988 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
17989 push({ type: 'star', value, output: '' });
17990 continue;
17991 }
17992
17993 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
17994 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
17995 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
17996 push({ type: 'star', value, output: '' });
17997 continue;
17998 }
17999
18000 // strip consecutive `/**/`
18001 while (input.slice(state.index + 1, state.index + 4) === '/**') {
18002 let after = input[state.index + 4];
18003 if (after && after !== '/') {
18004 break;
18005 }
18006 state.consumed += '/**';
18007 state.index += 3;
18008 }
18009
18010 if (prior.type === 'bos' && eos()) {
18011 prev.type = 'globstar';
18012 prev.value += value;
18013 prev.output = globstar(opts);
18014 state.output = prev.output;
18015 state.consumed += value;
18016 continue;
18017 }
18018
18019 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
18020 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18021 prior.output = '(?:' + prior.output;
18022
18023 prev.type = 'globstar';
18024 prev.output = globstar(opts) + '|$)';
18025 prev.value += value;
18026
18027 state.output += prior.output + prev.output;
18028 state.consumed += value;
18029 continue;
18030 }
18031
18032 let next = peek();
18033 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
18034 let end = peek(2) !== void 0 ? '|$' : '';
18035
18036 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18037 prior.output = '(?:' + prior.output;
18038
18039 prev.type = 'globstar';
18040 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
18041 prev.value += value;
18042
18043 state.output += prior.output + prev.output;
18044 state.consumed += value + advance();
18045
18046 push({ type: 'slash', value, output: '' });
18047 continue;
18048 }
18049
18050 if (prior.type === 'bos' && next === '/') {
18051 prev.type = 'globstar';
18052 prev.value += value;
18053 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
18054 state.output = prev.output;
18055 state.consumed += value + advance();
18056 push({ type: 'slash', value, output: '' });
18057 continue;
18058 }
18059
18060 // remove single star from output
18061 state.output = state.output.slice(0, -prev.output.length);
18062
18063 // reset previous token to globstar
18064 prev.type = 'globstar';
18065 prev.output = globstar(opts);
18066 prev.value += value;
18067
18068 // reset output with globstar
18069 state.output += prev.output;
18070 state.consumed += value;
18071 continue;
18072 }
18073
18074 let token = { type: 'star', value, output: star };
18075
18076 if (opts.bash === true) {
18077 token.output = '.*?';
18078 if (prev.type === 'bos' || prev.type === 'slash') {
18079 token.output = nodot + token.output;
18080 }
18081 push(token);
18082 continue;
18083 }
18084
18085 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
18086 token.output = value;
18087 push(token);
18088 continue;
18089 }
18090
18091 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
18092 if (prev.type === 'dot') {
18093 state.output += NO_DOT_SLASH;
18094 prev.output += NO_DOT_SLASH;
18095
18096 } else if (opts.dot === true) {
18097 state.output += NO_DOTS_SLASH;
18098 prev.output += NO_DOTS_SLASH;
18099
18100 } else {
18101 state.output += nodot;
18102 prev.output += nodot;
18103 }
18104
18105 if (peek() !== '*') {
18106 state.output += ONE_CHAR;
18107 prev.output += ONE_CHAR;
18108 }
18109 }
18110
18111 push(token);
18112 }
18113
18114 while (state.brackets > 0) {
18115 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
18116 state.output = utils.escapeLast(state.output, '[');
18117 decrement('brackets');
18118 }
18119
18120 while (state.parens > 0) {
18121 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
18122 state.output = utils.escapeLast(state.output, '(');
18123 decrement('parens');
18124 }
18125
18126 while (state.braces > 0) {
18127 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
18128 state.output = utils.escapeLast(state.output, '{');
18129 decrement('braces');
18130 }
18131
18132 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
18133 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
18134 }
18135
18136 // rebuild the output if we had to backtrack at any point
18137 if (state.backtrack === true) {
18138 state.output = '';
18139
18140 for (let token of state.tokens) {
18141 state.output += token.output != null ? token.output : token.value;
18142
18143 if (token.suffix) {
18144 state.output += token.suffix;
18145 }
18146 }
18147 }
18148
18149 return state;
18150};
18151
18152/**
18153 * Fast paths for creating regular expressions for common glob patterns.
18154 * This can significantly speed up processing and has very little downside
18155 * impact when none of the fast paths match.
18156 */
18157
18158parse.fastpaths = (input, options) => {
18159 let opts = { ...options };
18160 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
18161 let len = input.length;
18162 if (len > max) {
18163 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
18164 }
18165
18166 input = REPLACEMENTS[input] || input;
18167 let win32 = utils.isWindows(options);
18168
18169 // create constants based on platform, for windows or posix
18170 const {
18171 DOT_LITERAL,
18172 SLASH_LITERAL,
18173 ONE_CHAR,
18174 DOTS_SLASH,
18175 NO_DOT,
18176 NO_DOTS,
18177 NO_DOTS_SLASH,
18178 STAR,
18179 START_ANCHOR
18180 } = constants.globChars(win32);
18181
18182 let capture = opts.capture ? '' : '?:';
18183 let star = opts.bash === true ? '.*?' : STAR;
18184 let nodot = opts.dot ? NO_DOTS : NO_DOT;
18185 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
18186
18187 if (opts.capture) {
18188 star = `(${star})`;
18189 }
18190
18191 const globstar = (opts) => {
18192 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
18193 };
18194
18195 const create = str => {
18196 switch (str) {
18197 case '*':
18198 return `${nodot}${ONE_CHAR}${star}`;
18199
18200 case '.*':
18201 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
18202
18203 case '*.*':
18204 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18205
18206 case '*/*':
18207 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
18208
18209 case '**':
18210 return nodot + globstar(opts);
18211
18212 case '**/*':
18213 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
18214
18215 case '**/*.*':
18216 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18217
18218 case '**/.*':
18219 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
18220
18221 default: {
18222 let match = /^(.*?)\.(\w+)$/.exec(str);
18223 if (!match) return;
18224
18225 let source = create(match[1], options);
18226 if (!source) return;
18227
18228 return source + DOT_LITERAL + match[2];
18229 }
18230 }
18231 };
18232
18233 let output = create(input);
18234 if (output && opts.strictSlashes !== true) {
18235 output += `${SLASH_LITERAL}?`;
18236 }
18237
18238 return output;
18239};
18240
18241module.exports = parse;
18242
18243
18244/***/ }),
18245/* 88 */
18246/***/ (function(module, exports, __webpack_require__) {
18247
18248"use strict";
18249
18250
18251module.exports = __webpack_require__(89);
18252
18253
18254/***/ }),
18255/* 89 */
18256/***/ (function(module, exports, __webpack_require__) {
18257
18258"use strict";
18259
18260
18261const path = __webpack_require__(13);
18262const scan = __webpack_require__(90);
18263const parse = __webpack_require__(93);
18264const utils = __webpack_require__(91);
18265const constants = __webpack_require__(92);
18266const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
18267
18268/**
18269 * Creates a matcher function from one or more glob patterns. The
18270 * returned function takes a string to match as its first argument,
18271 * and returns true if the string is a match. The returned matcher
18272 * function also takes a boolean as the second argument that, when true,
18273 * returns an object with additional information.
18274 *
18275 * ```js
18276 * const picomatch = require('picomatch');
18277 * // picomatch(glob[, options]);
18278 *
18279 * const isMatch = picomatch('*.!(*a)');
18280 * console.log(isMatch('a.a')); //=> false
18281 * console.log(isMatch('a.b')); //=> true
18282 * ```
18283 * @name picomatch
18284 * @param {String|Array} `globs` One or more glob patterns.
18285 * @param {Object=} `options`
18286 * @return {Function=} Returns a matcher function.
18287 * @api public
18288 */
18289
18290const picomatch = (glob, options, returnState = false) => {
18291 if (Array.isArray(glob)) {
18292 const fns = glob.map(input => picomatch(input, options, returnState));
18293 const arrayMatcher = str => {
18294 for (const isMatch of fns) {
18295 const state = isMatch(str);
18296 if (state) return state;
18297 }
18298 return false;
18299 };
18300 return arrayMatcher;
18301 }
18302
18303 const isState = isObject(glob) && glob.tokens && glob.input;
18304
18305 if (glob === '' || (typeof glob !== 'string' && !isState)) {
18306 throw new TypeError('Expected pattern to be a non-empty string');
18307 }
18308
18309 const opts = options || {};
18310 const posix = utils.isWindows(options);
18311 const regex = isState
18312 ? picomatch.compileRe(glob, options)
18313 : picomatch.makeRe(glob, options, false, true);
18314
18315 const state = regex.state;
18316 delete regex.state;
18317
18318 let isIgnored = () => false;
18319 if (opts.ignore) {
18320 const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
18321 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
18322 }
18323
18324 const matcher = (input, returnObject = false) => {
18325 const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
18326 const result = { glob, state, regex, posix, input, output, match, isMatch };
18327
18328 if (typeof opts.onResult === 'function') {
18329 opts.onResult(result);
18330 }
18331
18332 if (isMatch === false) {
18333 result.isMatch = false;
18334 return returnObject ? result : false;
18335 }
18336
18337 if (isIgnored(input)) {
18338 if (typeof opts.onIgnore === 'function') {
18339 opts.onIgnore(result);
18340 }
18341 result.isMatch = false;
18342 return returnObject ? result : false;
18343 }
18344
18345 if (typeof opts.onMatch === 'function') {
18346 opts.onMatch(result);
18347 }
18348 return returnObject ? result : true;
18349 };
18350
18351 if (returnState) {
18352 matcher.state = state;
18353 }
18354
18355 return matcher;
18356};
18357
18358/**
18359 * Test `input` with the given `regex`. This is used by the main
18360 * `picomatch()` function to test the input string.
18361 *
18362 * ```js
18363 * const picomatch = require('picomatch');
18364 * // picomatch.test(input, regex[, options]);
18365 *
18366 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
18367 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
18368 * ```
18369 * @param {String} `input` String to test.
18370 * @param {RegExp} `regex`
18371 * @return {Object} Returns an object with matching info.
18372 * @api public
18373 */
18374
18375picomatch.test = (input, regex, options, { glob, posix } = {}) => {
18376 if (typeof input !== 'string') {
18377 throw new TypeError('Expected input to be a string');
18378 }
18379
18380 if (input === '') {
18381 return { isMatch: false, output: '' };
18382 }
18383
18384 const opts = options || {};
18385 const format = opts.format || (posix ? utils.toPosixSlashes : null);
18386 let match = input === glob;
18387 let output = (match && format) ? format(input) : input;
18388
18389 if (match === false) {
18390 output = format ? format(input) : input;
18391 match = output === glob;
18392 }
18393
18394 if (match === false || opts.capture === true) {
18395 if (opts.matchBase === true || opts.basename === true) {
18396 match = picomatch.matchBase(input, regex, options, posix);
18397 } else {
18398 match = regex.exec(output);
18399 }
18400 }
18401
18402 return { isMatch: Boolean(match), match, output };
18403};
18404
18405/**
18406 * Match the basename of a filepath.
18407 *
18408 * ```js
18409 * const picomatch = require('picomatch');
18410 * // picomatch.matchBase(input, glob[, options]);
18411 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
18412 * ```
18413 * @param {String} `input` String to test.
18414 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
18415 * @return {Boolean}
18416 * @api public
18417 */
18418
18419picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
18420 const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
18421 return regex.test(path.basename(input));
18422};
18423
18424/**
18425 * Returns true if **any** of the given glob `patterns` match the specified `string`.
18426 *
18427 * ```js
18428 * const picomatch = require('picomatch');
18429 * // picomatch.isMatch(string, patterns[, options]);
18430 *
18431 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
18432 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
18433 * ```
18434 * @param {String|Array} str The string to test.
18435 * @param {String|Array} patterns One or more glob patterns to use for matching.
18436 * @param {Object} [options] See available [options](#options).
18437 * @return {Boolean} Returns true if any patterns match `str`
18438 * @api public
18439 */
18440
18441picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
18442
18443/**
18444 * Parse a glob pattern to create the source string for a regular
18445 * expression.
18446 *
18447 * ```js
18448 * const picomatch = require('picomatch');
18449 * const result = picomatch.parse(pattern[, options]);
18450 * ```
18451 * @param {String} `pattern`
18452 * @param {Object} `options`
18453 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
18454 * @api public
18455 */
18456
18457picomatch.parse = (pattern, options) => {
18458 if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
18459 return parse(pattern, { ...options, fastpaths: false });
18460};
18461
18462/**
18463 * Scan a glob pattern to separate the pattern into segments.
18464 *
18465 * ```js
18466 * const picomatch = require('picomatch');
18467 * // picomatch.scan(input[, options]);
18468 *
18469 * const result = picomatch.scan('!./foo/*.js');
18470 * console.log(result);
18471 * { prefix: '!./',
18472 * input: '!./foo/*.js',
18473 * start: 3,
18474 * base: 'foo',
18475 * glob: '*.js',
18476 * isBrace: false,
18477 * isBracket: false,
18478 * isGlob: true,
18479 * isExtglob: false,
18480 * isGlobstar: false,
18481 * negated: true }
18482 * ```
18483 * @param {String} `input` Glob pattern to scan.
18484 * @param {Object} `options`
18485 * @return {Object} Returns an object with
18486 * @api public
18487 */
18488
18489picomatch.scan = (input, options) => scan(input, options);
18490
18491/**
18492 * Create a regular expression from a parsed glob pattern.
18493 *
18494 * ```js
18495 * const picomatch = require('picomatch');
18496 * const state = picomatch.parse('*.js');
18497 * // picomatch.compileRe(state[, options]);
18498 *
18499 * console.log(picomatch.compileRe(state));
18500 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18501 * ```
18502 * @param {String} `state` The object returned from the `.parse` method.
18503 * @param {Object} `options`
18504 * @return {RegExp} Returns a regex created from the given pattern.
18505 * @api public
18506 */
18507
18508picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {
18509 if (returnOutput === true) {
18510 return parsed.output;
18511 }
18512
18513 const opts = options || {};
18514 const prepend = opts.contains ? '' : '^';
18515 const append = opts.contains ? '' : '$';
18516
18517 let source = `${prepend}(?:${parsed.output})${append}`;
18518 if (parsed && parsed.negated === true) {
18519 source = `^(?!${source}).*$`;
18520 }
18521
18522 const regex = picomatch.toRegex(source, options);
18523 if (returnState === true) {
18524 regex.state = parsed;
18525 }
18526
18527 return regex;
18528};
18529
18530picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
18531 if (!input || typeof input !== 'string') {
18532 throw new TypeError('Expected a non-empty string');
18533 }
18534
18535 const opts = options || {};
18536 let parsed = { negated: false, fastpaths: true };
18537 let prefix = '';
18538 let output;
18539
18540 if (input.startsWith('./')) {
18541 input = input.slice(2);
18542 prefix = parsed.prefix = './';
18543 }
18544
18545 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
18546 output = parse.fastpaths(input, options);
18547 }
18548
18549 if (output === undefined) {
18550 parsed = parse(input, options);
18551 parsed.prefix = prefix + (parsed.prefix || '');
18552 } else {
18553 parsed.output = output;
18554 }
18555
18556 return picomatch.compileRe(parsed, options, returnOutput, returnState);
18557};
18558
18559/**
18560 * Create a regular expression from the given regex source string.
18561 *
18562 * ```js
18563 * const picomatch = require('picomatch');
18564 * // picomatch.toRegex(source[, options]);
18565 *
18566 * const { output } = picomatch.parse('*.js');
18567 * console.log(picomatch.toRegex(output));
18568 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18569 * ```
18570 * @param {String} `source` Regular expression source string.
18571 * @param {Object} `options`
18572 * @return {RegExp}
18573 * @api public
18574 */
18575
18576picomatch.toRegex = (source, options) => {
18577 try {
18578 const opts = options || {};
18579 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
18580 } catch (err) {
18581 if (options && options.debug === true) throw err;
18582 return /$^/;
18583 }
18584};
18585
18586/**
18587 * Picomatch constants.
18588 * @return {Object}
18589 */
18590
18591picomatch.constants = constants;
18592
18593/**
18594 * Expose "picomatch"
18595 */
18596
18597module.exports = picomatch;
18598
18599
18600/***/ }),
18601/* 90 */
18602/***/ (function(module, exports, __webpack_require__) {
18603
18604"use strict";
18605
18606
18607const utils = __webpack_require__(91);
18608const {
18609 CHAR_ASTERISK, /* * */
18610 CHAR_AT, /* @ */
18611 CHAR_BACKWARD_SLASH, /* \ */
18612 CHAR_COMMA, /* , */
18613 CHAR_DOT, /* . */
18614 CHAR_EXCLAMATION_MARK, /* ! */
18615 CHAR_FORWARD_SLASH, /* / */
18616 CHAR_LEFT_CURLY_BRACE, /* { */
18617 CHAR_LEFT_PARENTHESES, /* ( */
18618 CHAR_LEFT_SQUARE_BRACKET, /* [ */
18619 CHAR_PLUS, /* + */
18620 CHAR_QUESTION_MARK, /* ? */
18621 CHAR_RIGHT_CURLY_BRACE, /* } */
18622 CHAR_RIGHT_PARENTHESES, /* ) */
18623 CHAR_RIGHT_SQUARE_BRACKET /* ] */
18624} = __webpack_require__(92);
18625
18626const isPathSeparator = code => {
18627 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
18628};
18629
18630const depth = token => {
18631 if (token.isPrefix !== true) {
18632 token.depth = token.isGlobstar ? Infinity : 1;
18633 }
18634};
18635
18636/**
18637 * Quickly scans a glob pattern and returns an object with a handful of
18638 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
18639 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
18640 *
18641 * ```js
18642 * const pm = require('picomatch');
18643 * console.log(pm.scan('foo/bar/*.js'));
18644 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
18645 * ```
18646 * @param {String} `str`
18647 * @param {Object} `options`
18648 * @return {Object} Returns an object with tokens and regex source string.
18649 * @api public
18650 */
18651
18652const scan = (input, options) => {
18653 const opts = options || {};
18654
18655 const length = input.length - 1;
18656 const scanToEnd = opts.parts === true || opts.scanToEnd === true;
18657 const slashes = [];
18658 const tokens = [];
18659 const parts = [];
18660
18661 let str = input;
18662 let index = -1;
18663 let start = 0;
18664 let lastIndex = 0;
18665 let isBrace = false;
18666 let isBracket = false;
18667 let isGlob = false;
18668 let isExtglob = false;
18669 let isGlobstar = false;
18670 let braceEscaped = false;
18671 let backslashes = false;
18672 let negated = false;
18673 let finished = false;
18674 let braces = 0;
18675 let prev;
18676 let code;
18677 let token = { value: '', depth: 0, isGlob: false };
18678
18679 const eos = () => index >= length;
18680 const peek = () => str.charCodeAt(index + 1);
18681 const advance = () => {
18682 prev = code;
18683 return str.charCodeAt(++index);
18684 };
18685
18686 while (index < length) {
18687 code = advance();
18688 let next;
18689
18690 if (code === CHAR_BACKWARD_SLASH) {
18691 backslashes = token.backslashes = true;
18692 code = advance();
18693
18694 if (code === CHAR_LEFT_CURLY_BRACE) {
18695 braceEscaped = true;
18696 }
18697 continue;
18698 }
18699
18700 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
18701 braces++;
18702
18703 while (eos() !== true && (code = advance())) {
18704 if (code === CHAR_BACKWARD_SLASH) {
18705 backslashes = token.backslashes = true;
18706 advance();
18707 continue;
18708 }
18709
18710 if (code === CHAR_LEFT_CURLY_BRACE) {
18711 braces++;
18712 continue;
18713 }
18714
18715 if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
18716 isBrace = token.isBrace = true;
18717 isGlob = token.isGlob = true;
18718 finished = true;
18719
18720 if (scanToEnd === true) {
18721 continue;
18722 }
18723
18724 break;
18725 }
18726
18727 if (braceEscaped !== true && code === CHAR_COMMA) {
18728 isBrace = token.isBrace = true;
18729 isGlob = token.isGlob = true;
18730 finished = true;
18731
18732 if (scanToEnd === true) {
18733 continue;
18734 }
18735
18736 break;
18737 }
18738
18739 if (code === CHAR_RIGHT_CURLY_BRACE) {
18740 braces--;
18741
18742 if (braces === 0) {
18743 braceEscaped = false;
18744 isBrace = token.isBrace = true;
18745 finished = true;
18746 break;
18747 }
18748 }
18749 }
18750
18751 if (scanToEnd === true) {
18752 continue;
18753 }
18754
18755 break;
18756 }
18757
18758 if (code === CHAR_FORWARD_SLASH) {
18759 slashes.push(index);
18760 tokens.push(token);
18761 token = { value: '', depth: 0, isGlob: false };
18762
18763 if (finished === true) continue;
18764 if (prev === CHAR_DOT && index === (start + 1)) {
18765 start += 2;
18766 continue;
18767 }
18768
18769 lastIndex = index + 1;
18770 continue;
18771 }
18772
18773 if (opts.noext !== true) {
18774 const isExtglobChar = code === CHAR_PLUS
18775 || code === CHAR_AT
18776 || code === CHAR_ASTERISK
18777 || code === CHAR_QUESTION_MARK
18778 || code === CHAR_EXCLAMATION_MARK;
18779
18780 if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
18781 isGlob = token.isGlob = true;
18782 isExtglob = token.isExtglob = true;
18783 finished = true;
18784
18785 if (scanToEnd === true) {
18786 while (eos() !== true && (code = advance())) {
18787 if (code === CHAR_BACKWARD_SLASH) {
18788 backslashes = token.backslashes = true;
18789 code = advance();
18790 continue;
18791 }
18792
18793 if (code === CHAR_RIGHT_PARENTHESES) {
18794 isGlob = token.isGlob = true;
18795 finished = true;
18796 break;
18797 }
18798 }
18799 continue;
18800 }
18801 break;
18802 }
18803 }
18804
18805 if (code === CHAR_ASTERISK) {
18806 if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
18807 isGlob = token.isGlob = true;
18808 finished = true;
18809
18810 if (scanToEnd === true) {
18811 continue;
18812 }
18813 break;
18814 }
18815
18816 if (code === CHAR_QUESTION_MARK) {
18817 isGlob = token.isGlob = true;
18818 finished = true;
18819
18820 if (scanToEnd === true) {
18821 continue;
18822 }
18823 break;
18824 }
18825
18826 if (code === CHAR_LEFT_SQUARE_BRACKET) {
18827 while (eos() !== true && (next = advance())) {
18828 if (next === CHAR_BACKWARD_SLASH) {
18829 backslashes = token.backslashes = true;
18830 advance();
18831 continue;
18832 }
18833
18834 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
18835 isBracket = token.isBracket = true;
18836 isGlob = token.isGlob = true;
18837 finished = true;
18838
18839 if (scanToEnd === true) {
18840 continue;
18841 }
18842 break;
18843 }
18844 }
18845 }
18846
18847 if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
18848 negated = token.negated = true;
18849 start++;
18850 continue;
18851 }
18852
18853 if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
18854 isGlob = token.isGlob = true;
18855
18856 if (scanToEnd === true) {
18857 while (eos() !== true && (code = advance())) {
18858 if (code === CHAR_LEFT_PARENTHESES) {
18859 backslashes = token.backslashes = true;
18860 code = advance();
18861 continue;
18862 }
18863
18864 if (code === CHAR_RIGHT_PARENTHESES) {
18865 finished = true;
18866 break;
18867 }
18868 }
18869 continue;
18870 }
18871 break;
18872 }
18873
18874 if (isGlob === true) {
18875 finished = true;
18876
18877 if (scanToEnd === true) {
18878 continue;
18879 }
18880
18881 break;
18882 }
18883 }
18884
18885 if (opts.noext === true) {
18886 isExtglob = false;
18887 isGlob = false;
18888 }
18889
18890 let base = str;
18891 let prefix = '';
18892 let glob = '';
18893
18894 if (start > 0) {
18895 prefix = str.slice(0, start);
18896 str = str.slice(start);
18897 lastIndex -= start;
18898 }
18899
18900 if (base && isGlob === true && lastIndex > 0) {
18901 base = str.slice(0, lastIndex);
18902 glob = str.slice(lastIndex);
18903 } else if (isGlob === true) {
18904 base = '';
18905 glob = str;
18906 } else {
18907 base = str;
18908 }
18909
18910 if (base && base !== '' && base !== '/' && base !== str) {
18911 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
18912 base = base.slice(0, -1);
18913 }
18914 }
18915
18916 if (opts.unescape === true) {
18917 if (glob) glob = utils.removeBackslashes(glob);
18918
18919 if (base && backslashes === true) {
18920 base = utils.removeBackslashes(base);
18921 }
18922 }
18923
18924 const state = {
18925 prefix,
18926 input,
18927 start,
18928 base,
18929 glob,
18930 isBrace,
18931 isBracket,
18932 isGlob,
18933 isExtglob,
18934 isGlobstar,
18935 negated
18936 };
18937
18938 if (opts.tokens === true) {
18939 state.maxDepth = 0;
18940 if (!isPathSeparator(code)) {
18941 tokens.push(token);
18942 }
18943 state.tokens = tokens;
18944 }
18945
18946 if (opts.parts === true || opts.tokens === true) {
18947 let prevIndex;
18948
18949 for (let idx = 0; idx < slashes.length; idx++) {
18950 const n = prevIndex ? prevIndex + 1 : start;
18951 const i = slashes[idx];
18952 const value = input.slice(n, i);
18953 if (opts.tokens) {
18954 if (idx === 0 && start !== 0) {
18955 tokens[idx].isPrefix = true;
18956 tokens[idx].value = prefix;
18957 } else {
18958 tokens[idx].value = value;
18959 }
18960 depth(tokens[idx]);
18961 state.maxDepth += tokens[idx].depth;
18962 }
18963 if (idx !== 0 || value !== '') {
18964 parts.push(value);
18965 }
18966 prevIndex = i;
18967 }
18968
18969 if (prevIndex && prevIndex + 1 < input.length) {
18970 const value = input.slice(prevIndex + 1);
18971 parts.push(value);
18972
18973 if (opts.tokens) {
18974 tokens[tokens.length - 1].value = value;
18975 depth(tokens[tokens.length - 1]);
18976 state.maxDepth += tokens[tokens.length - 1].depth;
18977 }
18978 }
18979
18980 state.slashes = slashes;
18981 state.parts = parts;
18982 }
18983
18984 return state;
18985};
18986
18987module.exports = scan;
18988
18989
18990/***/ }),
18991/* 91 */
18992/***/ (function(module, exports, __webpack_require__) {
18993
18994"use strict";
18995
18996
18997const path = __webpack_require__(13);
18998const win32 = process.platform === 'win32';
18999const {
19000 REGEX_BACKSLASH,
19001 REGEX_REMOVE_BACKSLASH,
19002 REGEX_SPECIAL_CHARS,
19003 REGEX_SPECIAL_CHARS_GLOBAL
19004} = __webpack_require__(92);
19005
19006exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
19007exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
19008exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
19009exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
19010exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
19011
19012exports.removeBackslashes = str => {
19013 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
19014 return match === '\\' ? '' : match;
19015 });
19016};
19017
19018exports.supportsLookbehinds = () => {
19019 const segs = process.version.slice(1).split('.').map(Number);
19020 if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
19021 return true;
19022 }
19023 return false;
19024};
19025
19026exports.isWindows = options => {
19027 if (options && typeof options.windows === 'boolean') {
19028 return options.windows;
19029 }
19030 return win32 === true || path.sep === '\\';
19031};
19032
19033exports.escapeLast = (input, char, lastIdx) => {
19034 const idx = input.lastIndexOf(char, lastIdx);
19035 if (idx === -1) return input;
19036 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
19037 return `${input.slice(0, idx)}\\${input.slice(idx)}`;
19038};
19039
19040exports.removePrefix = (input, state = {}) => {
19041 let output = input;
19042 if (output.startsWith('./')) {
19043 output = output.slice(2);
19044 state.prefix = './';
19045 }
19046 return output;
19047};
19048
19049exports.wrapOutput = (input, state = {}, options = {}) => {
19050 const prepend = options.contains ? '' : '^';
19051 const append = options.contains ? '' : '$';
19052
19053 let output = `${prepend}(?:${input})${append}`;
19054 if (state.negated === true) {
19055 output = `(?:^(?!${output}).*$)`;
19056 }
19057 return output;
19058};
19059
19060
19061/***/ }),
19062/* 92 */
19063/***/ (function(module, exports, __webpack_require__) {
19064
19065"use strict";
19066
19067
19068const path = __webpack_require__(13);
19069const WIN_SLASH = '\\\\/';
19070const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
19071
19072/**
19073 * Posix glob regex
19074 */
19075
19076const DOT_LITERAL = '\\.';
19077const PLUS_LITERAL = '\\+';
19078const QMARK_LITERAL = '\\?';
19079const SLASH_LITERAL = '\\/';
19080const ONE_CHAR = '(?=.)';
19081const QMARK = '[^/]';
19082const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
19083const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
19084const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
19085const NO_DOT = `(?!${DOT_LITERAL})`;
19086const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
19087const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
19088const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
19089const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
19090const STAR = `${QMARK}*?`;
19091
19092const POSIX_CHARS = {
19093 DOT_LITERAL,
19094 PLUS_LITERAL,
19095 QMARK_LITERAL,
19096 SLASH_LITERAL,
19097 ONE_CHAR,
19098 QMARK,
19099 END_ANCHOR,
19100 DOTS_SLASH,
19101 NO_DOT,
19102 NO_DOTS,
19103 NO_DOT_SLASH,
19104 NO_DOTS_SLASH,
19105 QMARK_NO_DOT,
19106 STAR,
19107 START_ANCHOR
19108};
19109
19110/**
19111 * Windows glob regex
19112 */
19113
19114const WINDOWS_CHARS = {
19115 ...POSIX_CHARS,
19116
19117 SLASH_LITERAL: `[${WIN_SLASH}]`,
19118 QMARK: WIN_NO_SLASH,
19119 STAR: `${WIN_NO_SLASH}*?`,
19120 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
19121 NO_DOT: `(?!${DOT_LITERAL})`,
19122 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19123 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
19124 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19125 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
19126 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
19127 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
19128};
19129
19130/**
19131 * POSIX Bracket Regex
19132 */
19133
19134const POSIX_REGEX_SOURCE = {
19135 alnum: 'a-zA-Z0-9',
19136 alpha: 'a-zA-Z',
19137 ascii: '\\x00-\\x7F',
19138 blank: ' \\t',
19139 cntrl: '\\x00-\\x1F\\x7F',
19140 digit: '0-9',
19141 graph: '\\x21-\\x7E',
19142 lower: 'a-z',
19143 print: '\\x20-\\x7E ',
19144 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
19145 space: ' \\t\\r\\n\\v\\f',
19146 upper: 'A-Z',
19147 word: 'A-Za-z0-9_',
19148 xdigit: 'A-Fa-f0-9'
19149};
19150
19151module.exports = {
19152 MAX_LENGTH: 1024 * 64,
19153 POSIX_REGEX_SOURCE,
19154
19155 // regular expressions
19156 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
19157 REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
19158 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
19159 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
19160 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
19161 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
19162
19163 // Replace globs with equivalent patterns to reduce parsing time.
19164 REPLACEMENTS: {
19165 '***': '*',
19166 '**/**': '**',
19167 '**/**/**': '**'
19168 },
19169
19170 // Digits
19171 CHAR_0: 48, /* 0 */
19172 CHAR_9: 57, /* 9 */
19173
19174 // Alphabet chars.
19175 CHAR_UPPERCASE_A: 65, /* A */
19176 CHAR_LOWERCASE_A: 97, /* a */
19177 CHAR_UPPERCASE_Z: 90, /* Z */
19178 CHAR_LOWERCASE_Z: 122, /* z */
19179
19180 CHAR_LEFT_PARENTHESES: 40, /* ( */
19181 CHAR_RIGHT_PARENTHESES: 41, /* ) */
19182
19183 CHAR_ASTERISK: 42, /* * */
19184
19185 // Non-alphabetic chars.
19186 CHAR_AMPERSAND: 38, /* & */
19187 CHAR_AT: 64, /* @ */
19188 CHAR_BACKWARD_SLASH: 92, /* \ */
19189 CHAR_CARRIAGE_RETURN: 13, /* \r */
19190 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
19191 CHAR_COLON: 58, /* : */
19192 CHAR_COMMA: 44, /* , */
19193 CHAR_DOT: 46, /* . */
19194 CHAR_DOUBLE_QUOTE: 34, /* " */
19195 CHAR_EQUAL: 61, /* = */
19196 CHAR_EXCLAMATION_MARK: 33, /* ! */
19197 CHAR_FORM_FEED: 12, /* \f */
19198 CHAR_FORWARD_SLASH: 47, /* / */
19199 CHAR_GRAVE_ACCENT: 96, /* ` */
19200 CHAR_HASH: 35, /* # */
19201 CHAR_HYPHEN_MINUS: 45, /* - */
19202 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
19203 CHAR_LEFT_CURLY_BRACE: 123, /* { */
19204 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
19205 CHAR_LINE_FEED: 10, /* \n */
19206 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
19207 CHAR_PERCENT: 37, /* % */
19208 CHAR_PLUS: 43, /* + */
19209 CHAR_QUESTION_MARK: 63, /* ? */
19210 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
19211 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
19212 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
19213 CHAR_SEMICOLON: 59, /* ; */
19214 CHAR_SINGLE_QUOTE: 39, /* ' */
19215 CHAR_SPACE: 32, /* */
19216 CHAR_TAB: 9, /* \t */
19217 CHAR_UNDERSCORE: 95, /* _ */
19218 CHAR_VERTICAL_LINE: 124, /* | */
19219 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
19220
19221 SEP: path.sep,
19222
19223 /**
19224 * Create EXTGLOB_CHARS
19225 */
19226
19227 extglobChars(chars) {
19228 return {
19229 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
19230 '?': { type: 'qmark', open: '(?:', close: ')?' },
19231 '+': { type: 'plus', open: '(?:', close: ')+' },
19232 '*': { type: 'star', open: '(?:', close: ')*' },
19233 '@': { type: 'at', open: '(?:', close: ')' }
19234 };
19235 },
19236
19237 /**
19238 * Create GLOB_CHARS
19239 */
19240
19241 globChars(win32) {
19242 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
19243 }
19244};
19245
19246
19247/***/ }),
19248/* 93 */
19249/***/ (function(module, exports, __webpack_require__) {
19250
19251"use strict";
19252
19253
19254const constants = __webpack_require__(92);
19255const utils = __webpack_require__(91);
19256
19257/**
19258 * Constants
19259 */
19260
19261const {
19262 MAX_LENGTH,
19263 POSIX_REGEX_SOURCE,
19264 REGEX_NON_SPECIAL_CHARS,
19265 REGEX_SPECIAL_CHARS_BACKREF,
19266 REPLACEMENTS
19267} = constants;
19268
19269/**
19270 * Helpers
19271 */
19272
19273const expandRange = (args, options) => {
19274 if (typeof options.expandRange === 'function') {
19275 return options.expandRange(...args, options);
19276 }
19277
19278 args.sort();
19279 const value = `[${args.join('-')}]`;
19280
19281 try {
19282 /* eslint-disable-next-line no-new */
19283 new RegExp(value);
19284 } catch (ex) {
19285 return args.map(v => utils.escapeRegex(v)).join('..');
19286 }
19287
19288 return value;
19289};
19290
19291/**
19292 * Create the message for a syntax error
19293 */
19294
19295const syntaxError = (type, char) => {
19296 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
19297};
19298
19299/**
19300 * Parse the given input string.
19301 * @param {String} input
19302 * @param {Object} options
19303 * @return {Object}
19304 */
19305
19306const parse = (input, options) => {
19307 if (typeof input !== 'string') {
19308 throw new TypeError('Expected a string');
19309 }
19310
19311 input = REPLACEMENTS[input] || input;
19312
19313 const opts = { ...options };
19314 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
19315
19316 let len = input.length;
19317 if (len > max) {
19318 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
19319 }
19320
19321 const bos = { type: 'bos', value: '', output: opts.prepend || '' };
19322 const tokens = [bos];
19323
19324 const capture = opts.capture ? '' : '?:';
19325 const win32 = utils.isWindows(options);
19326
19327 // create constants based on platform, for windows or posix
19328 const PLATFORM_CHARS = constants.globChars(win32);
19329 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
19330
19331 const {
19332 DOT_LITERAL,
19333 PLUS_LITERAL,
19334 SLASH_LITERAL,
19335 ONE_CHAR,
19336 DOTS_SLASH,
19337 NO_DOT,
19338 NO_DOT_SLASH,
19339 NO_DOTS_SLASH,
19340 QMARK,
19341 QMARK_NO_DOT,
19342 STAR,
19343 START_ANCHOR
19344 } = PLATFORM_CHARS;
19345
19346 const globstar = (opts) => {
19347 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
19348 };
19349
19350 const nodot = opts.dot ? '' : NO_DOT;
19351 const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
19352 let star = opts.bash === true ? globstar(opts) : STAR;
19353
19354 if (opts.capture) {
19355 star = `(${star})`;
19356 }
19357
19358 // minimatch options support
19359 if (typeof opts.noext === 'boolean') {
19360 opts.noextglob = opts.noext;
19361 }
19362
19363 const state = {
19364 input,
19365 index: -1,
19366 start: 0,
19367 dot: opts.dot === true,
19368 consumed: '',
19369 output: '',
19370 prefix: '',
19371 backtrack: false,
19372 negated: false,
19373 brackets: 0,
19374 braces: 0,
19375 parens: 0,
19376 quotes: 0,
19377 globstar: false,
19378 tokens
19379 };
19380
19381 input = utils.removePrefix(input, state);
19382 len = input.length;
19383
19384 const extglobs = [];
19385 const braces = [];
19386 const stack = [];
19387 let prev = bos;
19388 let value;
19389
19390 /**
19391 * Tokenizing helpers
19392 */
19393
19394 const eos = () => state.index === len - 1;
19395 const peek = state.peek = (n = 1) => input[state.index + n];
19396 const advance = state.advance = () => input[++state.index];
19397 const remaining = () => input.slice(state.index + 1);
19398 const consume = (value = '', num = 0) => {
19399 state.consumed += value;
19400 state.index += num;
19401 };
19402 const append = token => {
19403 state.output += token.output != null ? token.output : token.value;
19404 consume(token.value);
19405 };
19406
19407 const negate = () => {
19408 let count = 1;
19409
19410 while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
19411 advance();
19412 state.start++;
19413 count++;
19414 }
19415
19416 if (count % 2 === 0) {
19417 return false;
19418 }
19419
19420 state.negated = true;
19421 state.start++;
19422 return true;
19423 };
19424
19425 const increment = type => {
19426 state[type]++;
19427 stack.push(type);
19428 };
19429
19430 const decrement = type => {
19431 state[type]--;
19432 stack.pop();
19433 };
19434
19435 /**
19436 * Push tokens onto the tokens array. This helper speeds up
19437 * tokenizing by 1) helping us avoid backtracking as much as possible,
19438 * and 2) helping us avoid creating extra tokens when consecutive
19439 * characters are plain text. This improves performance and simplifies
19440 * lookbehinds.
19441 */
19442
19443 const push = tok => {
19444 if (prev.type === 'globstar') {
19445 const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
19446 const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
19447
19448 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
19449 state.output = state.output.slice(0, -prev.output.length);
19450 prev.type = 'star';
19451 prev.value = '*';
19452 prev.output = star;
19453 state.output += prev.output;
19454 }
19455 }
19456
19457 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
19458 extglobs[extglobs.length - 1].inner += tok.value;
19459 }
19460
19461 if (tok.value || tok.output) append(tok);
19462 if (prev && prev.type === 'text' && tok.type === 'text') {
19463 prev.value += tok.value;
19464 prev.output = (prev.output || '') + tok.value;
19465 return;
19466 }
19467
19468 tok.prev = prev;
19469 tokens.push(tok);
19470 prev = tok;
19471 };
19472
19473 const extglobOpen = (type, value) => {
19474 const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
19475
19476 token.prev = prev;
19477 token.parens = state.parens;
19478 token.output = state.output;
19479 const output = (opts.capture ? '(' : '') + token.open;
19480
19481 increment('parens');
19482 push({ type, value, output: state.output ? '' : ONE_CHAR });
19483 push({ type: 'paren', extglob: true, value: advance(), output });
19484 extglobs.push(token);
19485 };
19486
19487 const extglobClose = token => {
19488 let output = token.close + (opts.capture ? ')' : '');
19489
19490 if (token.type === 'negate') {
19491 let extglobStar = star;
19492
19493 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
19494 extglobStar = globstar(opts);
19495 }
19496
19497 if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
19498 output = token.close = `)$))${extglobStar}`;
19499 }
19500
19501 if (token.prev.type === 'bos' && eos()) {
19502 state.negatedExtglob = true;
19503 }
19504 }
19505
19506 push({ type: 'paren', extglob: true, value, output });
19507 decrement('parens');
19508 };
19509
19510 /**
19511 * Fast paths
19512 */
19513
19514 if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
19515 let backslashes = false;
19516
19517 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
19518 if (first === '\\') {
19519 backslashes = true;
19520 return m;
19521 }
19522
19523 if (first === '?') {
19524 if (esc) {
19525 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
19526 }
19527 if (index === 0) {
19528 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
19529 }
19530 return QMARK.repeat(chars.length);
19531 }
19532
19533 if (first === '.') {
19534 return DOT_LITERAL.repeat(chars.length);
19535 }
19536
19537 if (first === '*') {
19538 if (esc) {
19539 return esc + first + (rest ? star : '');
19540 }
19541 return star;
19542 }
19543 return esc ? m : `\\${m}`;
19544 });
19545
19546 if (backslashes === true) {
19547 if (opts.unescape === true) {
19548 output = output.replace(/\\/g, '');
19549 } else {
19550 output = output.replace(/\\+/g, m => {
19551 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
19552 });
19553 }
19554 }
19555
19556 if (output === input && opts.contains === true) {
19557 state.output = input;
19558 return state;
19559 }
19560
19561 state.output = utils.wrapOutput(output, state, options);
19562 return state;
19563 }
19564
19565 /**
19566 * Tokenize input until we reach end-of-string
19567 */
19568
19569 while (!eos()) {
19570 value = advance();
19571
19572 if (value === '\u0000') {
19573 continue;
19574 }
19575
19576 /**
19577 * Escaped characters
19578 */
19579
19580 if (value === '\\') {
19581 const next = peek();
19582
19583 if (next === '/' && opts.bash !== true) {
19584 continue;
19585 }
19586
19587 if (next === '.' || next === ';') {
19588 continue;
19589 }
19590
19591 if (!next) {
19592 value += '\\';
19593 push({ type: 'text', value });
19594 continue;
19595 }
19596
19597 // collapse slashes to reduce potential for exploits
19598 const match = /^\\+/.exec(remaining());
19599 let slashes = 0;
19600
19601 if (match && match[0].length > 2) {
19602 slashes = match[0].length;
19603 state.index += slashes;
19604 if (slashes % 2 !== 0) {
19605 value += '\\';
19606 }
19607 }
19608
19609 if (opts.unescape === true) {
19610 value = advance() || '';
19611 } else {
19612 value += advance() || '';
19613 }
19614
19615 if (state.brackets === 0) {
19616 push({ type: 'text', value });
19617 continue;
19618 }
19619 }
19620
19621 /**
19622 * If we're inside a regex character class, continue
19623 * until we reach the closing bracket.
19624 */
19625
19626 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
19627 if (opts.posix !== false && value === ':') {
19628 const inner = prev.value.slice(1);
19629 if (inner.includes('[')) {
19630 prev.posix = true;
19631
19632 if (inner.includes(':')) {
19633 const idx = prev.value.lastIndexOf('[');
19634 const pre = prev.value.slice(0, idx);
19635 const rest = prev.value.slice(idx + 2);
19636 const posix = POSIX_REGEX_SOURCE[rest];
19637 if (posix) {
19638 prev.value = pre + posix;
19639 state.backtrack = true;
19640 advance();
19641
19642 if (!bos.output && tokens.indexOf(prev) === 1) {
19643 bos.output = ONE_CHAR;
19644 }
19645 continue;
19646 }
19647 }
19648 }
19649 }
19650
19651 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
19652 value = `\\${value}`;
19653 }
19654
19655 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
19656 value = `\\${value}`;
19657 }
19658
19659 if (opts.posix === true && value === '!' && prev.value === '[') {
19660 value = '^';
19661 }
19662
19663 prev.value += value;
19664 append({ value });
19665 continue;
19666 }
19667
19668 /**
19669 * If we're inside a quoted string, continue
19670 * until we reach the closing double quote.
19671 */
19672
19673 if (state.quotes === 1 && value !== '"') {
19674 value = utils.escapeRegex(value);
19675 prev.value += value;
19676 append({ value });
19677 continue;
19678 }
19679
19680 /**
19681 * Double quotes
19682 */
19683
19684 if (value === '"') {
19685 state.quotes = state.quotes === 1 ? 0 : 1;
19686 if (opts.keepQuotes === true) {
19687 push({ type: 'text', value });
19688 }
19689 continue;
19690 }
19691
19692 /**
19693 * Parentheses
19694 */
19695
19696 if (value === '(') {
19697 increment('parens');
19698 push({ type: 'paren', value });
19699 continue;
19700 }
19701
19702 if (value === ')') {
19703 if (state.parens === 0 && opts.strictBrackets === true) {
19704 throw new SyntaxError(syntaxError('opening', '('));
19705 }
19706
19707 const extglob = extglobs[extglobs.length - 1];
19708 if (extglob && state.parens === extglob.parens + 1) {
19709 extglobClose(extglobs.pop());
19710 continue;
19711 }
19712
19713 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
19714 decrement('parens');
19715 continue;
19716 }
19717
19718 /**
19719 * Square brackets
19720 */
19721
19722 if (value === '[') {
19723 if (opts.nobracket === true || !remaining().includes(']')) {
19724 if (opts.nobracket !== true && opts.strictBrackets === true) {
19725 throw new SyntaxError(syntaxError('closing', ']'));
19726 }
19727
19728 value = `\\${value}`;
19729 } else {
19730 increment('brackets');
19731 }
19732
19733 push({ type: 'bracket', value });
19734 continue;
19735 }
19736
19737 if (value === ']') {
19738 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
19739 push({ type: 'text', value, output: `\\${value}` });
19740 continue;
19741 }
19742
19743 if (state.brackets === 0) {
19744 if (opts.strictBrackets === true) {
19745 throw new SyntaxError(syntaxError('opening', '['));
19746 }
19747
19748 push({ type: 'text', value, output: `\\${value}` });
19749 continue;
19750 }
19751
19752 decrement('brackets');
19753
19754 const prevValue = prev.value.slice(1);
19755 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
19756 value = `/${value}`;
19757 }
19758
19759 prev.value += value;
19760 append({ value });
19761
19762 // when literal brackets are explicitly disabled
19763 // assume we should match with a regex character class
19764 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
19765 continue;
19766 }
19767
19768 const escaped = utils.escapeRegex(prev.value);
19769 state.output = state.output.slice(0, -prev.value.length);
19770
19771 // when literal brackets are explicitly enabled
19772 // assume we should escape the brackets to match literal characters
19773 if (opts.literalBrackets === true) {
19774 state.output += escaped;
19775 prev.value = escaped;
19776 continue;
19777 }
19778
19779 // when the user specifies nothing, try to match both
19780 prev.value = `(${capture}${escaped}|${prev.value})`;
19781 state.output += prev.value;
19782 continue;
19783 }
19784
19785 /**
19786 * Braces
19787 */
19788
19789 if (value === '{' && opts.nobrace !== true) {
19790 increment('braces');
19791
19792 const open = {
19793 type: 'brace',
19794 value,
19795 output: '(',
19796 outputIndex: state.output.length,
19797 tokensIndex: state.tokens.length
19798 };
19799
19800 braces.push(open);
19801 push(open);
19802 continue;
19803 }
19804
19805 if (value === '}') {
19806 const brace = braces[braces.length - 1];
19807
19808 if (opts.nobrace === true || !brace) {
19809 push({ type: 'text', value, output: value });
19810 continue;
19811 }
19812
19813 let output = ')';
19814
19815 if (brace.dots === true) {
19816 const arr = tokens.slice();
19817 const range = [];
19818
19819 for (let i = arr.length - 1; i >= 0; i--) {
19820 tokens.pop();
19821 if (arr[i].type === 'brace') {
19822 break;
19823 }
19824 if (arr[i].type !== 'dots') {
19825 range.unshift(arr[i].value);
19826 }
19827 }
19828
19829 output = expandRange(range, opts);
19830 state.backtrack = true;
19831 }
19832
19833 if (brace.comma !== true && brace.dots !== true) {
19834 const out = state.output.slice(0, brace.outputIndex);
19835 const toks = state.tokens.slice(brace.tokensIndex);
19836 brace.value = brace.output = '\\{';
19837 value = output = '\\}';
19838 state.output = out;
19839 for (const t of toks) {
19840 state.output += (t.output || t.value);
19841 }
19842 }
19843
19844 push({ type: 'brace', value, output });
19845 decrement('braces');
19846 braces.pop();
19847 continue;
19848 }
19849
19850 /**
19851 * Pipes
19852 */
19853
19854 if (value === '|') {
19855 if (extglobs.length > 0) {
19856 extglobs[extglobs.length - 1].conditions++;
19857 }
19858 push({ type: 'text', value });
19859 continue;
19860 }
19861
19862 /**
19863 * Commas
19864 */
19865
19866 if (value === ',') {
19867 let output = value;
19868
19869 const brace = braces[braces.length - 1];
19870 if (brace && stack[stack.length - 1] === 'braces') {
19871 brace.comma = true;
19872 output = '|';
19873 }
19874
19875 push({ type: 'comma', value, output });
19876 continue;
19877 }
19878
19879 /**
19880 * Slashes
19881 */
19882
19883 if (value === '/') {
19884 // if the beginning of the glob is "./", advance the start
19885 // to the current index, and don't add the "./" characters
19886 // to the state. This greatly simplifies lookbehinds when
19887 // checking for BOS characters like "!" and "." (not "./")
19888 if (prev.type === 'dot' && state.index === state.start + 1) {
19889 state.start = state.index + 1;
19890 state.consumed = '';
19891 state.output = '';
19892 tokens.pop();
19893 prev = bos; // reset "prev" to the first token
19894 continue;
19895 }
19896
19897 push({ type: 'slash', value, output: SLASH_LITERAL });
19898 continue;
19899 }
19900
19901 /**
19902 * Dots
19903 */
19904
19905 if (value === '.') {
19906 if (state.braces > 0 && prev.type === 'dot') {
19907 if (prev.value === '.') prev.output = DOT_LITERAL;
19908 const brace = braces[braces.length - 1];
19909 prev.type = 'dots';
19910 prev.output += value;
19911 prev.value += value;
19912 brace.dots = true;
19913 continue;
19914 }
19915
19916 if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
19917 push({ type: 'text', value, output: DOT_LITERAL });
19918 continue;
19919 }
19920
19921 push({ type: 'dot', value, output: DOT_LITERAL });
19922 continue;
19923 }
19924
19925 /**
19926 * Question marks
19927 */
19928
19929 if (value === '?') {
19930 const isGroup = prev && prev.value === '(';
19931 if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19932 extglobOpen('qmark', value);
19933 continue;
19934 }
19935
19936 if (prev && prev.type === 'paren') {
19937 const next = peek();
19938 let output = value;
19939
19940 if (next === '<' && !utils.supportsLookbehinds()) {
19941 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
19942 }
19943
19944 if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
19945 output = `\\${value}`;
19946 }
19947
19948 push({ type: 'text', value, output });
19949 continue;
19950 }
19951
19952 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
19953 push({ type: 'qmark', value, output: QMARK_NO_DOT });
19954 continue;
19955 }
19956
19957 push({ type: 'qmark', value, output: QMARK });
19958 continue;
19959 }
19960
19961 /**
19962 * Exclamation
19963 */
19964
19965 if (value === '!') {
19966 if (opts.noextglob !== true && peek() === '(') {
19967 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
19968 extglobOpen('negate', value);
19969 continue;
19970 }
19971 }
19972
19973 if (opts.nonegate !== true && state.index === 0) {
19974 negate();
19975 continue;
19976 }
19977 }
19978
19979 /**
19980 * Plus
19981 */
19982
19983 if (value === '+') {
19984 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19985 extglobOpen('plus', value);
19986 continue;
19987 }
19988
19989 if ((prev && prev.value === '(') || opts.regex === false) {
19990 push({ type: 'plus', value, output: PLUS_LITERAL });
19991 continue;
19992 }
19993
19994 if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
19995 push({ type: 'plus', value });
19996 continue;
19997 }
19998
19999 push({ type: 'plus', value: PLUS_LITERAL });
20000 continue;
20001 }
20002
20003 /**
20004 * Plain text
20005 */
20006
20007 if (value === '@') {
20008 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
20009 push({ type: 'at', extglob: true, value, output: '' });
20010 continue;
20011 }
20012
20013 push({ type: 'text', value });
20014 continue;
20015 }
20016
20017 /**
20018 * Plain text
20019 */
20020
20021 if (value !== '*') {
20022 if (value === '$' || value === '^') {
20023 value = `\\${value}`;
20024 }
20025
20026 const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
20027 if (match) {
20028 value += match[0];
20029 state.index += match[0].length;
20030 }
20031
20032 push({ type: 'text', value });
20033 continue;
20034 }
20035
20036 /**
20037 * Stars
20038 */
20039
20040 if (prev && (prev.type === 'globstar' || prev.star === true)) {
20041 prev.type = 'star';
20042 prev.star = true;
20043 prev.value += value;
20044 prev.output = star;
20045 state.backtrack = true;
20046 state.globstar = true;
20047 consume(value);
20048 continue;
20049 }
20050
20051 let rest = remaining();
20052 if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
20053 extglobOpen('star', value);
20054 continue;
20055 }
20056
20057 if (prev.type === 'star') {
20058 if (opts.noglobstar === true) {
20059 consume(value);
20060 continue;
20061 }
20062
20063 const prior = prev.prev;
20064 const before = prior.prev;
20065 const isStart = prior.type === 'slash' || prior.type === 'bos';
20066 const afterStar = before && (before.type === 'star' || before.type === 'globstar');
20067
20068 if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
20069 push({ type: 'star', value, output: '' });
20070 continue;
20071 }
20072
20073 const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
20074 const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
20075 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
20076 push({ type: 'star', value, output: '' });
20077 continue;
20078 }
20079
20080 // strip consecutive `/**/`
20081 while (rest.slice(0, 3) === '/**') {
20082 const after = input[state.index + 4];
20083 if (after && after !== '/') {
20084 break;
20085 }
20086 rest = rest.slice(3);
20087 consume('/**', 3);
20088 }
20089
20090 if (prior.type === 'bos' && eos()) {
20091 prev.type = 'globstar';
20092 prev.value += value;
20093 prev.output = globstar(opts);
20094 state.output = prev.output;
20095 state.globstar = true;
20096 consume(value);
20097 continue;
20098 }
20099
20100 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
20101 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20102 prior.output = `(?:${prior.output}`;
20103
20104 prev.type = 'globstar';
20105 prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
20106 prev.value += value;
20107 state.globstar = true;
20108 state.output += prior.output + prev.output;
20109 consume(value);
20110 continue;
20111 }
20112
20113 if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
20114 const end = rest[1] !== void 0 ? '|$' : '';
20115
20116 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20117 prior.output = `(?:${prior.output}`;
20118
20119 prev.type = 'globstar';
20120 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
20121 prev.value += value;
20122
20123 state.output += prior.output + prev.output;
20124 state.globstar = true;
20125
20126 consume(value + advance());
20127
20128 push({ type: 'slash', value: '/', output: '' });
20129 continue;
20130 }
20131
20132 if (prior.type === 'bos' && rest[0] === '/') {
20133 prev.type = 'globstar';
20134 prev.value += value;
20135 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
20136 state.output = prev.output;
20137 state.globstar = true;
20138 consume(value + advance());
20139 push({ type: 'slash', value: '/', output: '' });
20140 continue;
20141 }
20142
20143 // remove single star from output
20144 state.output = state.output.slice(0, -prev.output.length);
20145
20146 // reset previous token to globstar
20147 prev.type = 'globstar';
20148 prev.output = globstar(opts);
20149 prev.value += value;
20150
20151 // reset output with globstar
20152 state.output += prev.output;
20153 state.globstar = true;
20154 consume(value);
20155 continue;
20156 }
20157
20158 const token = { type: 'star', value, output: star };
20159
20160 if (opts.bash === true) {
20161 token.output = '.*?';
20162 if (prev.type === 'bos' || prev.type === 'slash') {
20163 token.output = nodot + token.output;
20164 }
20165 push(token);
20166 continue;
20167 }
20168
20169 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
20170 token.output = value;
20171 push(token);
20172 continue;
20173 }
20174
20175 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
20176 if (prev.type === 'dot') {
20177 state.output += NO_DOT_SLASH;
20178 prev.output += NO_DOT_SLASH;
20179
20180 } else if (opts.dot === true) {
20181 state.output += NO_DOTS_SLASH;
20182 prev.output += NO_DOTS_SLASH;
20183
20184 } else {
20185 state.output += nodot;
20186 prev.output += nodot;
20187 }
20188
20189 if (peek() !== '*') {
20190 state.output += ONE_CHAR;
20191 prev.output += ONE_CHAR;
20192 }
20193 }
20194
20195 push(token);
20196 }
20197
20198 while (state.brackets > 0) {
20199 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
20200 state.output = utils.escapeLast(state.output, '[');
20201 decrement('brackets');
20202 }
20203
20204 while (state.parens > 0) {
20205 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
20206 state.output = utils.escapeLast(state.output, '(');
20207 decrement('parens');
20208 }
20209
20210 while (state.braces > 0) {
20211 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
20212 state.output = utils.escapeLast(state.output, '{');
20213 decrement('braces');
20214 }
20215
20216 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
20217 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
20218 }
20219
20220 // rebuild the output if we had to backtrack at any point
20221 if (state.backtrack === true) {
20222 state.output = '';
20223
20224 for (const token of state.tokens) {
20225 state.output += token.output != null ? token.output : token.value;
20226
20227 if (token.suffix) {
20228 state.output += token.suffix;
20229 }
20230 }
20231 }
20232
20233 return state;
20234};
20235
20236/**
20237 * Fast paths for creating regular expressions for common glob patterns.
20238 * This can significantly speed up processing and has very little downside
20239 * impact when none of the fast paths match.
20240 */
20241
20242parse.fastpaths = (input, options) => {
20243 const opts = { ...options };
20244 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
20245 const len = input.length;
20246 if (len > max) {
20247 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
20248 }
20249
20250 input = REPLACEMENTS[input] || input;
20251 const win32 = utils.isWindows(options);
20252
20253 // create constants based on platform, for windows or posix
20254 const {
20255 DOT_LITERAL,
20256 SLASH_LITERAL,
20257 ONE_CHAR,
20258 DOTS_SLASH,
20259 NO_DOT,
20260 NO_DOTS,
20261 NO_DOTS_SLASH,
20262 STAR,
20263 START_ANCHOR
20264 } = constants.globChars(win32);
20265
20266 const nodot = opts.dot ? NO_DOTS : NO_DOT;
20267 const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
20268 const capture = opts.capture ? '' : '?:';
20269 const state = { negated: false, prefix: '' };
20270 let star = opts.bash === true ? '.*?' : STAR;
20271
20272 if (opts.capture) {
20273 star = `(${star})`;
20274 }
20275
20276 const globstar = (opts) => {
20277 if (opts.noglobstar === true) return star;
20278 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
20279 };
20280
20281 const create = str => {
20282 switch (str) {
20283 case '*':
20284 return `${nodot}${ONE_CHAR}${star}`;
20285
20286 case '.*':
20287 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
20288
20289 case '*.*':
20290 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20291
20292 case '*/*':
20293 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
20294
20295 case '**':
20296 return nodot + globstar(opts);
20297
20298 case '**/*':
20299 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
20300
20301 case '**/*.*':
20302 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20303
20304 case '**/.*':
20305 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
20306
20307 default: {
20308 const match = /^(.*?)\.(\w+)$/.exec(str);
20309 if (!match) return;
20310
20311 const source = create(match[1]);
20312 if (!source) return;
20313
20314 return source + DOT_LITERAL + match[2];
20315 }
20316 }
20317 };
20318
20319 const output = utils.removePrefix(input, state);
20320 let source = create(output);
20321
20322 if (source && opts.strictSlashes !== true) {
20323 source += `${SLASH_LITERAL}?`;
20324 }
20325
20326 return source;
20327};
20328
20329module.exports = parse;
20330
20331
20332/***/ }),
20333/* 94 */
20334/***/ (function(module, exports, __webpack_require__) {
20335
20336"use strict";
20337
20338Object.defineProperty(exports, "__esModule", { value: true });
20339const merge2 = __webpack_require__(95);
20340function merge(streams) {
20341 const mergedStream = merge2(streams);
20342 streams.forEach((stream) => {
20343 stream.once('error', (error) => mergedStream.emit('error', error));
20344 });
20345 mergedStream.once('close', () => propagateCloseEventToSources(streams));
20346 mergedStream.once('end', () => propagateCloseEventToSources(streams));
20347 return mergedStream;
20348}
20349exports.merge = merge;
20350function propagateCloseEventToSources(streams) {
20351 streams.forEach((stream) => stream.emit('close'));
20352}
20353
20354
20355/***/ }),
20356/* 95 */
20357/***/ (function(module, exports, __webpack_require__) {
20358
20359"use strict";
20360
20361/*
20362 * merge2
20363 * https://github.com/teambition/merge2
20364 *
20365 * Copyright (c) 2014-2016 Teambition
20366 * Licensed under the MIT license.
20367 */
20368const Stream = __webpack_require__(96)
20369const PassThrough = Stream.PassThrough
20370const slice = Array.prototype.slice
20371
20372module.exports = merge2
20373
20374function merge2 () {
20375 const streamsQueue = []
20376 let merging = false
20377 const args = slice.call(arguments)
20378 let options = args[args.length - 1]
20379
20380 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
20381 else options = {}
20382
20383 const doEnd = options.end !== false
20384 if (options.objectMode == null) options.objectMode = true
20385 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
20386 const mergedStream = PassThrough(options)
20387
20388 function addStream () {
20389 for (let i = 0, len = arguments.length; i < len; i++) {
20390 streamsQueue.push(pauseStreams(arguments[i], options))
20391 }
20392 mergeStream()
20393 return this
20394 }
20395
20396 function mergeStream () {
20397 if (merging) return
20398 merging = true
20399
20400 let streams = streamsQueue.shift()
20401 if (!streams) {
20402 process.nextTick(endStream)
20403 return
20404 }
20405 if (!Array.isArray(streams)) streams = [streams]
20406
20407 let pipesCount = streams.length + 1
20408
20409 function next () {
20410 if (--pipesCount > 0) return
20411 merging = false
20412 mergeStream()
20413 }
20414
20415 function pipe (stream) {
20416 function onend () {
20417 stream.removeListener('merge2UnpipeEnd', onend)
20418 stream.removeListener('end', onend)
20419 next()
20420 }
20421 // skip ended stream
20422 if (stream._readableState.endEmitted) return next()
20423
20424 stream.on('merge2UnpipeEnd', onend)
20425 stream.on('end', onend)
20426 stream.pipe(mergedStream, { end: false })
20427 // compatible for old stream
20428 stream.resume()
20429 }
20430
20431 for (let i = 0; i < streams.length; i++) pipe(streams[i])
20432
20433 next()
20434 }
20435
20436 function endStream () {
20437 merging = false
20438 // emit 'queueDrain' when all streams merged.
20439 mergedStream.emit('queueDrain')
20440 return doEnd && mergedStream.end()
20441 }
20442
20443 mergedStream.setMaxListeners(0)
20444 mergedStream.add = addStream
20445 mergedStream.on('unpipe', function (stream) {
20446 stream.emit('merge2UnpipeEnd')
20447 })
20448
20449 if (args.length) addStream.apply(null, args)
20450 return mergedStream
20451}
20452
20453// check and pause streams for pipe.
20454function pauseStreams (streams, options) {
20455 if (!Array.isArray(streams)) {
20456 // Backwards-compat with old-style streams
20457 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
20458 if (!streams._readableState || !streams.pause || !streams.pipe) {
20459 throw new Error('Only readable stream can be merged.')
20460 }
20461 streams.pause()
20462 } else {
20463 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
20464 }
20465 return streams
20466}
20467
20468
20469/***/ }),
20470/* 96 */
20471/***/ (function(module, exports) {
20472
20473module.exports = require("stream");
20474
20475/***/ }),
20476/* 97 */
20477/***/ (function(module, exports, __webpack_require__) {
20478
20479"use strict";
20480
20481Object.defineProperty(exports, "__esModule", { value: true });
20482function isString(input) {
20483 return typeof input === 'string';
20484}
20485exports.isString = isString;
20486function isEmpty(input) {
20487 return input === '';
20488}
20489exports.isEmpty = isEmpty;
20490
20491
20492/***/ }),
20493/* 98 */
20494/***/ (function(module, exports, __webpack_require__) {
20495
20496"use strict";
20497
20498Object.defineProperty(exports, "__esModule", { value: true });
20499const stream_1 = __webpack_require__(99);
20500const provider_1 = __webpack_require__(126);
20501class ProviderAsync extends provider_1.default {
20502 constructor() {
20503 super(...arguments);
20504 this._reader = new stream_1.default(this._settings);
20505 }
20506 read(task) {
20507 const root = this._getRootDirectory(task);
20508 const options = this._getReaderOptions(task);
20509 const entries = [];
20510 return new Promise((resolve, reject) => {
20511 const stream = this.api(root, task, options);
20512 stream.once('error', reject);
20513 stream.on('data', (entry) => entries.push(options.transform(entry)));
20514 stream.once('end', () => resolve(entries));
20515 });
20516 }
20517 api(root, task, options) {
20518 if (task.dynamic) {
20519 return this._reader.dynamic(root, options);
20520 }
20521 return this._reader.static(task.patterns, options);
20522 }
20523}
20524exports.default = ProviderAsync;
20525
20526
20527/***/ }),
20528/* 99 */
20529/***/ (function(module, exports, __webpack_require__) {
20530
20531"use strict";
20532
20533Object.defineProperty(exports, "__esModule", { value: true });
20534const stream_1 = __webpack_require__(96);
20535const fsStat = __webpack_require__(100);
20536const fsWalk = __webpack_require__(105);
20537const reader_1 = __webpack_require__(125);
20538class ReaderStream extends reader_1.default {
20539 constructor() {
20540 super(...arguments);
20541 this._walkStream = fsWalk.walkStream;
20542 this._stat = fsStat.stat;
20543 }
20544 dynamic(root, options) {
20545 return this._walkStream(root, options);
20546 }
20547 static(patterns, options) {
20548 const filepaths = patterns.map(this._getFullEntryPath, this);
20549 const stream = new stream_1.PassThrough({ objectMode: true });
20550 stream._write = (index, _enc, done) => {
20551 return this._getEntry(filepaths[index], patterns[index], options)
20552 .then((entry) => {
20553 if (entry !== null && options.entryFilter(entry)) {
20554 stream.push(entry);
20555 }
20556 if (index === filepaths.length - 1) {
20557 stream.end();
20558 }
20559 done();
20560 })
20561 .catch(done);
20562 };
20563 for (let i = 0; i < filepaths.length; i++) {
20564 stream.write(i);
20565 }
20566 return stream;
20567 }
20568 _getEntry(filepath, pattern, options) {
20569 return this._getStat(filepath)
20570 .then((stats) => this._makeEntry(stats, pattern))
20571 .catch((error) => {
20572 if (options.errorFilter(error)) {
20573 return null;
20574 }
20575 throw error;
20576 });
20577 }
20578 _getStat(filepath) {
20579 return new Promise((resolve, reject) => {
20580 this._stat(filepath, this._fsStatSettings, (error, stats) => {
20581 return error === null ? resolve(stats) : reject(error);
20582 });
20583 });
20584 }
20585}
20586exports.default = ReaderStream;
20587
20588
20589/***/ }),
20590/* 100 */
20591/***/ (function(module, exports, __webpack_require__) {
20592
20593"use strict";
20594
20595Object.defineProperty(exports, "__esModule", { value: true });
20596const async = __webpack_require__(101);
20597const sync = __webpack_require__(102);
20598const settings_1 = __webpack_require__(103);
20599exports.Settings = settings_1.default;
20600function stat(path, optionsOrSettingsOrCallback, callback) {
20601 if (typeof optionsOrSettingsOrCallback === 'function') {
20602 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20603 }
20604 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20605}
20606exports.stat = stat;
20607function statSync(path, optionsOrSettings) {
20608 const settings = getSettings(optionsOrSettings);
20609 return sync.read(path, settings);
20610}
20611exports.statSync = statSync;
20612function getSettings(settingsOrOptions = {}) {
20613 if (settingsOrOptions instanceof settings_1.default) {
20614 return settingsOrOptions;
20615 }
20616 return new settings_1.default(settingsOrOptions);
20617}
20618
20619
20620/***/ }),
20621/* 101 */
20622/***/ (function(module, exports, __webpack_require__) {
20623
20624"use strict";
20625
20626Object.defineProperty(exports, "__esModule", { value: true });
20627function read(path, settings, callback) {
20628 settings.fs.lstat(path, (lstatError, lstat) => {
20629 if (lstatError !== null) {
20630 return callFailureCallback(callback, lstatError);
20631 }
20632 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20633 return callSuccessCallback(callback, lstat);
20634 }
20635 settings.fs.stat(path, (statError, stat) => {
20636 if (statError !== null) {
20637 if (settings.throwErrorOnBrokenSymbolicLink) {
20638 return callFailureCallback(callback, statError);
20639 }
20640 return callSuccessCallback(callback, lstat);
20641 }
20642 if (settings.markSymbolicLink) {
20643 stat.isSymbolicLink = () => true;
20644 }
20645 callSuccessCallback(callback, stat);
20646 });
20647 });
20648}
20649exports.read = read;
20650function callFailureCallback(callback, error) {
20651 callback(error);
20652}
20653function callSuccessCallback(callback, result) {
20654 callback(null, result);
20655}
20656
20657
20658/***/ }),
20659/* 102 */
20660/***/ (function(module, exports, __webpack_require__) {
20661
20662"use strict";
20663
20664Object.defineProperty(exports, "__esModule", { value: true });
20665function read(path, settings) {
20666 const lstat = settings.fs.lstatSync(path);
20667 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20668 return lstat;
20669 }
20670 try {
20671 const stat = settings.fs.statSync(path);
20672 if (settings.markSymbolicLink) {
20673 stat.isSymbolicLink = () => true;
20674 }
20675 return stat;
20676 }
20677 catch (error) {
20678 if (!settings.throwErrorOnBrokenSymbolicLink) {
20679 return lstat;
20680 }
20681 throw error;
20682 }
20683}
20684exports.read = read;
20685
20686
20687/***/ }),
20688/* 103 */
20689/***/ (function(module, exports, __webpack_require__) {
20690
20691"use strict";
20692
20693Object.defineProperty(exports, "__esModule", { value: true });
20694const fs = __webpack_require__(104);
20695class Settings {
20696 constructor(_options = {}) {
20697 this._options = _options;
20698 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
20699 this.fs = fs.createFileSystemAdapter(this._options.fs);
20700 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
20701 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
20702 }
20703 _getValue(option, value) {
20704 return option === undefined ? value : option;
20705 }
20706}
20707exports.default = Settings;
20708
20709
20710/***/ }),
20711/* 104 */
20712/***/ (function(module, exports, __webpack_require__) {
20713
20714"use strict";
20715
20716Object.defineProperty(exports, "__esModule", { value: true });
20717const fs = __webpack_require__(40);
20718exports.FILE_SYSTEM_ADAPTER = {
20719 lstat: fs.lstat,
20720 stat: fs.stat,
20721 lstatSync: fs.lstatSync,
20722 statSync: fs.statSync
20723};
20724function createFileSystemAdapter(fsMethods) {
20725 if (fsMethods === undefined) {
20726 return exports.FILE_SYSTEM_ADAPTER;
20727 }
20728 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
20729}
20730exports.createFileSystemAdapter = createFileSystemAdapter;
20731
20732
20733/***/ }),
20734/* 105 */
20735/***/ (function(module, exports, __webpack_require__) {
20736
20737"use strict";
20738
20739Object.defineProperty(exports, "__esModule", { value: true });
20740const async_1 = __webpack_require__(106);
20741const stream_1 = __webpack_require__(121);
20742const sync_1 = __webpack_require__(122);
20743const settings_1 = __webpack_require__(124);
20744exports.Settings = settings_1.default;
20745function walk(directory, optionsOrSettingsOrCallback, callback) {
20746 if (typeof optionsOrSettingsOrCallback === 'function') {
20747 return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
20748 }
20749 new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
20750}
20751exports.walk = walk;
20752function walkSync(directory, optionsOrSettings) {
20753 const settings = getSettings(optionsOrSettings);
20754 const provider = new sync_1.default(directory, settings);
20755 return provider.read();
20756}
20757exports.walkSync = walkSync;
20758function walkStream(directory, optionsOrSettings) {
20759 const settings = getSettings(optionsOrSettings);
20760 const provider = new stream_1.default(directory, settings);
20761 return provider.read();
20762}
20763exports.walkStream = walkStream;
20764function getSettings(settingsOrOptions = {}) {
20765 if (settingsOrOptions instanceof settings_1.default) {
20766 return settingsOrOptions;
20767 }
20768 return new settings_1.default(settingsOrOptions);
20769}
20770
20771
20772/***/ }),
20773/* 106 */
20774/***/ (function(module, exports, __webpack_require__) {
20775
20776"use strict";
20777
20778Object.defineProperty(exports, "__esModule", { value: true });
20779const async_1 = __webpack_require__(107);
20780class AsyncProvider {
20781 constructor(_root, _settings) {
20782 this._root = _root;
20783 this._settings = _settings;
20784 this._reader = new async_1.default(this._root, this._settings);
20785 this._storage = new Set();
20786 }
20787 read(callback) {
20788 this._reader.onError((error) => {
20789 callFailureCallback(callback, error);
20790 });
20791 this._reader.onEntry((entry) => {
20792 this._storage.add(entry);
20793 });
20794 this._reader.onEnd(() => {
20795 callSuccessCallback(callback, [...this._storage]);
20796 });
20797 this._reader.read();
20798 }
20799}
20800exports.default = AsyncProvider;
20801function callFailureCallback(callback, error) {
20802 callback(error);
20803}
20804function callSuccessCallback(callback, entries) {
20805 callback(null, entries);
20806}
20807
20808
20809/***/ }),
20810/* 107 */
20811/***/ (function(module, exports, __webpack_require__) {
20812
20813"use strict";
20814
20815Object.defineProperty(exports, "__esModule", { value: true });
20816const events_1 = __webpack_require__(51);
20817const fsScandir = __webpack_require__(108);
20818const fastq = __webpack_require__(117);
20819const common = __webpack_require__(119);
20820const reader_1 = __webpack_require__(120);
20821class AsyncReader extends reader_1.default {
20822 constructor(_root, _settings) {
20823 super(_root, _settings);
20824 this._settings = _settings;
20825 this._scandir = fsScandir.scandir;
20826 this._emitter = new events_1.EventEmitter();
20827 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
20828 this._isFatalError = false;
20829 this._isDestroyed = false;
20830 this._queue.drain = () => {
20831 if (!this._isFatalError) {
20832 this._emitter.emit('end');
20833 }
20834 };
20835 }
20836 read() {
20837 this._isFatalError = false;
20838 this._isDestroyed = false;
20839 setImmediate(() => {
20840 this._pushToQueue(this._root, this._settings.basePath);
20841 });
20842 return this._emitter;
20843 }
20844 destroy() {
20845 if (this._isDestroyed) {
20846 throw new Error('The reader is already destroyed');
20847 }
20848 this._isDestroyed = true;
20849 this._queue.killAndDrain();
20850 }
20851 onEntry(callback) {
20852 this._emitter.on('entry', callback);
20853 }
20854 onError(callback) {
20855 this._emitter.once('error', callback);
20856 }
20857 onEnd(callback) {
20858 this._emitter.once('end', callback);
20859 }
20860 _pushToQueue(directory, base) {
20861 const queueItem = { directory, base };
20862 this._queue.push(queueItem, (error) => {
20863 if (error !== null) {
20864 this._handleError(error);
20865 }
20866 });
20867 }
20868 _worker(item, done) {
20869 this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
20870 if (error !== null) {
20871 return done(error, undefined);
20872 }
20873 for (const entry of entries) {
20874 this._handleEntry(entry, item.base);
20875 }
20876 done(null, undefined);
20877 });
20878 }
20879 _handleError(error) {
20880 if (!common.isFatalError(this._settings, error)) {
20881 return;
20882 }
20883 this._isFatalError = true;
20884 this._isDestroyed = true;
20885 this._emitter.emit('error', error);
20886 }
20887 _handleEntry(entry, base) {
20888 if (this._isDestroyed || this._isFatalError) {
20889 return;
20890 }
20891 const fullpath = entry.path;
20892 if (base !== undefined) {
20893 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
20894 }
20895 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
20896 this._emitEntry(entry);
20897 }
20898 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
20899 this._pushToQueue(fullpath, entry.path);
20900 }
20901 }
20902 _emitEntry(entry) {
20903 this._emitter.emit('entry', entry);
20904 }
20905}
20906exports.default = AsyncReader;
20907
20908
20909/***/ }),
20910/* 108 */
20911/***/ (function(module, exports, __webpack_require__) {
20912
20913"use strict";
20914
20915Object.defineProperty(exports, "__esModule", { value: true });
20916const async = __webpack_require__(109);
20917const sync = __webpack_require__(114);
20918const settings_1 = __webpack_require__(115);
20919exports.Settings = settings_1.default;
20920function scandir(path, optionsOrSettingsOrCallback, callback) {
20921 if (typeof optionsOrSettingsOrCallback === 'function') {
20922 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20923 }
20924 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20925}
20926exports.scandir = scandir;
20927function scandirSync(path, optionsOrSettings) {
20928 const settings = getSettings(optionsOrSettings);
20929 return sync.read(path, settings);
20930}
20931exports.scandirSync = scandirSync;
20932function getSettings(settingsOrOptions = {}) {
20933 if (settingsOrOptions instanceof settings_1.default) {
20934 return settingsOrOptions;
20935 }
20936 return new settings_1.default(settingsOrOptions);
20937}
20938
20939
20940/***/ }),
20941/* 109 */
20942/***/ (function(module, exports, __webpack_require__) {
20943
20944"use strict";
20945
20946Object.defineProperty(exports, "__esModule", { value: true });
20947const fsStat = __webpack_require__(100);
20948const rpl = __webpack_require__(110);
20949const constants_1 = __webpack_require__(111);
20950const utils = __webpack_require__(112);
20951function read(directory, settings, callback) {
20952 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
20953 return readdirWithFileTypes(directory, settings, callback);
20954 }
20955 return readdir(directory, settings, callback);
20956}
20957exports.read = read;
20958function readdirWithFileTypes(directory, settings, callback) {
20959 settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
20960 if (readdirError !== null) {
20961 return callFailureCallback(callback, readdirError);
20962 }
20963 const entries = dirents.map((dirent) => ({
20964 dirent,
20965 name: dirent.name,
20966 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
20967 }));
20968 if (!settings.followSymbolicLinks) {
20969 return callSuccessCallback(callback, entries);
20970 }
20971 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
20972 rpl(tasks, (rplError, rplEntries) => {
20973 if (rplError !== null) {
20974 return callFailureCallback(callback, rplError);
20975 }
20976 callSuccessCallback(callback, rplEntries);
20977 });
20978 });
20979}
20980exports.readdirWithFileTypes = readdirWithFileTypes;
20981function makeRplTaskEntry(entry, settings) {
20982 return (done) => {
20983 if (!entry.dirent.isSymbolicLink()) {
20984 return done(null, entry);
20985 }
20986 settings.fs.stat(entry.path, (statError, stats) => {
20987 if (statError !== null) {
20988 if (settings.throwErrorOnBrokenSymbolicLink) {
20989 return done(statError);
20990 }
20991 return done(null, entry);
20992 }
20993 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
20994 return done(null, entry);
20995 });
20996 };
20997}
20998function readdir(directory, settings, callback) {
20999 settings.fs.readdir(directory, (readdirError, names) => {
21000 if (readdirError !== null) {
21001 return callFailureCallback(callback, readdirError);
21002 }
21003 const filepaths = names.map((name) => `${directory}${settings.pathSegmentSeparator}${name}`);
21004 const tasks = filepaths.map((filepath) => {
21005 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
21006 });
21007 rpl(tasks, (rplError, results) => {
21008 if (rplError !== null) {
21009 return callFailureCallback(callback, rplError);
21010 }
21011 const entries = [];
21012 names.forEach((name, index) => {
21013 const stats = results[index];
21014 const entry = {
21015 name,
21016 path: filepaths[index],
21017 dirent: utils.fs.createDirentFromStats(name, stats)
21018 };
21019 if (settings.stats) {
21020 entry.stats = stats;
21021 }
21022 entries.push(entry);
21023 });
21024 callSuccessCallback(callback, entries);
21025 });
21026 });
21027}
21028exports.readdir = readdir;
21029function callFailureCallback(callback, error) {
21030 callback(error);
21031}
21032function callSuccessCallback(callback, result) {
21033 callback(null, result);
21034}
21035
21036
21037/***/ }),
21038/* 110 */
21039/***/ (function(module, exports) {
21040
21041module.exports = runParallel
21042
21043function runParallel (tasks, cb) {
21044 var results, pending, keys
21045 var isSync = true
21046
21047 if (Array.isArray(tasks)) {
21048 results = []
21049 pending = tasks.length
21050 } else {
21051 keys = Object.keys(tasks)
21052 results = {}
21053 pending = keys.length
21054 }
21055
21056 function done (err) {
21057 function end () {
21058 if (cb) cb(err, results)
21059 cb = null
21060 }
21061 if (isSync) process.nextTick(end)
21062 else end()
21063 }
21064
21065 function each (i, err, result) {
21066 results[i] = result
21067 if (--pending === 0 || err) {
21068 done(err)
21069 }
21070 }
21071
21072 if (!pending) {
21073 // empty
21074 done(null)
21075 } else if (keys) {
21076 // object
21077 keys.forEach(function (key) {
21078 tasks[key](function (err, result) { each(key, err, result) })
21079 })
21080 } else {
21081 // array
21082 tasks.forEach(function (task, i) {
21083 task(function (err, result) { each(i, err, result) })
21084 })
21085 }
21086
21087 isSync = false
21088}
21089
21090
21091/***/ }),
21092/* 111 */
21093/***/ (function(module, exports, __webpack_require__) {
21094
21095"use strict";
21096
21097Object.defineProperty(exports, "__esModule", { value: true });
21098const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
21099const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
21100const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
21101const SUPPORTED_MAJOR_VERSION = 10;
21102const SUPPORTED_MINOR_VERSION = 10;
21103const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
21104const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
21105/**
21106 * IS `true` for Node.js 10.10 and greater.
21107 */
21108exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
21109
21110
21111/***/ }),
21112/* 112 */
21113/***/ (function(module, exports, __webpack_require__) {
21114
21115"use strict";
21116
21117Object.defineProperty(exports, "__esModule", { value: true });
21118const fs = __webpack_require__(113);
21119exports.fs = fs;
21120
21121
21122/***/ }),
21123/* 113 */
21124/***/ (function(module, exports, __webpack_require__) {
21125
21126"use strict";
21127
21128Object.defineProperty(exports, "__esModule", { value: true });
21129class DirentFromStats {
21130 constructor(name, stats) {
21131 this.name = name;
21132 this.isBlockDevice = stats.isBlockDevice.bind(stats);
21133 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
21134 this.isDirectory = stats.isDirectory.bind(stats);
21135 this.isFIFO = stats.isFIFO.bind(stats);
21136 this.isFile = stats.isFile.bind(stats);
21137 this.isSocket = stats.isSocket.bind(stats);
21138 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
21139 }
21140}
21141function createDirentFromStats(name, stats) {
21142 return new DirentFromStats(name, stats);
21143}
21144exports.createDirentFromStats = createDirentFromStats;
21145
21146
21147/***/ }),
21148/* 114 */
21149/***/ (function(module, exports, __webpack_require__) {
21150
21151"use strict";
21152
21153Object.defineProperty(exports, "__esModule", { value: true });
21154const fsStat = __webpack_require__(100);
21155const constants_1 = __webpack_require__(111);
21156const utils = __webpack_require__(112);
21157function read(directory, settings) {
21158 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
21159 return readdirWithFileTypes(directory, settings);
21160 }
21161 return readdir(directory, settings);
21162}
21163exports.read = read;
21164function readdirWithFileTypes(directory, settings) {
21165 const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
21166 return dirents.map((dirent) => {
21167 const entry = {
21168 dirent,
21169 name: dirent.name,
21170 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
21171 };
21172 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
21173 try {
21174 const stats = settings.fs.statSync(entry.path);
21175 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
21176 }
21177 catch (error) {
21178 if (settings.throwErrorOnBrokenSymbolicLink) {
21179 throw error;
21180 }
21181 }
21182 }
21183 return entry;
21184 });
21185}
21186exports.readdirWithFileTypes = readdirWithFileTypes;
21187function readdir(directory, settings) {
21188 const names = settings.fs.readdirSync(directory);
21189 return names.map((name) => {
21190 const entryPath = `${directory}${settings.pathSegmentSeparator}${name}`;
21191 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
21192 const entry = {
21193 name,
21194 path: entryPath,
21195 dirent: utils.fs.createDirentFromStats(name, stats)
21196 };
21197 if (settings.stats) {
21198 entry.stats = stats;
21199 }
21200 return entry;
21201 });
21202}
21203exports.readdir = readdir;
21204
21205
21206/***/ }),
21207/* 115 */
21208/***/ (function(module, exports, __webpack_require__) {
21209
21210"use strict";
21211
21212Object.defineProperty(exports, "__esModule", { value: true });
21213const path = __webpack_require__(13);
21214const fsStat = __webpack_require__(100);
21215const fs = __webpack_require__(116);
21216class Settings {
21217 constructor(_options = {}) {
21218 this._options = _options;
21219 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
21220 this.fs = fs.createFileSystemAdapter(this._options.fs);
21221 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21222 this.stats = this._getValue(this._options.stats, false);
21223 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
21224 this.fsStatSettings = new fsStat.Settings({
21225 followSymbolicLink: this.followSymbolicLinks,
21226 fs: this.fs,
21227 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
21228 });
21229 }
21230 _getValue(option, value) {
21231 return option === undefined ? value : option;
21232 }
21233}
21234exports.default = Settings;
21235
21236
21237/***/ }),
21238/* 116 */
21239/***/ (function(module, exports, __webpack_require__) {
21240
21241"use strict";
21242
21243Object.defineProperty(exports, "__esModule", { value: true });
21244const fs = __webpack_require__(40);
21245exports.FILE_SYSTEM_ADAPTER = {
21246 lstat: fs.lstat,
21247 stat: fs.stat,
21248 lstatSync: fs.lstatSync,
21249 statSync: fs.statSync,
21250 readdir: fs.readdir,
21251 readdirSync: fs.readdirSync
21252};
21253function createFileSystemAdapter(fsMethods) {
21254 if (fsMethods === undefined) {
21255 return exports.FILE_SYSTEM_ADAPTER;
21256 }
21257 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
21258}
21259exports.createFileSystemAdapter = createFileSystemAdapter;
21260
21261
21262/***/ }),
21263/* 117 */
21264/***/ (function(module, exports, __webpack_require__) {
21265
21266"use strict";
21267
21268
21269var reusify = __webpack_require__(118)
21270
21271function fastqueue (context, worker, concurrency) {
21272 if (typeof context === 'function') {
21273 concurrency = worker
21274 worker = context
21275 context = null
21276 }
21277
21278 var cache = reusify(Task)
21279 var queueHead = null
21280 var queueTail = null
21281 var _running = 0
21282
21283 var self = {
21284 push: push,
21285 drain: noop,
21286 saturated: noop,
21287 pause: pause,
21288 paused: false,
21289 concurrency: concurrency,
21290 running: running,
21291 resume: resume,
21292 idle: idle,
21293 length: length,
21294 unshift: unshift,
21295 empty: noop,
21296 kill: kill,
21297 killAndDrain: killAndDrain
21298 }
21299
21300 return self
21301
21302 function running () {
21303 return _running
21304 }
21305
21306 function pause () {
21307 self.paused = true
21308 }
21309
21310 function length () {
21311 var current = queueHead
21312 var counter = 0
21313
21314 while (current) {
21315 current = current.next
21316 counter++
21317 }
21318
21319 return counter
21320 }
21321
21322 function resume () {
21323 if (!self.paused) return
21324 self.paused = false
21325 for (var i = 0; i < self.concurrency; i++) {
21326 _running++
21327 release()
21328 }
21329 }
21330
21331 function idle () {
21332 return _running === 0 && self.length() === 0
21333 }
21334
21335 function push (value, done) {
21336 var current = cache.get()
21337
21338 current.context = context
21339 current.release = release
21340 current.value = value
21341 current.callback = done || noop
21342
21343 if (_running === self.concurrency || self.paused) {
21344 if (queueTail) {
21345 queueTail.next = current
21346 queueTail = current
21347 } else {
21348 queueHead = current
21349 queueTail = current
21350 self.saturated()
21351 }
21352 } else {
21353 _running++
21354 worker.call(context, current.value, current.worked)
21355 }
21356 }
21357
21358 function unshift (value, done) {
21359 var current = cache.get()
21360
21361 current.context = context
21362 current.release = release
21363 current.value = value
21364 current.callback = done || noop
21365
21366 if (_running === self.concurrency || self.paused) {
21367 if (queueHead) {
21368 current.next = queueHead
21369 queueHead = current
21370 } else {
21371 queueHead = current
21372 queueTail = current
21373 self.saturated()
21374 }
21375 } else {
21376 _running++
21377 worker.call(context, current.value, current.worked)
21378 }
21379 }
21380
21381 function release (holder) {
21382 if (holder) {
21383 cache.release(holder)
21384 }
21385 var next = queueHead
21386 if (next) {
21387 if (!self.paused) {
21388 if (queueTail === queueHead) {
21389 queueTail = null
21390 }
21391 queueHead = next.next
21392 next.next = null
21393 worker.call(context, next.value, next.worked)
21394 if (queueTail === null) {
21395 self.empty()
21396 }
21397 } else {
21398 _running--
21399 }
21400 } else if (--_running === 0) {
21401 self.drain()
21402 }
21403 }
21404
21405 function kill () {
21406 queueHead = null
21407 queueTail = null
21408 self.drain = noop
21409 }
21410
21411 function killAndDrain () {
21412 queueHead = null
21413 queueTail = null
21414 self.drain()
21415 self.drain = noop
21416 }
21417}
21418
21419function noop () {}
21420
21421function Task () {
21422 this.value = null
21423 this.callback = noop
21424 this.next = null
21425 this.release = noop
21426 this.context = null
21427
21428 var self = this
21429
21430 this.worked = function worked (err, result) {
21431 var callback = self.callback
21432 self.value = null
21433 self.callback = noop
21434 callback.call(self.context, err, result)
21435 self.release(self)
21436 }
21437}
21438
21439module.exports = fastqueue
21440
21441
21442/***/ }),
21443/* 118 */
21444/***/ (function(module, exports, __webpack_require__) {
21445
21446"use strict";
21447
21448
21449function reusify (Constructor) {
21450 var head = new Constructor()
21451 var tail = head
21452
21453 function get () {
21454 var current = head
21455
21456 if (current.next) {
21457 head = current.next
21458 } else {
21459 head = new Constructor()
21460 tail = head
21461 }
21462
21463 current.next = null
21464
21465 return current
21466 }
21467
21468 function release (obj) {
21469 tail.next = obj
21470 tail = obj
21471 }
21472
21473 return {
21474 get: get,
21475 release: release
21476 }
21477}
21478
21479module.exports = reusify
21480
21481
21482/***/ }),
21483/* 119 */
21484/***/ (function(module, exports, __webpack_require__) {
21485
21486"use strict";
21487
21488Object.defineProperty(exports, "__esModule", { value: true });
21489function isFatalError(settings, error) {
21490 if (settings.errorFilter === null) {
21491 return true;
21492 }
21493 return !settings.errorFilter(error);
21494}
21495exports.isFatalError = isFatalError;
21496function isAppliedFilter(filter, value) {
21497 return filter === null || filter(value);
21498}
21499exports.isAppliedFilter = isAppliedFilter;
21500function replacePathSegmentSeparator(filepath, separator) {
21501 return filepath.split(/[\\/]/).join(separator);
21502}
21503exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
21504function joinPathSegments(a, b, separator) {
21505 if (a === '') {
21506 return b;
21507 }
21508 return a + separator + b;
21509}
21510exports.joinPathSegments = joinPathSegments;
21511
21512
21513/***/ }),
21514/* 120 */
21515/***/ (function(module, exports, __webpack_require__) {
21516
21517"use strict";
21518
21519Object.defineProperty(exports, "__esModule", { value: true });
21520const common = __webpack_require__(119);
21521class Reader {
21522 constructor(_root, _settings) {
21523 this._root = _root;
21524 this._settings = _settings;
21525 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
21526 }
21527}
21528exports.default = Reader;
21529
21530
21531/***/ }),
21532/* 121 */
21533/***/ (function(module, exports, __webpack_require__) {
21534
21535"use strict";
21536
21537Object.defineProperty(exports, "__esModule", { value: true });
21538const stream_1 = __webpack_require__(96);
21539const async_1 = __webpack_require__(107);
21540class StreamProvider {
21541 constructor(_root, _settings) {
21542 this._root = _root;
21543 this._settings = _settings;
21544 this._reader = new async_1.default(this._root, this._settings);
21545 this._stream = new stream_1.Readable({
21546 objectMode: true,
21547 read: () => { },
21548 destroy: this._reader.destroy.bind(this._reader)
21549 });
21550 }
21551 read() {
21552 this._reader.onError((error) => {
21553 this._stream.emit('error', error);
21554 });
21555 this._reader.onEntry((entry) => {
21556 this._stream.push(entry);
21557 });
21558 this._reader.onEnd(() => {
21559 this._stream.push(null);
21560 });
21561 this._reader.read();
21562 return this._stream;
21563 }
21564}
21565exports.default = StreamProvider;
21566
21567
21568/***/ }),
21569/* 122 */
21570/***/ (function(module, exports, __webpack_require__) {
21571
21572"use strict";
21573
21574Object.defineProperty(exports, "__esModule", { value: true });
21575const sync_1 = __webpack_require__(123);
21576class SyncProvider {
21577 constructor(_root, _settings) {
21578 this._root = _root;
21579 this._settings = _settings;
21580 this._reader = new sync_1.default(this._root, this._settings);
21581 }
21582 read() {
21583 return this._reader.read();
21584 }
21585}
21586exports.default = SyncProvider;
21587
21588
21589/***/ }),
21590/* 123 */
21591/***/ (function(module, exports, __webpack_require__) {
21592
21593"use strict";
21594
21595Object.defineProperty(exports, "__esModule", { value: true });
21596const fsScandir = __webpack_require__(108);
21597const common = __webpack_require__(119);
21598const reader_1 = __webpack_require__(120);
21599class SyncReader extends reader_1.default {
21600 constructor() {
21601 super(...arguments);
21602 this._scandir = fsScandir.scandirSync;
21603 this._storage = new Set();
21604 this._queue = new Set();
21605 }
21606 read() {
21607 this._pushToQueue(this._root, this._settings.basePath);
21608 this._handleQueue();
21609 return [...this._storage];
21610 }
21611 _pushToQueue(directory, base) {
21612 this._queue.add({ directory, base });
21613 }
21614 _handleQueue() {
21615 for (const item of this._queue.values()) {
21616 this._handleDirectory(item.directory, item.base);
21617 }
21618 }
21619 _handleDirectory(directory, base) {
21620 try {
21621 const entries = this._scandir(directory, this._settings.fsScandirSettings);
21622 for (const entry of entries) {
21623 this._handleEntry(entry, base);
21624 }
21625 }
21626 catch (error) {
21627 this._handleError(error);
21628 }
21629 }
21630 _handleError(error) {
21631 if (!common.isFatalError(this._settings, error)) {
21632 return;
21633 }
21634 throw error;
21635 }
21636 _handleEntry(entry, base) {
21637 const fullpath = entry.path;
21638 if (base !== undefined) {
21639 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
21640 }
21641 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
21642 this._pushToStorage(entry);
21643 }
21644 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
21645 this._pushToQueue(fullpath, entry.path);
21646 }
21647 }
21648 _pushToStorage(entry) {
21649 this._storage.add(entry);
21650 }
21651}
21652exports.default = SyncReader;
21653
21654
21655/***/ }),
21656/* 124 */
21657/***/ (function(module, exports, __webpack_require__) {
21658
21659"use strict";
21660
21661Object.defineProperty(exports, "__esModule", { value: true });
21662const path = __webpack_require__(13);
21663const fsScandir = __webpack_require__(108);
21664class Settings {
21665 constructor(_options = {}) {
21666 this._options = _options;
21667 this.basePath = this._getValue(this._options.basePath, undefined);
21668 this.concurrency = this._getValue(this._options.concurrency, Infinity);
21669 this.deepFilter = this._getValue(this._options.deepFilter, null);
21670 this.entryFilter = this._getValue(this._options.entryFilter, null);
21671 this.errorFilter = this._getValue(this._options.errorFilter, null);
21672 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21673 this.fsScandirSettings = new fsScandir.Settings({
21674 followSymbolicLinks: this._options.followSymbolicLinks,
21675 fs: this._options.fs,
21676 pathSegmentSeparator: this._options.pathSegmentSeparator,
21677 stats: this._options.stats,
21678 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
21679 });
21680 }
21681 _getValue(option, value) {
21682 return option === undefined ? value : option;
21683 }
21684}
21685exports.default = Settings;
21686
21687
21688/***/ }),
21689/* 125 */
21690/***/ (function(module, exports, __webpack_require__) {
21691
21692"use strict";
21693
21694Object.defineProperty(exports, "__esModule", { value: true });
21695const path = __webpack_require__(13);
21696const fsStat = __webpack_require__(100);
21697const utils = __webpack_require__(62);
21698class Reader {
21699 constructor(_settings) {
21700 this._settings = _settings;
21701 this._fsStatSettings = new fsStat.Settings({
21702 followSymbolicLink: this._settings.followSymbolicLinks,
21703 fs: this._settings.fs,
21704 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
21705 });
21706 }
21707 _getFullEntryPath(filepath) {
21708 return path.resolve(this._settings.cwd, filepath);
21709 }
21710 _makeEntry(stats, pattern) {
21711 const entry = {
21712 name: pattern,
21713 path: pattern,
21714 dirent: utils.fs.createDirentFromStats(pattern, stats)
21715 };
21716 if (this._settings.stats) {
21717 entry.stats = stats;
21718 }
21719 return entry;
21720 }
21721 _isFatalError(error) {
21722 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
21723 }
21724}
21725exports.default = Reader;
21726
21727
21728/***/ }),
21729/* 126 */
21730/***/ (function(module, exports, __webpack_require__) {
21731
21732"use strict";
21733
21734Object.defineProperty(exports, "__esModule", { value: true });
21735const path = __webpack_require__(13);
21736const deep_1 = __webpack_require__(127);
21737const entry_1 = __webpack_require__(130);
21738const error_1 = __webpack_require__(131);
21739const entry_2 = __webpack_require__(132);
21740class Provider {
21741 constructor(_settings) {
21742 this._settings = _settings;
21743 this.errorFilter = new error_1.default(this._settings);
21744 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
21745 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
21746 this.entryTransformer = new entry_2.default(this._settings);
21747 }
21748 _getRootDirectory(task) {
21749 return path.resolve(this._settings.cwd, task.base);
21750 }
21751 _getReaderOptions(task) {
21752 const basePath = task.base === '.' ? '' : task.base;
21753 return {
21754 basePath,
21755 pathSegmentSeparator: '/',
21756 concurrency: this._settings.concurrency,
21757 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
21758 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
21759 errorFilter: this.errorFilter.getFilter(),
21760 followSymbolicLinks: this._settings.followSymbolicLinks,
21761 fs: this._settings.fs,
21762 stats: this._settings.stats,
21763 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
21764 transform: this.entryTransformer.getTransformer()
21765 };
21766 }
21767 _getMicromatchOptions() {
21768 return {
21769 dot: this._settings.dot,
21770 matchBase: this._settings.baseNameMatch,
21771 nobrace: !this._settings.braceExpansion,
21772 nocase: !this._settings.caseSensitiveMatch,
21773 noext: !this._settings.extglob,
21774 noglobstar: !this._settings.globstar,
21775 posix: true,
21776 strictSlashes: false
21777 };
21778 }
21779}
21780exports.default = Provider;
21781
21782
21783/***/ }),
21784/* 127 */
21785/***/ (function(module, exports, __webpack_require__) {
21786
21787"use strict";
21788
21789Object.defineProperty(exports, "__esModule", { value: true });
21790const utils = __webpack_require__(62);
21791const partial_1 = __webpack_require__(128);
21792class DeepFilter {
21793 constructor(_settings, _micromatchOptions) {
21794 this._settings = _settings;
21795 this._micromatchOptions = _micromatchOptions;
21796 }
21797 getFilter(basePath, positive, negative) {
21798 const matcher = this._getMatcher(positive);
21799 const negativeRe = this._getNegativePatternsRe(negative);
21800 return (entry) => this._filter(basePath, entry, matcher, negativeRe);
21801 }
21802 _getMatcher(patterns) {
21803 return new partial_1.default(patterns, this._settings, this._micromatchOptions);
21804 }
21805 _getNegativePatternsRe(patterns) {
21806 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
21807 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
21808 }
21809 _filter(basePath, entry, matcher, negativeRe) {
21810 const depth = this._getEntryLevel(basePath, entry.path);
21811 if (this._isSkippedByDeep(depth)) {
21812 return false;
21813 }
21814 if (this._isSkippedSymbolicLink(entry)) {
21815 return false;
21816 }
21817 const filepath = utils.path.removeLeadingDotSegment(entry.path);
21818 if (this._isSkippedByPositivePatterns(filepath, matcher)) {
21819 return false;
21820 }
21821 return this._isSkippedByNegativePatterns(filepath, negativeRe);
21822 }
21823 _isSkippedByDeep(entryDepth) {
21824 return entryDepth >= this._settings.deep;
21825 }
21826 _isSkippedSymbolicLink(entry) {
21827 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
21828 }
21829 _getEntryLevel(basePath, entryPath) {
21830 const basePathDepth = basePath.split('/').length;
21831 const entryPathDepth = entryPath.split('/').length;
21832 return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
21833 }
21834 _isSkippedByPositivePatterns(entryPath, matcher) {
21835 return !this._settings.baseNameMatch && !matcher.match(entryPath);
21836 }
21837 _isSkippedByNegativePatterns(entryPath, negativeRe) {
21838 return !utils.pattern.matchAny(entryPath, negativeRe);
21839 }
21840}
21841exports.default = DeepFilter;
21842
21843
21844/***/ }),
21845/* 128 */
21846/***/ (function(module, exports, __webpack_require__) {
21847
21848"use strict";
21849
21850Object.defineProperty(exports, "__esModule", { value: true });
21851const matcher_1 = __webpack_require__(129);
21852class PartialMatcher extends matcher_1.default {
21853 match(filepath) {
21854 const parts = filepath.split('/');
21855 const levels = parts.length;
21856 const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
21857 for (const pattern of patterns) {
21858 const section = pattern.sections[0];
21859 /**
21860 * In this case, the pattern has a globstar and we must read all directories unconditionally,
21861 * but only if the level has reached the end of the first group.
21862 *
21863 * fixtures/{a,b}/**
21864 * ^ true/false ^ always true
21865 */
21866 if (!pattern.complete && levels > section.length) {
21867 return true;
21868 }
21869 const match = parts.every((part, index) => {
21870 const segment = pattern.segments[index];
21871 if (segment.dynamic && segment.patternRe.test(part)) {
21872 return true;
21873 }
21874 if (!segment.dynamic && segment.pattern === part) {
21875 return true;
21876 }
21877 return false;
21878 });
21879 if (match) {
21880 return true;
21881 }
21882 }
21883 return false;
21884 }
21885}
21886exports.default = PartialMatcher;
21887
21888
21889/***/ }),
21890/* 129 */
21891/***/ (function(module, exports, __webpack_require__) {
21892
21893"use strict";
21894
21895Object.defineProperty(exports, "__esModule", { value: true });
21896const utils = __webpack_require__(62);
21897class Matcher {
21898 constructor(_patterns, _settings, _micromatchOptions) {
21899 this._patterns = _patterns;
21900 this._settings = _settings;
21901 this._micromatchOptions = _micromatchOptions;
21902 this._storage = [];
21903 this._fillStorage();
21904 }
21905 _fillStorage() {
21906 /**
21907 * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
21908 * So, before expand patterns with brace expansion into separated patterns.
21909 */
21910 const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
21911 for (const pattern of patterns) {
21912 const segments = this._getPatternSegments(pattern);
21913 const sections = this._splitSegmentsIntoSections(segments);
21914 this._storage.push({
21915 complete: sections.length <= 1,
21916 pattern,
21917 segments,
21918 sections
21919 });
21920 }
21921 }
21922 _getPatternSegments(pattern) {
21923 const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
21924 return parts.map((part) => {
21925 const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
21926 if (!dynamic) {
21927 return {
21928 dynamic: false,
21929 pattern: part
21930 };
21931 }
21932 return {
21933 dynamic: true,
21934 pattern: part,
21935 patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
21936 };
21937 });
21938 }
21939 _splitSegmentsIntoSections(segments) {
21940 return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
21941 }
21942}
21943exports.default = Matcher;
21944
21945
21946/***/ }),
21947/* 130 */
21948/***/ (function(module, exports, __webpack_require__) {
21949
21950"use strict";
21951
21952Object.defineProperty(exports, "__esModule", { value: true });
21953const utils = __webpack_require__(62);
21954class EntryFilter {
21955 constructor(_settings, _micromatchOptions) {
21956 this._settings = _settings;
21957 this._micromatchOptions = _micromatchOptions;
21958 this.index = new Map();
21959 }
21960 getFilter(positive, negative) {
21961 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
21962 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
21963 return (entry) => this._filter(entry, positiveRe, negativeRe);
21964 }
21965 _filter(entry, positiveRe, negativeRe) {
21966 if (this._settings.unique) {
21967 if (this._isDuplicateEntry(entry)) {
21968 return false;
21969 }
21970 this._createIndexRecord(entry);
21971 }
21972 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
21973 return false;
21974 }
21975 if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
21976 return false;
21977 }
21978 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
21979 return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
21980 }
21981 _isDuplicateEntry(entry) {
21982 return this.index.has(entry.path);
21983 }
21984 _createIndexRecord(entry) {
21985 this.index.set(entry.path, undefined);
21986 }
21987 _onlyFileFilter(entry) {
21988 return this._settings.onlyFiles && !entry.dirent.isFile();
21989 }
21990 _onlyDirectoryFilter(entry) {
21991 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
21992 }
21993 _isSkippedByAbsoluteNegativePatterns(entry, negativeRe) {
21994 if (!this._settings.absolute) {
21995 return false;
21996 }
21997 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path);
21998 return this._isMatchToPatterns(fullpath, negativeRe);
21999 }
22000 _isMatchToPatterns(entryPath, patternsRe) {
22001 const filepath = utils.path.removeLeadingDotSegment(entryPath);
22002 return utils.pattern.matchAny(filepath, patternsRe);
22003 }
22004}
22005exports.default = EntryFilter;
22006
22007
22008/***/ }),
22009/* 131 */
22010/***/ (function(module, exports, __webpack_require__) {
22011
22012"use strict";
22013
22014Object.defineProperty(exports, "__esModule", { value: true });
22015const utils = __webpack_require__(62);
22016class ErrorFilter {
22017 constructor(_settings) {
22018 this._settings = _settings;
22019 }
22020 getFilter() {
22021 return (error) => this._isNonFatalError(error);
22022 }
22023 _isNonFatalError(error) {
22024 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
22025 }
22026}
22027exports.default = ErrorFilter;
22028
22029
22030/***/ }),
22031/* 132 */
22032/***/ (function(module, exports, __webpack_require__) {
22033
22034"use strict";
22035
22036Object.defineProperty(exports, "__esModule", { value: true });
22037const utils = __webpack_require__(62);
22038class EntryTransformer {
22039 constructor(_settings) {
22040 this._settings = _settings;
22041 }
22042 getTransformer() {
22043 return (entry) => this._transform(entry);
22044 }
22045 _transform(entry) {
22046 let filepath = entry.path;
22047 if (this._settings.absolute) {
22048 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
22049 filepath = utils.path.unixify(filepath);
22050 }
22051 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
22052 filepath += '/';
22053 }
22054 if (!this._settings.objectMode) {
22055 return filepath;
22056 }
22057 return Object.assign(Object.assign({}, entry), { path: filepath });
22058 }
22059}
22060exports.default = EntryTransformer;
22061
22062
22063/***/ }),
22064/* 133 */
22065/***/ (function(module, exports, __webpack_require__) {
22066
22067"use strict";
22068
22069Object.defineProperty(exports, "__esModule", { value: true });
22070const stream_1 = __webpack_require__(96);
22071const stream_2 = __webpack_require__(99);
22072const provider_1 = __webpack_require__(126);
22073class ProviderStream extends provider_1.default {
22074 constructor() {
22075 super(...arguments);
22076 this._reader = new stream_2.default(this._settings);
22077 }
22078 read(task) {
22079 const root = this._getRootDirectory(task);
22080 const options = this._getReaderOptions(task);
22081 const source = this.api(root, task, options);
22082 const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
22083 source
22084 .once('error', (error) => destination.emit('error', error))
22085 .on('data', (entry) => destination.emit('data', options.transform(entry)))
22086 .once('end', () => destination.emit('end'));
22087 destination
22088 .once('close', () => source.destroy());
22089 return destination;
22090 }
22091 api(root, task, options) {
22092 if (task.dynamic) {
22093 return this._reader.dynamic(root, options);
22094 }
22095 return this._reader.static(task.patterns, options);
22096 }
22097}
22098exports.default = ProviderStream;
22099
22100
22101/***/ }),
22102/* 134 */
22103/***/ (function(module, exports, __webpack_require__) {
22104
22105"use strict";
22106
22107Object.defineProperty(exports, "__esModule", { value: true });
22108const sync_1 = __webpack_require__(135);
22109const provider_1 = __webpack_require__(126);
22110class ProviderSync extends provider_1.default {
22111 constructor() {
22112 super(...arguments);
22113 this._reader = new sync_1.default(this._settings);
22114 }
22115 read(task) {
22116 const root = this._getRootDirectory(task);
22117 const options = this._getReaderOptions(task);
22118 const entries = this.api(root, task, options);
22119 return entries.map(options.transform);
22120 }
22121 api(root, task, options) {
22122 if (task.dynamic) {
22123 return this._reader.dynamic(root, options);
22124 }
22125 return this._reader.static(task.patterns, options);
22126 }
22127}
22128exports.default = ProviderSync;
22129
22130
22131/***/ }),
22132/* 135 */
22133/***/ (function(module, exports, __webpack_require__) {
22134
22135"use strict";
22136
22137Object.defineProperty(exports, "__esModule", { value: true });
22138const fsStat = __webpack_require__(100);
22139const fsWalk = __webpack_require__(105);
22140const reader_1 = __webpack_require__(125);
22141class ReaderSync extends reader_1.default {
22142 constructor() {
22143 super(...arguments);
22144 this._walkSync = fsWalk.walkSync;
22145 this._statSync = fsStat.statSync;
22146 }
22147 dynamic(root, options) {
22148 return this._walkSync(root, options);
22149 }
22150 static(patterns, options) {
22151 const entries = [];
22152 for (const pattern of patterns) {
22153 const filepath = this._getFullEntryPath(pattern);
22154 const entry = this._getEntry(filepath, pattern, options);
22155 if (entry === null || !options.entryFilter(entry)) {
22156 continue;
22157 }
22158 entries.push(entry);
22159 }
22160 return entries;
22161 }
22162 _getEntry(filepath, pattern, options) {
22163 try {
22164 const stats = this._getStat(filepath);
22165 return this._makeEntry(stats, pattern);
22166 }
22167 catch (error) {
22168 if (options.errorFilter(error)) {
22169 return null;
22170 }
22171 throw error;
22172 }
22173 }
22174 _getStat(filepath) {
22175 return this._statSync(filepath, this._fsStatSettings);
22176 }
22177}
22178exports.default = ReaderSync;
22179
22180
22181/***/ }),
22182/* 136 */
22183/***/ (function(module, exports, __webpack_require__) {
22184
22185"use strict";
22186
22187Object.defineProperty(exports, "__esModule", { value: true });
22188const fs = __webpack_require__(40);
22189const os = __webpack_require__(14);
22190const CPU_COUNT = os.cpus().length;
22191exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
22192 lstat: fs.lstat,
22193 lstatSync: fs.lstatSync,
22194 stat: fs.stat,
22195 statSync: fs.statSync,
22196 readdir: fs.readdir,
22197 readdirSync: fs.readdirSync
22198};
22199class Settings {
22200 constructor(_options = {}) {
22201 this._options = _options;
22202 this.absolute = this._getValue(this._options.absolute, false);
22203 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
22204 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
22205 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
22206 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
22207 this.cwd = this._getValue(this._options.cwd, process.cwd());
22208 this.deep = this._getValue(this._options.deep, Infinity);
22209 this.dot = this._getValue(this._options.dot, false);
22210 this.extglob = this._getValue(this._options.extglob, true);
22211 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
22212 this.fs = this._getFileSystemMethods(this._options.fs);
22213 this.globstar = this._getValue(this._options.globstar, true);
22214 this.ignore = this._getValue(this._options.ignore, []);
22215 this.markDirectories = this._getValue(this._options.markDirectories, false);
22216 this.objectMode = this._getValue(this._options.objectMode, false);
22217 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
22218 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
22219 this.stats = this._getValue(this._options.stats, false);
22220 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
22221 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
22222 this.unique = this._getValue(this._options.unique, true);
22223 if (this.onlyDirectories) {
22224 this.onlyFiles = false;
22225 }
22226 if (this.stats) {
22227 this.objectMode = true;
22228 }
22229 }
22230 _getValue(option, value) {
22231 return option === undefined ? value : option;
22232 }
22233 _getFileSystemMethods(methods = {}) {
22234 return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
22235 }
22236}
22237exports.default = Settings;
22238
22239
22240/***/ }),
22241/* 137 */,
22242/* 138 */,
22243/* 139 */,
22244/* 140 */,
22245/* 141 */,
22246/* 142 */,
22247/* 143 */,
22248/* 144 */,
22249/* 145 */,
22250/* 146 */,
22251/* 147 */,
22252/* 148 */,
22253/* 149 */
22254/***/ (function(module, __webpack_exports__, __webpack_require__) {
22255
22256"use strict";
22257__webpack_require__.r(__webpack_exports__);
22258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
22259/*---------------------------------------------------------------------------------------------
22260 * Copyright (c) Microsoft Corporation. All rights reserved.
22261 * Licensed under the MIT License. See License.txt in the project root for license information.
22262 *--------------------------------------------------------------------------------------------*/
22263
22264var __extends = (undefined && undefined.__extends) || (function () {
22265 var extendStatics = function (d, b) {
22266 extendStatics = Object.setPrototypeOf ||
22267 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22268 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22269 return extendStatics(d, b);
22270 };
22271 return function (d, b) {
22272 extendStatics(d, b);
22273 function __() { this.constructor = d; }
22274 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22275 };
22276})();
22277var _a;
22278var isWindows;
22279if (typeof process === 'object') {
22280 isWindows = process.platform === 'win32';
22281}
22282else if (typeof navigator === 'object') {
22283 var userAgent = navigator.userAgent;
22284 isWindows = userAgent.indexOf('Windows') >= 0;
22285}
22286function isHighSurrogate(charCode) {
22287 return (0xD800 <= charCode && charCode <= 0xDBFF);
22288}
22289function isLowSurrogate(charCode) {
22290 return (0xDC00 <= charCode && charCode <= 0xDFFF);
22291}
22292function isLowerAsciiHex(code) {
22293 return code >= 97 /* a */ && code <= 102 /* f */;
22294}
22295function isLowerAsciiLetter(code) {
22296 return code >= 97 /* a */ && code <= 122 /* z */;
22297}
22298function isUpperAsciiLetter(code) {
22299 return code >= 65 /* A */ && code <= 90 /* Z */;
22300}
22301function isAsciiLetter(code) {
22302 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
22303}
22304//#endregion
22305var _schemePattern = /^\w[\w\d+.-]*$/;
22306var _singleSlashStart = /^\//;
22307var _doubleSlashStart = /^\/\//;
22308function _validateUri(ret, _strict) {
22309 // scheme, must be set
22310 if (!ret.scheme && _strict) {
22311 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
22312 }
22313 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
22314 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
22315 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
22316 throw new Error('[UriError]: Scheme contains illegal characters.');
22317 }
22318 // path, http://tools.ietf.org/html/rfc3986#section-3.3
22319 // If a URI contains an authority component, then the path component
22320 // must either be empty or begin with a slash ("/") character. If a URI
22321 // does not contain an authority component, then the path cannot begin
22322 // with two slash characters ("//").
22323 if (ret.path) {
22324 if (ret.authority) {
22325 if (!_singleSlashStart.test(ret.path)) {
22326 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');
22327 }
22328 }
22329 else {
22330 if (_doubleSlashStart.test(ret.path)) {
22331 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
22332 }
22333 }
22334 }
22335}
22336// for a while we allowed uris *without* schemes and this is the migration
22337// for them, e.g. an uri without scheme and without strict-mode warns and falls
22338// back to the file-scheme. that should cause the least carnage and still be a
22339// clear warning
22340function _schemeFix(scheme, _strict) {
22341 if (!scheme && !_strict) {
22342 return 'file';
22343 }
22344 return scheme;
22345}
22346// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
22347function _referenceResolution(scheme, path) {
22348 // the slash-character is our 'default base' as we don't
22349 // support constructing URIs relative to other URIs. This
22350 // also means that we alter and potentially break paths.
22351 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
22352 switch (scheme) {
22353 case 'https':
22354 case 'http':
22355 case 'file':
22356 if (!path) {
22357 path = _slash;
22358 }
22359 else if (path[0] !== _slash) {
22360 path = _slash + path;
22361 }
22362 break;
22363 }
22364 return path;
22365}
22366var _empty = '';
22367var _slash = '/';
22368var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
22369/**
22370 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
22371 * This class is a simple parser which creates the basic component parts
22372 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
22373 * and encoding.
22374 *
22375 * foo://example.com:8042/over/there?name=ferret#nose
22376 * \_/ \______________/\_________/ \_________/ \__/
22377 * | | | | |
22378 * scheme authority path query fragment
22379 * | _____________________|__
22380 * / \ / \
22381 * urn:example:animal:ferret:nose
22382 */
22383var URI = /** @class */ (function () {
22384 /**
22385 * @internal
22386 */
22387 function URI(schemeOrData, authority, path, query, fragment, _strict) {
22388 if (_strict === void 0) { _strict = false; }
22389 if (typeof schemeOrData === 'object') {
22390 this.scheme = schemeOrData.scheme || _empty;
22391 this.authority = schemeOrData.authority || _empty;
22392 this.path = schemeOrData.path || _empty;
22393 this.query = schemeOrData.query || _empty;
22394 this.fragment = schemeOrData.fragment || _empty;
22395 // no validation because it's this URI
22396 // that creates uri components.
22397 // _validateUri(this);
22398 }
22399 else {
22400 this.scheme = _schemeFix(schemeOrData, _strict);
22401 this.authority = authority || _empty;
22402 this.path = _referenceResolution(this.scheme, path || _empty);
22403 this.query = query || _empty;
22404 this.fragment = fragment || _empty;
22405 _validateUri(this, _strict);
22406 }
22407 }
22408 URI.isUri = function (thing) {
22409 if (thing instanceof URI) {
22410 return true;
22411 }
22412 if (!thing) {
22413 return false;
22414 }
22415 return typeof thing.authority === 'string'
22416 && typeof thing.fragment === 'string'
22417 && typeof thing.path === 'string'
22418 && typeof thing.query === 'string'
22419 && typeof thing.scheme === 'string'
22420 && typeof thing.fsPath === 'function'
22421 && typeof thing.with === 'function'
22422 && typeof thing.toString === 'function';
22423 };
22424 Object.defineProperty(URI.prototype, "fsPath", {
22425 // ---- filesystem path -----------------------
22426 /**
22427 * Returns a string representing the corresponding file system path of this URI.
22428 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
22429 * platform specific path separator.
22430 *
22431 * * Will *not* validate the path for invalid characters and semantics.
22432 * * Will *not* look at the scheme of this URI.
22433 * * The result shall *not* be used for display purposes but for accessing a file on disk.
22434 *
22435 *
22436 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
22437 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
22438 *
22439 * ```ts
22440 const u = URI.parse('file://server/c$/folder/file.txt')
22441 u.authority === 'server'
22442 u.path === '/shares/c$/file.txt'
22443 u.fsPath === '\\server\c$\folder\file.txt'
22444 ```
22445 *
22446 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
22447 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
22448 * with URIs that represent files on disk (`file` scheme).
22449 */
22450 get: function () {
22451 // if (this.scheme !== 'file') {
22452 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
22453 // }
22454 return _makeFsPath(this);
22455 },
22456 enumerable: true,
22457 configurable: true
22458 });
22459 // ---- modify to new -------------------------
22460 URI.prototype.with = function (change) {
22461 if (!change) {
22462 return this;
22463 }
22464 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
22465 if (scheme === undefined) {
22466 scheme = this.scheme;
22467 }
22468 else if (scheme === null) {
22469 scheme = _empty;
22470 }
22471 if (authority === undefined) {
22472 authority = this.authority;
22473 }
22474 else if (authority === null) {
22475 authority = _empty;
22476 }
22477 if (path === undefined) {
22478 path = this.path;
22479 }
22480 else if (path === null) {
22481 path = _empty;
22482 }
22483 if (query === undefined) {
22484 query = this.query;
22485 }
22486 else if (query === null) {
22487 query = _empty;
22488 }
22489 if (fragment === undefined) {
22490 fragment = this.fragment;
22491 }
22492 else if (fragment === null) {
22493 fragment = _empty;
22494 }
22495 if (scheme === this.scheme
22496 && authority === this.authority
22497 && path === this.path
22498 && query === this.query
22499 && fragment === this.fragment) {
22500 return this;
22501 }
22502 return new _URI(scheme, authority, path, query, fragment);
22503 };
22504 // ---- parse & validate ------------------------
22505 /**
22506 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
22507 * `file:///usr/home`, or `scheme:with/path`.
22508 *
22509 * @param value A string which represents an URI (see `URI#toString`).
22510 */
22511 URI.parse = function (value, _strict) {
22512 if (_strict === void 0) { _strict = false; }
22513 var match = _regexp.exec(value);
22514 if (!match) {
22515 return new _URI(_empty, _empty, _empty, _empty, _empty);
22516 }
22517 return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict);
22518 };
22519 /**
22520 * Creates a new URI from a file system path, e.g. `c:\my\files`,
22521 * `/usr/home`, or `\\server\share\some\path`.
22522 *
22523 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
22524 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
22525 * `URI.parse('file://' + path)` because the path might contain characters that are
22526 * interpreted (# and ?). See the following sample:
22527 * ```ts
22528 const good = URI.file('/coding/c#/project1');
22529 good.scheme === 'file';
22530 good.path === '/coding/c#/project1';
22531 good.fragment === '';
22532 const bad = URI.parse('file://' + '/coding/c#/project1');
22533 bad.scheme === 'file';
22534 bad.path === '/coding/c'; // path is now broken
22535 bad.fragment === '/project1';
22536 ```
22537 *
22538 * @param path A file system path (see `URI#fsPath`)
22539 */
22540 URI.file = function (path) {
22541 var authority = _empty;
22542 // normalize to fwd-slashes on windows,
22543 // on other systems bwd-slashes are valid
22544 // filename character, eg /f\oo/ba\r.txt
22545 if (isWindows) {
22546 path = path.replace(/\\/g, _slash);
22547 }
22548 // check for authority as used in UNC shares
22549 // or use the path as given
22550 if (path[0] === _slash && path[1] === _slash) {
22551 var idx = path.indexOf(_slash, 2);
22552 if (idx === -1) {
22553 authority = path.substring(2);
22554 path = _slash;
22555 }
22556 else {
22557 authority = path.substring(2, idx);
22558 path = path.substring(idx) || _slash;
22559 }
22560 }
22561 return new _URI('file', authority, path, _empty, _empty);
22562 };
22563 URI.from = function (components) {
22564 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
22565 };
22566 // ---- printing/externalize ---------------------------
22567 /**
22568 * Creates a string representation for this URI. It's guaranteed that calling
22569 * `URI.parse` with the result of this function creates an URI which is equal
22570 * to this URI.
22571 *
22572 * * The result shall *not* be used for display purposes but for externalization or transport.
22573 * * The result will be encoded using the percentage encoding and encoding happens mostly
22574 * ignore the scheme-specific encoding rules.
22575 *
22576 * @param skipEncoding Do not encode the result, default is `false`
22577 */
22578 URI.prototype.toString = function (skipEncoding) {
22579 if (skipEncoding === void 0) { skipEncoding = false; }
22580 return _asFormatted(this, skipEncoding);
22581 };
22582 URI.prototype.toJSON = function () {
22583 return this;
22584 };
22585 URI.revive = function (data) {
22586 if (!data) {
22587 return data;
22588 }
22589 else if (data instanceof URI) {
22590 return data;
22591 }
22592 else {
22593 var result = new _URI(data);
22594 result._formatted = data.external;
22595 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
22596 return result;
22597 }
22598 };
22599 return URI;
22600}());
22601
22602var _pathSepMarker = isWindows ? 1 : undefined;
22603// tslint:disable-next-line:class-name
22604var _URI = /** @class */ (function (_super) {
22605 __extends(_URI, _super);
22606 function _URI() {
22607 var _this = _super !== null && _super.apply(this, arguments) || this;
22608 _this._formatted = null;
22609 _this._fsPath = null;
22610 return _this;
22611 }
22612 Object.defineProperty(_URI.prototype, "fsPath", {
22613 get: function () {
22614 if (!this._fsPath) {
22615 this._fsPath = _makeFsPath(this);
22616 }
22617 return this._fsPath;
22618 },
22619 enumerable: true,
22620 configurable: true
22621 });
22622 _URI.prototype.toString = function (skipEncoding) {
22623 if (skipEncoding === void 0) { skipEncoding = false; }
22624 if (!skipEncoding) {
22625 if (!this._formatted) {
22626 this._formatted = _asFormatted(this, false);
22627 }
22628 return this._formatted;
22629 }
22630 else {
22631 // we don't cache that
22632 return _asFormatted(this, true);
22633 }
22634 };
22635 _URI.prototype.toJSON = function () {
22636 var res = {
22637 $mid: 1
22638 };
22639 // cached state
22640 if (this._fsPath) {
22641 res.fsPath = this._fsPath;
22642 res._sep = _pathSepMarker;
22643 }
22644 if (this._formatted) {
22645 res.external = this._formatted;
22646 }
22647 // uri components
22648 if (this.path) {
22649 res.path = this.path;
22650 }
22651 if (this.scheme) {
22652 res.scheme = this.scheme;
22653 }
22654 if (this.authority) {
22655 res.authority = this.authority;
22656 }
22657 if (this.query) {
22658 res.query = this.query;
22659 }
22660 if (this.fragment) {
22661 res.fragment = this.fragment;
22662 }
22663 return res;
22664 };
22665 return _URI;
22666}(URI));
22667// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
22668var encodeTable = (_a = {},
22669 _a[58 /* Colon */] = '%3A',
22670 _a[47 /* Slash */] = '%2F',
22671 _a[63 /* QuestionMark */] = '%3F',
22672 _a[35 /* Hash */] = '%23',
22673 _a[91 /* OpenSquareBracket */] = '%5B',
22674 _a[93 /* CloseSquareBracket */] = '%5D',
22675 _a[64 /* AtSign */] = '%40',
22676 _a[33 /* ExclamationMark */] = '%21',
22677 _a[36 /* DollarSign */] = '%24',
22678 _a[38 /* Ampersand */] = '%26',
22679 _a[39 /* SingleQuote */] = '%27',
22680 _a[40 /* OpenParen */] = '%28',
22681 _a[41 /* CloseParen */] = '%29',
22682 _a[42 /* Asterisk */] = '%2A',
22683 _a[43 /* Plus */] = '%2B',
22684 _a[44 /* Comma */] = '%2C',
22685 _a[59 /* Semicolon */] = '%3B',
22686 _a[61 /* Equals */] = '%3D',
22687 _a[32 /* Space */] = '%20',
22688 _a);
22689function encodeURIComponentFast(uriComponent, allowSlash) {
22690 var res = undefined;
22691 var nativeEncodePos = -1;
22692 for (var pos = 0; pos < uriComponent.length; pos++) {
22693 var code = uriComponent.charCodeAt(pos);
22694 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
22695 if ((code >= 97 /* a */ && code <= 122 /* z */)
22696 || (code >= 65 /* A */ && code <= 90 /* Z */)
22697 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
22698 || code === 45 /* Dash */
22699 || code === 46 /* Period */
22700 || code === 95 /* Underline */
22701 || code === 126 /* Tilde */
22702 || (allowSlash && code === 47 /* Slash */)) {
22703 // check if we are delaying native encode
22704 if (nativeEncodePos !== -1) {
22705 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22706 nativeEncodePos = -1;
22707 }
22708 // check if we write into a new string (by default we try to return the param)
22709 if (res !== undefined) {
22710 res += uriComponent.charAt(pos);
22711 }
22712 }
22713 else {
22714 // encoding needed, we need to allocate a new string
22715 if (res === undefined) {
22716 res = uriComponent.substr(0, pos);
22717 }
22718 // check with default table first
22719 var escaped = encodeTable[code];
22720 if (escaped !== undefined) {
22721 // check if we are delaying native encode
22722 if (nativeEncodePos !== -1) {
22723 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22724 nativeEncodePos = -1;
22725 }
22726 // append escaped variant to result
22727 res += escaped;
22728 }
22729 else if (nativeEncodePos === -1) {
22730 // use native encode only when needed
22731 nativeEncodePos = pos;
22732 }
22733 }
22734 }
22735 if (nativeEncodePos !== -1) {
22736 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
22737 }
22738 return res !== undefined ? res : uriComponent;
22739}
22740function encodeURIComponentMinimal(path) {
22741 var res = undefined;
22742 for (var pos = 0; pos < path.length; pos++) {
22743 var code = path.charCodeAt(pos);
22744 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
22745 if (res === undefined) {
22746 res = path.substr(0, pos);
22747 }
22748 res += encodeTable[code];
22749 }
22750 else {
22751 if (res !== undefined) {
22752 res += path[pos];
22753 }
22754 }
22755 }
22756 return res !== undefined ? res : path;
22757}
22758/**
22759 * Compute `fsPath` for the given uri
22760 */
22761function _makeFsPath(uri) {
22762 var value;
22763 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
22764 // unc path: file://shares/c$/far/boo
22765 value = "//" + uri.authority + uri.path;
22766 }
22767 else if (uri.path.charCodeAt(0) === 47 /* Slash */
22768 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
22769 && uri.path.charCodeAt(2) === 58 /* Colon */) {
22770 // windows drive letter: file:///c:/far/boo
22771 value = uri.path[1].toLowerCase() + uri.path.substr(2);
22772 }
22773 else {
22774 // other path
22775 value = uri.path;
22776 }
22777 if (isWindows) {
22778 value = value.replace(/\//g, '\\');
22779 }
22780 return value;
22781}
22782/**
22783 * Create the external version of a uri
22784 */
22785function _asFormatted(uri, skipEncoding) {
22786 var encoder = !skipEncoding
22787 ? encodeURIComponentFast
22788 : encodeURIComponentMinimal;
22789 var res = '';
22790 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
22791 if (scheme) {
22792 res += scheme;
22793 res += ':';
22794 }
22795 if (authority || scheme === 'file') {
22796 res += _slash;
22797 res += _slash;
22798 }
22799 if (authority) {
22800 var idx = authority.indexOf('@');
22801 if (idx !== -1) {
22802 // <user>@<auth>
22803 var userinfo = authority.substr(0, idx);
22804 authority = authority.substr(idx + 1);
22805 idx = userinfo.indexOf(':');
22806 if (idx === -1) {
22807 res += encoder(userinfo, false);
22808 }
22809 else {
22810 // <user>:<pass>@<auth>
22811 res += encoder(userinfo.substr(0, idx), false);
22812 res += ':';
22813 res += encoder(userinfo.substr(idx + 1), false);
22814 }
22815 res += '@';
22816 }
22817 authority = authority.toLowerCase();
22818 idx = authority.indexOf(':');
22819 if (idx === -1) {
22820 res += encoder(authority, false);
22821 }
22822 else {
22823 // <auth>:<port>
22824 res += encoder(authority.substr(0, idx), false);
22825 res += authority.substr(idx);
22826 }
22827 }
22828 if (path) {
22829 // lower-case windows drive letters in /C:/fff or C:/fff
22830 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
22831 var code = path.charCodeAt(1);
22832 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22833 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
22834 }
22835 }
22836 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
22837 var code = path.charCodeAt(0);
22838 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22839 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
22840 }
22841 }
22842 // encode the rest of the path
22843 res += encoder(path, true);
22844 }
22845 if (query) {
22846 res += '?';
22847 res += encoder(query, false);
22848 }
22849 if (fragment) {
22850 res += '#';
22851 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
22852 }
22853 return res;
22854}
22855
22856
22857/***/ }),
22858/* 150 */,
22859/* 151 */,
22860/* 152 */,
22861/* 153 */,
22862/* 154 */,
22863/* 155 */,
22864/* 156 */,
22865/* 157 */,
22866/* 158 */,
22867/* 159 */,
22868/* 160 */,
22869/* 161 */,
22870/* 162 */,
22871/* 163 */,
22872/* 164 */,
22873/* 165 */,
22874/* 166 */
22875/***/ (function(module, __webpack_exports__, __webpack_require__) {
22876
22877"use strict";
22878__webpack_require__.r(__webpack_exports__);
22879/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
22880/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
22881
22882/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
22883/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
22884
22885/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
22886/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
22887
22888/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(181);
22889/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
22890
22891/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
22892/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
22893
22894/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(190);
22895/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
22896
22897/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(191);
22898/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
22899
22900/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(208);
22901/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
22902
22903/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(209);
22904/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
22905
22906/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(213);
22907/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
22908
22909/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(192);
22910/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
22911
22912/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(214);
22913/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
22914
22915/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(217);
22916/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
22917
22918/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
22919
22920/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(198);
22921/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
22922
22923/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(175);
22924/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
22925
22926/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(169);
22927/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
22928
22929/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(200);
22930/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
22931
22932/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
22933
22934/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(182);
22935/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
22936
22937/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(218);
22938/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
22939
22940/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(183);
22941/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
22942
22943/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(219);
22944/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
22945
22946/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(220);
22947/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
22948
22949/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(221);
22950/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
22951
22952/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(186);
22953/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
22954
22955/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(178);
22956/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
22957
22958/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(222);
22959/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
22960
22961/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(223);
22962/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
22963
22964/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(225);
22965/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
22966
22967/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(226);
22968/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
22969
22970/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(237);
22971/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
22972
22973/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(248);
22974/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
22975
22976/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(201);
22977/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
22978
22979/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(249);
22980/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
22981
22982/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(241);
22983/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
22984
22985/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(250);
22986/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
22987
22988/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(251);
22989/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
22990
22991/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(252);
22992/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
22993
22994/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(253);
22995/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
22996
22997/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(254);
22998/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
22999
23000/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(256);
23001/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
23002
23003/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(257);
23004/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
23005
23006/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(202);
23007/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
23008
23009/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(258);
23010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
23011
23012/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(259);
23013/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
23014
23015/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(260);
23016/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
23017
23018/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(263);
23019/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
23020
23021/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(264);
23022/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
23023
23024/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(207);
23025/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
23026
23027/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(265);
23028/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
23029
23030/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(266);
23031/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
23032
23033/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(267);
23034/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
23035
23036/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(242);
23037/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
23038
23039/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
23040
23041/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
23042
23043/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(173);
23044/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
23045
23046/** PURE_IMPORTS_START PURE_IMPORTS_END */
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102//# sourceMappingURL=index.js.map
23103
23104
23105/***/ }),
23106/* 167 */
23107/***/ (function(module, __webpack_exports__, __webpack_require__) {
23108
23109"use strict";
23110__webpack_require__.r(__webpack_exports__);
23111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
23112/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
23113/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(180);
23114/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
23115/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
23116/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
23117/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
23118
23119
23120
23121
23122
23123var Observable = /*@__PURE__*/ (function () {
23124 function Observable(subscribe) {
23125 this._isScalar = false;
23126 if (subscribe) {
23127 this._subscribe = subscribe;
23128 }
23129 }
23130 Observable.prototype.lift = function (operator) {
23131 var observable = new Observable();
23132 observable.source = this;
23133 observable.operator = operator;
23134 return observable;
23135 };
23136 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
23137 var operator = this.operator;
23138 var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
23139 if (operator) {
23140 sink.add(operator.call(sink, this.source));
23141 }
23142 else {
23143 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
23144 this._subscribe(sink) :
23145 this._trySubscribe(sink));
23146 }
23147 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23148 if (sink.syncErrorThrowable) {
23149 sink.syncErrorThrowable = false;
23150 if (sink.syncErrorThrown) {
23151 throw sink.syncErrorValue;
23152 }
23153 }
23154 }
23155 return sink;
23156 };
23157 Observable.prototype._trySubscribe = function (sink) {
23158 try {
23159 return this._subscribe(sink);
23160 }
23161 catch (err) {
23162 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23163 sink.syncErrorThrown = true;
23164 sink.syncErrorValue = err;
23165 }
23166 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
23167 sink.error(err);
23168 }
23169 else {
23170 console.warn(err);
23171 }
23172 }
23173 };
23174 Observable.prototype.forEach = function (next, promiseCtor) {
23175 var _this = this;
23176 promiseCtor = getPromiseCtor(promiseCtor);
23177 return new promiseCtor(function (resolve, reject) {
23178 var subscription;
23179 subscription = _this.subscribe(function (value) {
23180 try {
23181 next(value);
23182 }
23183 catch (err) {
23184 reject(err);
23185 if (subscription) {
23186 subscription.unsubscribe();
23187 }
23188 }
23189 }, reject, resolve);
23190 });
23191 };
23192 Observable.prototype._subscribe = function (subscriber) {
23193 var source = this.source;
23194 return source && source.subscribe(subscriber);
23195 };
23196 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
23197 return this;
23198 };
23199 Observable.prototype.pipe = function () {
23200 var operations = [];
23201 for (var _i = 0; _i < arguments.length; _i++) {
23202 operations[_i] = arguments[_i];
23203 }
23204 if (operations.length === 0) {
23205 return this;
23206 }
23207 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
23208 };
23209 Observable.prototype.toPromise = function (promiseCtor) {
23210 var _this = this;
23211 promiseCtor = getPromiseCtor(promiseCtor);
23212 return new promiseCtor(function (resolve, reject) {
23213 var value;
23214 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
23215 });
23216 };
23217 Observable.create = function (subscribe) {
23218 return new Observable(subscribe);
23219 };
23220 return Observable;
23221}());
23222
23223function getPromiseCtor(promiseCtor) {
23224 if (!promiseCtor) {
23225 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
23226 }
23227 if (!promiseCtor) {
23228 throw new Error('no Promise impl found');
23229 }
23230 return promiseCtor;
23231}
23232//# sourceMappingURL=Observable.js.map
23233
23234
23235/***/ }),
23236/* 168 */
23237/***/ (function(module, __webpack_exports__, __webpack_require__) {
23238
23239"use strict";
23240__webpack_require__.r(__webpack_exports__);
23241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
23242/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
23243/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
23244
23245function canReportError(observer) {
23246 while (observer) {
23247 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
23248 if (closed_1 || isStopped) {
23249 return false;
23250 }
23251 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
23252 observer = destination;
23253 }
23254 else {
23255 observer = null;
23256 }
23257 }
23258 return true;
23259}
23260//# sourceMappingURL=canReportError.js.map
23261
23262
23263/***/ }),
23264/* 169 */
23265/***/ (function(module, __webpack_exports__, __webpack_require__) {
23266
23267"use strict";
23268__webpack_require__.r(__webpack_exports__);
23269/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
23270/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; });
23271/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
23272/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
23273/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
23274/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
23275/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(179);
23276/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(173);
23277/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(174);
23278/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
23279
23280
23281
23282
23283
23284
23285
23286var Subscriber = /*@__PURE__*/ (function (_super) {
23287 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
23288 function Subscriber(destinationOrNext, error, complete) {
23289 var _this = _super.call(this) || this;
23290 _this.syncErrorValue = null;
23291 _this.syncErrorThrown = false;
23292 _this.syncErrorThrowable = false;
23293 _this.isStopped = false;
23294 switch (arguments.length) {
23295 case 0:
23296 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23297 break;
23298 case 1:
23299 if (!destinationOrNext) {
23300 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23301 break;
23302 }
23303 if (typeof destinationOrNext === 'object') {
23304 if (destinationOrNext instanceof Subscriber) {
23305 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
23306 _this.destination = destinationOrNext;
23307 destinationOrNext.add(_this);
23308 }
23309 else {
23310 _this.syncErrorThrowable = true;
23311 _this.destination = new SafeSubscriber(_this, destinationOrNext);
23312 }
23313 break;
23314 }
23315 default:
23316 _this.syncErrorThrowable = true;
23317 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
23318 break;
23319 }
23320 return _this;
23321 }
23322 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
23323 Subscriber.create = function (next, error, complete) {
23324 var subscriber = new Subscriber(next, error, complete);
23325 subscriber.syncErrorThrowable = false;
23326 return subscriber;
23327 };
23328 Subscriber.prototype.next = function (value) {
23329 if (!this.isStopped) {
23330 this._next(value);
23331 }
23332 };
23333 Subscriber.prototype.error = function (err) {
23334 if (!this.isStopped) {
23335 this.isStopped = true;
23336 this._error(err);
23337 }
23338 };
23339 Subscriber.prototype.complete = function () {
23340 if (!this.isStopped) {
23341 this.isStopped = true;
23342 this._complete();
23343 }
23344 };
23345 Subscriber.prototype.unsubscribe = function () {
23346 if (this.closed) {
23347 return;
23348 }
23349 this.isStopped = true;
23350 _super.prototype.unsubscribe.call(this);
23351 };
23352 Subscriber.prototype._next = function (value) {
23353 this.destination.next(value);
23354 };
23355 Subscriber.prototype._error = function (err) {
23356 this.destination.error(err);
23357 this.unsubscribe();
23358 };
23359 Subscriber.prototype._complete = function () {
23360 this.destination.complete();
23361 this.unsubscribe();
23362 };
23363 Subscriber.prototype._unsubscribeAndRecycle = function () {
23364 var _parentOrParents = this._parentOrParents;
23365 this._parentOrParents = null;
23366 this.unsubscribe();
23367 this.closed = false;
23368 this.isStopped = false;
23369 this._parentOrParents = _parentOrParents;
23370 return this;
23371 };
23372 return Subscriber;
23373}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
23374
23375var SafeSubscriber = /*@__PURE__*/ (function (_super) {
23376 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
23377 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
23378 var _this = _super.call(this) || this;
23379 _this._parentSubscriber = _parentSubscriber;
23380 var next;
23381 var context = _this;
23382 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
23383 next = observerOrNext;
23384 }
23385 else if (observerOrNext) {
23386 next = observerOrNext.next;
23387 error = observerOrNext.error;
23388 complete = observerOrNext.complete;
23389 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
23390 context = Object.create(observerOrNext);
23391 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
23392 _this.add(context.unsubscribe.bind(context));
23393 }
23394 context.unsubscribe = _this.unsubscribe.bind(_this);
23395 }
23396 }
23397 _this._context = context;
23398 _this._next = next;
23399 _this._error = error;
23400 _this._complete = complete;
23401 return _this;
23402 }
23403 SafeSubscriber.prototype.next = function (value) {
23404 if (!this.isStopped && this._next) {
23405 var _parentSubscriber = this._parentSubscriber;
23406 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23407 this.__tryOrUnsub(this._next, value);
23408 }
23409 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
23410 this.unsubscribe();
23411 }
23412 }
23413 };
23414 SafeSubscriber.prototype.error = function (err) {
23415 if (!this.isStopped) {
23416 var _parentSubscriber = this._parentSubscriber;
23417 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
23418 if (this._error) {
23419 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23420 this.__tryOrUnsub(this._error, err);
23421 this.unsubscribe();
23422 }
23423 else {
23424 this.__tryOrSetError(_parentSubscriber, this._error, err);
23425 this.unsubscribe();
23426 }
23427 }
23428 else if (!_parentSubscriber.syncErrorThrowable) {
23429 this.unsubscribe();
23430 if (useDeprecatedSynchronousErrorHandling) {
23431 throw err;
23432 }
23433 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23434 }
23435 else {
23436 if (useDeprecatedSynchronousErrorHandling) {
23437 _parentSubscriber.syncErrorValue = err;
23438 _parentSubscriber.syncErrorThrown = true;
23439 }
23440 else {
23441 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23442 }
23443 this.unsubscribe();
23444 }
23445 }
23446 };
23447 SafeSubscriber.prototype.complete = function () {
23448 var _this = this;
23449 if (!this.isStopped) {
23450 var _parentSubscriber = this._parentSubscriber;
23451 if (this._complete) {
23452 var wrappedComplete = function () { return _this._complete.call(_this._context); };
23453 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23454 this.__tryOrUnsub(wrappedComplete);
23455 this.unsubscribe();
23456 }
23457 else {
23458 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
23459 this.unsubscribe();
23460 }
23461 }
23462 else {
23463 this.unsubscribe();
23464 }
23465 }
23466 };
23467 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
23468 try {
23469 fn.call(this._context, value);
23470 }
23471 catch (err) {
23472 this.unsubscribe();
23473 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23474 throw err;
23475 }
23476 else {
23477 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23478 }
23479 }
23480 };
23481 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
23482 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23483 throw new Error('bad call');
23484 }
23485 try {
23486 fn.call(this._context, value);
23487 }
23488 catch (err) {
23489 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23490 parent.syncErrorValue = err;
23491 parent.syncErrorThrown = true;
23492 return true;
23493 }
23494 else {
23495 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23496 return true;
23497 }
23498 }
23499 return false;
23500 };
23501 SafeSubscriber.prototype._unsubscribe = function () {
23502 var _parentSubscriber = this._parentSubscriber;
23503 this._context = null;
23504 this._parentSubscriber = null;
23505 _parentSubscriber.unsubscribe();
23506 };
23507 return SafeSubscriber;
23508}(Subscriber));
23509
23510//# sourceMappingURL=Subscriber.js.map
23511
23512
23513/***/ }),
23514/* 170 */
23515/***/ (function(module, __webpack_exports__, __webpack_require__) {
23516
23517"use strict";
23518__webpack_require__.r(__webpack_exports__);
23519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
23520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
23521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
23522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
23523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
23524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
23525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
23526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
23527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
23528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
23529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
23530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
23531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
23532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
23533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
23534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
23535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
23536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
23537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
23538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
23539/*! *****************************************************************************
23540Copyright (c) Microsoft Corporation. All rights reserved.
23541Licensed under the Apache License, Version 2.0 (the "License"); you may not use
23542this file except in compliance with the License. You may obtain a copy of the
23543License at http://www.apache.org/licenses/LICENSE-2.0
23544
23545THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23546KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
23547WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23548MERCHANTABLITY OR NON-INFRINGEMENT.
23549
23550See the Apache Version 2.0 License for specific language governing permissions
23551and limitations under the License.
23552***************************************************************************** */
23553/* global Reflect, Promise */
23554
23555var extendStatics = function(d, b) {
23556 extendStatics = Object.setPrototypeOf ||
23557 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23558 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23559 return extendStatics(d, b);
23560};
23561
23562function __extends(d, b) {
23563 extendStatics(d, b);
23564 function __() { this.constructor = d; }
23565 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23566}
23567
23568var __assign = function() {
23569 __assign = Object.assign || function __assign(t) {
23570 for (var s, i = 1, n = arguments.length; i < n; i++) {
23571 s = arguments[i];
23572 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
23573 }
23574 return t;
23575 }
23576 return __assign.apply(this, arguments);
23577}
23578
23579function __rest(s, e) {
23580 var t = {};
23581 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23582 t[p] = s[p];
23583 if (s != null && typeof Object.getOwnPropertySymbols === "function")
23584 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23585 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23586 t[p[i]] = s[p[i]];
23587 }
23588 return t;
23589}
23590
23591function __decorate(decorators, target, key, desc) {
23592 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23593 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23594 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;
23595 return c > 3 && r && Object.defineProperty(target, key, r), r;
23596}
23597
23598function __param(paramIndex, decorator) {
23599 return function (target, key) { decorator(target, key, paramIndex); }
23600}
23601
23602function __metadata(metadataKey, metadataValue) {
23603 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
23604}
23605
23606function __awaiter(thisArg, _arguments, P, generator) {
23607 return new (P || (P = Promise))(function (resolve, reject) {
23608 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
23609 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23610 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
23611 step((generator = generator.apply(thisArg, _arguments || [])).next());
23612 });
23613}
23614
23615function __generator(thisArg, body) {
23616 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23617 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23618 function verb(n) { return function (v) { return step([n, v]); }; }
23619 function step(op) {
23620 if (f) throw new TypeError("Generator is already executing.");
23621 while (_) try {
23622 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;
23623 if (y = 0, t) op = [op[0] & 2, t.value];
23624 switch (op[0]) {
23625 case 0: case 1: t = op; break;
23626 case 4: _.label++; return { value: op[1], done: false };
23627 case 5: _.label++; y = op[1]; op = [0]; continue;
23628 case 7: op = _.ops.pop(); _.trys.pop(); continue;
23629 default:
23630 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
23631 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
23632 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
23633 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
23634 if (t[2]) _.ops.pop();
23635 _.trys.pop(); continue;
23636 }
23637 op = body.call(thisArg, _);
23638 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
23639 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
23640 }
23641}
23642
23643function __exportStar(m, exports) {
23644 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
23645}
23646
23647function __values(o) {
23648 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
23649 if (m) return m.call(o);
23650 return {
23651 next: function () {
23652 if (o && i >= o.length) o = void 0;
23653 return { value: o && o[i++], done: !o };
23654 }
23655 };
23656}
23657
23658function __read(o, n) {
23659 var m = typeof Symbol === "function" && o[Symbol.iterator];
23660 if (!m) return o;
23661 var i = m.call(o), r, ar = [], e;
23662 try {
23663 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23664 }
23665 catch (error) { e = { error: error }; }
23666 finally {
23667 try {
23668 if (r && !r.done && (m = i["return"])) m.call(i);
23669 }
23670 finally { if (e) throw e.error; }
23671 }
23672 return ar;
23673}
23674
23675function __spread() {
23676 for (var ar = [], i = 0; i < arguments.length; i++)
23677 ar = ar.concat(__read(arguments[i]));
23678 return ar;
23679}
23680
23681function __spreadArrays() {
23682 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
23683 for (var r = Array(s), k = 0, i = 0; i < il; i++)
23684 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
23685 r[k] = a[j];
23686 return r;
23687};
23688
23689function __await(v) {
23690 return this instanceof __await ? (this.v = v, this) : new __await(v);
23691}
23692
23693function __asyncGenerator(thisArg, _arguments, generator) {
23694 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23695 var g = generator.apply(thisArg, _arguments || []), i, q = [];
23696 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
23697 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); }); }; }
23698 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
23699 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
23700 function fulfill(value) { resume("next", value); }
23701 function reject(value) { resume("throw", value); }
23702 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23703}
23704
23705function __asyncDelegator(o) {
23706 var i, p;
23707 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
23708 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; }
23709}
23710
23711function __asyncValues(o) {
23712 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23713 var m = o[Symbol.asyncIterator], i;
23714 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);
23715 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); }); }; }
23716 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
23717}
23718
23719function __makeTemplateObject(cooked, raw) {
23720 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
23721 return cooked;
23722};
23723
23724function __importStar(mod) {
23725 if (mod && mod.__esModule) return mod;
23726 var result = {};
23727 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
23728 result.default = mod;
23729 return result;
23730}
23731
23732function __importDefault(mod) {
23733 return (mod && mod.__esModule) ? mod : { default: mod };
23734}
23735
23736
23737/***/ }),
23738/* 171 */
23739/***/ (function(module, __webpack_exports__, __webpack_require__) {
23740
23741"use strict";
23742__webpack_require__.r(__webpack_exports__);
23743/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
23744/** PURE_IMPORTS_START PURE_IMPORTS_END */
23745function isFunction(x) {
23746 return typeof x === 'function';
23747}
23748//# sourceMappingURL=isFunction.js.map
23749
23750
23751/***/ }),
23752/* 172 */
23753/***/ (function(module, __webpack_exports__, __webpack_require__) {
23754
23755"use strict";
23756__webpack_require__.r(__webpack_exports__);
23757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
23758/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
23759/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
23760/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
23761
23762
23763var empty = {
23764 closed: true,
23765 next: function (value) { },
23766 error: function (err) {
23767 if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
23768 throw err;
23769 }
23770 else {
23771 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
23772 }
23773 },
23774 complete: function () { }
23775};
23776//# sourceMappingURL=Observer.js.map
23777
23778
23779/***/ }),
23780/* 173 */
23781/***/ (function(module, __webpack_exports__, __webpack_require__) {
23782
23783"use strict";
23784__webpack_require__.r(__webpack_exports__);
23785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
23786/** PURE_IMPORTS_START PURE_IMPORTS_END */
23787var _enable_super_gross_mode_that_will_cause_bad_things = false;
23788var config = {
23789 Promise: undefined,
23790 set useDeprecatedSynchronousErrorHandling(value) {
23791 if (value) {
23792 var error = /*@__PURE__*/ new Error();
23793 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
23794 }
23795 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
23796 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
23797 }
23798 _enable_super_gross_mode_that_will_cause_bad_things = value;
23799 },
23800 get useDeprecatedSynchronousErrorHandling() {
23801 return _enable_super_gross_mode_that_will_cause_bad_things;
23802 },
23803};
23804//# sourceMappingURL=config.js.map
23805
23806
23807/***/ }),
23808/* 174 */
23809/***/ (function(module, __webpack_exports__, __webpack_require__) {
23810
23811"use strict";
23812__webpack_require__.r(__webpack_exports__);
23813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
23814/** PURE_IMPORTS_START PURE_IMPORTS_END */
23815function hostReportError(err) {
23816 setTimeout(function () { throw err; }, 0);
23817}
23818//# sourceMappingURL=hostReportError.js.map
23819
23820
23821/***/ }),
23822/* 175 */
23823/***/ (function(module, __webpack_exports__, __webpack_require__) {
23824
23825"use strict";
23826__webpack_require__.r(__webpack_exports__);
23827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
23828/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
23829/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
23830/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
23831/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
23832/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
23833
23834
23835
23836
23837var Subscription = /*@__PURE__*/ (function () {
23838 function Subscription(unsubscribe) {
23839 this.closed = false;
23840 this._parentOrParents = null;
23841 this._subscriptions = null;
23842 if (unsubscribe) {
23843 this._unsubscribe = unsubscribe;
23844 }
23845 }
23846 Subscription.prototype.unsubscribe = function () {
23847 var errors;
23848 if (this.closed) {
23849 return;
23850 }
23851 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
23852 this.closed = true;
23853 this._parentOrParents = null;
23854 this._subscriptions = null;
23855 if (_parentOrParents instanceof Subscription) {
23856 _parentOrParents.remove(this);
23857 }
23858 else if (_parentOrParents !== null) {
23859 for (var index = 0; index < _parentOrParents.length; ++index) {
23860 var parent_1 = _parentOrParents[index];
23861 parent_1.remove(this);
23862 }
23863 }
23864 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
23865 try {
23866 _unsubscribe.call(this);
23867 }
23868 catch (e) {
23869 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
23870 }
23871 }
23872 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
23873 var index = -1;
23874 var len = _subscriptions.length;
23875 while (++index < len) {
23876 var sub = _subscriptions[index];
23877 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
23878 try {
23879 sub.unsubscribe();
23880 }
23881 catch (e) {
23882 errors = errors || [];
23883 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
23884 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
23885 }
23886 else {
23887 errors.push(e);
23888 }
23889 }
23890 }
23891 }
23892 }
23893 if (errors) {
23894 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
23895 }
23896 };
23897 Subscription.prototype.add = function (teardown) {
23898 var subscription = teardown;
23899 if (!teardown) {
23900 return Subscription.EMPTY;
23901 }
23902 switch (typeof teardown) {
23903 case 'function':
23904 subscription = new Subscription(teardown);
23905 case 'object':
23906 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
23907 return subscription;
23908 }
23909 else if (this.closed) {
23910 subscription.unsubscribe();
23911 return subscription;
23912 }
23913 else if (!(subscription instanceof Subscription)) {
23914 var tmp = subscription;
23915 subscription = new Subscription();
23916 subscription._subscriptions = [tmp];
23917 }
23918 break;
23919 default: {
23920 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
23921 }
23922 }
23923 var _parentOrParents = subscription._parentOrParents;
23924 if (_parentOrParents === null) {
23925 subscription._parentOrParents = this;
23926 }
23927 else if (_parentOrParents instanceof Subscription) {
23928 if (_parentOrParents === this) {
23929 return subscription;
23930 }
23931 subscription._parentOrParents = [_parentOrParents, this];
23932 }
23933 else if (_parentOrParents.indexOf(this) === -1) {
23934 _parentOrParents.push(this);
23935 }
23936 else {
23937 return subscription;
23938 }
23939 var subscriptions = this._subscriptions;
23940 if (subscriptions === null) {
23941 this._subscriptions = [subscription];
23942 }
23943 else {
23944 subscriptions.push(subscription);
23945 }
23946 return subscription;
23947 };
23948 Subscription.prototype.remove = function (subscription) {
23949 var subscriptions = this._subscriptions;
23950 if (subscriptions) {
23951 var subscriptionIndex = subscriptions.indexOf(subscription);
23952 if (subscriptionIndex !== -1) {
23953 subscriptions.splice(subscriptionIndex, 1);
23954 }
23955 }
23956 };
23957 Subscription.EMPTY = (function (empty) {
23958 empty.closed = true;
23959 return empty;
23960 }(new Subscription()));
23961 return Subscription;
23962}());
23963
23964function flattenUnsubscriptionErrors(errors) {
23965 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err); }, []);
23966}
23967//# sourceMappingURL=Subscription.js.map
23968
23969
23970/***/ }),
23971/* 176 */
23972/***/ (function(module, __webpack_exports__, __webpack_require__) {
23973
23974"use strict";
23975__webpack_require__.r(__webpack_exports__);
23976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
23977/** PURE_IMPORTS_START PURE_IMPORTS_END */
23978var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
23979//# sourceMappingURL=isArray.js.map
23980
23981
23982/***/ }),
23983/* 177 */
23984/***/ (function(module, __webpack_exports__, __webpack_require__) {
23985
23986"use strict";
23987__webpack_require__.r(__webpack_exports__);
23988/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
23989/** PURE_IMPORTS_START PURE_IMPORTS_END */
23990function isObject(x) {
23991 return x !== null && typeof x === 'object';
23992}
23993//# sourceMappingURL=isObject.js.map
23994
23995
23996/***/ }),
23997/* 178 */
23998/***/ (function(module, __webpack_exports__, __webpack_require__) {
23999
24000"use strict";
24001__webpack_require__.r(__webpack_exports__);
24002/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
24003/** PURE_IMPORTS_START PURE_IMPORTS_END */
24004var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
24005 function UnsubscriptionErrorImpl(errors) {
24006 Error.call(this);
24007 this.message = errors ?
24008 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
24009 this.name = 'UnsubscriptionError';
24010 this.errors = errors;
24011 return this;
24012 }
24013 UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24014 return UnsubscriptionErrorImpl;
24015})();
24016var UnsubscriptionError = UnsubscriptionErrorImpl;
24017//# sourceMappingURL=UnsubscriptionError.js.map
24018
24019
24020/***/ }),
24021/* 179 */
24022/***/ (function(module, __webpack_exports__, __webpack_require__) {
24023
24024"use strict";
24025__webpack_require__.r(__webpack_exports__);
24026/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; });
24027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
24028/** PURE_IMPORTS_START PURE_IMPORTS_END */
24029var rxSubscriber = /*@__PURE__*/ (function () {
24030 return typeof Symbol === 'function'
24031 ? /*@__PURE__*/ Symbol('rxSubscriber')
24032 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
24033})();
24034var $$rxSubscriber = rxSubscriber;
24035//# sourceMappingURL=rxSubscriber.js.map
24036
24037
24038/***/ }),
24039/* 180 */
24040/***/ (function(module, __webpack_exports__, __webpack_require__) {
24041
24042"use strict";
24043__webpack_require__.r(__webpack_exports__);
24044/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
24045/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24046/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
24047/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
24048/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
24049
24050
24051
24052function toSubscriber(nextOrObserver, error, complete) {
24053 if (nextOrObserver) {
24054 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
24055 return nextOrObserver;
24056 }
24057 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
24058 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
24059 }
24060 }
24061 if (!nextOrObserver && !error && !complete) {
24062 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
24063 }
24064 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
24065}
24066//# sourceMappingURL=toSubscriber.js.map
24067
24068
24069/***/ }),
24070/* 181 */
24071/***/ (function(module, __webpack_exports__, __webpack_require__) {
24072
24073"use strict";
24074__webpack_require__.r(__webpack_exports__);
24075/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
24076/** PURE_IMPORTS_START PURE_IMPORTS_END */
24077var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
24078//# sourceMappingURL=observable.js.map
24079
24080
24081/***/ }),
24082/* 182 */
24083/***/ (function(module, __webpack_exports__, __webpack_require__) {
24084
24085"use strict";
24086__webpack_require__.r(__webpack_exports__);
24087/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
24088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
24089/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
24090/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */
24091
24092function pipe() {
24093 var fns = [];
24094 for (var _i = 0; _i < arguments.length; _i++) {
24095 fns[_i] = arguments[_i];
24096 }
24097 return pipeFromArray(fns);
24098}
24099function pipeFromArray(fns) {
24100 if (fns.length === 0) {
24101 return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"];
24102 }
24103 if (fns.length === 1) {
24104 return fns[0];
24105 }
24106 return function piped(input) {
24107 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
24108 };
24109}
24110//# sourceMappingURL=pipe.js.map
24111
24112
24113/***/ }),
24114/* 183 */
24115/***/ (function(module, __webpack_exports__, __webpack_require__) {
24116
24117"use strict";
24118__webpack_require__.r(__webpack_exports__);
24119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
24120/** PURE_IMPORTS_START PURE_IMPORTS_END */
24121function identity(x) {
24122 return x;
24123}
24124//# sourceMappingURL=identity.js.map
24125
24126
24127/***/ }),
24128/* 184 */
24129/***/ (function(module, __webpack_exports__, __webpack_require__) {
24130
24131"use strict";
24132__webpack_require__.r(__webpack_exports__);
24133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
24134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
24135/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24136/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24137/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
24138/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
24139/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
24140/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
24141/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
24142
24143
24144
24145
24146
24147
24148var ConnectableObservable = /*@__PURE__*/ (function (_super) {
24149 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
24150 function ConnectableObservable(source, subjectFactory) {
24151 var _this = _super.call(this) || this;
24152 _this.source = source;
24153 _this.subjectFactory = subjectFactory;
24154 _this._refCount = 0;
24155 _this._isComplete = false;
24156 return _this;
24157 }
24158 ConnectableObservable.prototype._subscribe = function (subscriber) {
24159 return this.getSubject().subscribe(subscriber);
24160 };
24161 ConnectableObservable.prototype.getSubject = function () {
24162 var subject = this._subject;
24163 if (!subject || subject.isStopped) {
24164 this._subject = this.subjectFactory();
24165 }
24166 return this._subject;
24167 };
24168 ConnectableObservable.prototype.connect = function () {
24169 var connection = this._connection;
24170 if (!connection) {
24171 this._isComplete = false;
24172 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
24173 connection.add(this.source
24174 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
24175 if (connection.closed) {
24176 this._connection = null;
24177 connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
24178 }
24179 }
24180 return connection;
24181 };
24182 ConnectableObservable.prototype.refCount = function () {
24183 return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
24184 };
24185 return ConnectableObservable;
24186}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
24187
24188var connectableObservableDescriptor = /*@__PURE__*/ (function () {
24189 var connectableProto = ConnectableObservable.prototype;
24190 return {
24191 operator: { value: null },
24192 _refCount: { value: 0, writable: true },
24193 _subject: { value: null, writable: true },
24194 _connection: { value: null, writable: true },
24195 _subscribe: { value: connectableProto._subscribe },
24196 _isComplete: { value: connectableProto._isComplete, writable: true },
24197 getSubject: { value: connectableProto.getSubject },
24198 connect: { value: connectableProto.connect },
24199 refCount: { value: connectableProto.refCount }
24200 };
24201})();
24202var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
24203 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
24204 function ConnectableSubscriber(destination, connectable) {
24205 var _this = _super.call(this, destination) || this;
24206 _this.connectable = connectable;
24207 return _this;
24208 }
24209 ConnectableSubscriber.prototype._error = function (err) {
24210 this._unsubscribe();
24211 _super.prototype._error.call(this, err);
24212 };
24213 ConnectableSubscriber.prototype._complete = function () {
24214 this.connectable._isComplete = true;
24215 this._unsubscribe();
24216 _super.prototype._complete.call(this);
24217 };
24218 ConnectableSubscriber.prototype._unsubscribe = function () {
24219 var connectable = this.connectable;
24220 if (connectable) {
24221 this.connectable = null;
24222 var connection = connectable._connection;
24223 connectable._refCount = 0;
24224 connectable._subject = null;
24225 connectable._connection = null;
24226 if (connection) {
24227 connection.unsubscribe();
24228 }
24229 }
24230 };
24231 return ConnectableSubscriber;
24232}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
24233var RefCountOperator = /*@__PURE__*/ (function () {
24234 function RefCountOperator(connectable) {
24235 this.connectable = connectable;
24236 }
24237 RefCountOperator.prototype.call = function (subscriber, source) {
24238 var connectable = this.connectable;
24239 connectable._refCount++;
24240 var refCounter = new RefCountSubscriber(subscriber, connectable);
24241 var subscription = source.subscribe(refCounter);
24242 if (!refCounter.closed) {
24243 refCounter.connection = connectable.connect();
24244 }
24245 return subscription;
24246 };
24247 return RefCountOperator;
24248}());
24249var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24250 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24251 function RefCountSubscriber(destination, connectable) {
24252 var _this = _super.call(this, destination) || this;
24253 _this.connectable = connectable;
24254 return _this;
24255 }
24256 RefCountSubscriber.prototype._unsubscribe = function () {
24257 var connectable = this.connectable;
24258 if (!connectable) {
24259 this.connection = null;
24260 return;
24261 }
24262 this.connectable = null;
24263 var refCount = connectable._refCount;
24264 if (refCount <= 0) {
24265 this.connection = null;
24266 return;
24267 }
24268 connectable._refCount = refCount - 1;
24269 if (refCount > 1) {
24270 this.connection = null;
24271 return;
24272 }
24273 var connection = this.connection;
24274 var sharedConnection = connectable._connection;
24275 this.connection = null;
24276 if (sharedConnection && (!connection || sharedConnection === connection)) {
24277 sharedConnection.unsubscribe();
24278 }
24279 };
24280 return RefCountSubscriber;
24281}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
24282//# sourceMappingURL=ConnectableObservable.js.map
24283
24284
24285/***/ }),
24286/* 185 */
24287/***/ (function(module, __webpack_exports__, __webpack_require__) {
24288
24289"use strict";
24290__webpack_require__.r(__webpack_exports__);
24291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
24292/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
24293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
24294/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24295/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
24296/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
24297/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24298/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(186);
24299/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(187);
24300/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(179);
24301/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
24302
24303
24304
24305
24306
24307
24308
24309var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
24310 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
24311 function SubjectSubscriber(destination) {
24312 var _this = _super.call(this, destination) || this;
24313 _this.destination = destination;
24314 return _this;
24315 }
24316 return SubjectSubscriber;
24317}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
24318
24319var Subject = /*@__PURE__*/ (function (_super) {
24320 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
24321 function Subject() {
24322 var _this = _super.call(this) || this;
24323 _this.observers = [];
24324 _this.closed = false;
24325 _this.isStopped = false;
24326 _this.hasError = false;
24327 _this.thrownError = null;
24328 return _this;
24329 }
24330 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
24331 return new SubjectSubscriber(this);
24332 };
24333 Subject.prototype.lift = function (operator) {
24334 var subject = new AnonymousSubject(this, this);
24335 subject.operator = operator;
24336 return subject;
24337 };
24338 Subject.prototype.next = function (value) {
24339 if (this.closed) {
24340 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24341 }
24342 if (!this.isStopped) {
24343 var observers = this.observers;
24344 var len = observers.length;
24345 var copy = observers.slice();
24346 for (var i = 0; i < len; i++) {
24347 copy[i].next(value);
24348 }
24349 }
24350 };
24351 Subject.prototype.error = function (err) {
24352 if (this.closed) {
24353 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24354 }
24355 this.hasError = true;
24356 this.thrownError = err;
24357 this.isStopped = true;
24358 var observers = this.observers;
24359 var len = observers.length;
24360 var copy = observers.slice();
24361 for (var i = 0; i < len; i++) {
24362 copy[i].error(err);
24363 }
24364 this.observers.length = 0;
24365 };
24366 Subject.prototype.complete = function () {
24367 if (this.closed) {
24368 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24369 }
24370 this.isStopped = true;
24371 var observers = this.observers;
24372 var len = observers.length;
24373 var copy = observers.slice();
24374 for (var i = 0; i < len; i++) {
24375 copy[i].complete();
24376 }
24377 this.observers.length = 0;
24378 };
24379 Subject.prototype.unsubscribe = function () {
24380 this.isStopped = true;
24381 this.closed = true;
24382 this.observers = null;
24383 };
24384 Subject.prototype._trySubscribe = function (subscriber) {
24385 if (this.closed) {
24386 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24387 }
24388 else {
24389 return _super.prototype._trySubscribe.call(this, subscriber);
24390 }
24391 };
24392 Subject.prototype._subscribe = function (subscriber) {
24393 if (this.closed) {
24394 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24395 }
24396 else if (this.hasError) {
24397 subscriber.error(this.thrownError);
24398 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24399 }
24400 else if (this.isStopped) {
24401 subscriber.complete();
24402 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24403 }
24404 else {
24405 this.observers.push(subscriber);
24406 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
24407 }
24408 };
24409 Subject.prototype.asObservable = function () {
24410 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
24411 observable.source = this;
24412 return observable;
24413 };
24414 Subject.create = function (destination, source) {
24415 return new AnonymousSubject(destination, source);
24416 };
24417 return Subject;
24418}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
24419
24420var AnonymousSubject = /*@__PURE__*/ (function (_super) {
24421 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
24422 function AnonymousSubject(destination, source) {
24423 var _this = _super.call(this) || this;
24424 _this.destination = destination;
24425 _this.source = source;
24426 return _this;
24427 }
24428 AnonymousSubject.prototype.next = function (value) {
24429 var destination = this.destination;
24430 if (destination && destination.next) {
24431 destination.next(value);
24432 }
24433 };
24434 AnonymousSubject.prototype.error = function (err) {
24435 var destination = this.destination;
24436 if (destination && destination.error) {
24437 this.destination.error(err);
24438 }
24439 };
24440 AnonymousSubject.prototype.complete = function () {
24441 var destination = this.destination;
24442 if (destination && destination.complete) {
24443 this.destination.complete();
24444 }
24445 };
24446 AnonymousSubject.prototype._subscribe = function (subscriber) {
24447 var source = this.source;
24448 if (source) {
24449 return this.source.subscribe(subscriber);
24450 }
24451 else {
24452 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24453 }
24454 };
24455 return AnonymousSubject;
24456}(Subject));
24457
24458//# sourceMappingURL=Subject.js.map
24459
24460
24461/***/ }),
24462/* 186 */
24463/***/ (function(module, __webpack_exports__, __webpack_require__) {
24464
24465"use strict";
24466__webpack_require__.r(__webpack_exports__);
24467/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
24468/** PURE_IMPORTS_START PURE_IMPORTS_END */
24469var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
24470 function ObjectUnsubscribedErrorImpl() {
24471 Error.call(this);
24472 this.message = 'object unsubscribed';
24473 this.name = 'ObjectUnsubscribedError';
24474 return this;
24475 }
24476 ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24477 return ObjectUnsubscribedErrorImpl;
24478})();
24479var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
24480//# sourceMappingURL=ObjectUnsubscribedError.js.map
24481
24482
24483/***/ }),
24484/* 187 */
24485/***/ (function(module, __webpack_exports__, __webpack_require__) {
24486
24487"use strict";
24488__webpack_require__.r(__webpack_exports__);
24489/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
24490/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24491/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
24492/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
24493
24494
24495var SubjectSubscription = /*@__PURE__*/ (function (_super) {
24496 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
24497 function SubjectSubscription(subject, subscriber) {
24498 var _this = _super.call(this) || this;
24499 _this.subject = subject;
24500 _this.subscriber = subscriber;
24501 _this.closed = false;
24502 return _this;
24503 }
24504 SubjectSubscription.prototype.unsubscribe = function () {
24505 if (this.closed) {
24506 return;
24507 }
24508 this.closed = true;
24509 var subject = this.subject;
24510 var observers = subject.observers;
24511 this.subject = null;
24512 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
24513 return;
24514 }
24515 var subscriberIndex = observers.indexOf(this.subscriber);
24516 if (subscriberIndex !== -1) {
24517 observers.splice(subscriberIndex, 1);
24518 }
24519 };
24520 return SubjectSubscription;
24521}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
24522
24523//# sourceMappingURL=SubjectSubscription.js.map
24524
24525
24526/***/ }),
24527/* 188 */
24528/***/ (function(module, __webpack_exports__, __webpack_require__) {
24529
24530"use strict";
24531__webpack_require__.r(__webpack_exports__);
24532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
24533/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24534/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24535/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24536
24537
24538function refCount() {
24539 return function refCountOperatorFunction(source) {
24540 return source.lift(new RefCountOperator(source));
24541 };
24542}
24543var RefCountOperator = /*@__PURE__*/ (function () {
24544 function RefCountOperator(connectable) {
24545 this.connectable = connectable;
24546 }
24547 RefCountOperator.prototype.call = function (subscriber, source) {
24548 var connectable = this.connectable;
24549 connectable._refCount++;
24550 var refCounter = new RefCountSubscriber(subscriber, connectable);
24551 var subscription = source.subscribe(refCounter);
24552 if (!refCounter.closed) {
24553 refCounter.connection = connectable.connect();
24554 }
24555 return subscription;
24556 };
24557 return RefCountOperator;
24558}());
24559var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24560 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24561 function RefCountSubscriber(destination, connectable) {
24562 var _this = _super.call(this, destination) || this;
24563 _this.connectable = connectable;
24564 return _this;
24565 }
24566 RefCountSubscriber.prototype._unsubscribe = function () {
24567 var connectable = this.connectable;
24568 if (!connectable) {
24569 this.connection = null;
24570 return;
24571 }
24572 this.connectable = null;
24573 var refCount = connectable._refCount;
24574 if (refCount <= 0) {
24575 this.connection = null;
24576 return;
24577 }
24578 connectable._refCount = refCount - 1;
24579 if (refCount > 1) {
24580 this.connection = null;
24581 return;
24582 }
24583 var connection = this.connection;
24584 var sharedConnection = connectable._connection;
24585 this.connection = null;
24586 if (sharedConnection && (!connection || sharedConnection === connection)) {
24587 sharedConnection.unsubscribe();
24588 }
24589 };
24590 return RefCountSubscriber;
24591}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24592//# sourceMappingURL=refCount.js.map
24593
24594
24595/***/ }),
24596/* 189 */
24597/***/ (function(module, __webpack_exports__, __webpack_require__) {
24598
24599"use strict";
24600__webpack_require__.r(__webpack_exports__);
24601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
24602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
24603/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24604/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24605/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
24606/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
24607/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
24608/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
24609
24610
24611
24612
24613
24614function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
24615 return function (source) {
24616 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
24617 };
24618}
24619var GroupByOperator = /*@__PURE__*/ (function () {
24620 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
24621 this.keySelector = keySelector;
24622 this.elementSelector = elementSelector;
24623 this.durationSelector = durationSelector;
24624 this.subjectSelector = subjectSelector;
24625 }
24626 GroupByOperator.prototype.call = function (subscriber, source) {
24627 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
24628 };
24629 return GroupByOperator;
24630}());
24631var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
24632 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
24633 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
24634 var _this = _super.call(this, destination) || this;
24635 _this.keySelector = keySelector;
24636 _this.elementSelector = elementSelector;
24637 _this.durationSelector = durationSelector;
24638 _this.subjectSelector = subjectSelector;
24639 _this.groups = null;
24640 _this.attemptedToUnsubscribe = false;
24641 _this.count = 0;
24642 return _this;
24643 }
24644 GroupBySubscriber.prototype._next = function (value) {
24645 var key;
24646 try {
24647 key = this.keySelector(value);
24648 }
24649 catch (err) {
24650 this.error(err);
24651 return;
24652 }
24653 this._group(value, key);
24654 };
24655 GroupBySubscriber.prototype._group = function (value, key) {
24656 var groups = this.groups;
24657 if (!groups) {
24658 groups = this.groups = new Map();
24659 }
24660 var group = groups.get(key);
24661 var element;
24662 if (this.elementSelector) {
24663 try {
24664 element = this.elementSelector(value);
24665 }
24666 catch (err) {
24667 this.error(err);
24668 }
24669 }
24670 else {
24671 element = value;
24672 }
24673 if (!group) {
24674 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
24675 groups.set(key, group);
24676 var groupedObservable = new GroupedObservable(key, group, this);
24677 this.destination.next(groupedObservable);
24678 if (this.durationSelector) {
24679 var duration = void 0;
24680 try {
24681 duration = this.durationSelector(new GroupedObservable(key, group));
24682 }
24683 catch (err) {
24684 this.error(err);
24685 return;
24686 }
24687 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
24688 }
24689 }
24690 if (!group.closed) {
24691 group.next(element);
24692 }
24693 };
24694 GroupBySubscriber.prototype._error = function (err) {
24695 var groups = this.groups;
24696 if (groups) {
24697 groups.forEach(function (group, key) {
24698 group.error(err);
24699 });
24700 groups.clear();
24701 }
24702 this.destination.error(err);
24703 };
24704 GroupBySubscriber.prototype._complete = function () {
24705 var groups = this.groups;
24706 if (groups) {
24707 groups.forEach(function (group, key) {
24708 group.complete();
24709 });
24710 groups.clear();
24711 }
24712 this.destination.complete();
24713 };
24714 GroupBySubscriber.prototype.removeGroup = function (key) {
24715 this.groups.delete(key);
24716 };
24717 GroupBySubscriber.prototype.unsubscribe = function () {
24718 if (!this.closed) {
24719 this.attemptedToUnsubscribe = true;
24720 if (this.count === 0) {
24721 _super.prototype.unsubscribe.call(this);
24722 }
24723 }
24724 };
24725 return GroupBySubscriber;
24726}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24727var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
24728 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
24729 function GroupDurationSubscriber(key, group, parent) {
24730 var _this = _super.call(this, group) || this;
24731 _this.key = key;
24732 _this.group = group;
24733 _this.parent = parent;
24734 return _this;
24735 }
24736 GroupDurationSubscriber.prototype._next = function (value) {
24737 this.complete();
24738 };
24739 GroupDurationSubscriber.prototype._unsubscribe = function () {
24740 var _a = this, parent = _a.parent, key = _a.key;
24741 this.key = this.parent = null;
24742 if (parent) {
24743 parent.removeGroup(key);
24744 }
24745 };
24746 return GroupDurationSubscriber;
24747}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24748var GroupedObservable = /*@__PURE__*/ (function (_super) {
24749 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
24750 function GroupedObservable(key, groupSubject, refCountSubscription) {
24751 var _this = _super.call(this) || this;
24752 _this.key = key;
24753 _this.groupSubject = groupSubject;
24754 _this.refCountSubscription = refCountSubscription;
24755 return _this;
24756 }
24757 GroupedObservable.prototype._subscribe = function (subscriber) {
24758 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
24759 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
24760 if (refCountSubscription && !refCountSubscription.closed) {
24761 subscription.add(new InnerRefCountSubscription(refCountSubscription));
24762 }
24763 subscription.add(groupSubject.subscribe(subscriber));
24764 return subscription;
24765 };
24766 return GroupedObservable;
24767}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
24768
24769var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
24770 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
24771 function InnerRefCountSubscription(parent) {
24772 var _this = _super.call(this) || this;
24773 _this.parent = parent;
24774 parent.count++;
24775 return _this;
24776 }
24777 InnerRefCountSubscription.prototype.unsubscribe = function () {
24778 var parent = this.parent;
24779 if (!parent.closed && !this.closed) {
24780 _super.prototype.unsubscribe.call(this);
24781 parent.count -= 1;
24782 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
24783 parent.unsubscribe();
24784 }
24785 }
24786 };
24787 return InnerRefCountSubscription;
24788}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
24789//# sourceMappingURL=groupBy.js.map
24790
24791
24792/***/ }),
24793/* 190 */
24794/***/ (function(module, __webpack_exports__, __webpack_require__) {
24795
24796"use strict";
24797__webpack_require__.r(__webpack_exports__);
24798/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
24799/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24800/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24801/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(186);
24802/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
24803
24804
24805
24806var BehaviorSubject = /*@__PURE__*/ (function (_super) {
24807 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
24808 function BehaviorSubject(_value) {
24809 var _this = _super.call(this) || this;
24810 _this._value = _value;
24811 return _this;
24812 }
24813 Object.defineProperty(BehaviorSubject.prototype, "value", {
24814 get: function () {
24815 return this.getValue();
24816 },
24817 enumerable: true,
24818 configurable: true
24819 });
24820 BehaviorSubject.prototype._subscribe = function (subscriber) {
24821 var subscription = _super.prototype._subscribe.call(this, subscriber);
24822 if (subscription && !subscription.closed) {
24823 subscriber.next(this._value);
24824 }
24825 return subscription;
24826 };
24827 BehaviorSubject.prototype.getValue = function () {
24828 if (this.hasError) {
24829 throw this.thrownError;
24830 }
24831 else if (this.closed) {
24832 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
24833 }
24834 else {
24835 return this._value;
24836 }
24837 };
24838 BehaviorSubject.prototype.next = function (value) {
24839 _super.prototype.next.call(this, this._value = value);
24840 };
24841 return BehaviorSubject;
24842}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
24843
24844//# sourceMappingURL=BehaviorSubject.js.map
24845
24846
24847/***/ }),
24848/* 191 */
24849/***/ (function(module, __webpack_exports__, __webpack_require__) {
24850
24851"use strict";
24852__webpack_require__.r(__webpack_exports__);
24853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
24854/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24855/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24856/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192);
24857/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24858/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(199);
24859/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(186);
24860/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(187);
24861/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
24862
24863
24864
24865
24866
24867
24868
24869var ReplaySubject = /*@__PURE__*/ (function (_super) {
24870 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
24871 function ReplaySubject(bufferSize, windowTime, scheduler) {
24872 if (bufferSize === void 0) {
24873 bufferSize = Number.POSITIVE_INFINITY;
24874 }
24875 if (windowTime === void 0) {
24876 windowTime = Number.POSITIVE_INFINITY;
24877 }
24878 var _this = _super.call(this) || this;
24879 _this.scheduler = scheduler;
24880 _this._events = [];
24881 _this._infiniteTimeWindow = false;
24882 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
24883 _this._windowTime = windowTime < 1 ? 1 : windowTime;
24884 if (windowTime === Number.POSITIVE_INFINITY) {
24885 _this._infiniteTimeWindow = true;
24886 _this.next = _this.nextInfiniteTimeWindow;
24887 }
24888 else {
24889 _this.next = _this.nextTimeWindow;
24890 }
24891 return _this;
24892 }
24893 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
24894 var _events = this._events;
24895 _events.push(value);
24896 if (_events.length > this._bufferSize) {
24897 _events.shift();
24898 }
24899 _super.prototype.next.call(this, value);
24900 };
24901 ReplaySubject.prototype.nextTimeWindow = function (value) {
24902 this._events.push(new ReplayEvent(this._getNow(), value));
24903 this._trimBufferThenGetEvents();
24904 _super.prototype.next.call(this, value);
24905 };
24906 ReplaySubject.prototype._subscribe = function (subscriber) {
24907 var _infiniteTimeWindow = this._infiniteTimeWindow;
24908 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
24909 var scheduler = this.scheduler;
24910 var len = _events.length;
24911 var subscription;
24912 if (this.closed) {
24913 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
24914 }
24915 else if (this.isStopped || this.hasError) {
24916 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24917 }
24918 else {
24919 this.observers.push(subscriber);
24920 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
24921 }
24922 if (scheduler) {
24923 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
24924 }
24925 if (_infiniteTimeWindow) {
24926 for (var i = 0; i < len && !subscriber.closed; i++) {
24927 subscriber.next(_events[i]);
24928 }
24929 }
24930 else {
24931 for (var i = 0; i < len && !subscriber.closed; i++) {
24932 subscriber.next(_events[i].value);
24933 }
24934 }
24935 if (this.hasError) {
24936 subscriber.error(this.thrownError);
24937 }
24938 else if (this.isStopped) {
24939 subscriber.complete();
24940 }
24941 return subscription;
24942 };
24943 ReplaySubject.prototype._getNow = function () {
24944 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
24945 };
24946 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
24947 var now = this._getNow();
24948 var _bufferSize = this._bufferSize;
24949 var _windowTime = this._windowTime;
24950 var _events = this._events;
24951 var eventsCount = _events.length;
24952 var spliceCount = 0;
24953 while (spliceCount < eventsCount) {
24954 if ((now - _events[spliceCount].time) < _windowTime) {
24955 break;
24956 }
24957 spliceCount++;
24958 }
24959 if (eventsCount > _bufferSize) {
24960 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
24961 }
24962 if (spliceCount > 0) {
24963 _events.splice(0, spliceCount);
24964 }
24965 return _events;
24966 };
24967 return ReplaySubject;
24968}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
24969
24970var ReplayEvent = /*@__PURE__*/ (function () {
24971 function ReplayEvent(time, value) {
24972 this.time = time;
24973 this.value = value;
24974 }
24975 return ReplayEvent;
24976}());
24977//# sourceMappingURL=ReplaySubject.js.map
24978
24979
24980/***/ }),
24981/* 192 */
24982/***/ (function(module, __webpack_exports__, __webpack_require__) {
24983
24984"use strict";
24985__webpack_require__.r(__webpack_exports__);
24986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
24987/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
24988/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
24989/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
24990
24991
24992var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
24993//# sourceMappingURL=queue.js.map
24994
24995
24996/***/ }),
24997/* 193 */
24998/***/ (function(module, __webpack_exports__, __webpack_require__) {
24999
25000"use strict";
25001__webpack_require__.r(__webpack_exports__);
25002/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
25003/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25004/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25005/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25006
25007
25008var QueueAction = /*@__PURE__*/ (function (_super) {
25009 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
25010 function QueueAction(scheduler, work) {
25011 var _this = _super.call(this, scheduler, work) || this;
25012 _this.scheduler = scheduler;
25013 _this.work = work;
25014 return _this;
25015 }
25016 QueueAction.prototype.schedule = function (state, delay) {
25017 if (delay === void 0) {
25018 delay = 0;
25019 }
25020 if (delay > 0) {
25021 return _super.prototype.schedule.call(this, state, delay);
25022 }
25023 this.delay = delay;
25024 this.state = state;
25025 this.scheduler.flush(this);
25026 return this;
25027 };
25028 QueueAction.prototype.execute = function (state, delay) {
25029 return (delay > 0 || this.closed) ?
25030 _super.prototype.execute.call(this, state, delay) :
25031 this._execute(state, delay);
25032 };
25033 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25034 if (delay === void 0) {
25035 delay = 0;
25036 }
25037 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25038 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25039 }
25040 return scheduler.flush(this);
25041 };
25042 return QueueAction;
25043}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
25044
25045//# sourceMappingURL=QueueAction.js.map
25046
25047
25048/***/ }),
25049/* 194 */
25050/***/ (function(module, __webpack_exports__, __webpack_require__) {
25051
25052"use strict";
25053__webpack_require__.r(__webpack_exports__);
25054/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
25055/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25056/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
25057/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
25058
25059
25060var AsyncAction = /*@__PURE__*/ (function (_super) {
25061 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
25062 function AsyncAction(scheduler, work) {
25063 var _this = _super.call(this, scheduler, work) || this;
25064 _this.scheduler = scheduler;
25065 _this.work = work;
25066 _this.pending = false;
25067 return _this;
25068 }
25069 AsyncAction.prototype.schedule = function (state, delay) {
25070 if (delay === void 0) {
25071 delay = 0;
25072 }
25073 if (this.closed) {
25074 return this;
25075 }
25076 this.state = state;
25077 var id = this.id;
25078 var scheduler = this.scheduler;
25079 if (id != null) {
25080 this.id = this.recycleAsyncId(scheduler, id, delay);
25081 }
25082 this.pending = true;
25083 this.delay = delay;
25084 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
25085 return this;
25086 };
25087 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25088 if (delay === void 0) {
25089 delay = 0;
25090 }
25091 return setInterval(scheduler.flush.bind(scheduler, this), delay);
25092 };
25093 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25094 if (delay === void 0) {
25095 delay = 0;
25096 }
25097 if (delay !== null && this.delay === delay && this.pending === false) {
25098 return id;
25099 }
25100 clearInterval(id);
25101 return undefined;
25102 };
25103 AsyncAction.prototype.execute = function (state, delay) {
25104 if (this.closed) {
25105 return new Error('executing a cancelled action');
25106 }
25107 this.pending = false;
25108 var error = this._execute(state, delay);
25109 if (error) {
25110 return error;
25111 }
25112 else if (this.pending === false && this.id != null) {
25113 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
25114 }
25115 };
25116 AsyncAction.prototype._execute = function (state, delay) {
25117 var errored = false;
25118 var errorValue = undefined;
25119 try {
25120 this.work(state);
25121 }
25122 catch (e) {
25123 errored = true;
25124 errorValue = !!e && e || new Error(e);
25125 }
25126 if (errored) {
25127 this.unsubscribe();
25128 return errorValue;
25129 }
25130 };
25131 AsyncAction.prototype._unsubscribe = function () {
25132 var id = this.id;
25133 var scheduler = this.scheduler;
25134 var actions = scheduler.actions;
25135 var index = actions.indexOf(this);
25136 this.work = null;
25137 this.state = null;
25138 this.pending = false;
25139 this.scheduler = null;
25140 if (index !== -1) {
25141 actions.splice(index, 1);
25142 }
25143 if (id != null) {
25144 this.id = this.recycleAsyncId(scheduler, id, null);
25145 }
25146 this.delay = null;
25147 };
25148 return AsyncAction;
25149}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
25150
25151//# sourceMappingURL=AsyncAction.js.map
25152
25153
25154/***/ }),
25155/* 195 */
25156/***/ (function(module, __webpack_exports__, __webpack_require__) {
25157
25158"use strict";
25159__webpack_require__.r(__webpack_exports__);
25160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
25161/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25162/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25163/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
25164
25165
25166var Action = /*@__PURE__*/ (function (_super) {
25167 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
25168 function Action(scheduler, work) {
25169 return _super.call(this) || this;
25170 }
25171 Action.prototype.schedule = function (state, delay) {
25172 if (delay === void 0) {
25173 delay = 0;
25174 }
25175 return this;
25176 };
25177 return Action;
25178}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
25179
25180//# sourceMappingURL=Action.js.map
25181
25182
25183/***/ }),
25184/* 196 */
25185/***/ (function(module, __webpack_exports__, __webpack_require__) {
25186
25187"use strict";
25188__webpack_require__.r(__webpack_exports__);
25189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
25190/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25191/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25192/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25193
25194
25195var QueueScheduler = /*@__PURE__*/ (function (_super) {
25196 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
25197 function QueueScheduler() {
25198 return _super !== null && _super.apply(this, arguments) || this;
25199 }
25200 return QueueScheduler;
25201}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25202
25203//# sourceMappingURL=QueueScheduler.js.map
25204
25205
25206/***/ }),
25207/* 197 */
25208/***/ (function(module, __webpack_exports__, __webpack_require__) {
25209
25210"use strict";
25211__webpack_require__.r(__webpack_exports__);
25212/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
25213/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25214/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
25215/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
25216
25217
25218var AsyncScheduler = /*@__PURE__*/ (function (_super) {
25219 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
25220 function AsyncScheduler(SchedulerAction, now) {
25221 if (now === void 0) {
25222 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
25223 }
25224 var _this = _super.call(this, SchedulerAction, function () {
25225 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
25226 return AsyncScheduler.delegate.now();
25227 }
25228 else {
25229 return now();
25230 }
25231 }) || this;
25232 _this.actions = [];
25233 _this.active = false;
25234 _this.scheduled = undefined;
25235 return _this;
25236 }
25237 AsyncScheduler.prototype.schedule = function (work, delay, state) {
25238 if (delay === void 0) {
25239 delay = 0;
25240 }
25241 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
25242 return AsyncScheduler.delegate.schedule(work, delay, state);
25243 }
25244 else {
25245 return _super.prototype.schedule.call(this, work, delay, state);
25246 }
25247 };
25248 AsyncScheduler.prototype.flush = function (action) {
25249 var actions = this.actions;
25250 if (this.active) {
25251 actions.push(action);
25252 return;
25253 }
25254 var error;
25255 this.active = true;
25256 do {
25257 if (error = action.execute(action.state, action.delay)) {
25258 break;
25259 }
25260 } while (action = actions.shift());
25261 this.active = false;
25262 if (error) {
25263 while (action = actions.shift()) {
25264 action.unsubscribe();
25265 }
25266 throw error;
25267 }
25268 };
25269 return AsyncScheduler;
25270}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
25271
25272//# sourceMappingURL=AsyncScheduler.js.map
25273
25274
25275/***/ }),
25276/* 198 */
25277/***/ (function(module, __webpack_exports__, __webpack_require__) {
25278
25279"use strict";
25280__webpack_require__.r(__webpack_exports__);
25281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
25282var Scheduler = /*@__PURE__*/ (function () {
25283 function Scheduler(SchedulerAction, now) {
25284 if (now === void 0) {
25285 now = Scheduler.now;
25286 }
25287 this.SchedulerAction = SchedulerAction;
25288 this.now = now;
25289 }
25290 Scheduler.prototype.schedule = function (work, delay, state) {
25291 if (delay === void 0) {
25292 delay = 0;
25293 }
25294 return new this.SchedulerAction(this, work).schedule(state, delay);
25295 };
25296 Scheduler.now = function () { return Date.now(); };
25297 return Scheduler;
25298}());
25299
25300//# sourceMappingURL=Scheduler.js.map
25301
25302
25303/***/ }),
25304/* 199 */
25305/***/ (function(module, __webpack_exports__, __webpack_require__) {
25306
25307"use strict";
25308__webpack_require__.r(__webpack_exports__);
25309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
25310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
25311/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
25312/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
25313/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25314/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
25315/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
25316/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
25317
25318
25319
25320function observeOn(scheduler, delay) {
25321 if (delay === void 0) {
25322 delay = 0;
25323 }
25324 return function observeOnOperatorFunction(source) {
25325 return source.lift(new ObserveOnOperator(scheduler, delay));
25326 };
25327}
25328var ObserveOnOperator = /*@__PURE__*/ (function () {
25329 function ObserveOnOperator(scheduler, delay) {
25330 if (delay === void 0) {
25331 delay = 0;
25332 }
25333 this.scheduler = scheduler;
25334 this.delay = delay;
25335 }
25336 ObserveOnOperator.prototype.call = function (subscriber, source) {
25337 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
25338 };
25339 return ObserveOnOperator;
25340}());
25341
25342var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
25343 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
25344 function ObserveOnSubscriber(destination, scheduler, delay) {
25345 if (delay === void 0) {
25346 delay = 0;
25347 }
25348 var _this = _super.call(this, destination) || this;
25349 _this.scheduler = scheduler;
25350 _this.delay = delay;
25351 return _this;
25352 }
25353 ObserveOnSubscriber.dispatch = function (arg) {
25354 var notification = arg.notification, destination = arg.destination;
25355 notification.observe(destination);
25356 this.unsubscribe();
25357 };
25358 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
25359 var destination = this.destination;
25360 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
25361 };
25362 ObserveOnSubscriber.prototype._next = function (value) {
25363 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
25364 };
25365 ObserveOnSubscriber.prototype._error = function (err) {
25366 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
25367 this.unsubscribe();
25368 };
25369 ObserveOnSubscriber.prototype._complete = function () {
25370 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
25371 this.unsubscribe();
25372 };
25373 return ObserveOnSubscriber;
25374}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25375
25376var ObserveOnMessage = /*@__PURE__*/ (function () {
25377 function ObserveOnMessage(notification, destination) {
25378 this.notification = notification;
25379 this.destination = destination;
25380 }
25381 return ObserveOnMessage;
25382}());
25383
25384//# sourceMappingURL=observeOn.js.map
25385
25386
25387/***/ }),
25388/* 200 */
25389/***/ (function(module, __webpack_exports__, __webpack_require__) {
25390
25391"use strict";
25392__webpack_require__.r(__webpack_exports__);
25393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
25394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
25395/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(201);
25396/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25397/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
25398/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
25399
25400
25401
25402var NotificationKind;
25403/*@__PURE__*/ (function (NotificationKind) {
25404 NotificationKind["NEXT"] = "N";
25405 NotificationKind["ERROR"] = "E";
25406 NotificationKind["COMPLETE"] = "C";
25407})(NotificationKind || (NotificationKind = {}));
25408var Notification = /*@__PURE__*/ (function () {
25409 function Notification(kind, value, error) {
25410 this.kind = kind;
25411 this.value = value;
25412 this.error = error;
25413 this.hasValue = kind === 'N';
25414 }
25415 Notification.prototype.observe = function (observer) {
25416 switch (this.kind) {
25417 case 'N':
25418 return observer.next && observer.next(this.value);
25419 case 'E':
25420 return observer.error && observer.error(this.error);
25421 case 'C':
25422 return observer.complete && observer.complete();
25423 }
25424 };
25425 Notification.prototype.do = function (next, error, complete) {
25426 var kind = this.kind;
25427 switch (kind) {
25428 case 'N':
25429 return next && next(this.value);
25430 case 'E':
25431 return error && error(this.error);
25432 case 'C':
25433 return complete && complete();
25434 }
25435 };
25436 Notification.prototype.accept = function (nextOrObserver, error, complete) {
25437 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
25438 return this.observe(nextOrObserver);
25439 }
25440 else {
25441 return this.do(nextOrObserver, error, complete);
25442 }
25443 };
25444 Notification.prototype.toObservable = function () {
25445 var kind = this.kind;
25446 switch (kind) {
25447 case 'N':
25448 return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
25449 case 'E':
25450 return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
25451 case 'C':
25452 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
25453 }
25454 throw new Error('unexpected notification kind value');
25455 };
25456 Notification.createNext = function (value) {
25457 if (typeof value !== 'undefined') {
25458 return new Notification('N', value);
25459 }
25460 return Notification.undefinedValueNotification;
25461 };
25462 Notification.createError = function (err) {
25463 return new Notification('E', undefined, err);
25464 };
25465 Notification.createComplete = function () {
25466 return Notification.completeNotification;
25467 };
25468 Notification.completeNotification = new Notification('C');
25469 Notification.undefinedValueNotification = new Notification('N', undefined);
25470 return Notification;
25471}());
25472
25473//# sourceMappingURL=Notification.js.map
25474
25475
25476/***/ }),
25477/* 201 */
25478/***/ (function(module, __webpack_exports__, __webpack_require__) {
25479
25480"use strict";
25481__webpack_require__.r(__webpack_exports__);
25482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
25483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
25484/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25485/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25486
25487var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
25488function empty(scheduler) {
25489 return scheduler ? emptyScheduled(scheduler) : EMPTY;
25490}
25491function emptyScheduled(scheduler) {
25492 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
25493}
25494//# sourceMappingURL=empty.js.map
25495
25496
25497/***/ }),
25498/* 202 */
25499/***/ (function(module, __webpack_exports__, __webpack_require__) {
25500
25501"use strict";
25502__webpack_require__.r(__webpack_exports__);
25503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
25504/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
25505/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
25506/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25507/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25508
25509
25510
25511function of() {
25512 var args = [];
25513 for (var _i = 0; _i < arguments.length; _i++) {
25514 args[_i] = arguments[_i];
25515 }
25516 var scheduler = args[args.length - 1];
25517 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
25518 args.pop();
25519 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
25520 }
25521 else {
25522 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
25523 }
25524}
25525//# sourceMappingURL=of.js.map
25526
25527
25528/***/ }),
25529/* 203 */
25530/***/ (function(module, __webpack_exports__, __webpack_require__) {
25531
25532"use strict";
25533__webpack_require__.r(__webpack_exports__);
25534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
25535/** PURE_IMPORTS_START PURE_IMPORTS_END */
25536function isScheduler(value) {
25537 return value && typeof value.schedule === 'function';
25538}
25539//# sourceMappingURL=isScheduler.js.map
25540
25541
25542/***/ }),
25543/* 204 */
25544/***/ (function(module, __webpack_exports__, __webpack_require__) {
25545
25546"use strict";
25547__webpack_require__.r(__webpack_exports__);
25548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
25549/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25550/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25551/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25552/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25553
25554
25555
25556function fromArray(input, scheduler) {
25557 if (!scheduler) {
25558 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
25559 }
25560 else {
25561 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
25562 }
25563}
25564//# sourceMappingURL=fromArray.js.map
25565
25566
25567/***/ }),
25568/* 205 */
25569/***/ (function(module, __webpack_exports__, __webpack_require__) {
25570
25571"use strict";
25572__webpack_require__.r(__webpack_exports__);
25573/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
25574/** PURE_IMPORTS_START PURE_IMPORTS_END */
25575var subscribeToArray = function (array) {
25576 return function (subscriber) {
25577 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
25578 subscriber.next(array[i]);
25579 }
25580 subscriber.complete();
25581 };
25582};
25583//# sourceMappingURL=subscribeToArray.js.map
25584
25585
25586/***/ }),
25587/* 206 */
25588/***/ (function(module, __webpack_exports__, __webpack_require__) {
25589
25590"use strict";
25591__webpack_require__.r(__webpack_exports__);
25592/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
25593/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25594/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25595/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
25596
25597
25598function scheduleArray(input, scheduler) {
25599 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25600 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
25601 var i = 0;
25602 sub.add(scheduler.schedule(function () {
25603 if (i === input.length) {
25604 subscriber.complete();
25605 return;
25606 }
25607 subscriber.next(input[i++]);
25608 if (!subscriber.closed) {
25609 sub.add(this.schedule());
25610 }
25611 }));
25612 return sub;
25613 });
25614}
25615//# sourceMappingURL=scheduleArray.js.map
25616
25617
25618/***/ }),
25619/* 207 */
25620/***/ (function(module, __webpack_exports__, __webpack_require__) {
25621
25622"use strict";
25623__webpack_require__.r(__webpack_exports__);
25624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
25625/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25626/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25627
25628function throwError(error, scheduler) {
25629 if (!scheduler) {
25630 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
25631 }
25632 else {
25633 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
25634 }
25635}
25636function dispatch(_a) {
25637 var error = _a.error, subscriber = _a.subscriber;
25638 subscriber.error(error);
25639}
25640//# sourceMappingURL=throwError.js.map
25641
25642
25643/***/ }),
25644/* 208 */
25645/***/ (function(module, __webpack_exports__, __webpack_require__) {
25646
25647"use strict";
25648__webpack_require__.r(__webpack_exports__);
25649/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
25650/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25651/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
25652/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
25653/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
25654
25655
25656
25657var AsyncSubject = /*@__PURE__*/ (function (_super) {
25658 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
25659 function AsyncSubject() {
25660 var _this = _super !== null && _super.apply(this, arguments) || this;
25661 _this.value = null;
25662 _this.hasNext = false;
25663 _this.hasCompleted = false;
25664 return _this;
25665 }
25666 AsyncSubject.prototype._subscribe = function (subscriber) {
25667 if (this.hasError) {
25668 subscriber.error(this.thrownError);
25669 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25670 }
25671 else if (this.hasCompleted && this.hasNext) {
25672 subscriber.next(this.value);
25673 subscriber.complete();
25674 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25675 }
25676 return _super.prototype._subscribe.call(this, subscriber);
25677 };
25678 AsyncSubject.prototype.next = function (value) {
25679 if (!this.hasCompleted) {
25680 this.value = value;
25681 this.hasNext = true;
25682 }
25683 };
25684 AsyncSubject.prototype.error = function (error) {
25685 if (!this.hasCompleted) {
25686 _super.prototype.error.call(this, error);
25687 }
25688 };
25689 AsyncSubject.prototype.complete = function () {
25690 this.hasCompleted = true;
25691 if (this.hasNext) {
25692 _super.prototype.next.call(this, this.value);
25693 }
25694 _super.prototype.complete.call(this);
25695 };
25696 return AsyncSubject;
25697}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
25698
25699//# sourceMappingURL=AsyncSubject.js.map
25700
25701
25702/***/ }),
25703/* 209 */
25704/***/ (function(module, __webpack_exports__, __webpack_require__) {
25705
25706"use strict";
25707__webpack_require__.r(__webpack_exports__);
25708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
25709/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
25710/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
25711/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
25712
25713
25714var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
25715//# sourceMappingURL=asap.js.map
25716
25717
25718/***/ }),
25719/* 210 */
25720/***/ (function(module, __webpack_exports__, __webpack_require__) {
25721
25722"use strict";
25723__webpack_require__.r(__webpack_exports__);
25724/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
25725/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25726/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
25727/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
25728/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
25729
25730
25731
25732var AsapAction = /*@__PURE__*/ (function (_super) {
25733 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
25734 function AsapAction(scheduler, work) {
25735 var _this = _super.call(this, scheduler, work) || this;
25736 _this.scheduler = scheduler;
25737 _this.work = work;
25738 return _this;
25739 }
25740 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25741 if (delay === void 0) {
25742 delay = 0;
25743 }
25744 if (delay !== null && delay > 0) {
25745 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25746 }
25747 scheduler.actions.push(this);
25748 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
25749 };
25750 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25751 if (delay === void 0) {
25752 delay = 0;
25753 }
25754 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25755 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25756 }
25757 if (scheduler.actions.length === 0) {
25758 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
25759 scheduler.scheduled = undefined;
25760 }
25761 return undefined;
25762 };
25763 return AsapAction;
25764}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
25765
25766//# sourceMappingURL=AsapAction.js.map
25767
25768
25769/***/ }),
25770/* 211 */
25771/***/ (function(module, __webpack_exports__, __webpack_require__) {
25772
25773"use strict";
25774__webpack_require__.r(__webpack_exports__);
25775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
25776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; });
25777/** PURE_IMPORTS_START PURE_IMPORTS_END */
25778var nextHandle = 1;
25779var RESOLVED = /*@__PURE__*/ (function () { return /*@__PURE__*/ Promise.resolve(); })();
25780var activeHandles = {};
25781function findAndClearHandle(handle) {
25782 if (handle in activeHandles) {
25783 delete activeHandles[handle];
25784 return true;
25785 }
25786 return false;
25787}
25788var Immediate = {
25789 setImmediate: function (cb) {
25790 var handle = nextHandle++;
25791 activeHandles[handle] = true;
25792 RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); });
25793 return handle;
25794 },
25795 clearImmediate: function (handle) {
25796 findAndClearHandle(handle);
25797 },
25798};
25799var TestTools = {
25800 pending: function () {
25801 return Object.keys(activeHandles).length;
25802 }
25803};
25804//# sourceMappingURL=Immediate.js.map
25805
25806
25807/***/ }),
25808/* 212 */
25809/***/ (function(module, __webpack_exports__, __webpack_require__) {
25810
25811"use strict";
25812__webpack_require__.r(__webpack_exports__);
25813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
25814/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25815/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25816/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25817
25818
25819var AsapScheduler = /*@__PURE__*/ (function (_super) {
25820 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
25821 function AsapScheduler() {
25822 return _super !== null && _super.apply(this, arguments) || this;
25823 }
25824 AsapScheduler.prototype.flush = function (action) {
25825 this.active = true;
25826 this.scheduled = undefined;
25827 var actions = this.actions;
25828 var error;
25829 var index = -1;
25830 var count = actions.length;
25831 action = action || actions.shift();
25832 do {
25833 if (error = action.execute(action.state, action.delay)) {
25834 break;
25835 }
25836 } while (++index < count && (action = actions.shift()));
25837 this.active = false;
25838 if (error) {
25839 while (++index < count && (action = actions.shift())) {
25840 action.unsubscribe();
25841 }
25842 throw error;
25843 }
25844 };
25845 return AsapScheduler;
25846}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25847
25848//# sourceMappingURL=AsapScheduler.js.map
25849
25850
25851/***/ }),
25852/* 213 */
25853/***/ (function(module, __webpack_exports__, __webpack_require__) {
25854
25855"use strict";
25856__webpack_require__.r(__webpack_exports__);
25857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
25858/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
25859/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25860/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25861
25862
25863var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
25864//# sourceMappingURL=async.js.map
25865
25866
25867/***/ }),
25868/* 214 */
25869/***/ (function(module, __webpack_exports__, __webpack_require__) {
25870
25871"use strict";
25872__webpack_require__.r(__webpack_exports__);
25873/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
25874/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
25875/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(216);
25876/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
25877
25878
25879var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
25880//# sourceMappingURL=animationFrame.js.map
25881
25882
25883/***/ }),
25884/* 215 */
25885/***/ (function(module, __webpack_exports__, __webpack_require__) {
25886
25887"use strict";
25888__webpack_require__.r(__webpack_exports__);
25889/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
25890/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25891/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25892/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25893
25894
25895var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
25896 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
25897 function AnimationFrameAction(scheduler, work) {
25898 var _this = _super.call(this, scheduler, work) || this;
25899 _this.scheduler = scheduler;
25900 _this.work = work;
25901 return _this;
25902 }
25903 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25904 if (delay === void 0) {
25905 delay = 0;
25906 }
25907 if (delay !== null && delay > 0) {
25908 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25909 }
25910 scheduler.actions.push(this);
25911 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
25912 };
25913 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25914 if (delay === void 0) {
25915 delay = 0;
25916 }
25917 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25918 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25919 }
25920 if (scheduler.actions.length === 0) {
25921 cancelAnimationFrame(id);
25922 scheduler.scheduled = undefined;
25923 }
25924 return undefined;
25925 };
25926 return AnimationFrameAction;
25927}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
25928
25929//# sourceMappingURL=AnimationFrameAction.js.map
25930
25931
25932/***/ }),
25933/* 216 */
25934/***/ (function(module, __webpack_exports__, __webpack_require__) {
25935
25936"use strict";
25937__webpack_require__.r(__webpack_exports__);
25938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
25939/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25940/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25941/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25942
25943
25944var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
25945 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
25946 function AnimationFrameScheduler() {
25947 return _super !== null && _super.apply(this, arguments) || this;
25948 }
25949 AnimationFrameScheduler.prototype.flush = function (action) {
25950 this.active = true;
25951 this.scheduled = undefined;
25952 var actions = this.actions;
25953 var error;
25954 var index = -1;
25955 var count = actions.length;
25956 action = action || actions.shift();
25957 do {
25958 if (error = action.execute(action.state, action.delay)) {
25959 break;
25960 }
25961 } while (++index < count && (action = actions.shift()));
25962 this.active = false;
25963 if (error) {
25964 while (++index < count && (action = actions.shift())) {
25965 action.unsubscribe();
25966 }
25967 throw error;
25968 }
25969 };
25970 return AnimationFrameScheduler;
25971}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25972
25973//# sourceMappingURL=AnimationFrameScheduler.js.map
25974
25975
25976/***/ }),
25977/* 217 */
25978/***/ (function(module, __webpack_exports__, __webpack_require__) {
25979
25980"use strict";
25981__webpack_require__.r(__webpack_exports__);
25982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
25983/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
25984/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25985/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25986/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197);
25987/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25988
25989
25990
25991var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
25992 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
25993 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
25994 if (SchedulerAction === void 0) {
25995 SchedulerAction = VirtualAction;
25996 }
25997 if (maxFrames === void 0) {
25998 maxFrames = Number.POSITIVE_INFINITY;
25999 }
26000 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
26001 _this.maxFrames = maxFrames;
26002 _this.frame = 0;
26003 _this.index = -1;
26004 return _this;
26005 }
26006 VirtualTimeScheduler.prototype.flush = function () {
26007 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
26008 var error, action;
26009 while ((action = actions[0]) && action.delay <= maxFrames) {
26010 actions.shift();
26011 this.frame = action.delay;
26012 if (error = action.execute(action.state, action.delay)) {
26013 break;
26014 }
26015 }
26016 if (error) {
26017 while (action = actions.shift()) {
26018 action.unsubscribe();
26019 }
26020 throw error;
26021 }
26022 };
26023 VirtualTimeScheduler.frameTimeFactor = 10;
26024 return VirtualTimeScheduler;
26025}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
26026
26027var VirtualAction = /*@__PURE__*/ (function (_super) {
26028 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
26029 function VirtualAction(scheduler, work, index) {
26030 if (index === void 0) {
26031 index = scheduler.index += 1;
26032 }
26033 var _this = _super.call(this, scheduler, work) || this;
26034 _this.scheduler = scheduler;
26035 _this.work = work;
26036 _this.index = index;
26037 _this.active = true;
26038 _this.index = scheduler.index = index;
26039 return _this;
26040 }
26041 VirtualAction.prototype.schedule = function (state, delay) {
26042 if (delay === void 0) {
26043 delay = 0;
26044 }
26045 if (!this.id) {
26046 return _super.prototype.schedule.call(this, state, delay);
26047 }
26048 this.active = false;
26049 var action = new VirtualAction(this.scheduler, this.work);
26050 this.add(action);
26051 return action.schedule(state, delay);
26052 };
26053 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
26054 if (delay === void 0) {
26055 delay = 0;
26056 }
26057 this.delay = scheduler.frame + delay;
26058 var actions = scheduler.actions;
26059 actions.push(this);
26060 actions.sort(VirtualAction.sortActions);
26061 return true;
26062 };
26063 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
26064 if (delay === void 0) {
26065 delay = 0;
26066 }
26067 return undefined;
26068 };
26069 VirtualAction.prototype._execute = function (state, delay) {
26070 if (this.active === true) {
26071 return _super.prototype._execute.call(this, state, delay);
26072 }
26073 };
26074 VirtualAction.sortActions = function (a, b) {
26075 if (a.delay === b.delay) {
26076 if (a.index === b.index) {
26077 return 0;
26078 }
26079 else if (a.index > b.index) {
26080 return 1;
26081 }
26082 else {
26083 return -1;
26084 }
26085 }
26086 else if (a.delay > b.delay) {
26087 return 1;
26088 }
26089 else {
26090 return -1;
26091 }
26092 };
26093 return VirtualAction;
26094}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
26095
26096//# sourceMappingURL=VirtualTimeScheduler.js.map
26097
26098
26099/***/ }),
26100/* 218 */
26101/***/ (function(module, __webpack_exports__, __webpack_require__) {
26102
26103"use strict";
26104__webpack_require__.r(__webpack_exports__);
26105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
26106/** PURE_IMPORTS_START PURE_IMPORTS_END */
26107function noop() { }
26108//# sourceMappingURL=noop.js.map
26109
26110
26111/***/ }),
26112/* 219 */
26113/***/ (function(module, __webpack_exports__, __webpack_require__) {
26114
26115"use strict";
26116__webpack_require__.r(__webpack_exports__);
26117/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
26118/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26119/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
26120
26121function isObservable(obj) {
26122 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
26123}
26124//# sourceMappingURL=isObservable.js.map
26125
26126
26127/***/ }),
26128/* 220 */
26129/***/ (function(module, __webpack_exports__, __webpack_require__) {
26130
26131"use strict";
26132__webpack_require__.r(__webpack_exports__);
26133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
26134/** PURE_IMPORTS_START PURE_IMPORTS_END */
26135var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26136 function ArgumentOutOfRangeErrorImpl() {
26137 Error.call(this);
26138 this.message = 'argument out of range';
26139 this.name = 'ArgumentOutOfRangeError';
26140 return this;
26141 }
26142 ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26143 return ArgumentOutOfRangeErrorImpl;
26144})();
26145var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26146//# sourceMappingURL=ArgumentOutOfRangeError.js.map
26147
26148
26149/***/ }),
26150/* 221 */
26151/***/ (function(module, __webpack_exports__, __webpack_require__) {
26152
26153"use strict";
26154__webpack_require__.r(__webpack_exports__);
26155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
26156/** PURE_IMPORTS_START PURE_IMPORTS_END */
26157var EmptyErrorImpl = /*@__PURE__*/ (function () {
26158 function EmptyErrorImpl() {
26159 Error.call(this);
26160 this.message = 'no elements in sequence';
26161 this.name = 'EmptyError';
26162 return this;
26163 }
26164 EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26165 return EmptyErrorImpl;
26166})();
26167var EmptyError = EmptyErrorImpl;
26168//# sourceMappingURL=EmptyError.js.map
26169
26170
26171/***/ }),
26172/* 222 */
26173/***/ (function(module, __webpack_exports__, __webpack_require__) {
26174
26175"use strict";
26176__webpack_require__.r(__webpack_exports__);
26177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
26178/** PURE_IMPORTS_START PURE_IMPORTS_END */
26179var TimeoutErrorImpl = /*@__PURE__*/ (function () {
26180 function TimeoutErrorImpl() {
26181 Error.call(this);
26182 this.message = 'Timeout has occurred';
26183 this.name = 'TimeoutError';
26184 return this;
26185 }
26186 TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26187 return TimeoutErrorImpl;
26188})();
26189var TimeoutError = TimeoutErrorImpl;
26190//# sourceMappingURL=TimeoutError.js.map
26191
26192
26193/***/ }),
26194/* 223 */
26195/***/ (function(module, __webpack_exports__, __webpack_require__) {
26196
26197"use strict";
26198__webpack_require__.r(__webpack_exports__);
26199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
26200/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26201/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26202/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26203/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26204/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
26205/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
26206/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
26207
26208
26209
26210
26211
26212
26213function bindCallback(callbackFunc, resultSelector, scheduler) {
26214 if (resultSelector) {
26215 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
26216 scheduler = resultSelector;
26217 }
26218 else {
26219 return function () {
26220 var args = [];
26221 for (var _i = 0; _i < arguments.length; _i++) {
26222 args[_i] = arguments[_i];
26223 }
26224 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); }));
26225 };
26226 }
26227 }
26228 return function () {
26229 var args = [];
26230 for (var _i = 0; _i < arguments.length; _i++) {
26231 args[_i] = arguments[_i];
26232 }
26233 var context = this;
26234 var subject;
26235 var params = {
26236 context: context,
26237 subject: subject,
26238 callbackFunc: callbackFunc,
26239 scheduler: scheduler,
26240 };
26241 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26242 if (!scheduler) {
26243 if (!subject) {
26244 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26245 var handler = function () {
26246 var innerArgs = [];
26247 for (var _i = 0; _i < arguments.length; _i++) {
26248 innerArgs[_i] = arguments[_i];
26249 }
26250 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26251 subject.complete();
26252 };
26253 try {
26254 callbackFunc.apply(context, args.concat([handler]));
26255 }
26256 catch (err) {
26257 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26258 subject.error(err);
26259 }
26260 else {
26261 console.warn(err);
26262 }
26263 }
26264 }
26265 return subject.subscribe(subscriber);
26266 }
26267 else {
26268 var state = {
26269 args: args, subscriber: subscriber, params: params,
26270 };
26271 return scheduler.schedule(dispatch, 0, state);
26272 }
26273 });
26274 };
26275}
26276function dispatch(state) {
26277 var _this = this;
26278 var self = this;
26279 var args = state.args, subscriber = state.subscriber, params = state.params;
26280 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
26281 var subject = params.subject;
26282 if (!subject) {
26283 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26284 var handler = function () {
26285 var innerArgs = [];
26286 for (var _i = 0; _i < arguments.length; _i++) {
26287 innerArgs[_i] = arguments[_i];
26288 }
26289 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26290 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26291 };
26292 try {
26293 callbackFunc.apply(context, args.concat([handler]));
26294 }
26295 catch (err) {
26296 subject.error(err);
26297 }
26298 }
26299 this.add(subject.subscribe(subscriber));
26300}
26301function dispatchNext(state) {
26302 var value = state.value, subject = state.subject;
26303 subject.next(value);
26304 subject.complete();
26305}
26306function dispatchError(state) {
26307 var err = state.err, subject = state.subject;
26308 subject.error(err);
26309}
26310//# sourceMappingURL=bindCallback.js.map
26311
26312
26313/***/ }),
26314/* 224 */
26315/***/ (function(module, __webpack_exports__, __webpack_require__) {
26316
26317"use strict";
26318__webpack_require__.r(__webpack_exports__);
26319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
26320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
26321/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26322/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26323/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26324
26325
26326function map(project, thisArg) {
26327 return function mapOperation(source) {
26328 if (typeof project !== 'function') {
26329 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
26330 }
26331 return source.lift(new MapOperator(project, thisArg));
26332 };
26333}
26334var MapOperator = /*@__PURE__*/ (function () {
26335 function MapOperator(project, thisArg) {
26336 this.project = project;
26337 this.thisArg = thisArg;
26338 }
26339 MapOperator.prototype.call = function (subscriber, source) {
26340 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
26341 };
26342 return MapOperator;
26343}());
26344
26345var MapSubscriber = /*@__PURE__*/ (function (_super) {
26346 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
26347 function MapSubscriber(destination, project, thisArg) {
26348 var _this = _super.call(this, destination) || this;
26349 _this.project = project;
26350 _this.count = 0;
26351 _this.thisArg = thisArg || _this;
26352 return _this;
26353 }
26354 MapSubscriber.prototype._next = function (value) {
26355 var result;
26356 try {
26357 result = this.project.call(this.thisArg, value, this.count++);
26358 }
26359 catch (err) {
26360 this.destination.error(err);
26361 return;
26362 }
26363 this.destination.next(result);
26364 };
26365 return MapSubscriber;
26366}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26367//# sourceMappingURL=map.js.map
26368
26369
26370/***/ }),
26371/* 225 */
26372/***/ (function(module, __webpack_exports__, __webpack_require__) {
26373
26374"use strict";
26375__webpack_require__.r(__webpack_exports__);
26376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
26377/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26378/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26379/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26380/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26381/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(203);
26382/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176);
26383/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
26384
26385
26386
26387
26388
26389
26390function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
26391 if (resultSelector) {
26392 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
26393 scheduler = resultSelector;
26394 }
26395 else {
26396 return function () {
26397 var args = [];
26398 for (var _i = 0; _i < arguments.length; _i++) {
26399 args[_i] = arguments[_i];
26400 }
26401 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); }));
26402 };
26403 }
26404 }
26405 return function () {
26406 var args = [];
26407 for (var _i = 0; _i < arguments.length; _i++) {
26408 args[_i] = arguments[_i];
26409 }
26410 var params = {
26411 subject: undefined,
26412 args: args,
26413 callbackFunc: callbackFunc,
26414 scheduler: scheduler,
26415 context: this,
26416 };
26417 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26418 var context = params.context;
26419 var subject = params.subject;
26420 if (!scheduler) {
26421 if (!subject) {
26422 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26423 var handler = function () {
26424 var innerArgs = [];
26425 for (var _i = 0; _i < arguments.length; _i++) {
26426 innerArgs[_i] = arguments[_i];
26427 }
26428 var err = innerArgs.shift();
26429 if (err) {
26430 subject.error(err);
26431 return;
26432 }
26433 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26434 subject.complete();
26435 };
26436 try {
26437 callbackFunc.apply(context, args.concat([handler]));
26438 }
26439 catch (err) {
26440 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26441 subject.error(err);
26442 }
26443 else {
26444 console.warn(err);
26445 }
26446 }
26447 }
26448 return subject.subscribe(subscriber);
26449 }
26450 else {
26451 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
26452 }
26453 });
26454 };
26455}
26456function dispatch(state) {
26457 var _this = this;
26458 var params = state.params, subscriber = state.subscriber, context = state.context;
26459 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
26460 var subject = params.subject;
26461 if (!subject) {
26462 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26463 var handler = function () {
26464 var innerArgs = [];
26465 for (var _i = 0; _i < arguments.length; _i++) {
26466 innerArgs[_i] = arguments[_i];
26467 }
26468 var err = innerArgs.shift();
26469 if (err) {
26470 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26471 }
26472 else {
26473 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26474 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26475 }
26476 };
26477 try {
26478 callbackFunc.apply(context, args.concat([handler]));
26479 }
26480 catch (err) {
26481 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26482 }
26483 }
26484 this.add(subject.subscribe(subscriber));
26485}
26486function dispatchNext(arg) {
26487 var value = arg.value, subject = arg.subject;
26488 subject.next(value);
26489 subject.complete();
26490}
26491function dispatchError(arg) {
26492 var err = arg.err, subject = arg.subject;
26493 subject.error(err);
26494}
26495//# sourceMappingURL=bindNodeCallback.js.map
26496
26497
26498/***/ }),
26499/* 226 */
26500/***/ (function(module, __webpack_exports__, __webpack_require__) {
26501
26502"use strict";
26503__webpack_require__.r(__webpack_exports__);
26504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
26505/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
26506/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
26507/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26508/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
26509/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
26510/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
26511/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
26512/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(204);
26513/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
26514
26515
26516
26517
26518
26519
26520var NONE = {};
26521function combineLatest() {
26522 var observables = [];
26523 for (var _i = 0; _i < arguments.length; _i++) {
26524 observables[_i] = arguments[_i];
26525 }
26526 var resultSelector = null;
26527 var scheduler = null;
26528 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
26529 scheduler = observables.pop();
26530 }
26531 if (typeof observables[observables.length - 1] === 'function') {
26532 resultSelector = observables.pop();
26533 }
26534 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
26535 observables = observables[0];
26536 }
26537 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
26538}
26539var CombineLatestOperator = /*@__PURE__*/ (function () {
26540 function CombineLatestOperator(resultSelector) {
26541 this.resultSelector = resultSelector;
26542 }
26543 CombineLatestOperator.prototype.call = function (subscriber, source) {
26544 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
26545 };
26546 return CombineLatestOperator;
26547}());
26548
26549var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
26550 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
26551 function CombineLatestSubscriber(destination, resultSelector) {
26552 var _this = _super.call(this, destination) || this;
26553 _this.resultSelector = resultSelector;
26554 _this.active = 0;
26555 _this.values = [];
26556 _this.observables = [];
26557 return _this;
26558 }
26559 CombineLatestSubscriber.prototype._next = function (observable) {
26560 this.values.push(NONE);
26561 this.observables.push(observable);
26562 };
26563 CombineLatestSubscriber.prototype._complete = function () {
26564 var observables = this.observables;
26565 var len = observables.length;
26566 if (len === 0) {
26567 this.destination.complete();
26568 }
26569 else {
26570 this.active = len;
26571 this.toRespond = len;
26572 for (var i = 0; i < len; i++) {
26573 var observable = observables[i];
26574 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
26575 }
26576 }
26577 };
26578 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
26579 if ((this.active -= 1) === 0) {
26580 this.destination.complete();
26581 }
26582 };
26583 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26584 var values = this.values;
26585 var oldVal = values[outerIndex];
26586 var toRespond = !this.toRespond
26587 ? 0
26588 : oldVal === NONE ? --this.toRespond : this.toRespond;
26589 values[outerIndex] = innerValue;
26590 if (toRespond === 0) {
26591 if (this.resultSelector) {
26592 this._tryResultSelector(values);
26593 }
26594 else {
26595 this.destination.next(values.slice());
26596 }
26597 }
26598 };
26599 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
26600 var result;
26601 try {
26602 result = this.resultSelector.apply(this, values);
26603 }
26604 catch (err) {
26605 this.destination.error(err);
26606 return;
26607 }
26608 this.destination.next(result);
26609 };
26610 return CombineLatestSubscriber;
26611}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
26612
26613//# sourceMappingURL=combineLatest.js.map
26614
26615
26616/***/ }),
26617/* 227 */
26618/***/ (function(module, __webpack_exports__, __webpack_require__) {
26619
26620"use strict";
26621__webpack_require__.r(__webpack_exports__);
26622/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
26623/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26624/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26625/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26626
26627
26628var OuterSubscriber = /*@__PURE__*/ (function (_super) {
26629 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
26630 function OuterSubscriber() {
26631 return _super !== null && _super.apply(this, arguments) || this;
26632 }
26633 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26634 this.destination.next(innerValue);
26635 };
26636 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
26637 this.destination.error(error);
26638 };
26639 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
26640 this.destination.complete();
26641 };
26642 return OuterSubscriber;
26643}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26644
26645//# sourceMappingURL=OuterSubscriber.js.map
26646
26647
26648/***/ }),
26649/* 228 */
26650/***/ (function(module, __webpack_exports__, __webpack_require__) {
26651
26652"use strict";
26653__webpack_require__.r(__webpack_exports__);
26654/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
26655/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
26656/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
26657/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
26658/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
26659
26660
26661
26662function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {
26663 if (innerSubscriber === void 0) {
26664 innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
26665 }
26666 if (innerSubscriber.closed) {
26667 return undefined;
26668 }
26669 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
26670 return result.subscribe(innerSubscriber);
26671 }
26672 return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber);
26673}
26674//# sourceMappingURL=subscribeToResult.js.map
26675
26676
26677/***/ }),
26678/* 229 */
26679/***/ (function(module, __webpack_exports__, __webpack_require__) {
26680
26681"use strict";
26682__webpack_require__.r(__webpack_exports__);
26683/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
26684/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26685/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26686/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26687
26688
26689var InnerSubscriber = /*@__PURE__*/ (function (_super) {
26690 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
26691 function InnerSubscriber(parent, outerValue, outerIndex) {
26692 var _this = _super.call(this) || this;
26693 _this.parent = parent;
26694 _this.outerValue = outerValue;
26695 _this.outerIndex = outerIndex;
26696 _this.index = 0;
26697 return _this;
26698 }
26699 InnerSubscriber.prototype._next = function (value) {
26700 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
26701 };
26702 InnerSubscriber.prototype._error = function (error) {
26703 this.parent.notifyError(error, this);
26704 this.unsubscribe();
26705 };
26706 InnerSubscriber.prototype._complete = function () {
26707 this.parent.notifyComplete(this);
26708 this.unsubscribe();
26709 };
26710 return InnerSubscriber;
26711}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26712
26713//# sourceMappingURL=InnerSubscriber.js.map
26714
26715
26716/***/ }),
26717/* 230 */
26718/***/ (function(module, __webpack_exports__, __webpack_require__) {
26719
26720"use strict";
26721__webpack_require__.r(__webpack_exports__);
26722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
26723/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
26724/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231);
26725/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(232);
26726/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(234);
26727/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
26728/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
26729/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(177);
26730/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(233);
26731/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(181);
26732/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742var subscribeTo = function (result) {
26743 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
26744 return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
26745 }
26746 else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
26747 return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
26748 }
26749 else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
26750 return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
26751 }
26752 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
26753 return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
26754 }
26755 else {
26756 var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
26757 var msg = "You provided " + value + " where a stream was expected."
26758 + ' You can provide an Observable, Promise, Array, or Iterable.';
26759 throw new TypeError(msg);
26760 }
26761};
26762//# sourceMappingURL=subscribeTo.js.map
26763
26764
26765/***/ }),
26766/* 231 */
26767/***/ (function(module, __webpack_exports__, __webpack_require__) {
26768
26769"use strict";
26770__webpack_require__.r(__webpack_exports__);
26771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
26772/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(174);
26773/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
26774
26775var subscribeToPromise = function (promise) {
26776 return function (subscriber) {
26777 promise.then(function (value) {
26778 if (!subscriber.closed) {
26779 subscriber.next(value);
26780 subscriber.complete();
26781 }
26782 }, function (err) { return subscriber.error(err); })
26783 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
26784 return subscriber;
26785 };
26786};
26787//# sourceMappingURL=subscribeToPromise.js.map
26788
26789
26790/***/ }),
26791/* 232 */
26792/***/ (function(module, __webpack_exports__, __webpack_require__) {
26793
26794"use strict";
26795__webpack_require__.r(__webpack_exports__);
26796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
26797/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
26798/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
26799
26800var subscribeToIterable = function (iterable) {
26801 return function (subscriber) {
26802 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
26803 do {
26804 var item = iterator.next();
26805 if (item.done) {
26806 subscriber.complete();
26807 break;
26808 }
26809 subscriber.next(item.value);
26810 if (subscriber.closed) {
26811 break;
26812 }
26813 } while (true);
26814 if (typeof iterator.return === 'function') {
26815 subscriber.add(function () {
26816 if (iterator.return) {
26817 iterator.return();
26818 }
26819 });
26820 }
26821 return subscriber;
26822 };
26823};
26824//# sourceMappingURL=subscribeToIterable.js.map
26825
26826
26827/***/ }),
26828/* 233 */
26829/***/ (function(module, __webpack_exports__, __webpack_require__) {
26830
26831"use strict";
26832__webpack_require__.r(__webpack_exports__);
26833/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
26834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
26835/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
26836/** PURE_IMPORTS_START PURE_IMPORTS_END */
26837function getSymbolIterator() {
26838 if (typeof Symbol !== 'function' || !Symbol.iterator) {
26839 return '@@iterator';
26840 }
26841 return Symbol.iterator;
26842}
26843var iterator = /*@__PURE__*/ getSymbolIterator();
26844var $$iterator = iterator;
26845//# sourceMappingURL=iterator.js.map
26846
26847
26848/***/ }),
26849/* 234 */
26850/***/ (function(module, __webpack_exports__, __webpack_require__) {
26851
26852"use strict";
26853__webpack_require__.r(__webpack_exports__);
26854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
26855/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
26856/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
26857
26858var subscribeToObservable = function (obj) {
26859 return function (subscriber) {
26860 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
26861 if (typeof obs.subscribe !== 'function') {
26862 throw new TypeError('Provided object does not correctly implement Symbol.observable');
26863 }
26864 else {
26865 return obs.subscribe(subscriber);
26866 }
26867 };
26868};
26869//# sourceMappingURL=subscribeToObservable.js.map
26870
26871
26872/***/ }),
26873/* 235 */
26874/***/ (function(module, __webpack_exports__, __webpack_require__) {
26875
26876"use strict";
26877__webpack_require__.r(__webpack_exports__);
26878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
26879/** PURE_IMPORTS_START PURE_IMPORTS_END */
26880var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
26881//# sourceMappingURL=isArrayLike.js.map
26882
26883
26884/***/ }),
26885/* 236 */
26886/***/ (function(module, __webpack_exports__, __webpack_require__) {
26887
26888"use strict";
26889__webpack_require__.r(__webpack_exports__);
26890/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
26891/** PURE_IMPORTS_START PURE_IMPORTS_END */
26892function isPromise(value) {
26893 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
26894}
26895//# sourceMappingURL=isPromise.js.map
26896
26897
26898/***/ }),
26899/* 237 */
26900/***/ (function(module, __webpack_exports__, __webpack_require__) {
26901
26902"use strict";
26903__webpack_require__.r(__webpack_exports__);
26904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
26905/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
26906/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(238);
26907/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
26908
26909
26910function concat() {
26911 var observables = [];
26912 for (var _i = 0; _i < arguments.length; _i++) {
26913 observables[_i] = arguments[_i];
26914 }
26915 return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
26916}
26917//# sourceMappingURL=concat.js.map
26918
26919
26920/***/ }),
26921/* 238 */
26922/***/ (function(module, __webpack_exports__, __webpack_require__) {
26923
26924"use strict";
26925__webpack_require__.r(__webpack_exports__);
26926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
26927/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
26928/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
26929
26930function concatAll() {
26931 return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
26932}
26933//# sourceMappingURL=concatAll.js.map
26934
26935
26936/***/ }),
26937/* 239 */
26938/***/ (function(module, __webpack_exports__, __webpack_require__) {
26939
26940"use strict";
26941__webpack_require__.r(__webpack_exports__);
26942/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
26943/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
26944/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
26945/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
26946
26947
26948function mergeAll(concurrent) {
26949 if (concurrent === void 0) {
26950 concurrent = Number.POSITIVE_INFINITY;
26951 }
26952 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
26953}
26954//# sourceMappingURL=mergeAll.js.map
26955
26956
26957/***/ }),
26958/* 240 */
26959/***/ (function(module, __webpack_exports__, __webpack_require__) {
26960
26961"use strict";
26962__webpack_require__.r(__webpack_exports__);
26963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
26964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
26965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
26966/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26967/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
26968/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
26969/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
26970/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
26971/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
26972/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
26973
26974
26975
26976
26977
26978
26979function mergeMap(project, resultSelector, concurrent) {
26980 if (concurrent === void 0) {
26981 concurrent = Number.POSITIVE_INFINITY;
26982 }
26983 if (typeof resultSelector === 'function') {
26984 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)); };
26985 }
26986 else if (typeof resultSelector === 'number') {
26987 concurrent = resultSelector;
26988 }
26989 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
26990}
26991var MergeMapOperator = /*@__PURE__*/ (function () {
26992 function MergeMapOperator(project, concurrent) {
26993 if (concurrent === void 0) {
26994 concurrent = Number.POSITIVE_INFINITY;
26995 }
26996 this.project = project;
26997 this.concurrent = concurrent;
26998 }
26999 MergeMapOperator.prototype.call = function (observer, source) {
27000 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
27001 };
27002 return MergeMapOperator;
27003}());
27004
27005var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
27006 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
27007 function MergeMapSubscriber(destination, project, concurrent) {
27008 if (concurrent === void 0) {
27009 concurrent = Number.POSITIVE_INFINITY;
27010 }
27011 var _this = _super.call(this, destination) || this;
27012 _this.project = project;
27013 _this.concurrent = concurrent;
27014 _this.hasCompleted = false;
27015 _this.buffer = [];
27016 _this.active = 0;
27017 _this.index = 0;
27018 return _this;
27019 }
27020 MergeMapSubscriber.prototype._next = function (value) {
27021 if (this.active < this.concurrent) {
27022 this._tryNext(value);
27023 }
27024 else {
27025 this.buffer.push(value);
27026 }
27027 };
27028 MergeMapSubscriber.prototype._tryNext = function (value) {
27029 var result;
27030 var index = this.index++;
27031 try {
27032 result = this.project(value, index);
27033 }
27034 catch (err) {
27035 this.destination.error(err);
27036 return;
27037 }
27038 this.active++;
27039 this._innerSub(result, value, index);
27040 };
27041 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
27042 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
27043 var destination = this.destination;
27044 destination.add(innerSubscriber);
27045 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
27046 if (innerSubscription !== innerSubscriber) {
27047 destination.add(innerSubscription);
27048 }
27049 };
27050 MergeMapSubscriber.prototype._complete = function () {
27051 this.hasCompleted = true;
27052 if (this.active === 0 && this.buffer.length === 0) {
27053 this.destination.complete();
27054 }
27055 this.unsubscribe();
27056 };
27057 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27058 this.destination.next(innerValue);
27059 };
27060 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
27061 var buffer = this.buffer;
27062 this.remove(innerSub);
27063 this.active--;
27064 if (buffer.length > 0) {
27065 this._next(buffer.shift());
27066 }
27067 else if (this.active === 0 && this.hasCompleted) {
27068 this.destination.complete();
27069 }
27070 };
27071 return MergeMapSubscriber;
27072}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
27073
27074//# sourceMappingURL=mergeMap.js.map
27075
27076
27077/***/ }),
27078/* 241 */
27079/***/ (function(module, __webpack_exports__, __webpack_require__) {
27080
27081"use strict";
27082__webpack_require__.r(__webpack_exports__);
27083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
27084/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27085/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
27086/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
27087/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
27088
27089
27090
27091function from(input, scheduler) {
27092 if (!scheduler) {
27093 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27094 return input;
27095 }
27096 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
27097 }
27098 else {
27099 return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
27100 }
27101}
27102//# sourceMappingURL=from.js.map
27103
27104
27105/***/ }),
27106/* 242 */
27107/***/ (function(module, __webpack_exports__, __webpack_require__) {
27108
27109"use strict";
27110__webpack_require__.r(__webpack_exports__);
27111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
27112/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
27113/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
27114/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
27115/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(245);
27116/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(246);
27117/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
27118/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
27119/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(247);
27120/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
27121
27122
27123
27124
27125
27126
27127
27128
27129function scheduled(input, scheduler) {
27130 if (input != null) {
27131 if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
27132 return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
27133 }
27134 else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
27135 return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
27136 }
27137 else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
27138 return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
27139 }
27140 else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
27141 return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
27142 }
27143 }
27144 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
27145}
27146//# sourceMappingURL=scheduled.js.map
27147
27148
27149/***/ }),
27150/* 243 */
27151/***/ (function(module, __webpack_exports__, __webpack_require__) {
27152
27153"use strict";
27154__webpack_require__.r(__webpack_exports__);
27155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
27156/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27157/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27158/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
27159/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
27160
27161
27162
27163function scheduleObservable(input, scheduler) {
27164 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27165 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27166 sub.add(scheduler.schedule(function () {
27167 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
27168 sub.add(observable.subscribe({
27169 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
27170 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
27171 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
27172 }));
27173 }));
27174 return sub;
27175 });
27176}
27177//# sourceMappingURL=scheduleObservable.js.map
27178
27179
27180/***/ }),
27181/* 244 */
27182/***/ (function(module, __webpack_exports__, __webpack_require__) {
27183
27184"use strict";
27185__webpack_require__.r(__webpack_exports__);
27186/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
27187/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27188/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27189/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27190
27191
27192function schedulePromise(input, scheduler) {
27193 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27194 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27195 sub.add(scheduler.schedule(function () {
27196 return input.then(function (value) {
27197 sub.add(scheduler.schedule(function () {
27198 subscriber.next(value);
27199 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
27200 }));
27201 }, function (err) {
27202 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
27203 });
27204 }));
27205 return sub;
27206 });
27207}
27208//# sourceMappingURL=schedulePromise.js.map
27209
27210
27211/***/ }),
27212/* 245 */
27213/***/ (function(module, __webpack_exports__, __webpack_require__) {
27214
27215"use strict";
27216__webpack_require__.r(__webpack_exports__);
27217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
27218/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27219/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27220/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(233);
27221/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
27222
27223
27224
27225function scheduleIterable(input, scheduler) {
27226 if (!input) {
27227 throw new Error('Iterable cannot be null');
27228 }
27229 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27230 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27231 var iterator;
27232 sub.add(function () {
27233 if (iterator && typeof iterator.return === 'function') {
27234 iterator.return();
27235 }
27236 });
27237 sub.add(scheduler.schedule(function () {
27238 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
27239 sub.add(scheduler.schedule(function () {
27240 if (subscriber.closed) {
27241 return;
27242 }
27243 var value;
27244 var done;
27245 try {
27246 var result = iterator.next();
27247 value = result.value;
27248 done = result.done;
27249 }
27250 catch (err) {
27251 subscriber.error(err);
27252 return;
27253 }
27254 if (done) {
27255 subscriber.complete();
27256 }
27257 else {
27258 subscriber.next(value);
27259 this.schedule();
27260 }
27261 }));
27262 }));
27263 return sub;
27264 });
27265}
27266//# sourceMappingURL=scheduleIterable.js.map
27267
27268
27269/***/ }),
27270/* 246 */
27271/***/ (function(module, __webpack_exports__, __webpack_require__) {
27272
27273"use strict";
27274__webpack_require__.r(__webpack_exports__);
27275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
27276/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
27277/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
27278
27279function isInteropObservable(input) {
27280 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
27281}
27282//# sourceMappingURL=isInteropObservable.js.map
27283
27284
27285/***/ }),
27286/* 247 */
27287/***/ (function(module, __webpack_exports__, __webpack_require__) {
27288
27289"use strict";
27290__webpack_require__.r(__webpack_exports__);
27291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
27292/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
27293/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
27294
27295function isIterable(input) {
27296 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
27297}
27298//# sourceMappingURL=isIterable.js.map
27299
27300
27301/***/ }),
27302/* 248 */
27303/***/ (function(module, __webpack_exports__, __webpack_require__) {
27304
27305"use strict";
27306__webpack_require__.r(__webpack_exports__);
27307/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
27308/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27309/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27310/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
27311/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
27312
27313
27314
27315function defer(observableFactory) {
27316 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27317 var input;
27318 try {
27319 input = observableFactory();
27320 }
27321 catch (err) {
27322 subscriber.error(err);
27323 return undefined;
27324 }
27325 var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
27326 return source.subscribe(subscriber);
27327 });
27328}
27329//# sourceMappingURL=defer.js.map
27330
27331
27332/***/ }),
27333/* 249 */
27334/***/ (function(module, __webpack_exports__, __webpack_require__) {
27335
27336"use strict";
27337__webpack_require__.r(__webpack_exports__);
27338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
27339/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27340/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27341/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
27342/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
27343/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
27344/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
27345
27346
27347
27348
27349
27350function forkJoin() {
27351 var sources = [];
27352 for (var _i = 0; _i < arguments.length; _i++) {
27353 sources[_i] = arguments[_i];
27354 }
27355 if (sources.length === 1) {
27356 var first_1 = sources[0];
27357 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
27358 return forkJoinInternal(first_1, null);
27359 }
27360 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
27361 var keys = Object.keys(first_1);
27362 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
27363 }
27364 }
27365 if (typeof sources[sources.length - 1] === 'function') {
27366 var resultSelector_1 = sources.pop();
27367 sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
27368 return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
27369 }
27370 return forkJoinInternal(sources, null);
27371}
27372function forkJoinInternal(sources, keys) {
27373 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27374 var len = sources.length;
27375 if (len === 0) {
27376 subscriber.complete();
27377 return;
27378 }
27379 var values = new Array(len);
27380 var completed = 0;
27381 var emitted = 0;
27382 var _loop_1 = function (i) {
27383 var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
27384 var hasValue = false;
27385 subscriber.add(source.subscribe({
27386 next: function (value) {
27387 if (!hasValue) {
27388 hasValue = true;
27389 emitted++;
27390 }
27391 values[i] = value;
27392 },
27393 error: function (err) { return subscriber.error(err); },
27394 complete: function () {
27395 completed++;
27396 if (completed === len || !hasValue) {
27397 if (emitted === len) {
27398 subscriber.next(keys ?
27399 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
27400 values);
27401 }
27402 subscriber.complete();
27403 }
27404 }
27405 }));
27406 };
27407 for (var i = 0; i < len; i++) {
27408 _loop_1(i);
27409 }
27410 });
27411}
27412//# sourceMappingURL=forkJoin.js.map
27413
27414
27415/***/ }),
27416/* 250 */
27417/***/ (function(module, __webpack_exports__, __webpack_require__) {
27418
27419"use strict";
27420__webpack_require__.r(__webpack_exports__);
27421/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
27422/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27423/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27424/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27425/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27426/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27427
27428
27429
27430
27431var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
27432function fromEvent(target, eventName, options, resultSelector) {
27433 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
27434 resultSelector = options;
27435 options = undefined;
27436 }
27437 if (resultSelector) {
27438 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); }));
27439 }
27440 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27441 function handler(e) {
27442 if (arguments.length > 1) {
27443 subscriber.next(Array.prototype.slice.call(arguments));
27444 }
27445 else {
27446 subscriber.next(e);
27447 }
27448 }
27449 setupSubscription(target, eventName, handler, subscriber, options);
27450 });
27451}
27452function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
27453 var unsubscribe;
27454 if (isEventTarget(sourceObj)) {
27455 var source_1 = sourceObj;
27456 sourceObj.addEventListener(eventName, handler, options);
27457 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
27458 }
27459 else if (isJQueryStyleEventEmitter(sourceObj)) {
27460 var source_2 = sourceObj;
27461 sourceObj.on(eventName, handler);
27462 unsubscribe = function () { return source_2.off(eventName, handler); };
27463 }
27464 else if (isNodeStyleEventEmitter(sourceObj)) {
27465 var source_3 = sourceObj;
27466 sourceObj.addListener(eventName, handler);
27467 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
27468 }
27469 else if (sourceObj && sourceObj.length) {
27470 for (var i = 0, len = sourceObj.length; i < len; i++) {
27471 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
27472 }
27473 }
27474 else {
27475 throw new TypeError('Invalid event target');
27476 }
27477 subscriber.add(unsubscribe);
27478}
27479function isNodeStyleEventEmitter(sourceObj) {
27480 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
27481}
27482function isJQueryStyleEventEmitter(sourceObj) {
27483 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
27484}
27485function isEventTarget(sourceObj) {
27486 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
27487}
27488//# sourceMappingURL=fromEvent.js.map
27489
27490
27491/***/ }),
27492/* 251 */
27493/***/ (function(module, __webpack_exports__, __webpack_require__) {
27494
27495"use strict";
27496__webpack_require__.r(__webpack_exports__);
27497/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
27498/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27499/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27500/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27501/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27502/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27503
27504
27505
27506
27507function fromEventPattern(addHandler, removeHandler, resultSelector) {
27508 if (resultSelector) {
27509 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); }));
27510 }
27511 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27512 var handler = function () {
27513 var e = [];
27514 for (var _i = 0; _i < arguments.length; _i++) {
27515 e[_i] = arguments[_i];
27516 }
27517 return subscriber.next(e.length === 1 ? e[0] : e);
27518 };
27519 var retValue;
27520 try {
27521 retValue = addHandler(handler);
27522 }
27523 catch (err) {
27524 subscriber.error(err);
27525 return undefined;
27526 }
27527 if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
27528 return undefined;
27529 }
27530 return function () { return removeHandler(handler, retValue); };
27531 });
27532}
27533//# sourceMappingURL=fromEventPattern.js.map
27534
27535
27536/***/ }),
27537/* 252 */
27538/***/ (function(module, __webpack_exports__, __webpack_require__) {
27539
27540"use strict";
27541__webpack_require__.r(__webpack_exports__);
27542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
27543/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27544/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
27545/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
27546/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
27547
27548
27549
27550function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
27551 var resultSelector;
27552 var initialState;
27553 if (arguments.length == 1) {
27554 var options = initialStateOrOptions;
27555 initialState = options.initialState;
27556 condition = options.condition;
27557 iterate = options.iterate;
27558 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27559 scheduler = options.scheduler;
27560 }
27561 else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
27562 initialState = initialStateOrOptions;
27563 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27564 scheduler = resultSelectorOrObservable;
27565 }
27566 else {
27567 initialState = initialStateOrOptions;
27568 resultSelector = resultSelectorOrObservable;
27569 }
27570 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27571 var state = initialState;
27572 if (scheduler) {
27573 return scheduler.schedule(dispatch, 0, {
27574 subscriber: subscriber,
27575 iterate: iterate,
27576 condition: condition,
27577 resultSelector: resultSelector,
27578 state: state
27579 });
27580 }
27581 do {
27582 if (condition) {
27583 var conditionResult = void 0;
27584 try {
27585 conditionResult = condition(state);
27586 }
27587 catch (err) {
27588 subscriber.error(err);
27589 return undefined;
27590 }
27591 if (!conditionResult) {
27592 subscriber.complete();
27593 break;
27594 }
27595 }
27596 var value = void 0;
27597 try {
27598 value = resultSelector(state);
27599 }
27600 catch (err) {
27601 subscriber.error(err);
27602 return undefined;
27603 }
27604 subscriber.next(value);
27605 if (subscriber.closed) {
27606 break;
27607 }
27608 try {
27609 state = iterate(state);
27610 }
27611 catch (err) {
27612 subscriber.error(err);
27613 return undefined;
27614 }
27615 } while (true);
27616 return undefined;
27617 });
27618}
27619function dispatch(state) {
27620 var subscriber = state.subscriber, condition = state.condition;
27621 if (subscriber.closed) {
27622 return undefined;
27623 }
27624 if (state.needIterate) {
27625 try {
27626 state.state = state.iterate(state.state);
27627 }
27628 catch (err) {
27629 subscriber.error(err);
27630 return undefined;
27631 }
27632 }
27633 else {
27634 state.needIterate = true;
27635 }
27636 if (condition) {
27637 var conditionResult = void 0;
27638 try {
27639 conditionResult = condition(state.state);
27640 }
27641 catch (err) {
27642 subscriber.error(err);
27643 return undefined;
27644 }
27645 if (!conditionResult) {
27646 subscriber.complete();
27647 return undefined;
27648 }
27649 if (subscriber.closed) {
27650 return undefined;
27651 }
27652 }
27653 var value;
27654 try {
27655 value = state.resultSelector(state.state);
27656 }
27657 catch (err) {
27658 subscriber.error(err);
27659 return undefined;
27660 }
27661 if (subscriber.closed) {
27662 return undefined;
27663 }
27664 subscriber.next(value);
27665 if (subscriber.closed) {
27666 return undefined;
27667 }
27668 return this.schedule(state);
27669}
27670//# sourceMappingURL=generate.js.map
27671
27672
27673/***/ }),
27674/* 253 */
27675/***/ (function(module, __webpack_exports__, __webpack_require__) {
27676
27677"use strict";
27678__webpack_require__.r(__webpack_exports__);
27679/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
27680/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
27681/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(201);
27682/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
27683
27684
27685function iif(condition, trueResult, falseResult) {
27686 if (trueResult === void 0) {
27687 trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27688 }
27689 if (falseResult === void 0) {
27690 falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27691 }
27692 return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
27693}
27694//# sourceMappingURL=iif.js.map
27695
27696
27697/***/ }),
27698/* 254 */
27699/***/ (function(module, __webpack_exports__, __webpack_require__) {
27700
27701"use strict";
27702__webpack_require__.r(__webpack_exports__);
27703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
27704/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27705/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
27706/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
27707/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
27708
27709
27710
27711function interval(period, scheduler) {
27712 if (period === void 0) {
27713 period = 0;
27714 }
27715 if (scheduler === void 0) {
27716 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27717 }
27718 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
27719 period = 0;
27720 }
27721 if (!scheduler || typeof scheduler.schedule !== 'function') {
27722 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27723 }
27724 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27725 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
27726 return subscriber;
27727 });
27728}
27729function dispatch(state) {
27730 var subscriber = state.subscriber, counter = state.counter, period = state.period;
27731 subscriber.next(counter);
27732 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
27733}
27734//# sourceMappingURL=interval.js.map
27735
27736
27737/***/ }),
27738/* 255 */
27739/***/ (function(module, __webpack_exports__, __webpack_require__) {
27740
27741"use strict";
27742__webpack_require__.r(__webpack_exports__);
27743/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
27744/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
27745/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
27746
27747function isNumeric(val) {
27748 return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
27749}
27750//# sourceMappingURL=isNumeric.js.map
27751
27752
27753/***/ }),
27754/* 256 */
27755/***/ (function(module, __webpack_exports__, __webpack_require__) {
27756
27757"use strict";
27758__webpack_require__.r(__webpack_exports__);
27759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
27760/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27761/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
27762/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
27763/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
27764/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
27765
27766
27767
27768
27769function merge() {
27770 var observables = [];
27771 for (var _i = 0; _i < arguments.length; _i++) {
27772 observables[_i] = arguments[_i];
27773 }
27774 var concurrent = Number.POSITIVE_INFINITY;
27775 var scheduler = null;
27776 var last = observables[observables.length - 1];
27777 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
27778 scheduler = observables.pop();
27779 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
27780 concurrent = observables.pop();
27781 }
27782 }
27783 else if (typeof last === 'number') {
27784 concurrent = observables.pop();
27785 }
27786 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27787 return observables[0];
27788 }
27789 return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
27790}
27791//# sourceMappingURL=merge.js.map
27792
27793
27794/***/ }),
27795/* 257 */
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__, "NEVER", function() { return NEVER; });
27801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
27802/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27803/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
27804/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
27805
27806
27807var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
27808function never() {
27809 return NEVER;
27810}
27811//# sourceMappingURL=never.js.map
27812
27813
27814/***/ }),
27815/* 258 */
27816/***/ (function(module, __webpack_exports__, __webpack_require__) {
27817
27818"use strict";
27819__webpack_require__.r(__webpack_exports__);
27820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
27821/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27822/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27823/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
27824/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
27825/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
27826
27827
27828
27829
27830function onErrorResumeNext() {
27831 var sources = [];
27832 for (var _i = 0; _i < arguments.length; _i++) {
27833 sources[_i] = arguments[_i];
27834 }
27835 if (sources.length === 0) {
27836 return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
27837 }
27838 var first = sources[0], remainder = sources.slice(1);
27839 if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
27840 return onErrorResumeNext.apply(void 0, first);
27841 }
27842 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27843 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
27844 return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
27845 next: function (value) { subscriber.next(value); },
27846 error: subNext,
27847 complete: subNext,
27848 });
27849 });
27850}
27851//# sourceMappingURL=onErrorResumeNext.js.map
27852
27853
27854/***/ }),
27855/* 259 */
27856/***/ (function(module, __webpack_exports__, __webpack_require__) {
27857
27858"use strict";
27859__webpack_require__.r(__webpack_exports__);
27860/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
27861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
27862/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27863/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27864/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27865
27866
27867function pairs(obj, scheduler) {
27868 if (!scheduler) {
27869 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27870 var keys = Object.keys(obj);
27871 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
27872 var key = keys[i];
27873 if (obj.hasOwnProperty(key)) {
27874 subscriber.next([key, obj[key]]);
27875 }
27876 }
27877 subscriber.complete();
27878 });
27879 }
27880 else {
27881 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27882 var keys = Object.keys(obj);
27883 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27884 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
27885 return subscription;
27886 });
27887 }
27888}
27889function dispatch(state) {
27890 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
27891 if (!subscriber.closed) {
27892 if (index < keys.length) {
27893 var key = keys[index];
27894 subscriber.next([key, obj[key]]);
27895 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
27896 }
27897 else {
27898 subscriber.complete();
27899 }
27900 }
27901}
27902//# sourceMappingURL=pairs.js.map
27903
27904
27905/***/ }),
27906/* 260 */
27907/***/ (function(module, __webpack_exports__, __webpack_require__) {
27908
27909"use strict";
27910__webpack_require__.r(__webpack_exports__);
27911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
27912/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
27913/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
27914/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
27915/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
27916/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
27917
27918
27919
27920
27921function partition(source, predicate, thisArg) {
27922 return [
27923 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))),
27924 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)))
27925 ];
27926}
27927//# sourceMappingURL=partition.js.map
27928
27929
27930/***/ }),
27931/* 261 */
27932/***/ (function(module, __webpack_exports__, __webpack_require__) {
27933
27934"use strict";
27935__webpack_require__.r(__webpack_exports__);
27936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
27937/** PURE_IMPORTS_START PURE_IMPORTS_END */
27938function not(pred, thisArg) {
27939 function notPred() {
27940 return !(notPred.pred.apply(notPred.thisArg, arguments));
27941 }
27942 notPred.pred = pred;
27943 notPred.thisArg = thisArg;
27944 return notPred;
27945}
27946//# sourceMappingURL=not.js.map
27947
27948
27949/***/ }),
27950/* 262 */
27951/***/ (function(module, __webpack_exports__, __webpack_require__) {
27952
27953"use strict";
27954__webpack_require__.r(__webpack_exports__);
27955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
27956/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
27957/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
27958/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27959
27960
27961function filter(predicate, thisArg) {
27962 return function filterOperatorFunction(source) {
27963 return source.lift(new FilterOperator(predicate, thisArg));
27964 };
27965}
27966var FilterOperator = /*@__PURE__*/ (function () {
27967 function FilterOperator(predicate, thisArg) {
27968 this.predicate = predicate;
27969 this.thisArg = thisArg;
27970 }
27971 FilterOperator.prototype.call = function (subscriber, source) {
27972 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
27973 };
27974 return FilterOperator;
27975}());
27976var FilterSubscriber = /*@__PURE__*/ (function (_super) {
27977 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
27978 function FilterSubscriber(destination, predicate, thisArg) {
27979 var _this = _super.call(this, destination) || this;
27980 _this.predicate = predicate;
27981 _this.thisArg = thisArg;
27982 _this.count = 0;
27983 return _this;
27984 }
27985 FilterSubscriber.prototype._next = function (value) {
27986 var result;
27987 try {
27988 result = this.predicate.call(this.thisArg, value, this.count++);
27989 }
27990 catch (err) {
27991 this.destination.error(err);
27992 return;
27993 }
27994 if (result) {
27995 this.destination.next(value);
27996 }
27997 };
27998 return FilterSubscriber;
27999}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28000//# sourceMappingURL=filter.js.map
28001
28002
28003/***/ }),
28004/* 263 */
28005/***/ (function(module, __webpack_exports__, __webpack_require__) {
28006
28007"use strict";
28008__webpack_require__.r(__webpack_exports__);
28009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
28010/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
28011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
28012/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28013/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
28014/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
28015/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
28016/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
28017/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28018
28019
28020
28021
28022
28023function race() {
28024 var observables = [];
28025 for (var _i = 0; _i < arguments.length; _i++) {
28026 observables[_i] = arguments[_i];
28027 }
28028 if (observables.length === 1) {
28029 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
28030 observables = observables[0];
28031 }
28032 else {
28033 return observables[0];
28034 }
28035 }
28036 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
28037}
28038var RaceOperator = /*@__PURE__*/ (function () {
28039 function RaceOperator() {
28040 }
28041 RaceOperator.prototype.call = function (subscriber, source) {
28042 return source.subscribe(new RaceSubscriber(subscriber));
28043 };
28044 return RaceOperator;
28045}());
28046
28047var RaceSubscriber = /*@__PURE__*/ (function (_super) {
28048 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
28049 function RaceSubscriber(destination) {
28050 var _this = _super.call(this, destination) || this;
28051 _this.hasFirst = false;
28052 _this.observables = [];
28053 _this.subscriptions = [];
28054 return _this;
28055 }
28056 RaceSubscriber.prototype._next = function (observable) {
28057 this.observables.push(observable);
28058 };
28059 RaceSubscriber.prototype._complete = function () {
28060 var observables = this.observables;
28061 var len = observables.length;
28062 if (len === 0) {
28063 this.destination.complete();
28064 }
28065 else {
28066 for (var i = 0; i < len && !this.hasFirst; i++) {
28067 var observable = observables[i];
28068 var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
28069 if (this.subscriptions) {
28070 this.subscriptions.push(subscription);
28071 }
28072 this.add(subscription);
28073 }
28074 this.observables = null;
28075 }
28076 };
28077 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28078 if (!this.hasFirst) {
28079 this.hasFirst = true;
28080 for (var i = 0; i < this.subscriptions.length; i++) {
28081 if (i !== outerIndex) {
28082 var subscription = this.subscriptions[i];
28083 subscription.unsubscribe();
28084 this.remove(subscription);
28085 }
28086 }
28087 this.subscriptions = null;
28088 }
28089 this.destination.next(innerValue);
28090 };
28091 return RaceSubscriber;
28092}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
28093
28094//# sourceMappingURL=race.js.map
28095
28096
28097/***/ }),
28098/* 264 */
28099/***/ (function(module, __webpack_exports__, __webpack_require__) {
28100
28101"use strict";
28102__webpack_require__.r(__webpack_exports__);
28103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
28104/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
28105/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28106/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
28107
28108function range(start, count, scheduler) {
28109 if (start === void 0) {
28110 start = 0;
28111 }
28112 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28113 if (count === undefined) {
28114 count = start;
28115 start = 0;
28116 }
28117 var index = 0;
28118 var current = start;
28119 if (scheduler) {
28120 return scheduler.schedule(dispatch, 0, {
28121 index: index, count: count, start: start, subscriber: subscriber
28122 });
28123 }
28124 else {
28125 do {
28126 if (index++ >= count) {
28127 subscriber.complete();
28128 break;
28129 }
28130 subscriber.next(current++);
28131 if (subscriber.closed) {
28132 break;
28133 }
28134 } while (true);
28135 }
28136 return undefined;
28137 });
28138}
28139function dispatch(state) {
28140 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
28141 if (index >= count) {
28142 subscriber.complete();
28143 return;
28144 }
28145 subscriber.next(start);
28146 if (subscriber.closed) {
28147 return;
28148 }
28149 state.index = index + 1;
28150 state.start = start + 1;
28151 this.schedule(state);
28152}
28153//# sourceMappingURL=range.js.map
28154
28155
28156/***/ }),
28157/* 265 */
28158/***/ (function(module, __webpack_exports__, __webpack_require__) {
28159
28160"use strict";
28161__webpack_require__.r(__webpack_exports__);
28162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
28163/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28164/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
28165/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
28166/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
28167/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
28168
28169
28170
28171
28172function timer(dueTime, periodOrScheduler, scheduler) {
28173 if (dueTime === void 0) {
28174 dueTime = 0;
28175 }
28176 var period = -1;
28177 if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
28178 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
28179 }
28180 else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
28181 scheduler = periodOrScheduler;
28182 }
28183 if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
28184 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
28185 }
28186 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28187 var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
28188 ? dueTime
28189 : (+dueTime - scheduler.now());
28190 return scheduler.schedule(dispatch, due, {
28191 index: 0, period: period, subscriber: subscriber
28192 });
28193 });
28194}
28195function dispatch(state) {
28196 var index = state.index, period = state.period, subscriber = state.subscriber;
28197 subscriber.next(index);
28198 if (subscriber.closed) {
28199 return;
28200 }
28201 else if (period === -1) {
28202 return subscriber.complete();
28203 }
28204 state.index = index + 1;
28205 this.schedule(state, period);
28206}
28207//# sourceMappingURL=timer.js.map
28208
28209
28210/***/ }),
28211/* 266 */
28212/***/ (function(module, __webpack_exports__, __webpack_require__) {
28213
28214"use strict";
28215__webpack_require__.r(__webpack_exports__);
28216/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
28217/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28218/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
28219/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
28220/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
28221
28222
28223
28224function using(resourceFactory, observableFactory) {
28225 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28226 var resource;
28227 try {
28228 resource = resourceFactory();
28229 }
28230 catch (err) {
28231 subscriber.error(err);
28232 return undefined;
28233 }
28234 var result;
28235 try {
28236 result = observableFactory(resource);
28237 }
28238 catch (err) {
28239 subscriber.error(err);
28240 return undefined;
28241 }
28242 var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
28243 var subscription = source.subscribe(subscriber);
28244 return function () {
28245 subscription.unsubscribe();
28246 if (resource) {
28247 resource.unsubscribe();
28248 }
28249 };
28250 });
28251}
28252//# sourceMappingURL=using.js.map
28253
28254
28255/***/ }),
28256/* 267 */
28257/***/ (function(module, __webpack_exports__, __webpack_require__) {
28258
28259"use strict";
28260__webpack_require__.r(__webpack_exports__);
28261/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
28262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
28263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
28264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28265/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
28266/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
28267/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
28268/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(227);
28269/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
28270/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(233);
28271/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
28272
28273
28274
28275
28276
28277
28278
28279function zip() {
28280 var observables = [];
28281 for (var _i = 0; _i < arguments.length; _i++) {
28282 observables[_i] = arguments[_i];
28283 }
28284 var resultSelector = observables[observables.length - 1];
28285 if (typeof resultSelector === 'function') {
28286 observables.pop();
28287 }
28288 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
28289}
28290var ZipOperator = /*@__PURE__*/ (function () {
28291 function ZipOperator(resultSelector) {
28292 this.resultSelector = resultSelector;
28293 }
28294 ZipOperator.prototype.call = function (subscriber, source) {
28295 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
28296 };
28297 return ZipOperator;
28298}());
28299
28300var ZipSubscriber = /*@__PURE__*/ (function (_super) {
28301 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
28302 function ZipSubscriber(destination, resultSelector, values) {
28303 if (values === void 0) {
28304 values = Object.create(null);
28305 }
28306 var _this = _super.call(this, destination) || this;
28307 _this.iterators = [];
28308 _this.active = 0;
28309 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
28310 _this.values = values;
28311 return _this;
28312 }
28313 ZipSubscriber.prototype._next = function (value) {
28314 var iterators = this.iterators;
28315 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
28316 iterators.push(new StaticArrayIterator(value));
28317 }
28318 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
28319 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
28320 }
28321 else {
28322 iterators.push(new ZipBufferIterator(this.destination, this, value));
28323 }
28324 };
28325 ZipSubscriber.prototype._complete = function () {
28326 var iterators = this.iterators;
28327 var len = iterators.length;
28328 this.unsubscribe();
28329 if (len === 0) {
28330 this.destination.complete();
28331 return;
28332 }
28333 this.active = len;
28334 for (var i = 0; i < len; i++) {
28335 var iterator = iterators[i];
28336 if (iterator.stillUnsubscribed) {
28337 var destination = this.destination;
28338 destination.add(iterator.subscribe(iterator, i));
28339 }
28340 else {
28341 this.active--;
28342 }
28343 }
28344 };
28345 ZipSubscriber.prototype.notifyInactive = function () {
28346 this.active--;
28347 if (this.active === 0) {
28348 this.destination.complete();
28349 }
28350 };
28351 ZipSubscriber.prototype.checkIterators = function () {
28352 var iterators = this.iterators;
28353 var len = iterators.length;
28354 var destination = this.destination;
28355 for (var i = 0; i < len; i++) {
28356 var iterator = iterators[i];
28357 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
28358 return;
28359 }
28360 }
28361 var shouldComplete = false;
28362 var args = [];
28363 for (var i = 0; i < len; i++) {
28364 var iterator = iterators[i];
28365 var result = iterator.next();
28366 if (iterator.hasCompleted()) {
28367 shouldComplete = true;
28368 }
28369 if (result.done) {
28370 destination.complete();
28371 return;
28372 }
28373 args.push(result.value);
28374 }
28375 if (this.resultSelector) {
28376 this._tryresultSelector(args);
28377 }
28378 else {
28379 destination.next(args);
28380 }
28381 if (shouldComplete) {
28382 destination.complete();
28383 }
28384 };
28385 ZipSubscriber.prototype._tryresultSelector = function (args) {
28386 var result;
28387 try {
28388 result = this.resultSelector.apply(this, args);
28389 }
28390 catch (err) {
28391 this.destination.error(err);
28392 return;
28393 }
28394 this.destination.next(result);
28395 };
28396 return ZipSubscriber;
28397}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
28398
28399var StaticIterator = /*@__PURE__*/ (function () {
28400 function StaticIterator(iterator) {
28401 this.iterator = iterator;
28402 this.nextResult = iterator.next();
28403 }
28404 StaticIterator.prototype.hasValue = function () {
28405 return true;
28406 };
28407 StaticIterator.prototype.next = function () {
28408 var result = this.nextResult;
28409 this.nextResult = this.iterator.next();
28410 return result;
28411 };
28412 StaticIterator.prototype.hasCompleted = function () {
28413 var nextResult = this.nextResult;
28414 return nextResult && nextResult.done;
28415 };
28416 return StaticIterator;
28417}());
28418var StaticArrayIterator = /*@__PURE__*/ (function () {
28419 function StaticArrayIterator(array) {
28420 this.array = array;
28421 this.index = 0;
28422 this.length = 0;
28423 this.length = array.length;
28424 }
28425 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28426 return this;
28427 };
28428 StaticArrayIterator.prototype.next = function (value) {
28429 var i = this.index++;
28430 var array = this.array;
28431 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
28432 };
28433 StaticArrayIterator.prototype.hasValue = function () {
28434 return this.array.length > this.index;
28435 };
28436 StaticArrayIterator.prototype.hasCompleted = function () {
28437 return this.array.length === this.index;
28438 };
28439 return StaticArrayIterator;
28440}());
28441var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
28442 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
28443 function ZipBufferIterator(destination, parent, observable) {
28444 var _this = _super.call(this, destination) || this;
28445 _this.parent = parent;
28446 _this.observable = observable;
28447 _this.stillUnsubscribed = true;
28448 _this.buffer = [];
28449 _this.isComplete = false;
28450 return _this;
28451 }
28452 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28453 return this;
28454 };
28455 ZipBufferIterator.prototype.next = function () {
28456 var buffer = this.buffer;
28457 if (buffer.length === 0 && this.isComplete) {
28458 return { value: null, done: true };
28459 }
28460 else {
28461 return { value: buffer.shift(), done: false };
28462 }
28463 };
28464 ZipBufferIterator.prototype.hasValue = function () {
28465 return this.buffer.length > 0;
28466 };
28467 ZipBufferIterator.prototype.hasCompleted = function () {
28468 return this.buffer.length === 0 && this.isComplete;
28469 };
28470 ZipBufferIterator.prototype.notifyComplete = function () {
28471 if (this.buffer.length > 0) {
28472 this.isComplete = true;
28473 this.parent.notifyInactive();
28474 }
28475 else {
28476 this.destination.complete();
28477 }
28478 };
28479 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28480 this.buffer.push(innerValue);
28481 this.parent.checkIterators();
28482 };
28483 ZipBufferIterator.prototype.subscribe = function (value, index) {
28484 return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
28485 };
28486 return ZipBufferIterator;
28487}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
28488//# sourceMappingURL=zip.js.map
28489
28490
28491/***/ }),
28492/* 268 */,
28493/* 269 */
28494/***/ (function(module, __webpack_exports__, __webpack_require__) {
28495
28496"use strict";
28497__webpack_require__.r(__webpack_exports__);
28498/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(270);
28499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
28500
28501/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
28502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
28503
28504/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(272);
28505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
28506
28507/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(273);
28508/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
28509
28510/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(274);
28511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
28512
28513/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(275);
28514/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
28515
28516/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(276);
28517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
28518
28519/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(277);
28520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
28521
28522/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(278);
28523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
28524
28525/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(279);
28526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
28527
28528/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(280);
28529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
28530
28531/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(238);
28532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
28533
28534/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(281);
28535/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
28536
28537/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(282);
28538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
28539
28540/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(283);
28541/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
28542
28543/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(284);
28544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
28545
28546/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(285);
28547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
28548
28549/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(286);
28550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
28551
28552/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(287);
28553/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
28554
28555/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(289);
28556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
28557
28558/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(290);
28559/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
28560
28561/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(291);
28562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
28563
28564/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(292);
28565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
28566
28567/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(293);
28568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
28569
28570/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(294);
28571/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
28572
28573/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(297);
28574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
28575
28576/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(298);
28577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
28578
28579/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(299);
28580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
28581
28582/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(300);
28583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
28584
28585/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(301);
28586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
28587
28588/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(262);
28589/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
28590
28591/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(302);
28592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
28593
28594/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(303);
28595/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
28596
28597/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(304);
28598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
28599
28600/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(305);
28601/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
28602
28603/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(189);
28604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
28605
28606/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(306);
28607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
28608
28609/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(307);
28610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
28611
28612/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(308);
28613/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
28614
28615/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(224);
28616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
28617
28618/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(310);
28619/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
28620
28621/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(311);
28622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
28623
28624/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(312);
28625/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
28626
28627/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(315);
28628/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
28629
28630/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(239);
28631/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
28632
28633/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(240);
28634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28635
28636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28637
28638/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(316);
28639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
28640
28641/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(317);
28642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
28643
28644/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(318);
28645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
28646
28647/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(319);
28648/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
28649
28650/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(199);
28651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
28652
28653/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(320);
28654/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
28655
28656/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(321);
28657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
28658
28659/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(322);
28660/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
28661
28662/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(323);
28663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
28664
28665/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(324);
28666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
28667
28668/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(325);
28669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
28670
28671/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(326);
28672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
28673
28674/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(327);
28675/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
28676
28677/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(328);
28678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
28679
28680/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(313);
28681/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
28682
28683/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(329);
28684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
28685
28686/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(330);
28687/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
28688
28689/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(331);
28690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
28691
28692/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(332);
28693/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
28694
28695/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(188);
28696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
28697
28698/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(333);
28699/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
28700
28701/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(334);
28702/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
28703
28704/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(314);
28705/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
28706
28707/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(335);
28708/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
28709
28710/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(336);
28711/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
28712
28713/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(337);
28714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
28715
28716/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(338);
28717/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
28718
28719/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(339);
28720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
28721
28722/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(340);
28723/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
28724
28725/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(341);
28726/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
28727
28728/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(342);
28729/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
28730
28731/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(343);
28732/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
28733
28734/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(344);
28735/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
28736
28737/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(346);
28738/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
28739
28740/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(347);
28741/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
28742
28743/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(348);
28744/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
28745
28746/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(296);
28747/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
28748
28749/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(309);
28750/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
28751
28752/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(349);
28753/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
28754
28755/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(350);
28756/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
28757
28758/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(351);
28759/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
28760
28761/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(352);
28762/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
28763
28764/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(353);
28765/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
28766
28767/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(295);
28768/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
28769
28770/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(354);
28771/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
28772
28773/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(355);
28774/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
28775
28776/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(356);
28777/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
28778
28779/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(357);
28780/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
28781
28782/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(358);
28783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
28784
28785/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(359);
28786/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
28787
28788/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(360);
28789/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
28790
28791/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(361);
28792/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
28793
28794/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(362);
28795/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
28796
28797/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(363);
28798/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
28799
28800/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(364);
28801/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
28802
28803/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(365);
28804/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
28805
28806/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(366);
28807/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
28808
28809/** PURE_IMPORTS_START PURE_IMPORTS_END */
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914//# sourceMappingURL=index.js.map
28915
28916
28917/***/ }),
28918/* 270 */
28919/***/ (function(module, __webpack_exports__, __webpack_require__) {
28920
28921"use strict";
28922__webpack_require__.r(__webpack_exports__);
28923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
28924/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28925/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
28926/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
28927/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28928
28929
28930
28931function audit(durationSelector) {
28932 return function auditOperatorFunction(source) {
28933 return source.lift(new AuditOperator(durationSelector));
28934 };
28935}
28936var AuditOperator = /*@__PURE__*/ (function () {
28937 function AuditOperator(durationSelector) {
28938 this.durationSelector = durationSelector;
28939 }
28940 AuditOperator.prototype.call = function (subscriber, source) {
28941 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
28942 };
28943 return AuditOperator;
28944}());
28945var AuditSubscriber = /*@__PURE__*/ (function (_super) {
28946 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
28947 function AuditSubscriber(destination, durationSelector) {
28948 var _this = _super.call(this, destination) || this;
28949 _this.durationSelector = durationSelector;
28950 _this.hasValue = false;
28951 return _this;
28952 }
28953 AuditSubscriber.prototype._next = function (value) {
28954 this.value = value;
28955 this.hasValue = true;
28956 if (!this.throttled) {
28957 var duration = void 0;
28958 try {
28959 var durationSelector = this.durationSelector;
28960 duration = durationSelector(value);
28961 }
28962 catch (err) {
28963 return this.destination.error(err);
28964 }
28965 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
28966 if (!innerSubscription || innerSubscription.closed) {
28967 this.clearThrottle();
28968 }
28969 else {
28970 this.add(this.throttled = innerSubscription);
28971 }
28972 }
28973 };
28974 AuditSubscriber.prototype.clearThrottle = function () {
28975 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
28976 if (throttled) {
28977 this.remove(throttled);
28978 this.throttled = null;
28979 throttled.unsubscribe();
28980 }
28981 if (hasValue) {
28982 this.value = null;
28983 this.hasValue = false;
28984 this.destination.next(value);
28985 }
28986 };
28987 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
28988 this.clearThrottle();
28989 };
28990 AuditSubscriber.prototype.notifyComplete = function () {
28991 this.clearThrottle();
28992 };
28993 return AuditSubscriber;
28994}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
28995//# sourceMappingURL=audit.js.map
28996
28997
28998/***/ }),
28999/* 271 */
29000/***/ (function(module, __webpack_exports__, __webpack_require__) {
29001
29002"use strict";
29003__webpack_require__.r(__webpack_exports__);
29004/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
29005/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
29006/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(270);
29007/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
29008/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
29009
29010
29011
29012function auditTime(duration, scheduler) {
29013 if (scheduler === void 0) {
29014 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
29015 }
29016 return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
29017}
29018//# sourceMappingURL=auditTime.js.map
29019
29020
29021/***/ }),
29022/* 272 */
29023/***/ (function(module, __webpack_exports__, __webpack_require__) {
29024
29025"use strict";
29026__webpack_require__.r(__webpack_exports__);
29027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
29028/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29029/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29030/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29031/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29032
29033
29034
29035function buffer(closingNotifier) {
29036 return function bufferOperatorFunction(source) {
29037 return source.lift(new BufferOperator(closingNotifier));
29038 };
29039}
29040var BufferOperator = /*@__PURE__*/ (function () {
29041 function BufferOperator(closingNotifier) {
29042 this.closingNotifier = closingNotifier;
29043 }
29044 BufferOperator.prototype.call = function (subscriber, source) {
29045 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
29046 };
29047 return BufferOperator;
29048}());
29049var BufferSubscriber = /*@__PURE__*/ (function (_super) {
29050 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
29051 function BufferSubscriber(destination, closingNotifier) {
29052 var _this = _super.call(this, destination) || this;
29053 _this.buffer = [];
29054 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
29055 return _this;
29056 }
29057 BufferSubscriber.prototype._next = function (value) {
29058 this.buffer.push(value);
29059 };
29060 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29061 var buffer = this.buffer;
29062 this.buffer = [];
29063 this.destination.next(buffer);
29064 };
29065 return BufferSubscriber;
29066}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29067//# sourceMappingURL=buffer.js.map
29068
29069
29070/***/ }),
29071/* 273 */
29072/***/ (function(module, __webpack_exports__, __webpack_require__) {
29073
29074"use strict";
29075__webpack_require__.r(__webpack_exports__);
29076/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
29077/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29078/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29079/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29080
29081
29082function bufferCount(bufferSize, startBufferEvery) {
29083 if (startBufferEvery === void 0) {
29084 startBufferEvery = null;
29085 }
29086 return function bufferCountOperatorFunction(source) {
29087 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
29088 };
29089}
29090var BufferCountOperator = /*@__PURE__*/ (function () {
29091 function BufferCountOperator(bufferSize, startBufferEvery) {
29092 this.bufferSize = bufferSize;
29093 this.startBufferEvery = startBufferEvery;
29094 if (!startBufferEvery || bufferSize === startBufferEvery) {
29095 this.subscriberClass = BufferCountSubscriber;
29096 }
29097 else {
29098 this.subscriberClass = BufferSkipCountSubscriber;
29099 }
29100 }
29101 BufferCountOperator.prototype.call = function (subscriber, source) {
29102 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
29103 };
29104 return BufferCountOperator;
29105}());
29106var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
29107 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
29108 function BufferCountSubscriber(destination, bufferSize) {
29109 var _this = _super.call(this, destination) || this;
29110 _this.bufferSize = bufferSize;
29111 _this.buffer = [];
29112 return _this;
29113 }
29114 BufferCountSubscriber.prototype._next = function (value) {
29115 var buffer = this.buffer;
29116 buffer.push(value);
29117 if (buffer.length == this.bufferSize) {
29118 this.destination.next(buffer);
29119 this.buffer = [];
29120 }
29121 };
29122 BufferCountSubscriber.prototype._complete = function () {
29123 var buffer = this.buffer;
29124 if (buffer.length > 0) {
29125 this.destination.next(buffer);
29126 }
29127 _super.prototype._complete.call(this);
29128 };
29129 return BufferCountSubscriber;
29130}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29131var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
29132 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
29133 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
29134 var _this = _super.call(this, destination) || this;
29135 _this.bufferSize = bufferSize;
29136 _this.startBufferEvery = startBufferEvery;
29137 _this.buffers = [];
29138 _this.count = 0;
29139 return _this;
29140 }
29141 BufferSkipCountSubscriber.prototype._next = function (value) {
29142 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
29143 this.count++;
29144 if (count % startBufferEvery === 0) {
29145 buffers.push([]);
29146 }
29147 for (var i = buffers.length; i--;) {
29148 var buffer = buffers[i];
29149 buffer.push(value);
29150 if (buffer.length === bufferSize) {
29151 buffers.splice(i, 1);
29152 this.destination.next(buffer);
29153 }
29154 }
29155 };
29156 BufferSkipCountSubscriber.prototype._complete = function () {
29157 var _a = this, buffers = _a.buffers, destination = _a.destination;
29158 while (buffers.length > 0) {
29159 var buffer = buffers.shift();
29160 if (buffer.length > 0) {
29161 destination.next(buffer);
29162 }
29163 }
29164 _super.prototype._complete.call(this);
29165 };
29166 return BufferSkipCountSubscriber;
29167}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29168//# sourceMappingURL=bufferCount.js.map
29169
29170
29171/***/ }),
29172/* 274 */
29173/***/ (function(module, __webpack_exports__, __webpack_require__) {
29174
29175"use strict";
29176__webpack_require__.r(__webpack_exports__);
29177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
29178/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29179/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
29180/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
29181/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
29182/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
29183
29184
29185
29186
29187function bufferTime(bufferTimeSpan) {
29188 var length = arguments.length;
29189 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
29190 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
29191 scheduler = arguments[arguments.length - 1];
29192 length--;
29193 }
29194 var bufferCreationInterval = null;
29195 if (length >= 2) {
29196 bufferCreationInterval = arguments[1];
29197 }
29198 var maxBufferSize = Number.POSITIVE_INFINITY;
29199 if (length >= 3) {
29200 maxBufferSize = arguments[2];
29201 }
29202 return function bufferTimeOperatorFunction(source) {
29203 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
29204 };
29205}
29206var BufferTimeOperator = /*@__PURE__*/ (function () {
29207 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29208 this.bufferTimeSpan = bufferTimeSpan;
29209 this.bufferCreationInterval = bufferCreationInterval;
29210 this.maxBufferSize = maxBufferSize;
29211 this.scheduler = scheduler;
29212 }
29213 BufferTimeOperator.prototype.call = function (subscriber, source) {
29214 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
29215 };
29216 return BufferTimeOperator;
29217}());
29218var Context = /*@__PURE__*/ (function () {
29219 function Context() {
29220 this.buffer = [];
29221 }
29222 return Context;
29223}());
29224var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
29225 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
29226 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29227 var _this = _super.call(this, destination) || this;
29228 _this.bufferTimeSpan = bufferTimeSpan;
29229 _this.bufferCreationInterval = bufferCreationInterval;
29230 _this.maxBufferSize = maxBufferSize;
29231 _this.scheduler = scheduler;
29232 _this.contexts = [];
29233 var context = _this.openContext();
29234 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
29235 if (_this.timespanOnly) {
29236 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
29237 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29238 }
29239 else {
29240 var closeState = { subscriber: _this, context: context };
29241 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
29242 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
29243 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
29244 }
29245 return _this;
29246 }
29247 BufferTimeSubscriber.prototype._next = function (value) {
29248 var contexts = this.contexts;
29249 var len = contexts.length;
29250 var filledBufferContext;
29251 for (var i = 0; i < len; i++) {
29252 var context_1 = contexts[i];
29253 var buffer = context_1.buffer;
29254 buffer.push(value);
29255 if (buffer.length == this.maxBufferSize) {
29256 filledBufferContext = context_1;
29257 }
29258 }
29259 if (filledBufferContext) {
29260 this.onBufferFull(filledBufferContext);
29261 }
29262 };
29263 BufferTimeSubscriber.prototype._error = function (err) {
29264 this.contexts.length = 0;
29265 _super.prototype._error.call(this, err);
29266 };
29267 BufferTimeSubscriber.prototype._complete = function () {
29268 var _a = this, contexts = _a.contexts, destination = _a.destination;
29269 while (contexts.length > 0) {
29270 var context_2 = contexts.shift();
29271 destination.next(context_2.buffer);
29272 }
29273 _super.prototype._complete.call(this);
29274 };
29275 BufferTimeSubscriber.prototype._unsubscribe = function () {
29276 this.contexts = null;
29277 };
29278 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
29279 this.closeContext(context);
29280 var closeAction = context.closeAction;
29281 closeAction.unsubscribe();
29282 this.remove(closeAction);
29283 if (!this.closed && this.timespanOnly) {
29284 context = this.openContext();
29285 var bufferTimeSpan = this.bufferTimeSpan;
29286 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
29287 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29288 }
29289 };
29290 BufferTimeSubscriber.prototype.openContext = function () {
29291 var context = new Context();
29292 this.contexts.push(context);
29293 return context;
29294 };
29295 BufferTimeSubscriber.prototype.closeContext = function (context) {
29296 this.destination.next(context.buffer);
29297 var contexts = this.contexts;
29298 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
29299 if (spliceIndex >= 0) {
29300 contexts.splice(contexts.indexOf(context), 1);
29301 }
29302 };
29303 return BufferTimeSubscriber;
29304}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
29305function dispatchBufferTimeSpanOnly(state) {
29306 var subscriber = state.subscriber;
29307 var prevContext = state.context;
29308 if (prevContext) {
29309 subscriber.closeContext(prevContext);
29310 }
29311 if (!subscriber.closed) {
29312 state.context = subscriber.openContext();
29313 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
29314 }
29315}
29316function dispatchBufferCreation(state) {
29317 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
29318 var context = subscriber.openContext();
29319 var action = this;
29320 if (!subscriber.closed) {
29321 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
29322 action.schedule(state, bufferCreationInterval);
29323 }
29324}
29325function dispatchBufferClose(arg) {
29326 var subscriber = arg.subscriber, context = arg.context;
29327 subscriber.closeContext(context);
29328}
29329//# sourceMappingURL=bufferTime.js.map
29330
29331
29332/***/ }),
29333/* 275 */
29334/***/ (function(module, __webpack_exports__, __webpack_require__) {
29335
29336"use strict";
29337__webpack_require__.r(__webpack_exports__);
29338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
29339/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29340/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29341/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29342/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
29343/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
29344
29345
29346
29347
29348function bufferToggle(openings, closingSelector) {
29349 return function bufferToggleOperatorFunction(source) {
29350 return source.lift(new BufferToggleOperator(openings, closingSelector));
29351 };
29352}
29353var BufferToggleOperator = /*@__PURE__*/ (function () {
29354 function BufferToggleOperator(openings, closingSelector) {
29355 this.openings = openings;
29356 this.closingSelector = closingSelector;
29357 }
29358 BufferToggleOperator.prototype.call = function (subscriber, source) {
29359 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
29360 };
29361 return BufferToggleOperator;
29362}());
29363var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
29364 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
29365 function BufferToggleSubscriber(destination, openings, closingSelector) {
29366 var _this = _super.call(this, destination) || this;
29367 _this.openings = openings;
29368 _this.closingSelector = closingSelector;
29369 _this.contexts = [];
29370 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
29371 return _this;
29372 }
29373 BufferToggleSubscriber.prototype._next = function (value) {
29374 var contexts = this.contexts;
29375 var len = contexts.length;
29376 for (var i = 0; i < len; i++) {
29377 contexts[i].buffer.push(value);
29378 }
29379 };
29380 BufferToggleSubscriber.prototype._error = function (err) {
29381 var contexts = this.contexts;
29382 while (contexts.length > 0) {
29383 var context_1 = contexts.shift();
29384 context_1.subscription.unsubscribe();
29385 context_1.buffer = null;
29386 context_1.subscription = null;
29387 }
29388 this.contexts = null;
29389 _super.prototype._error.call(this, err);
29390 };
29391 BufferToggleSubscriber.prototype._complete = function () {
29392 var contexts = this.contexts;
29393 while (contexts.length > 0) {
29394 var context_2 = contexts.shift();
29395 this.destination.next(context_2.buffer);
29396 context_2.subscription.unsubscribe();
29397 context_2.buffer = null;
29398 context_2.subscription = null;
29399 }
29400 this.contexts = null;
29401 _super.prototype._complete.call(this);
29402 };
29403 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29404 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
29405 };
29406 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
29407 this.closeBuffer(innerSub.context);
29408 };
29409 BufferToggleSubscriber.prototype.openBuffer = function (value) {
29410 try {
29411 var closingSelector = this.closingSelector;
29412 var closingNotifier = closingSelector.call(this, value);
29413 if (closingNotifier) {
29414 this.trySubscribe(closingNotifier);
29415 }
29416 }
29417 catch (err) {
29418 this._error(err);
29419 }
29420 };
29421 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
29422 var contexts = this.contexts;
29423 if (contexts && context) {
29424 var buffer = context.buffer, subscription = context.subscription;
29425 this.destination.next(buffer);
29426 contexts.splice(contexts.indexOf(context), 1);
29427 this.remove(subscription);
29428 subscription.unsubscribe();
29429 }
29430 };
29431 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
29432 var contexts = this.contexts;
29433 var buffer = [];
29434 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29435 var context = { buffer: buffer, subscription: subscription };
29436 contexts.push(context);
29437 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
29438 if (!innerSubscription || innerSubscription.closed) {
29439 this.closeBuffer(context);
29440 }
29441 else {
29442 innerSubscription.context = context;
29443 this.add(innerSubscription);
29444 subscription.add(innerSubscription);
29445 }
29446 };
29447 return BufferToggleSubscriber;
29448}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
29449//# sourceMappingURL=bufferToggle.js.map
29450
29451
29452/***/ }),
29453/* 276 */
29454/***/ (function(module, __webpack_exports__, __webpack_require__) {
29455
29456"use strict";
29457__webpack_require__.r(__webpack_exports__);
29458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
29459/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29460/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29461/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
29462/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29463/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29464
29465
29466
29467
29468function bufferWhen(closingSelector) {
29469 return function (source) {
29470 return source.lift(new BufferWhenOperator(closingSelector));
29471 };
29472}
29473var BufferWhenOperator = /*@__PURE__*/ (function () {
29474 function BufferWhenOperator(closingSelector) {
29475 this.closingSelector = closingSelector;
29476 }
29477 BufferWhenOperator.prototype.call = function (subscriber, source) {
29478 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
29479 };
29480 return BufferWhenOperator;
29481}());
29482var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
29483 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
29484 function BufferWhenSubscriber(destination, closingSelector) {
29485 var _this = _super.call(this, destination) || this;
29486 _this.closingSelector = closingSelector;
29487 _this.subscribing = false;
29488 _this.openBuffer();
29489 return _this;
29490 }
29491 BufferWhenSubscriber.prototype._next = function (value) {
29492 this.buffer.push(value);
29493 };
29494 BufferWhenSubscriber.prototype._complete = function () {
29495 var buffer = this.buffer;
29496 if (buffer) {
29497 this.destination.next(buffer);
29498 }
29499 _super.prototype._complete.call(this);
29500 };
29501 BufferWhenSubscriber.prototype._unsubscribe = function () {
29502 this.buffer = null;
29503 this.subscribing = false;
29504 };
29505 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29506 this.openBuffer();
29507 };
29508 BufferWhenSubscriber.prototype.notifyComplete = function () {
29509 if (this.subscribing) {
29510 this.complete();
29511 }
29512 else {
29513 this.openBuffer();
29514 }
29515 };
29516 BufferWhenSubscriber.prototype.openBuffer = function () {
29517 var closingSubscription = this.closingSubscription;
29518 if (closingSubscription) {
29519 this.remove(closingSubscription);
29520 closingSubscription.unsubscribe();
29521 }
29522 var buffer = this.buffer;
29523 if (this.buffer) {
29524 this.destination.next(buffer);
29525 }
29526 this.buffer = [];
29527 var closingNotifier;
29528 try {
29529 var closingSelector = this.closingSelector;
29530 closingNotifier = closingSelector();
29531 }
29532 catch (err) {
29533 return this.error(err);
29534 }
29535 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29536 this.closingSubscription = closingSubscription;
29537 this.add(closingSubscription);
29538 this.subscribing = true;
29539 closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
29540 this.subscribing = false;
29541 };
29542 return BufferWhenSubscriber;
29543}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29544//# sourceMappingURL=bufferWhen.js.map
29545
29546
29547/***/ }),
29548/* 277 */
29549/***/ (function(module, __webpack_exports__, __webpack_require__) {
29550
29551"use strict";
29552__webpack_require__.r(__webpack_exports__);
29553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
29554/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29555/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29556/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
29557/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29558/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29559
29560
29561
29562
29563function catchError(selector) {
29564 return function catchErrorOperatorFunction(source) {
29565 var operator = new CatchOperator(selector);
29566 var caught = source.lift(operator);
29567 return (operator.caught = caught);
29568 };
29569}
29570var CatchOperator = /*@__PURE__*/ (function () {
29571 function CatchOperator(selector) {
29572 this.selector = selector;
29573 }
29574 CatchOperator.prototype.call = function (subscriber, source) {
29575 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
29576 };
29577 return CatchOperator;
29578}());
29579var CatchSubscriber = /*@__PURE__*/ (function (_super) {
29580 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
29581 function CatchSubscriber(destination, selector, caught) {
29582 var _this = _super.call(this, destination) || this;
29583 _this.selector = selector;
29584 _this.caught = caught;
29585 return _this;
29586 }
29587 CatchSubscriber.prototype.error = function (err) {
29588 if (!this.isStopped) {
29589 var result = void 0;
29590 try {
29591 result = this.selector(err, this.caught);
29592 }
29593 catch (err2) {
29594 _super.prototype.error.call(this, err2);
29595 return;
29596 }
29597 this._unsubscribeAndRecycle();
29598 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
29599 this.add(innerSubscriber);
29600 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
29601 if (innerSubscription !== innerSubscriber) {
29602 this.add(innerSubscription);
29603 }
29604 }
29605 };
29606 return CatchSubscriber;
29607}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29608//# sourceMappingURL=catchError.js.map
29609
29610
29611/***/ }),
29612/* 278 */
29613/***/ (function(module, __webpack_exports__, __webpack_require__) {
29614
29615"use strict";
29616__webpack_require__.r(__webpack_exports__);
29617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
29618/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
29619/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
29620
29621function combineAll(project) {
29622 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
29623}
29624//# sourceMappingURL=combineAll.js.map
29625
29626
29627/***/ }),
29628/* 279 */
29629/***/ (function(module, __webpack_exports__, __webpack_require__) {
29630
29631"use strict";
29632__webpack_require__.r(__webpack_exports__);
29633/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
29634/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
29635/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29636/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
29637/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
29638
29639
29640
29641var none = {};
29642function combineLatest() {
29643 var observables = [];
29644 for (var _i = 0; _i < arguments.length; _i++) {
29645 observables[_i] = arguments[_i];
29646 }
29647 var project = null;
29648 if (typeof observables[observables.length - 1] === 'function') {
29649 project = observables.pop();
29650 }
29651 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
29652 observables = observables[0].slice();
29653 }
29654 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)); };
29655}
29656//# sourceMappingURL=combineLatest.js.map
29657
29658
29659/***/ }),
29660/* 280 */
29661/***/ (function(module, __webpack_exports__, __webpack_require__) {
29662
29663"use strict";
29664__webpack_require__.r(__webpack_exports__);
29665/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
29666/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
29667/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
29668
29669function concat() {
29670 var observables = [];
29671 for (var _i = 0; _i < arguments.length; _i++) {
29672 observables[_i] = arguments[_i];
29673 }
29674 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
29675}
29676//# sourceMappingURL=concat.js.map
29677
29678
29679/***/ }),
29680/* 281 */
29681/***/ (function(module, __webpack_exports__, __webpack_require__) {
29682
29683"use strict";
29684__webpack_require__.r(__webpack_exports__);
29685/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
29686/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
29687/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
29688
29689function concatMap(project, resultSelector) {
29690 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
29691}
29692//# sourceMappingURL=concatMap.js.map
29693
29694
29695/***/ }),
29696/* 282 */
29697/***/ (function(module, __webpack_exports__, __webpack_require__) {
29698
29699"use strict";
29700__webpack_require__.r(__webpack_exports__);
29701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
29702/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281);
29703/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
29704
29705function concatMapTo(innerObservable, resultSelector) {
29706 return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
29707}
29708//# sourceMappingURL=concatMapTo.js.map
29709
29710
29711/***/ }),
29712/* 283 */
29713/***/ (function(module, __webpack_exports__, __webpack_require__) {
29714
29715"use strict";
29716__webpack_require__.r(__webpack_exports__);
29717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
29718/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29719/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29720/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29721
29722
29723function count(predicate) {
29724 return function (source) { return source.lift(new CountOperator(predicate, source)); };
29725}
29726var CountOperator = /*@__PURE__*/ (function () {
29727 function CountOperator(predicate, source) {
29728 this.predicate = predicate;
29729 this.source = source;
29730 }
29731 CountOperator.prototype.call = function (subscriber, source) {
29732 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
29733 };
29734 return CountOperator;
29735}());
29736var CountSubscriber = /*@__PURE__*/ (function (_super) {
29737 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
29738 function CountSubscriber(destination, predicate, source) {
29739 var _this = _super.call(this, destination) || this;
29740 _this.predicate = predicate;
29741 _this.source = source;
29742 _this.count = 0;
29743 _this.index = 0;
29744 return _this;
29745 }
29746 CountSubscriber.prototype._next = function (value) {
29747 if (this.predicate) {
29748 this._tryPredicate(value);
29749 }
29750 else {
29751 this.count++;
29752 }
29753 };
29754 CountSubscriber.prototype._tryPredicate = function (value) {
29755 var result;
29756 try {
29757 result = this.predicate(value, this.index++, this.source);
29758 }
29759 catch (err) {
29760 this.destination.error(err);
29761 return;
29762 }
29763 if (result) {
29764 this.count++;
29765 }
29766 };
29767 CountSubscriber.prototype._complete = function () {
29768 this.destination.next(this.count);
29769 this.destination.complete();
29770 };
29771 return CountSubscriber;
29772}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29773//# sourceMappingURL=count.js.map
29774
29775
29776/***/ }),
29777/* 284 */
29778/***/ (function(module, __webpack_exports__, __webpack_require__) {
29779
29780"use strict";
29781__webpack_require__.r(__webpack_exports__);
29782/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
29783/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29784/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29785/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29786/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29787
29788
29789
29790function debounce(durationSelector) {
29791 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
29792}
29793var DebounceOperator = /*@__PURE__*/ (function () {
29794 function DebounceOperator(durationSelector) {
29795 this.durationSelector = durationSelector;
29796 }
29797 DebounceOperator.prototype.call = function (subscriber, source) {
29798 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
29799 };
29800 return DebounceOperator;
29801}());
29802var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
29803 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
29804 function DebounceSubscriber(destination, durationSelector) {
29805 var _this = _super.call(this, destination) || this;
29806 _this.durationSelector = durationSelector;
29807 _this.hasValue = false;
29808 _this.durationSubscription = null;
29809 return _this;
29810 }
29811 DebounceSubscriber.prototype._next = function (value) {
29812 try {
29813 var result = this.durationSelector.call(this, value);
29814 if (result) {
29815 this._tryNext(value, result);
29816 }
29817 }
29818 catch (err) {
29819 this.destination.error(err);
29820 }
29821 };
29822 DebounceSubscriber.prototype._complete = function () {
29823 this.emitValue();
29824 this.destination.complete();
29825 };
29826 DebounceSubscriber.prototype._tryNext = function (value, duration) {
29827 var subscription = this.durationSubscription;
29828 this.value = value;
29829 this.hasValue = true;
29830 if (subscription) {
29831 subscription.unsubscribe();
29832 this.remove(subscription);
29833 }
29834 subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
29835 if (subscription && !subscription.closed) {
29836 this.add(this.durationSubscription = subscription);
29837 }
29838 };
29839 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29840 this.emitValue();
29841 };
29842 DebounceSubscriber.prototype.notifyComplete = function () {
29843 this.emitValue();
29844 };
29845 DebounceSubscriber.prototype.emitValue = function () {
29846 if (this.hasValue) {
29847 var value = this.value;
29848 var subscription = this.durationSubscription;
29849 if (subscription) {
29850 this.durationSubscription = null;
29851 subscription.unsubscribe();
29852 this.remove(subscription);
29853 }
29854 this.value = null;
29855 this.hasValue = false;
29856 _super.prototype._next.call(this, value);
29857 }
29858 };
29859 return DebounceSubscriber;
29860}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29861//# sourceMappingURL=debounce.js.map
29862
29863
29864/***/ }),
29865/* 285 */
29866/***/ (function(module, __webpack_exports__, __webpack_require__) {
29867
29868"use strict";
29869__webpack_require__.r(__webpack_exports__);
29870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
29871/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29872/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29873/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
29874/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29875
29876
29877
29878function debounceTime(dueTime, scheduler) {
29879 if (scheduler === void 0) {
29880 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
29881 }
29882 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
29883}
29884var DebounceTimeOperator = /*@__PURE__*/ (function () {
29885 function DebounceTimeOperator(dueTime, scheduler) {
29886 this.dueTime = dueTime;
29887 this.scheduler = scheduler;
29888 }
29889 DebounceTimeOperator.prototype.call = function (subscriber, source) {
29890 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
29891 };
29892 return DebounceTimeOperator;
29893}());
29894var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
29895 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
29896 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
29897 var _this = _super.call(this, destination) || this;
29898 _this.dueTime = dueTime;
29899 _this.scheduler = scheduler;
29900 _this.debouncedSubscription = null;
29901 _this.lastValue = null;
29902 _this.hasValue = false;
29903 return _this;
29904 }
29905 DebounceTimeSubscriber.prototype._next = function (value) {
29906 this.clearDebounce();
29907 this.lastValue = value;
29908 this.hasValue = true;
29909 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
29910 };
29911 DebounceTimeSubscriber.prototype._complete = function () {
29912 this.debouncedNext();
29913 this.destination.complete();
29914 };
29915 DebounceTimeSubscriber.prototype.debouncedNext = function () {
29916 this.clearDebounce();
29917 if (this.hasValue) {
29918 var lastValue = this.lastValue;
29919 this.lastValue = null;
29920 this.hasValue = false;
29921 this.destination.next(lastValue);
29922 }
29923 };
29924 DebounceTimeSubscriber.prototype.clearDebounce = function () {
29925 var debouncedSubscription = this.debouncedSubscription;
29926 if (debouncedSubscription !== null) {
29927 this.remove(debouncedSubscription);
29928 debouncedSubscription.unsubscribe();
29929 this.debouncedSubscription = null;
29930 }
29931 };
29932 return DebounceTimeSubscriber;
29933}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29934function dispatchNext(subscriber) {
29935 subscriber.debouncedNext();
29936}
29937//# sourceMappingURL=debounceTime.js.map
29938
29939
29940/***/ }),
29941/* 286 */
29942/***/ (function(module, __webpack_exports__, __webpack_require__) {
29943
29944"use strict";
29945__webpack_require__.r(__webpack_exports__);
29946/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
29947/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29948/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29949/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29950
29951
29952function defaultIfEmpty(defaultValue) {
29953 if (defaultValue === void 0) {
29954 defaultValue = null;
29955 }
29956 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
29957}
29958var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
29959 function DefaultIfEmptyOperator(defaultValue) {
29960 this.defaultValue = defaultValue;
29961 }
29962 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
29963 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
29964 };
29965 return DefaultIfEmptyOperator;
29966}());
29967var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
29968 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
29969 function DefaultIfEmptySubscriber(destination, defaultValue) {
29970 var _this = _super.call(this, destination) || this;
29971 _this.defaultValue = defaultValue;
29972 _this.isEmpty = true;
29973 return _this;
29974 }
29975 DefaultIfEmptySubscriber.prototype._next = function (value) {
29976 this.isEmpty = false;
29977 this.destination.next(value);
29978 };
29979 DefaultIfEmptySubscriber.prototype._complete = function () {
29980 if (this.isEmpty) {
29981 this.destination.next(this.defaultValue);
29982 }
29983 this.destination.complete();
29984 };
29985 return DefaultIfEmptySubscriber;
29986}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29987//# sourceMappingURL=defaultIfEmpty.js.map
29988
29989
29990/***/ }),
29991/* 287 */
29992/***/ (function(module, __webpack_exports__, __webpack_require__) {
29993
29994"use strict";
29995__webpack_require__.r(__webpack_exports__);
29996/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
29997/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29998/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
29999/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
30000/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
30001/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(200);
30002/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
30003
30004
30005
30006
30007
30008function delay(delay, scheduler) {
30009 if (scheduler === void 0) {
30010 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
30011 }
30012 var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
30013 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
30014 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
30015}
30016var DelayOperator = /*@__PURE__*/ (function () {
30017 function DelayOperator(delay, scheduler) {
30018 this.delay = delay;
30019 this.scheduler = scheduler;
30020 }
30021 DelayOperator.prototype.call = function (subscriber, source) {
30022 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
30023 };
30024 return DelayOperator;
30025}());
30026var DelaySubscriber = /*@__PURE__*/ (function (_super) {
30027 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
30028 function DelaySubscriber(destination, delay, scheduler) {
30029 var _this = _super.call(this, destination) || this;
30030 _this.delay = delay;
30031 _this.scheduler = scheduler;
30032 _this.queue = [];
30033 _this.active = false;
30034 _this.errored = false;
30035 return _this;
30036 }
30037 DelaySubscriber.dispatch = function (state) {
30038 var source = state.source;
30039 var queue = source.queue;
30040 var scheduler = state.scheduler;
30041 var destination = state.destination;
30042 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
30043 queue.shift().notification.observe(destination);
30044 }
30045 if (queue.length > 0) {
30046 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
30047 this.schedule(state, delay_1);
30048 }
30049 else {
30050 this.unsubscribe();
30051 source.active = false;
30052 }
30053 };
30054 DelaySubscriber.prototype._schedule = function (scheduler) {
30055 this.active = true;
30056 var destination = this.destination;
30057 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
30058 source: this, destination: this.destination, scheduler: scheduler
30059 }));
30060 };
30061 DelaySubscriber.prototype.scheduleNotification = function (notification) {
30062 if (this.errored === true) {
30063 return;
30064 }
30065 var scheduler = this.scheduler;
30066 var message = new DelayMessage(scheduler.now() + this.delay, notification);
30067 this.queue.push(message);
30068 if (this.active === false) {
30069 this._schedule(scheduler);
30070 }
30071 };
30072 DelaySubscriber.prototype._next = function (value) {
30073 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
30074 };
30075 DelaySubscriber.prototype._error = function (err) {
30076 this.errored = true;
30077 this.queue = [];
30078 this.destination.error(err);
30079 this.unsubscribe();
30080 };
30081 DelaySubscriber.prototype._complete = function () {
30082 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
30083 this.unsubscribe();
30084 };
30085 return DelaySubscriber;
30086}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
30087var DelayMessage = /*@__PURE__*/ (function () {
30088 function DelayMessage(time, notification) {
30089 this.time = time;
30090 this.notification = notification;
30091 }
30092 return DelayMessage;
30093}());
30094//# sourceMappingURL=delay.js.map
30095
30096
30097/***/ }),
30098/* 288 */
30099/***/ (function(module, __webpack_exports__, __webpack_require__) {
30100
30101"use strict";
30102__webpack_require__.r(__webpack_exports__);
30103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
30104/** PURE_IMPORTS_START PURE_IMPORTS_END */
30105function isDate(value) {
30106 return value instanceof Date && !isNaN(+value);
30107}
30108//# sourceMappingURL=isDate.js.map
30109
30110
30111/***/ }),
30112/* 289 */
30113/***/ (function(module, __webpack_exports__, __webpack_require__) {
30114
30115"use strict";
30116__webpack_require__.r(__webpack_exports__);
30117/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
30118/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30119/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30120/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
30121/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
30122/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
30123/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30124
30125
30126
30127
30128
30129function delayWhen(delayDurationSelector, subscriptionDelay) {
30130 if (subscriptionDelay) {
30131 return function (source) {
30132 return new SubscriptionDelayObservable(source, subscriptionDelay)
30133 .lift(new DelayWhenOperator(delayDurationSelector));
30134 };
30135 }
30136 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
30137}
30138var DelayWhenOperator = /*@__PURE__*/ (function () {
30139 function DelayWhenOperator(delayDurationSelector) {
30140 this.delayDurationSelector = delayDurationSelector;
30141 }
30142 DelayWhenOperator.prototype.call = function (subscriber, source) {
30143 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
30144 };
30145 return DelayWhenOperator;
30146}());
30147var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
30148 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
30149 function DelayWhenSubscriber(destination, delayDurationSelector) {
30150 var _this = _super.call(this, destination) || this;
30151 _this.delayDurationSelector = delayDurationSelector;
30152 _this.completed = false;
30153 _this.delayNotifierSubscriptions = [];
30154 _this.index = 0;
30155 return _this;
30156 }
30157 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30158 this.destination.next(outerValue);
30159 this.removeSubscription(innerSub);
30160 this.tryComplete();
30161 };
30162 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
30163 this._error(error);
30164 };
30165 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
30166 var value = this.removeSubscription(innerSub);
30167 if (value) {
30168 this.destination.next(value);
30169 }
30170 this.tryComplete();
30171 };
30172 DelayWhenSubscriber.prototype._next = function (value) {
30173 var index = this.index++;
30174 try {
30175 var delayNotifier = this.delayDurationSelector(value, index);
30176 if (delayNotifier) {
30177 this.tryDelay(delayNotifier, value);
30178 }
30179 }
30180 catch (err) {
30181 this.destination.error(err);
30182 }
30183 };
30184 DelayWhenSubscriber.prototype._complete = function () {
30185 this.completed = true;
30186 this.tryComplete();
30187 this.unsubscribe();
30188 };
30189 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
30190 subscription.unsubscribe();
30191 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
30192 if (subscriptionIdx !== -1) {
30193 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
30194 }
30195 return subscription.outerValue;
30196 };
30197 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
30198 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
30199 if (notifierSubscription && !notifierSubscription.closed) {
30200 var destination = this.destination;
30201 destination.add(notifierSubscription);
30202 this.delayNotifierSubscriptions.push(notifierSubscription);
30203 }
30204 };
30205 DelayWhenSubscriber.prototype.tryComplete = function () {
30206 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
30207 this.destination.complete();
30208 }
30209 };
30210 return DelayWhenSubscriber;
30211}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
30212var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
30213 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
30214 function SubscriptionDelayObservable(source, subscriptionDelay) {
30215 var _this = _super.call(this) || this;
30216 _this.source = source;
30217 _this.subscriptionDelay = subscriptionDelay;
30218 return _this;
30219 }
30220 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
30221 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
30222 };
30223 return SubscriptionDelayObservable;
30224}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
30225var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
30226 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
30227 function SubscriptionDelaySubscriber(parent, source) {
30228 var _this = _super.call(this) || this;
30229 _this.parent = parent;
30230 _this.source = source;
30231 _this.sourceSubscribed = false;
30232 return _this;
30233 }
30234 SubscriptionDelaySubscriber.prototype._next = function (unused) {
30235 this.subscribeToSource();
30236 };
30237 SubscriptionDelaySubscriber.prototype._error = function (err) {
30238 this.unsubscribe();
30239 this.parent.error(err);
30240 };
30241 SubscriptionDelaySubscriber.prototype._complete = function () {
30242 this.unsubscribe();
30243 this.subscribeToSource();
30244 };
30245 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
30246 if (!this.sourceSubscribed) {
30247 this.sourceSubscribed = true;
30248 this.unsubscribe();
30249 this.source.subscribe(this.parent);
30250 }
30251 };
30252 return SubscriptionDelaySubscriber;
30253}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30254//# sourceMappingURL=delayWhen.js.map
30255
30256
30257/***/ }),
30258/* 290 */
30259/***/ (function(module, __webpack_exports__, __webpack_require__) {
30260
30261"use strict";
30262__webpack_require__.r(__webpack_exports__);
30263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
30264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30265/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30266/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30267
30268
30269function dematerialize() {
30270 return function dematerializeOperatorFunction(source) {
30271 return source.lift(new DeMaterializeOperator());
30272 };
30273}
30274var DeMaterializeOperator = /*@__PURE__*/ (function () {
30275 function DeMaterializeOperator() {
30276 }
30277 DeMaterializeOperator.prototype.call = function (subscriber, source) {
30278 return source.subscribe(new DeMaterializeSubscriber(subscriber));
30279 };
30280 return DeMaterializeOperator;
30281}());
30282var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
30283 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
30284 function DeMaterializeSubscriber(destination) {
30285 return _super.call(this, destination) || this;
30286 }
30287 DeMaterializeSubscriber.prototype._next = function (value) {
30288 value.observe(this.destination);
30289 };
30290 return DeMaterializeSubscriber;
30291}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30292//# sourceMappingURL=dematerialize.js.map
30293
30294
30295/***/ }),
30296/* 291 */
30297/***/ (function(module, __webpack_exports__, __webpack_require__) {
30298
30299"use strict";
30300__webpack_require__.r(__webpack_exports__);
30301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
30302/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
30303/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30304/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30305/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30306/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30307
30308
30309
30310function distinct(keySelector, flushes) {
30311 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
30312}
30313var DistinctOperator = /*@__PURE__*/ (function () {
30314 function DistinctOperator(keySelector, flushes) {
30315 this.keySelector = keySelector;
30316 this.flushes = flushes;
30317 }
30318 DistinctOperator.prototype.call = function (subscriber, source) {
30319 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
30320 };
30321 return DistinctOperator;
30322}());
30323var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
30324 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
30325 function DistinctSubscriber(destination, keySelector, flushes) {
30326 var _this = _super.call(this, destination) || this;
30327 _this.keySelector = keySelector;
30328 _this.values = new Set();
30329 if (flushes) {
30330 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
30331 }
30332 return _this;
30333 }
30334 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30335 this.values.clear();
30336 };
30337 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
30338 this._error(error);
30339 };
30340 DistinctSubscriber.prototype._next = function (value) {
30341 if (this.keySelector) {
30342 this._useKeySelector(value);
30343 }
30344 else {
30345 this._finalizeNext(value, value);
30346 }
30347 };
30348 DistinctSubscriber.prototype._useKeySelector = function (value) {
30349 var key;
30350 var destination = this.destination;
30351 try {
30352 key = this.keySelector(value);
30353 }
30354 catch (err) {
30355 destination.error(err);
30356 return;
30357 }
30358 this._finalizeNext(key, value);
30359 };
30360 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
30361 var values = this.values;
30362 if (!values.has(key)) {
30363 values.add(key);
30364 this.destination.next(value);
30365 }
30366 };
30367 return DistinctSubscriber;
30368}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30369
30370//# sourceMappingURL=distinct.js.map
30371
30372
30373/***/ }),
30374/* 292 */
30375/***/ (function(module, __webpack_exports__, __webpack_require__) {
30376
30377"use strict";
30378__webpack_require__.r(__webpack_exports__);
30379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
30380/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30381/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30382/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30383
30384
30385function distinctUntilChanged(compare, keySelector) {
30386 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
30387}
30388var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
30389 function DistinctUntilChangedOperator(compare, keySelector) {
30390 this.compare = compare;
30391 this.keySelector = keySelector;
30392 }
30393 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
30394 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
30395 };
30396 return DistinctUntilChangedOperator;
30397}());
30398var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
30399 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
30400 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
30401 var _this = _super.call(this, destination) || this;
30402 _this.keySelector = keySelector;
30403 _this.hasKey = false;
30404 if (typeof compare === 'function') {
30405 _this.compare = compare;
30406 }
30407 return _this;
30408 }
30409 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
30410 return x === y;
30411 };
30412 DistinctUntilChangedSubscriber.prototype._next = function (value) {
30413 var key;
30414 try {
30415 var keySelector = this.keySelector;
30416 key = keySelector ? keySelector(value) : value;
30417 }
30418 catch (err) {
30419 return this.destination.error(err);
30420 }
30421 var result = false;
30422 if (this.hasKey) {
30423 try {
30424 var compare = this.compare;
30425 result = compare(this.key, key);
30426 }
30427 catch (err) {
30428 return this.destination.error(err);
30429 }
30430 }
30431 else {
30432 this.hasKey = true;
30433 }
30434 if (!result) {
30435 this.key = key;
30436 this.destination.next(value);
30437 }
30438 };
30439 return DistinctUntilChangedSubscriber;
30440}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30441//# sourceMappingURL=distinctUntilChanged.js.map
30442
30443
30444/***/ }),
30445/* 293 */
30446/***/ (function(module, __webpack_exports__, __webpack_require__) {
30447
30448"use strict";
30449__webpack_require__.r(__webpack_exports__);
30450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
30451/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(292);
30452/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
30453
30454function distinctUntilKeyChanged(key, compare) {
30455 return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
30456}
30457//# sourceMappingURL=distinctUntilKeyChanged.js.map
30458
30459
30460/***/ }),
30461/* 294 */
30462/***/ (function(module, __webpack_exports__, __webpack_require__) {
30463
30464"use strict";
30465__webpack_require__.r(__webpack_exports__);
30466/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
30467/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
30468/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
30469/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(295);
30470/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
30471/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(296);
30472/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
30473
30474
30475
30476
30477
30478function elementAt(index, defaultValue) {
30479 if (index < 0) {
30480 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
30481 }
30482 var hasDefaultValue = arguments.length >= 2;
30483 return function (source) {
30484 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
30485 ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
30486 : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
30487 };
30488}
30489//# sourceMappingURL=elementAt.js.map
30490
30491
30492/***/ }),
30493/* 295 */
30494/***/ (function(module, __webpack_exports__, __webpack_require__) {
30495
30496"use strict";
30497__webpack_require__.r(__webpack_exports__);
30498/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
30499/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30500/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
30501/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
30502/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
30503
30504
30505
30506function throwIfEmpty(errorFactory) {
30507 if (errorFactory === void 0) {
30508 errorFactory = defaultErrorFactory;
30509 }
30510 return function (source) {
30511 return source.lift(new ThrowIfEmptyOperator(errorFactory));
30512 };
30513}
30514var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
30515 function ThrowIfEmptyOperator(errorFactory) {
30516 this.errorFactory = errorFactory;
30517 }
30518 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
30519 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
30520 };
30521 return ThrowIfEmptyOperator;
30522}());
30523var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30524 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
30525 function ThrowIfEmptySubscriber(destination, errorFactory) {
30526 var _this = _super.call(this, destination) || this;
30527 _this.errorFactory = errorFactory;
30528 _this.hasValue = false;
30529 return _this;
30530 }
30531 ThrowIfEmptySubscriber.prototype._next = function (value) {
30532 this.hasValue = true;
30533 this.destination.next(value);
30534 };
30535 ThrowIfEmptySubscriber.prototype._complete = function () {
30536 if (!this.hasValue) {
30537 var err = void 0;
30538 try {
30539 err = this.errorFactory();
30540 }
30541 catch (e) {
30542 err = e;
30543 }
30544 this.destination.error(err);
30545 }
30546 else {
30547 return this.destination.complete();
30548 }
30549 };
30550 return ThrowIfEmptySubscriber;
30551}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
30552function defaultErrorFactory() {
30553 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
30554}
30555//# sourceMappingURL=throwIfEmpty.js.map
30556
30557
30558/***/ }),
30559/* 296 */
30560/***/ (function(module, __webpack_exports__, __webpack_require__) {
30561
30562"use strict";
30563__webpack_require__.r(__webpack_exports__);
30564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
30565/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30566/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30567/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
30568/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
30569/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
30570
30571
30572
30573
30574function take(count) {
30575 return function (source) {
30576 if (count === 0) {
30577 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
30578 }
30579 else {
30580 return source.lift(new TakeOperator(count));
30581 }
30582 };
30583}
30584var TakeOperator = /*@__PURE__*/ (function () {
30585 function TakeOperator(total) {
30586 this.total = total;
30587 if (this.total < 0) {
30588 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
30589 }
30590 }
30591 TakeOperator.prototype.call = function (subscriber, source) {
30592 return source.subscribe(new TakeSubscriber(subscriber, this.total));
30593 };
30594 return TakeOperator;
30595}());
30596var TakeSubscriber = /*@__PURE__*/ (function (_super) {
30597 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
30598 function TakeSubscriber(destination, total) {
30599 var _this = _super.call(this, destination) || this;
30600 _this.total = total;
30601 _this.count = 0;
30602 return _this;
30603 }
30604 TakeSubscriber.prototype._next = function (value) {
30605 var total = this.total;
30606 var count = ++this.count;
30607 if (count <= total) {
30608 this.destination.next(value);
30609 if (count === total) {
30610 this.destination.complete();
30611 this.unsubscribe();
30612 }
30613 }
30614 };
30615 return TakeSubscriber;
30616}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30617//# sourceMappingURL=take.js.map
30618
30619
30620/***/ }),
30621/* 297 */
30622/***/ (function(module, __webpack_exports__, __webpack_require__) {
30623
30624"use strict";
30625__webpack_require__.r(__webpack_exports__);
30626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
30627/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
30628/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
30629/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
30630
30631
30632function endWith() {
30633 var array = [];
30634 for (var _i = 0; _i < arguments.length; _i++) {
30635 array[_i] = arguments[_i];
30636 }
30637 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
30638}
30639//# sourceMappingURL=endWith.js.map
30640
30641
30642/***/ }),
30643/* 298 */
30644/***/ (function(module, __webpack_exports__, __webpack_require__) {
30645
30646"use strict";
30647__webpack_require__.r(__webpack_exports__);
30648/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
30649/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30650/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30651/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30652
30653
30654function every(predicate, thisArg) {
30655 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
30656}
30657var EveryOperator = /*@__PURE__*/ (function () {
30658 function EveryOperator(predicate, thisArg, source) {
30659 this.predicate = predicate;
30660 this.thisArg = thisArg;
30661 this.source = source;
30662 }
30663 EveryOperator.prototype.call = function (observer, source) {
30664 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
30665 };
30666 return EveryOperator;
30667}());
30668var EverySubscriber = /*@__PURE__*/ (function (_super) {
30669 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
30670 function EverySubscriber(destination, predicate, thisArg, source) {
30671 var _this = _super.call(this, destination) || this;
30672 _this.predicate = predicate;
30673 _this.thisArg = thisArg;
30674 _this.source = source;
30675 _this.index = 0;
30676 _this.thisArg = thisArg || _this;
30677 return _this;
30678 }
30679 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
30680 this.destination.next(everyValueMatch);
30681 this.destination.complete();
30682 };
30683 EverySubscriber.prototype._next = function (value) {
30684 var result = false;
30685 try {
30686 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
30687 }
30688 catch (err) {
30689 this.destination.error(err);
30690 return;
30691 }
30692 if (!result) {
30693 this.notifyComplete(false);
30694 }
30695 };
30696 EverySubscriber.prototype._complete = function () {
30697 this.notifyComplete(true);
30698 };
30699 return EverySubscriber;
30700}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30701//# sourceMappingURL=every.js.map
30702
30703
30704/***/ }),
30705/* 299 */
30706/***/ (function(module, __webpack_exports__, __webpack_require__) {
30707
30708"use strict";
30709__webpack_require__.r(__webpack_exports__);
30710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
30711/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30712/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30713/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30714/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30715
30716
30717
30718function exhaust() {
30719 return function (source) { return source.lift(new SwitchFirstOperator()); };
30720}
30721var SwitchFirstOperator = /*@__PURE__*/ (function () {
30722 function SwitchFirstOperator() {
30723 }
30724 SwitchFirstOperator.prototype.call = function (subscriber, source) {
30725 return source.subscribe(new SwitchFirstSubscriber(subscriber));
30726 };
30727 return SwitchFirstOperator;
30728}());
30729var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
30730 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
30731 function SwitchFirstSubscriber(destination) {
30732 var _this = _super.call(this, destination) || this;
30733 _this.hasCompleted = false;
30734 _this.hasSubscription = false;
30735 return _this;
30736 }
30737 SwitchFirstSubscriber.prototype._next = function (value) {
30738 if (!this.hasSubscription) {
30739 this.hasSubscription = true;
30740 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
30741 }
30742 };
30743 SwitchFirstSubscriber.prototype._complete = function () {
30744 this.hasCompleted = true;
30745 if (!this.hasSubscription) {
30746 this.destination.complete();
30747 }
30748 };
30749 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
30750 this.remove(innerSub);
30751 this.hasSubscription = false;
30752 if (this.hasCompleted) {
30753 this.destination.complete();
30754 }
30755 };
30756 return SwitchFirstSubscriber;
30757}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30758//# sourceMappingURL=exhaust.js.map
30759
30760
30761/***/ }),
30762/* 300 */
30763/***/ (function(module, __webpack_exports__, __webpack_require__) {
30764
30765"use strict";
30766__webpack_require__.r(__webpack_exports__);
30767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
30768/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30769/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30770/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
30771/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
30772/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
30773/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
30774/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
30775
30776
30777
30778
30779
30780
30781function exhaustMap(project, resultSelector) {
30782 if (resultSelector) {
30783 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); })); })); };
30784 }
30785 return function (source) {
30786 return source.lift(new ExhaustMapOperator(project));
30787 };
30788}
30789var ExhaustMapOperator = /*@__PURE__*/ (function () {
30790 function ExhaustMapOperator(project) {
30791 this.project = project;
30792 }
30793 ExhaustMapOperator.prototype.call = function (subscriber, source) {
30794 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
30795 };
30796 return ExhaustMapOperator;
30797}());
30798var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
30799 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
30800 function ExhaustMapSubscriber(destination, project) {
30801 var _this = _super.call(this, destination) || this;
30802 _this.project = project;
30803 _this.hasSubscription = false;
30804 _this.hasCompleted = false;
30805 _this.index = 0;
30806 return _this;
30807 }
30808 ExhaustMapSubscriber.prototype._next = function (value) {
30809 if (!this.hasSubscription) {
30810 this.tryNext(value);
30811 }
30812 };
30813 ExhaustMapSubscriber.prototype.tryNext = function (value) {
30814 var result;
30815 var index = this.index++;
30816 try {
30817 result = this.project(value, index);
30818 }
30819 catch (err) {
30820 this.destination.error(err);
30821 return;
30822 }
30823 this.hasSubscription = true;
30824 this._innerSub(result, value, index);
30825 };
30826 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
30827 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
30828 var destination = this.destination;
30829 destination.add(innerSubscriber);
30830 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
30831 if (innerSubscription !== innerSubscriber) {
30832 destination.add(innerSubscription);
30833 }
30834 };
30835 ExhaustMapSubscriber.prototype._complete = function () {
30836 this.hasCompleted = true;
30837 if (!this.hasSubscription) {
30838 this.destination.complete();
30839 }
30840 this.unsubscribe();
30841 };
30842 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30843 this.destination.next(innerValue);
30844 };
30845 ExhaustMapSubscriber.prototype.notifyError = function (err) {
30846 this.destination.error(err);
30847 };
30848 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
30849 var destination = this.destination;
30850 destination.remove(innerSub);
30851 this.hasSubscription = false;
30852 if (this.hasCompleted) {
30853 this.destination.complete();
30854 }
30855 };
30856 return ExhaustMapSubscriber;
30857}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30858//# sourceMappingURL=exhaustMap.js.map
30859
30860
30861/***/ }),
30862/* 301 */
30863/***/ (function(module, __webpack_exports__, __webpack_require__) {
30864
30865"use strict";
30866__webpack_require__.r(__webpack_exports__);
30867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
30868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
30869/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
30870/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30871/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30872/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30873/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30874
30875
30876
30877function expand(project, concurrent, scheduler) {
30878 if (concurrent === void 0) {
30879 concurrent = Number.POSITIVE_INFINITY;
30880 }
30881 if (scheduler === void 0) {
30882 scheduler = undefined;
30883 }
30884 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
30885 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
30886}
30887var ExpandOperator = /*@__PURE__*/ (function () {
30888 function ExpandOperator(project, concurrent, scheduler) {
30889 this.project = project;
30890 this.concurrent = concurrent;
30891 this.scheduler = scheduler;
30892 }
30893 ExpandOperator.prototype.call = function (subscriber, source) {
30894 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
30895 };
30896 return ExpandOperator;
30897}());
30898
30899var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
30900 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
30901 function ExpandSubscriber(destination, project, concurrent, scheduler) {
30902 var _this = _super.call(this, destination) || this;
30903 _this.project = project;
30904 _this.concurrent = concurrent;
30905 _this.scheduler = scheduler;
30906 _this.index = 0;
30907 _this.active = 0;
30908 _this.hasCompleted = false;
30909 if (concurrent < Number.POSITIVE_INFINITY) {
30910 _this.buffer = [];
30911 }
30912 return _this;
30913 }
30914 ExpandSubscriber.dispatch = function (arg) {
30915 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
30916 subscriber.subscribeToProjection(result, value, index);
30917 };
30918 ExpandSubscriber.prototype._next = function (value) {
30919 var destination = this.destination;
30920 if (destination.closed) {
30921 this._complete();
30922 return;
30923 }
30924 var index = this.index++;
30925 if (this.active < this.concurrent) {
30926 destination.next(value);
30927 try {
30928 var project = this.project;
30929 var result = project(value, index);
30930 if (!this.scheduler) {
30931 this.subscribeToProjection(result, value, index);
30932 }
30933 else {
30934 var state = { subscriber: this, result: result, value: value, index: index };
30935 var destination_1 = this.destination;
30936 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
30937 }
30938 }
30939 catch (e) {
30940 destination.error(e);
30941 }
30942 }
30943 else {
30944 this.buffer.push(value);
30945 }
30946 };
30947 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
30948 this.active++;
30949 var destination = this.destination;
30950 destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
30951 };
30952 ExpandSubscriber.prototype._complete = function () {
30953 this.hasCompleted = true;
30954 if (this.hasCompleted && this.active === 0) {
30955 this.destination.complete();
30956 }
30957 this.unsubscribe();
30958 };
30959 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30960 this._next(innerValue);
30961 };
30962 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
30963 var buffer = this.buffer;
30964 var destination = this.destination;
30965 destination.remove(innerSub);
30966 this.active--;
30967 if (buffer && buffer.length > 0) {
30968 this._next(buffer.shift());
30969 }
30970 if (this.hasCompleted && this.active === 0) {
30971 this.destination.complete();
30972 }
30973 };
30974 return ExpandSubscriber;
30975}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30976
30977//# sourceMappingURL=expand.js.map
30978
30979
30980/***/ }),
30981/* 302 */
30982/***/ (function(module, __webpack_exports__, __webpack_require__) {
30983
30984"use strict";
30985__webpack_require__.r(__webpack_exports__);
30986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
30987/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30988/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30989/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
30990/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
30991
30992
30993
30994function finalize(callback) {
30995 return function (source) { return source.lift(new FinallyOperator(callback)); };
30996}
30997var FinallyOperator = /*@__PURE__*/ (function () {
30998 function FinallyOperator(callback) {
30999 this.callback = callback;
31000 }
31001 FinallyOperator.prototype.call = function (subscriber, source) {
31002 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
31003 };
31004 return FinallyOperator;
31005}());
31006var FinallySubscriber = /*@__PURE__*/ (function (_super) {
31007 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
31008 function FinallySubscriber(destination, callback) {
31009 var _this = _super.call(this, destination) || this;
31010 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
31011 return _this;
31012 }
31013 return FinallySubscriber;
31014}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31015//# sourceMappingURL=finalize.js.map
31016
31017
31018/***/ }),
31019/* 303 */
31020/***/ (function(module, __webpack_exports__, __webpack_require__) {
31021
31022"use strict";
31023__webpack_require__.r(__webpack_exports__);
31024/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
31025/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
31026/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
31027/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31028/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31029/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31030
31031
31032function find(predicate, thisArg) {
31033 if (typeof predicate !== 'function') {
31034 throw new TypeError('predicate is not a function');
31035 }
31036 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
31037}
31038var FindValueOperator = /*@__PURE__*/ (function () {
31039 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
31040 this.predicate = predicate;
31041 this.source = source;
31042 this.yieldIndex = yieldIndex;
31043 this.thisArg = thisArg;
31044 }
31045 FindValueOperator.prototype.call = function (observer, source) {
31046 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
31047 };
31048 return FindValueOperator;
31049}());
31050
31051var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
31052 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
31053 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
31054 var _this = _super.call(this, destination) || this;
31055 _this.predicate = predicate;
31056 _this.source = source;
31057 _this.yieldIndex = yieldIndex;
31058 _this.thisArg = thisArg;
31059 _this.index = 0;
31060 return _this;
31061 }
31062 FindValueSubscriber.prototype.notifyComplete = function (value) {
31063 var destination = this.destination;
31064 destination.next(value);
31065 destination.complete();
31066 this.unsubscribe();
31067 };
31068 FindValueSubscriber.prototype._next = function (value) {
31069 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
31070 var index = this.index++;
31071 try {
31072 var result = predicate.call(thisArg || this, value, index, this.source);
31073 if (result) {
31074 this.notifyComplete(this.yieldIndex ? index : value);
31075 }
31076 }
31077 catch (err) {
31078 this.destination.error(err);
31079 }
31080 };
31081 FindValueSubscriber.prototype._complete = function () {
31082 this.notifyComplete(this.yieldIndex ? -1 : undefined);
31083 };
31084 return FindValueSubscriber;
31085}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31086
31087//# sourceMappingURL=find.js.map
31088
31089
31090/***/ }),
31091/* 304 */
31092/***/ (function(module, __webpack_exports__, __webpack_require__) {
31093
31094"use strict";
31095__webpack_require__.r(__webpack_exports__);
31096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
31097/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(303);
31098/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
31099
31100function findIndex(predicate, thisArg) {
31101 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
31102}
31103//# sourceMappingURL=findIndex.js.map
31104
31105
31106/***/ }),
31107/* 305 */
31108/***/ (function(module, __webpack_exports__, __webpack_require__) {
31109
31110"use strict";
31111__webpack_require__.r(__webpack_exports__);
31112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
31113/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31114/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31115/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(296);
31116/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
31117/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
31118/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31119/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
31120
31121
31122
31123
31124
31125
31126function first(predicate, defaultValue) {
31127 var hasDefaultValue = arguments.length >= 2;
31128 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"](); })); };
31129}
31130//# sourceMappingURL=first.js.map
31131
31132
31133/***/ }),
31134/* 306 */
31135/***/ (function(module, __webpack_exports__, __webpack_require__) {
31136
31137"use strict";
31138__webpack_require__.r(__webpack_exports__);
31139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
31140/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31141/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31142/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31143
31144
31145function ignoreElements() {
31146 return function ignoreElementsOperatorFunction(source) {
31147 return source.lift(new IgnoreElementsOperator());
31148 };
31149}
31150var IgnoreElementsOperator = /*@__PURE__*/ (function () {
31151 function IgnoreElementsOperator() {
31152 }
31153 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
31154 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
31155 };
31156 return IgnoreElementsOperator;
31157}());
31158var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
31159 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
31160 function IgnoreElementsSubscriber() {
31161 return _super !== null && _super.apply(this, arguments) || this;
31162 }
31163 IgnoreElementsSubscriber.prototype._next = function (unused) {
31164 };
31165 return IgnoreElementsSubscriber;
31166}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31167//# sourceMappingURL=ignoreElements.js.map
31168
31169
31170/***/ }),
31171/* 307 */
31172/***/ (function(module, __webpack_exports__, __webpack_require__) {
31173
31174"use strict";
31175__webpack_require__.r(__webpack_exports__);
31176/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
31177/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31178/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31179/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31180
31181
31182function isEmpty() {
31183 return function (source) { return source.lift(new IsEmptyOperator()); };
31184}
31185var IsEmptyOperator = /*@__PURE__*/ (function () {
31186 function IsEmptyOperator() {
31187 }
31188 IsEmptyOperator.prototype.call = function (observer, source) {
31189 return source.subscribe(new IsEmptySubscriber(observer));
31190 };
31191 return IsEmptyOperator;
31192}());
31193var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
31194 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
31195 function IsEmptySubscriber(destination) {
31196 return _super.call(this, destination) || this;
31197 }
31198 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
31199 var destination = this.destination;
31200 destination.next(isEmpty);
31201 destination.complete();
31202 };
31203 IsEmptySubscriber.prototype._next = function (value) {
31204 this.notifyComplete(false);
31205 };
31206 IsEmptySubscriber.prototype._complete = function () {
31207 this.notifyComplete(true);
31208 };
31209 return IsEmptySubscriber;
31210}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31211//# sourceMappingURL=isEmpty.js.map
31212
31213
31214/***/ }),
31215/* 308 */
31216/***/ (function(module, __webpack_exports__, __webpack_require__) {
31217
31218"use strict";
31219__webpack_require__.r(__webpack_exports__);
31220/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
31221/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31222/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31223/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(309);
31224/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(295);
31225/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(286);
31226/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31227/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
31228
31229
31230
31231
31232
31233
31234function last(predicate, defaultValue) {
31235 var hasDefaultValue = arguments.length >= 2;
31236 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"](); })); };
31237}
31238//# sourceMappingURL=last.js.map
31239
31240
31241/***/ }),
31242/* 309 */
31243/***/ (function(module, __webpack_exports__, __webpack_require__) {
31244
31245"use strict";
31246__webpack_require__.r(__webpack_exports__);
31247/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
31248/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31249/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31250/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
31251/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
31252/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
31253
31254
31255
31256
31257function takeLast(count) {
31258 return function takeLastOperatorFunction(source) {
31259 if (count === 0) {
31260 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
31261 }
31262 else {
31263 return source.lift(new TakeLastOperator(count));
31264 }
31265 };
31266}
31267var TakeLastOperator = /*@__PURE__*/ (function () {
31268 function TakeLastOperator(total) {
31269 this.total = total;
31270 if (this.total < 0) {
31271 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
31272 }
31273 }
31274 TakeLastOperator.prototype.call = function (subscriber, source) {
31275 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
31276 };
31277 return TakeLastOperator;
31278}());
31279var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
31280 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
31281 function TakeLastSubscriber(destination, total) {
31282 var _this = _super.call(this, destination) || this;
31283 _this.total = total;
31284 _this.ring = new Array();
31285 _this.count = 0;
31286 return _this;
31287 }
31288 TakeLastSubscriber.prototype._next = function (value) {
31289 var ring = this.ring;
31290 var total = this.total;
31291 var count = this.count++;
31292 if (ring.length < total) {
31293 ring.push(value);
31294 }
31295 else {
31296 var index = count % total;
31297 ring[index] = value;
31298 }
31299 };
31300 TakeLastSubscriber.prototype._complete = function () {
31301 var destination = this.destination;
31302 var count = this.count;
31303 if (count > 0) {
31304 var total = this.count >= this.total ? this.total : this.count;
31305 var ring = this.ring;
31306 for (var i = 0; i < total; i++) {
31307 var idx = (count++) % total;
31308 destination.next(ring[idx]);
31309 }
31310 }
31311 destination.complete();
31312 };
31313 return TakeLastSubscriber;
31314}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31315//# sourceMappingURL=takeLast.js.map
31316
31317
31318/***/ }),
31319/* 310 */
31320/***/ (function(module, __webpack_exports__, __webpack_require__) {
31321
31322"use strict";
31323__webpack_require__.r(__webpack_exports__);
31324/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
31325/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31326/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31327/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31328
31329
31330function mapTo(value) {
31331 return function (source) { return source.lift(new MapToOperator(value)); };
31332}
31333var MapToOperator = /*@__PURE__*/ (function () {
31334 function MapToOperator(value) {
31335 this.value = value;
31336 }
31337 MapToOperator.prototype.call = function (subscriber, source) {
31338 return source.subscribe(new MapToSubscriber(subscriber, this.value));
31339 };
31340 return MapToOperator;
31341}());
31342var MapToSubscriber = /*@__PURE__*/ (function (_super) {
31343 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
31344 function MapToSubscriber(destination, value) {
31345 var _this = _super.call(this, destination) || this;
31346 _this.value = value;
31347 return _this;
31348 }
31349 MapToSubscriber.prototype._next = function (x) {
31350 this.destination.next(this.value);
31351 };
31352 return MapToSubscriber;
31353}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31354//# sourceMappingURL=mapTo.js.map
31355
31356
31357/***/ }),
31358/* 311 */
31359/***/ (function(module, __webpack_exports__, __webpack_require__) {
31360
31361"use strict";
31362__webpack_require__.r(__webpack_exports__);
31363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
31364/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31365/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31366/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
31367/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
31368
31369
31370
31371function materialize() {
31372 return function materializeOperatorFunction(source) {
31373 return source.lift(new MaterializeOperator());
31374 };
31375}
31376var MaterializeOperator = /*@__PURE__*/ (function () {
31377 function MaterializeOperator() {
31378 }
31379 MaterializeOperator.prototype.call = function (subscriber, source) {
31380 return source.subscribe(new MaterializeSubscriber(subscriber));
31381 };
31382 return MaterializeOperator;
31383}());
31384var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
31385 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
31386 function MaterializeSubscriber(destination) {
31387 return _super.call(this, destination) || this;
31388 }
31389 MaterializeSubscriber.prototype._next = function (value) {
31390 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
31391 };
31392 MaterializeSubscriber.prototype._error = function (err) {
31393 var destination = this.destination;
31394 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
31395 destination.complete();
31396 };
31397 MaterializeSubscriber.prototype._complete = function () {
31398 var destination = this.destination;
31399 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
31400 destination.complete();
31401 };
31402 return MaterializeSubscriber;
31403}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31404//# sourceMappingURL=materialize.js.map
31405
31406
31407/***/ }),
31408/* 312 */
31409/***/ (function(module, __webpack_exports__, __webpack_require__) {
31410
31411"use strict";
31412__webpack_require__.r(__webpack_exports__);
31413/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
31414/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31415/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31416
31417function max(comparer) {
31418 var max = (typeof comparer === 'function')
31419 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
31420 : function (x, y) { return x > y ? x : y; };
31421 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
31422}
31423//# sourceMappingURL=max.js.map
31424
31425
31426/***/ }),
31427/* 313 */
31428/***/ (function(module, __webpack_exports__, __webpack_require__) {
31429
31430"use strict";
31431__webpack_require__.r(__webpack_exports__);
31432/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
31433/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
31434/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(309);
31435/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(286);
31436/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
31437/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
31438
31439
31440
31441
31442function reduce(accumulator, seed) {
31443 if (arguments.length >= 2) {
31444 return function reduceOperatorFunctionWithSeed(source) {
31445 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);
31446 };
31447 }
31448 return function reduceOperatorFunction(source) {
31449 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);
31450 };
31451}
31452//# sourceMappingURL=reduce.js.map
31453
31454
31455/***/ }),
31456/* 314 */
31457/***/ (function(module, __webpack_exports__, __webpack_require__) {
31458
31459"use strict";
31460__webpack_require__.r(__webpack_exports__);
31461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
31462/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31463/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31464/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31465
31466
31467function scan(accumulator, seed) {
31468 var hasSeed = false;
31469 if (arguments.length >= 2) {
31470 hasSeed = true;
31471 }
31472 return function scanOperatorFunction(source) {
31473 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
31474 };
31475}
31476var ScanOperator = /*@__PURE__*/ (function () {
31477 function ScanOperator(accumulator, seed, hasSeed) {
31478 if (hasSeed === void 0) {
31479 hasSeed = false;
31480 }
31481 this.accumulator = accumulator;
31482 this.seed = seed;
31483 this.hasSeed = hasSeed;
31484 }
31485 ScanOperator.prototype.call = function (subscriber, source) {
31486 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
31487 };
31488 return ScanOperator;
31489}());
31490var ScanSubscriber = /*@__PURE__*/ (function (_super) {
31491 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
31492 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
31493 var _this = _super.call(this, destination) || this;
31494 _this.accumulator = accumulator;
31495 _this._seed = _seed;
31496 _this.hasSeed = hasSeed;
31497 _this.index = 0;
31498 return _this;
31499 }
31500 Object.defineProperty(ScanSubscriber.prototype, "seed", {
31501 get: function () {
31502 return this._seed;
31503 },
31504 set: function (value) {
31505 this.hasSeed = true;
31506 this._seed = value;
31507 },
31508 enumerable: true,
31509 configurable: true
31510 });
31511 ScanSubscriber.prototype._next = function (value) {
31512 if (!this.hasSeed) {
31513 this.seed = value;
31514 this.destination.next(value);
31515 }
31516 else {
31517 return this._tryNext(value);
31518 }
31519 };
31520 ScanSubscriber.prototype._tryNext = function (value) {
31521 var index = this.index++;
31522 var result;
31523 try {
31524 result = this.accumulator(this.seed, value, index);
31525 }
31526 catch (err) {
31527 this.destination.error(err);
31528 }
31529 this.seed = result;
31530 this.destination.next(result);
31531 };
31532 return ScanSubscriber;
31533}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31534//# sourceMappingURL=scan.js.map
31535
31536
31537/***/ }),
31538/* 315 */
31539/***/ (function(module, __webpack_exports__, __webpack_require__) {
31540
31541"use strict";
31542__webpack_require__.r(__webpack_exports__);
31543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
31544/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(256);
31545/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
31546
31547function merge() {
31548 var observables = [];
31549 for (var _i = 0; _i < arguments.length; _i++) {
31550 observables[_i] = arguments[_i];
31551 }
31552 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
31553}
31554//# sourceMappingURL=merge.js.map
31555
31556
31557/***/ }),
31558/* 316 */
31559/***/ (function(module, __webpack_exports__, __webpack_require__) {
31560
31561"use strict";
31562__webpack_require__.r(__webpack_exports__);
31563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
31564/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
31565/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
31566
31567function mergeMapTo(innerObservable, resultSelector, concurrent) {
31568 if (concurrent === void 0) {
31569 concurrent = Number.POSITIVE_INFINITY;
31570 }
31571 if (typeof resultSelector === 'function') {
31572 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
31573 }
31574 if (typeof resultSelector === 'number') {
31575 concurrent = resultSelector;
31576 }
31577 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
31578}
31579//# sourceMappingURL=mergeMapTo.js.map
31580
31581
31582/***/ }),
31583/* 317 */
31584/***/ (function(module, __webpack_exports__, __webpack_require__) {
31585
31586"use strict";
31587__webpack_require__.r(__webpack_exports__);
31588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
31589/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
31590/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
31591/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31592/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
31593/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
31594/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
31595/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
31596
31597
31598
31599
31600function mergeScan(accumulator, seed, concurrent) {
31601 if (concurrent === void 0) {
31602 concurrent = Number.POSITIVE_INFINITY;
31603 }
31604 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
31605}
31606var MergeScanOperator = /*@__PURE__*/ (function () {
31607 function MergeScanOperator(accumulator, seed, concurrent) {
31608 this.accumulator = accumulator;
31609 this.seed = seed;
31610 this.concurrent = concurrent;
31611 }
31612 MergeScanOperator.prototype.call = function (subscriber, source) {
31613 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
31614 };
31615 return MergeScanOperator;
31616}());
31617
31618var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
31619 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
31620 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
31621 var _this = _super.call(this, destination) || this;
31622 _this.accumulator = accumulator;
31623 _this.acc = acc;
31624 _this.concurrent = concurrent;
31625 _this.hasValue = false;
31626 _this.hasCompleted = false;
31627 _this.buffer = [];
31628 _this.active = 0;
31629 _this.index = 0;
31630 return _this;
31631 }
31632 MergeScanSubscriber.prototype._next = function (value) {
31633 if (this.active < this.concurrent) {
31634 var index = this.index++;
31635 var destination = this.destination;
31636 var ish = void 0;
31637 try {
31638 var accumulator = this.accumulator;
31639 ish = accumulator(this.acc, value, index);
31640 }
31641 catch (e) {
31642 return destination.error(e);
31643 }
31644 this.active++;
31645 this._innerSub(ish, value, index);
31646 }
31647 else {
31648 this.buffer.push(value);
31649 }
31650 };
31651 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
31652 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
31653 var destination = this.destination;
31654 destination.add(innerSubscriber);
31655 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
31656 if (innerSubscription !== innerSubscriber) {
31657 destination.add(innerSubscription);
31658 }
31659 };
31660 MergeScanSubscriber.prototype._complete = function () {
31661 this.hasCompleted = true;
31662 if (this.active === 0 && this.buffer.length === 0) {
31663 if (this.hasValue === false) {
31664 this.destination.next(this.acc);
31665 }
31666 this.destination.complete();
31667 }
31668 this.unsubscribe();
31669 };
31670 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31671 var destination = this.destination;
31672 this.acc = innerValue;
31673 this.hasValue = true;
31674 destination.next(innerValue);
31675 };
31676 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
31677 var buffer = this.buffer;
31678 var destination = this.destination;
31679 destination.remove(innerSub);
31680 this.active--;
31681 if (buffer.length > 0) {
31682 this._next(buffer.shift());
31683 }
31684 else if (this.active === 0 && this.hasCompleted) {
31685 if (this.hasValue === false) {
31686 this.destination.next(this.acc);
31687 }
31688 this.destination.complete();
31689 }
31690 };
31691 return MergeScanSubscriber;
31692}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
31693
31694//# sourceMappingURL=mergeScan.js.map
31695
31696
31697/***/ }),
31698/* 318 */
31699/***/ (function(module, __webpack_exports__, __webpack_require__) {
31700
31701"use strict";
31702__webpack_require__.r(__webpack_exports__);
31703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
31704/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31705/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31706
31707function min(comparer) {
31708 var min = (typeof comparer === 'function')
31709 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
31710 : function (x, y) { return x < y ? x : y; };
31711 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
31712}
31713//# sourceMappingURL=min.js.map
31714
31715
31716/***/ }),
31717/* 319 */
31718/***/ (function(module, __webpack_exports__, __webpack_require__) {
31719
31720"use strict";
31721__webpack_require__.r(__webpack_exports__);
31722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
31723/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
31724/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
31725/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
31726
31727function multicast(subjectOrSubjectFactory, selector) {
31728 return function multicastOperatorFunction(source) {
31729 var subjectFactory;
31730 if (typeof subjectOrSubjectFactory === 'function') {
31731 subjectFactory = subjectOrSubjectFactory;
31732 }
31733 else {
31734 subjectFactory = function subjectFactory() {
31735 return subjectOrSubjectFactory;
31736 };
31737 }
31738 if (typeof selector === 'function') {
31739 return source.lift(new MulticastOperator(subjectFactory, selector));
31740 }
31741 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
31742 connectable.source = source;
31743 connectable.subjectFactory = subjectFactory;
31744 return connectable;
31745 };
31746}
31747var MulticastOperator = /*@__PURE__*/ (function () {
31748 function MulticastOperator(subjectFactory, selector) {
31749 this.subjectFactory = subjectFactory;
31750 this.selector = selector;
31751 }
31752 MulticastOperator.prototype.call = function (subscriber, source) {
31753 var selector = this.selector;
31754 var subject = this.subjectFactory();
31755 var subscription = selector(subject).subscribe(subscriber);
31756 subscription.add(source.subscribe(subject));
31757 return subscription;
31758 };
31759 return MulticastOperator;
31760}());
31761
31762//# sourceMappingURL=multicast.js.map
31763
31764
31765/***/ }),
31766/* 320 */
31767/***/ (function(module, __webpack_exports__, __webpack_require__) {
31768
31769"use strict";
31770__webpack_require__.r(__webpack_exports__);
31771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
31772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
31773/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31774/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
31775/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
31776/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
31777/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(229);
31778/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
31779/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31780
31781
31782
31783
31784
31785
31786function onErrorResumeNext() {
31787 var nextSources = [];
31788 for (var _i = 0; _i < arguments.length; _i++) {
31789 nextSources[_i] = arguments[_i];
31790 }
31791 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31792 nextSources = nextSources[0];
31793 }
31794 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
31795}
31796function onErrorResumeNextStatic() {
31797 var nextSources = [];
31798 for (var _i = 0; _i < arguments.length; _i++) {
31799 nextSources[_i] = arguments[_i];
31800 }
31801 var source = null;
31802 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31803 nextSources = nextSources[0];
31804 }
31805 source = nextSources.shift();
31806 return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
31807}
31808var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
31809 function OnErrorResumeNextOperator(nextSources) {
31810 this.nextSources = nextSources;
31811 }
31812 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
31813 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
31814 };
31815 return OnErrorResumeNextOperator;
31816}());
31817var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
31818 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
31819 function OnErrorResumeNextSubscriber(destination, nextSources) {
31820 var _this = _super.call(this, destination) || this;
31821 _this.destination = destination;
31822 _this.nextSources = nextSources;
31823 return _this;
31824 }
31825 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
31826 this.subscribeToNextSource();
31827 };
31828 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
31829 this.subscribeToNextSource();
31830 };
31831 OnErrorResumeNextSubscriber.prototype._error = function (err) {
31832 this.subscribeToNextSource();
31833 this.unsubscribe();
31834 };
31835 OnErrorResumeNextSubscriber.prototype._complete = function () {
31836 this.subscribeToNextSource();
31837 this.unsubscribe();
31838 };
31839 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
31840 var next = this.nextSources.shift();
31841 if (!!next) {
31842 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
31843 var destination = this.destination;
31844 destination.add(innerSubscriber);
31845 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
31846 if (innerSubscription !== innerSubscriber) {
31847 destination.add(innerSubscription);
31848 }
31849 }
31850 else {
31851 this.destination.complete();
31852 }
31853 };
31854 return OnErrorResumeNextSubscriber;
31855}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
31856//# sourceMappingURL=onErrorResumeNext.js.map
31857
31858
31859/***/ }),
31860/* 321 */
31861/***/ (function(module, __webpack_exports__, __webpack_require__) {
31862
31863"use strict";
31864__webpack_require__.r(__webpack_exports__);
31865/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
31866/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31867/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31868/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31869
31870
31871function pairwise() {
31872 return function (source) { return source.lift(new PairwiseOperator()); };
31873}
31874var PairwiseOperator = /*@__PURE__*/ (function () {
31875 function PairwiseOperator() {
31876 }
31877 PairwiseOperator.prototype.call = function (subscriber, source) {
31878 return source.subscribe(new PairwiseSubscriber(subscriber));
31879 };
31880 return PairwiseOperator;
31881}());
31882var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
31883 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
31884 function PairwiseSubscriber(destination) {
31885 var _this = _super.call(this, destination) || this;
31886 _this.hasPrev = false;
31887 return _this;
31888 }
31889 PairwiseSubscriber.prototype._next = function (value) {
31890 var pair;
31891 if (this.hasPrev) {
31892 pair = [this.prev, value];
31893 }
31894 else {
31895 this.hasPrev = true;
31896 }
31897 this.prev = value;
31898 if (pair) {
31899 this.destination.next(pair);
31900 }
31901 };
31902 return PairwiseSubscriber;
31903}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31904//# sourceMappingURL=pairwise.js.map
31905
31906
31907/***/ }),
31908/* 322 */
31909/***/ (function(module, __webpack_exports__, __webpack_require__) {
31910
31911"use strict";
31912__webpack_require__.r(__webpack_exports__);
31913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
31914/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
31915/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31916/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
31917
31918
31919function partition(predicate, thisArg) {
31920 return function (source) {
31921 return [
31922 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
31923 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
31924 ];
31925 };
31926}
31927//# sourceMappingURL=partition.js.map
31928
31929
31930/***/ }),
31931/* 323 */
31932/***/ (function(module, __webpack_exports__, __webpack_require__) {
31933
31934"use strict";
31935__webpack_require__.r(__webpack_exports__);
31936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
31937/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(224);
31938/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
31939
31940function pluck() {
31941 var properties = [];
31942 for (var _i = 0; _i < arguments.length; _i++) {
31943 properties[_i] = arguments[_i];
31944 }
31945 var length = properties.length;
31946 if (length === 0) {
31947 throw new Error('list of properties cannot be empty.');
31948 }
31949 return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
31950}
31951function plucker(props, length) {
31952 var mapper = function (x) {
31953 var currentProp = x;
31954 for (var i = 0; i < length; i++) {
31955 var p = currentProp[props[i]];
31956 if (typeof p !== 'undefined') {
31957 currentProp = p;
31958 }
31959 else {
31960 return undefined;
31961 }
31962 }
31963 return currentProp;
31964 };
31965 return mapper;
31966}
31967//# sourceMappingURL=pluck.js.map
31968
31969
31970/***/ }),
31971/* 324 */
31972/***/ (function(module, __webpack_exports__, __webpack_require__) {
31973
31974"use strict";
31975__webpack_require__.r(__webpack_exports__);
31976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
31977/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
31978/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
31979/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
31980
31981
31982function publish(selector) {
31983 return selector ?
31984 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
31985 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
31986}
31987//# sourceMappingURL=publish.js.map
31988
31989
31990/***/ }),
31991/* 325 */
31992/***/ (function(module, __webpack_exports__, __webpack_require__) {
31993
31994"use strict";
31995__webpack_require__.r(__webpack_exports__);
31996/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
31997/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
31998/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
31999/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
32000
32001
32002function publishBehavior(value) {
32003 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
32004}
32005//# sourceMappingURL=publishBehavior.js.map
32006
32007
32008/***/ }),
32009/* 326 */
32010/***/ (function(module, __webpack_exports__, __webpack_require__) {
32011
32012"use strict";
32013__webpack_require__.r(__webpack_exports__);
32014/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
32015/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
32016/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32017/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
32018
32019
32020function publishLast() {
32021 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
32022}
32023//# sourceMappingURL=publishLast.js.map
32024
32025
32026/***/ }),
32027/* 327 */
32028/***/ (function(module, __webpack_exports__, __webpack_require__) {
32029
32030"use strict";
32031__webpack_require__.r(__webpack_exports__);
32032/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
32033/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32034/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32035/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
32036
32037
32038function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
32039 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
32040 scheduler = selectorOrScheduler;
32041 }
32042 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
32043 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32044 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
32045}
32046//# sourceMappingURL=publishReplay.js.map
32047
32048
32049/***/ }),
32050/* 328 */
32051/***/ (function(module, __webpack_exports__, __webpack_require__) {
32052
32053"use strict";
32054__webpack_require__.r(__webpack_exports__);
32055/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
32056/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
32057/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(263);
32058/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
32059
32060
32061function race() {
32062 var observables = [];
32063 for (var _i = 0; _i < arguments.length; _i++) {
32064 observables[_i] = arguments[_i];
32065 }
32066 return function raceOperatorFunction(source) {
32067 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
32068 observables = observables[0];
32069 }
32070 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
32071 };
32072}
32073//# sourceMappingURL=race.js.map
32074
32075
32076/***/ }),
32077/* 329 */
32078/***/ (function(module, __webpack_exports__, __webpack_require__) {
32079
32080"use strict";
32081__webpack_require__.r(__webpack_exports__);
32082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
32083/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32084/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32085/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
32086/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
32087
32088
32089
32090function repeat(count) {
32091 if (count === void 0) {
32092 count = -1;
32093 }
32094 return function (source) {
32095 if (count === 0) {
32096 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
32097 }
32098 else if (count < 0) {
32099 return source.lift(new RepeatOperator(-1, source));
32100 }
32101 else {
32102 return source.lift(new RepeatOperator(count - 1, source));
32103 }
32104 };
32105}
32106var RepeatOperator = /*@__PURE__*/ (function () {
32107 function RepeatOperator(count, source) {
32108 this.count = count;
32109 this.source = source;
32110 }
32111 RepeatOperator.prototype.call = function (subscriber, source) {
32112 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
32113 };
32114 return RepeatOperator;
32115}());
32116var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
32117 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
32118 function RepeatSubscriber(destination, count, source) {
32119 var _this = _super.call(this, destination) || this;
32120 _this.count = count;
32121 _this.source = source;
32122 return _this;
32123 }
32124 RepeatSubscriber.prototype.complete = function () {
32125 if (!this.isStopped) {
32126 var _a = this, source = _a.source, count = _a.count;
32127 if (count === 0) {
32128 return _super.prototype.complete.call(this);
32129 }
32130 else if (count > -1) {
32131 this.count = count - 1;
32132 }
32133 source.subscribe(this._unsubscribeAndRecycle());
32134 }
32135 };
32136 return RepeatSubscriber;
32137}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32138//# sourceMappingURL=repeat.js.map
32139
32140
32141/***/ }),
32142/* 330 */
32143/***/ (function(module, __webpack_exports__, __webpack_require__) {
32144
32145"use strict";
32146__webpack_require__.r(__webpack_exports__);
32147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
32148/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32149/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32150/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32151/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32152/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32153
32154
32155
32156
32157function repeatWhen(notifier) {
32158 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
32159}
32160var RepeatWhenOperator = /*@__PURE__*/ (function () {
32161 function RepeatWhenOperator(notifier) {
32162 this.notifier = notifier;
32163 }
32164 RepeatWhenOperator.prototype.call = function (subscriber, source) {
32165 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
32166 };
32167 return RepeatWhenOperator;
32168}());
32169var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
32170 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
32171 function RepeatWhenSubscriber(destination, notifier, source) {
32172 var _this = _super.call(this, destination) || this;
32173 _this.notifier = notifier;
32174 _this.source = source;
32175 _this.sourceIsBeingSubscribedTo = true;
32176 return _this;
32177 }
32178 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32179 this.sourceIsBeingSubscribedTo = true;
32180 this.source.subscribe(this);
32181 };
32182 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
32183 if (this.sourceIsBeingSubscribedTo === false) {
32184 return _super.prototype.complete.call(this);
32185 }
32186 };
32187 RepeatWhenSubscriber.prototype.complete = function () {
32188 this.sourceIsBeingSubscribedTo = false;
32189 if (!this.isStopped) {
32190 if (!this.retries) {
32191 this.subscribeToRetries();
32192 }
32193 if (!this.retriesSubscription || this.retriesSubscription.closed) {
32194 return _super.prototype.complete.call(this);
32195 }
32196 this._unsubscribeAndRecycle();
32197 this.notifications.next();
32198 }
32199 };
32200 RepeatWhenSubscriber.prototype._unsubscribe = function () {
32201 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
32202 if (notifications) {
32203 notifications.unsubscribe();
32204 this.notifications = null;
32205 }
32206 if (retriesSubscription) {
32207 retriesSubscription.unsubscribe();
32208 this.retriesSubscription = null;
32209 }
32210 this.retries = null;
32211 };
32212 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
32213 var _unsubscribe = this._unsubscribe;
32214 this._unsubscribe = null;
32215 _super.prototype._unsubscribeAndRecycle.call(this);
32216 this._unsubscribe = _unsubscribe;
32217 return this;
32218 };
32219 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
32220 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32221 var retries;
32222 try {
32223 var notifier = this.notifier;
32224 retries = notifier(this.notifications);
32225 }
32226 catch (e) {
32227 return _super.prototype.complete.call(this);
32228 }
32229 this.retries = retries;
32230 this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32231 };
32232 return RepeatWhenSubscriber;
32233}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32234//# sourceMappingURL=repeatWhen.js.map
32235
32236
32237/***/ }),
32238/* 331 */
32239/***/ (function(module, __webpack_exports__, __webpack_require__) {
32240
32241"use strict";
32242__webpack_require__.r(__webpack_exports__);
32243/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
32244/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32245/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32246/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32247
32248
32249function retry(count) {
32250 if (count === void 0) {
32251 count = -1;
32252 }
32253 return function (source) { return source.lift(new RetryOperator(count, source)); };
32254}
32255var RetryOperator = /*@__PURE__*/ (function () {
32256 function RetryOperator(count, source) {
32257 this.count = count;
32258 this.source = source;
32259 }
32260 RetryOperator.prototype.call = function (subscriber, source) {
32261 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
32262 };
32263 return RetryOperator;
32264}());
32265var RetrySubscriber = /*@__PURE__*/ (function (_super) {
32266 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
32267 function RetrySubscriber(destination, count, source) {
32268 var _this = _super.call(this, destination) || this;
32269 _this.count = count;
32270 _this.source = source;
32271 return _this;
32272 }
32273 RetrySubscriber.prototype.error = function (err) {
32274 if (!this.isStopped) {
32275 var _a = this, source = _a.source, count = _a.count;
32276 if (count === 0) {
32277 return _super.prototype.error.call(this, err);
32278 }
32279 else if (count > -1) {
32280 this.count = count - 1;
32281 }
32282 source.subscribe(this._unsubscribeAndRecycle());
32283 }
32284 };
32285 return RetrySubscriber;
32286}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32287//# sourceMappingURL=retry.js.map
32288
32289
32290/***/ }),
32291/* 332 */
32292/***/ (function(module, __webpack_exports__, __webpack_require__) {
32293
32294"use strict";
32295__webpack_require__.r(__webpack_exports__);
32296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
32297/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32298/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32299/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32300/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32301/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32302
32303
32304
32305
32306function retryWhen(notifier) {
32307 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
32308}
32309var RetryWhenOperator = /*@__PURE__*/ (function () {
32310 function RetryWhenOperator(notifier, source) {
32311 this.notifier = notifier;
32312 this.source = source;
32313 }
32314 RetryWhenOperator.prototype.call = function (subscriber, source) {
32315 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
32316 };
32317 return RetryWhenOperator;
32318}());
32319var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
32320 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
32321 function RetryWhenSubscriber(destination, notifier, source) {
32322 var _this = _super.call(this, destination) || this;
32323 _this.notifier = notifier;
32324 _this.source = source;
32325 return _this;
32326 }
32327 RetryWhenSubscriber.prototype.error = function (err) {
32328 if (!this.isStopped) {
32329 var errors = this.errors;
32330 var retries = this.retries;
32331 var retriesSubscription = this.retriesSubscription;
32332 if (!retries) {
32333 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32334 try {
32335 var notifier = this.notifier;
32336 retries = notifier(errors);
32337 }
32338 catch (e) {
32339 return _super.prototype.error.call(this, e);
32340 }
32341 retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32342 }
32343 else {
32344 this.errors = null;
32345 this.retriesSubscription = null;
32346 }
32347 this._unsubscribeAndRecycle();
32348 this.errors = errors;
32349 this.retries = retries;
32350 this.retriesSubscription = retriesSubscription;
32351 errors.next(err);
32352 }
32353 };
32354 RetryWhenSubscriber.prototype._unsubscribe = function () {
32355 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
32356 if (errors) {
32357 errors.unsubscribe();
32358 this.errors = null;
32359 }
32360 if (retriesSubscription) {
32361 retriesSubscription.unsubscribe();
32362 this.retriesSubscription = null;
32363 }
32364 this.retries = null;
32365 };
32366 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32367 var _unsubscribe = this._unsubscribe;
32368 this._unsubscribe = null;
32369 this._unsubscribeAndRecycle();
32370 this._unsubscribe = _unsubscribe;
32371 this.source.subscribe(this);
32372 };
32373 return RetryWhenSubscriber;
32374}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32375//# sourceMappingURL=retryWhen.js.map
32376
32377
32378/***/ }),
32379/* 333 */
32380/***/ (function(module, __webpack_exports__, __webpack_require__) {
32381
32382"use strict";
32383__webpack_require__.r(__webpack_exports__);
32384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
32385/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32386/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32387/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
32388/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32389
32390
32391
32392function sample(notifier) {
32393 return function (source) { return source.lift(new SampleOperator(notifier)); };
32394}
32395var SampleOperator = /*@__PURE__*/ (function () {
32396 function SampleOperator(notifier) {
32397 this.notifier = notifier;
32398 }
32399 SampleOperator.prototype.call = function (subscriber, source) {
32400 var sampleSubscriber = new SampleSubscriber(subscriber);
32401 var subscription = source.subscribe(sampleSubscriber);
32402 subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
32403 return subscription;
32404 };
32405 return SampleOperator;
32406}());
32407var SampleSubscriber = /*@__PURE__*/ (function (_super) {
32408 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
32409 function SampleSubscriber() {
32410 var _this = _super !== null && _super.apply(this, arguments) || this;
32411 _this.hasValue = false;
32412 return _this;
32413 }
32414 SampleSubscriber.prototype._next = function (value) {
32415 this.value = value;
32416 this.hasValue = true;
32417 };
32418 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32419 this.emitValue();
32420 };
32421 SampleSubscriber.prototype.notifyComplete = function () {
32422 this.emitValue();
32423 };
32424 SampleSubscriber.prototype.emitValue = function () {
32425 if (this.hasValue) {
32426 this.hasValue = false;
32427 this.destination.next(this.value);
32428 }
32429 };
32430 return SampleSubscriber;
32431}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
32432//# sourceMappingURL=sample.js.map
32433
32434
32435/***/ }),
32436/* 334 */
32437/***/ (function(module, __webpack_exports__, __webpack_require__) {
32438
32439"use strict";
32440__webpack_require__.r(__webpack_exports__);
32441/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
32442/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32443/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32444/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
32445/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
32446
32447
32448
32449function sampleTime(period, scheduler) {
32450 if (scheduler === void 0) {
32451 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
32452 }
32453 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
32454}
32455var SampleTimeOperator = /*@__PURE__*/ (function () {
32456 function SampleTimeOperator(period, scheduler) {
32457 this.period = period;
32458 this.scheduler = scheduler;
32459 }
32460 SampleTimeOperator.prototype.call = function (subscriber, source) {
32461 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
32462 };
32463 return SampleTimeOperator;
32464}());
32465var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
32466 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
32467 function SampleTimeSubscriber(destination, period, scheduler) {
32468 var _this = _super.call(this, destination) || this;
32469 _this.period = period;
32470 _this.scheduler = scheduler;
32471 _this.hasValue = false;
32472 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
32473 return _this;
32474 }
32475 SampleTimeSubscriber.prototype._next = function (value) {
32476 this.lastValue = value;
32477 this.hasValue = true;
32478 };
32479 SampleTimeSubscriber.prototype.notifyNext = function () {
32480 if (this.hasValue) {
32481 this.hasValue = false;
32482 this.destination.next(this.lastValue);
32483 }
32484 };
32485 return SampleTimeSubscriber;
32486}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32487function dispatchNotification(state) {
32488 var subscriber = state.subscriber, period = state.period;
32489 subscriber.notifyNext();
32490 this.schedule(state, period);
32491}
32492//# sourceMappingURL=sampleTime.js.map
32493
32494
32495/***/ }),
32496/* 335 */
32497/***/ (function(module, __webpack_exports__, __webpack_require__) {
32498
32499"use strict";
32500__webpack_require__.r(__webpack_exports__);
32501/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
32502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
32503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
32504/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32505/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32506/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32507
32508
32509function sequenceEqual(compareTo, comparator) {
32510 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
32511}
32512var SequenceEqualOperator = /*@__PURE__*/ (function () {
32513 function SequenceEqualOperator(compareTo, comparator) {
32514 this.compareTo = compareTo;
32515 this.comparator = comparator;
32516 }
32517 SequenceEqualOperator.prototype.call = function (subscriber, source) {
32518 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
32519 };
32520 return SequenceEqualOperator;
32521}());
32522
32523var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
32524 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
32525 function SequenceEqualSubscriber(destination, compareTo, comparator) {
32526 var _this = _super.call(this, destination) || this;
32527 _this.compareTo = compareTo;
32528 _this.comparator = comparator;
32529 _this._a = [];
32530 _this._b = [];
32531 _this._oneComplete = false;
32532 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
32533 return _this;
32534 }
32535 SequenceEqualSubscriber.prototype._next = function (value) {
32536 if (this._oneComplete && this._b.length === 0) {
32537 this.emit(false);
32538 }
32539 else {
32540 this._a.push(value);
32541 this.checkValues();
32542 }
32543 };
32544 SequenceEqualSubscriber.prototype._complete = function () {
32545 if (this._oneComplete) {
32546 this.emit(this._a.length === 0 && this._b.length === 0);
32547 }
32548 else {
32549 this._oneComplete = true;
32550 }
32551 this.unsubscribe();
32552 };
32553 SequenceEqualSubscriber.prototype.checkValues = function () {
32554 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
32555 while (_a.length > 0 && _b.length > 0) {
32556 var a = _a.shift();
32557 var b = _b.shift();
32558 var areEqual = false;
32559 try {
32560 areEqual = comparator ? comparator(a, b) : a === b;
32561 }
32562 catch (e) {
32563 this.destination.error(e);
32564 }
32565 if (!areEqual) {
32566 this.emit(false);
32567 }
32568 }
32569 };
32570 SequenceEqualSubscriber.prototype.emit = function (value) {
32571 var destination = this.destination;
32572 destination.next(value);
32573 destination.complete();
32574 };
32575 SequenceEqualSubscriber.prototype.nextB = function (value) {
32576 if (this._oneComplete && this._a.length === 0) {
32577 this.emit(false);
32578 }
32579 else {
32580 this._b.push(value);
32581 this.checkValues();
32582 }
32583 };
32584 SequenceEqualSubscriber.prototype.completeB = function () {
32585 if (this._oneComplete) {
32586 this.emit(this._a.length === 0 && this._b.length === 0);
32587 }
32588 else {
32589 this._oneComplete = true;
32590 }
32591 };
32592 return SequenceEqualSubscriber;
32593}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32594
32595var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
32596 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
32597 function SequenceEqualCompareToSubscriber(destination, parent) {
32598 var _this = _super.call(this, destination) || this;
32599 _this.parent = parent;
32600 return _this;
32601 }
32602 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
32603 this.parent.nextB(value);
32604 };
32605 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
32606 this.parent.error(err);
32607 this.unsubscribe();
32608 };
32609 SequenceEqualCompareToSubscriber.prototype._complete = function () {
32610 this.parent.completeB();
32611 this.unsubscribe();
32612 };
32613 return SequenceEqualCompareToSubscriber;
32614}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32615//# sourceMappingURL=sequenceEqual.js.map
32616
32617
32618/***/ }),
32619/* 336 */
32620/***/ (function(module, __webpack_exports__, __webpack_require__) {
32621
32622"use strict";
32623__webpack_require__.r(__webpack_exports__);
32624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
32625/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
32626/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(188);
32627/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
32628/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
32629
32630
32631
32632function shareSubjectFactory() {
32633 return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
32634}
32635function share() {
32636 return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
32637}
32638//# sourceMappingURL=share.js.map
32639
32640
32641/***/ }),
32642/* 337 */
32643/***/ (function(module, __webpack_exports__, __webpack_require__) {
32644
32645"use strict";
32646__webpack_require__.r(__webpack_exports__);
32647/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
32648/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32649/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
32650
32651function shareReplay(configOrBufferSize, windowTime, scheduler) {
32652 var config;
32653 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
32654 config = configOrBufferSize;
32655 }
32656 else {
32657 config = {
32658 bufferSize: configOrBufferSize,
32659 windowTime: windowTime,
32660 refCount: false,
32661 scheduler: scheduler
32662 };
32663 }
32664 return function (source) { return source.lift(shareReplayOperator(config)); };
32665}
32666function shareReplayOperator(_a) {
32667 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;
32668 var subject;
32669 var refCount = 0;
32670 var subscription;
32671 var hasError = false;
32672 var isComplete = false;
32673 return function shareReplayOperation(source) {
32674 refCount++;
32675 if (!subject || hasError) {
32676 hasError = false;
32677 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32678 subscription = source.subscribe({
32679 next: function (value) { subject.next(value); },
32680 error: function (err) {
32681 hasError = true;
32682 subject.error(err);
32683 },
32684 complete: function () {
32685 isComplete = true;
32686 subscription = undefined;
32687 subject.complete();
32688 },
32689 });
32690 }
32691 var innerSub = subject.subscribe(this);
32692 this.add(function () {
32693 refCount--;
32694 innerSub.unsubscribe();
32695 if (subscription && !isComplete && useRefCount && refCount === 0) {
32696 subscription.unsubscribe();
32697 subscription = undefined;
32698 subject = undefined;
32699 }
32700 });
32701 };
32702}
32703//# sourceMappingURL=shareReplay.js.map
32704
32705
32706/***/ }),
32707/* 338 */
32708/***/ (function(module, __webpack_exports__, __webpack_require__) {
32709
32710"use strict";
32711__webpack_require__.r(__webpack_exports__);
32712/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
32713/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32714/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32715/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
32716/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
32717
32718
32719
32720function single(predicate) {
32721 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
32722}
32723var SingleOperator = /*@__PURE__*/ (function () {
32724 function SingleOperator(predicate, source) {
32725 this.predicate = predicate;
32726 this.source = source;
32727 }
32728 SingleOperator.prototype.call = function (subscriber, source) {
32729 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
32730 };
32731 return SingleOperator;
32732}());
32733var SingleSubscriber = /*@__PURE__*/ (function (_super) {
32734 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
32735 function SingleSubscriber(destination, predicate, source) {
32736 var _this = _super.call(this, destination) || this;
32737 _this.predicate = predicate;
32738 _this.source = source;
32739 _this.seenValue = false;
32740 _this.index = 0;
32741 return _this;
32742 }
32743 SingleSubscriber.prototype.applySingleValue = function (value) {
32744 if (this.seenValue) {
32745 this.destination.error('Sequence contains more than one element');
32746 }
32747 else {
32748 this.seenValue = true;
32749 this.singleValue = value;
32750 }
32751 };
32752 SingleSubscriber.prototype._next = function (value) {
32753 var index = this.index++;
32754 if (this.predicate) {
32755 this.tryNext(value, index);
32756 }
32757 else {
32758 this.applySingleValue(value);
32759 }
32760 };
32761 SingleSubscriber.prototype.tryNext = function (value, index) {
32762 try {
32763 if (this.predicate(value, index, this.source)) {
32764 this.applySingleValue(value);
32765 }
32766 }
32767 catch (err) {
32768 this.destination.error(err);
32769 }
32770 };
32771 SingleSubscriber.prototype._complete = function () {
32772 var destination = this.destination;
32773 if (this.index > 0) {
32774 destination.next(this.seenValue ? this.singleValue : undefined);
32775 destination.complete();
32776 }
32777 else {
32778 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
32779 }
32780 };
32781 return SingleSubscriber;
32782}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32783//# sourceMappingURL=single.js.map
32784
32785
32786/***/ }),
32787/* 339 */
32788/***/ (function(module, __webpack_exports__, __webpack_require__) {
32789
32790"use strict";
32791__webpack_require__.r(__webpack_exports__);
32792/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
32793/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32794/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32795/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32796
32797
32798function skip(count) {
32799 return function (source) { return source.lift(new SkipOperator(count)); };
32800}
32801var SkipOperator = /*@__PURE__*/ (function () {
32802 function SkipOperator(total) {
32803 this.total = total;
32804 }
32805 SkipOperator.prototype.call = function (subscriber, source) {
32806 return source.subscribe(new SkipSubscriber(subscriber, this.total));
32807 };
32808 return SkipOperator;
32809}());
32810var SkipSubscriber = /*@__PURE__*/ (function (_super) {
32811 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
32812 function SkipSubscriber(destination, total) {
32813 var _this = _super.call(this, destination) || this;
32814 _this.total = total;
32815 _this.count = 0;
32816 return _this;
32817 }
32818 SkipSubscriber.prototype._next = function (x) {
32819 if (++this.count > this.total) {
32820 this.destination.next(x);
32821 }
32822 };
32823 return SkipSubscriber;
32824}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32825//# sourceMappingURL=skip.js.map
32826
32827
32828/***/ }),
32829/* 340 */
32830/***/ (function(module, __webpack_exports__, __webpack_require__) {
32831
32832"use strict";
32833__webpack_require__.r(__webpack_exports__);
32834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
32835/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32836/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32837/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
32838/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
32839
32840
32841
32842function skipLast(count) {
32843 return function (source) { return source.lift(new SkipLastOperator(count)); };
32844}
32845var SkipLastOperator = /*@__PURE__*/ (function () {
32846 function SkipLastOperator(_skipCount) {
32847 this._skipCount = _skipCount;
32848 if (this._skipCount < 0) {
32849 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
32850 }
32851 }
32852 SkipLastOperator.prototype.call = function (subscriber, source) {
32853 if (this._skipCount === 0) {
32854 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
32855 }
32856 else {
32857 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
32858 }
32859 };
32860 return SkipLastOperator;
32861}());
32862var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
32863 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
32864 function SkipLastSubscriber(destination, _skipCount) {
32865 var _this = _super.call(this, destination) || this;
32866 _this._skipCount = _skipCount;
32867 _this._count = 0;
32868 _this._ring = new Array(_skipCount);
32869 return _this;
32870 }
32871 SkipLastSubscriber.prototype._next = function (value) {
32872 var skipCount = this._skipCount;
32873 var count = this._count++;
32874 if (count < skipCount) {
32875 this._ring[count] = value;
32876 }
32877 else {
32878 var currentIndex = count % skipCount;
32879 var ring = this._ring;
32880 var oldValue = ring[currentIndex];
32881 ring[currentIndex] = value;
32882 this.destination.next(oldValue);
32883 }
32884 };
32885 return SkipLastSubscriber;
32886}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32887//# sourceMappingURL=skipLast.js.map
32888
32889
32890/***/ }),
32891/* 341 */
32892/***/ (function(module, __webpack_exports__, __webpack_require__) {
32893
32894"use strict";
32895__webpack_require__.r(__webpack_exports__);
32896/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
32897/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32898/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32899/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
32900/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32901/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32902
32903
32904
32905
32906function skipUntil(notifier) {
32907 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
32908}
32909var SkipUntilOperator = /*@__PURE__*/ (function () {
32910 function SkipUntilOperator(notifier) {
32911 this.notifier = notifier;
32912 }
32913 SkipUntilOperator.prototype.call = function (destination, source) {
32914 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
32915 };
32916 return SkipUntilOperator;
32917}());
32918var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
32919 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
32920 function SkipUntilSubscriber(destination, notifier) {
32921 var _this = _super.call(this, destination) || this;
32922 _this.hasValue = false;
32923 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
32924 _this.add(innerSubscriber);
32925 _this.innerSubscription = innerSubscriber;
32926 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
32927 if (innerSubscription !== innerSubscriber) {
32928 _this.add(innerSubscription);
32929 _this.innerSubscription = innerSubscription;
32930 }
32931 return _this;
32932 }
32933 SkipUntilSubscriber.prototype._next = function (value) {
32934 if (this.hasValue) {
32935 _super.prototype._next.call(this, value);
32936 }
32937 };
32938 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32939 this.hasValue = true;
32940 if (this.innerSubscription) {
32941 this.innerSubscription.unsubscribe();
32942 }
32943 };
32944 SkipUntilSubscriber.prototype.notifyComplete = function () {
32945 };
32946 return SkipUntilSubscriber;
32947}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
32948//# sourceMappingURL=skipUntil.js.map
32949
32950
32951/***/ }),
32952/* 342 */
32953/***/ (function(module, __webpack_exports__, __webpack_require__) {
32954
32955"use strict";
32956__webpack_require__.r(__webpack_exports__);
32957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
32958/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32959/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32960/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32961
32962
32963function skipWhile(predicate) {
32964 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
32965}
32966var SkipWhileOperator = /*@__PURE__*/ (function () {
32967 function SkipWhileOperator(predicate) {
32968 this.predicate = predicate;
32969 }
32970 SkipWhileOperator.prototype.call = function (subscriber, source) {
32971 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
32972 };
32973 return SkipWhileOperator;
32974}());
32975var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
32976 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
32977 function SkipWhileSubscriber(destination, predicate) {
32978 var _this = _super.call(this, destination) || this;
32979 _this.predicate = predicate;
32980 _this.skipping = true;
32981 _this.index = 0;
32982 return _this;
32983 }
32984 SkipWhileSubscriber.prototype._next = function (value) {
32985 var destination = this.destination;
32986 if (this.skipping) {
32987 this.tryCallPredicate(value);
32988 }
32989 if (!this.skipping) {
32990 destination.next(value);
32991 }
32992 };
32993 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
32994 try {
32995 var result = this.predicate(value, this.index++);
32996 this.skipping = Boolean(result);
32997 }
32998 catch (err) {
32999 this.destination.error(err);
33000 }
33001 };
33002 return SkipWhileSubscriber;
33003}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33004//# sourceMappingURL=skipWhile.js.map
33005
33006
33007/***/ }),
33008/* 343 */
33009/***/ (function(module, __webpack_exports__, __webpack_require__) {
33010
33011"use strict";
33012__webpack_require__.r(__webpack_exports__);
33013/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
33014/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
33015/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
33016/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
33017
33018
33019function startWith() {
33020 var array = [];
33021 for (var _i = 0; _i < arguments.length; _i++) {
33022 array[_i] = arguments[_i];
33023 }
33024 var scheduler = array[array.length - 1];
33025 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
33026 array.pop();
33027 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
33028 }
33029 else {
33030 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
33031 }
33032}
33033//# sourceMappingURL=startWith.js.map
33034
33035
33036/***/ }),
33037/* 344 */
33038/***/ (function(module, __webpack_exports__, __webpack_require__) {
33039
33040"use strict";
33041__webpack_require__.r(__webpack_exports__);
33042/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
33043/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(345);
33044/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
33045
33046function subscribeOn(scheduler, delay) {
33047 if (delay === void 0) {
33048 delay = 0;
33049 }
33050 return function subscribeOnOperatorFunction(source) {
33051 return source.lift(new SubscribeOnOperator(scheduler, delay));
33052 };
33053}
33054var SubscribeOnOperator = /*@__PURE__*/ (function () {
33055 function SubscribeOnOperator(scheduler, delay) {
33056 this.scheduler = scheduler;
33057 this.delay = delay;
33058 }
33059 SubscribeOnOperator.prototype.call = function (subscriber, source) {
33060 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
33061 };
33062 return SubscribeOnOperator;
33063}());
33064//# sourceMappingURL=subscribeOn.js.map
33065
33066
33067/***/ }),
33068/* 345 */
33069/***/ (function(module, __webpack_exports__, __webpack_require__) {
33070
33071"use strict";
33072__webpack_require__.r(__webpack_exports__);
33073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
33074/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33075/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
33076/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
33077/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(255);
33078/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
33079
33080
33081
33082
33083var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
33084 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
33085 function SubscribeOnObservable(source, delayTime, scheduler) {
33086 if (delayTime === void 0) {
33087 delayTime = 0;
33088 }
33089 if (scheduler === void 0) {
33090 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33091 }
33092 var _this = _super.call(this) || this;
33093 _this.source = source;
33094 _this.delayTime = delayTime;
33095 _this.scheduler = scheduler;
33096 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
33097 _this.delayTime = 0;
33098 }
33099 if (!scheduler || typeof scheduler.schedule !== 'function') {
33100 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33101 }
33102 return _this;
33103 }
33104 SubscribeOnObservable.create = function (source, delay, scheduler) {
33105 if (delay === void 0) {
33106 delay = 0;
33107 }
33108 if (scheduler === void 0) {
33109 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33110 }
33111 return new SubscribeOnObservable(source, delay, scheduler);
33112 };
33113 SubscribeOnObservable.dispatch = function (arg) {
33114 var source = arg.source, subscriber = arg.subscriber;
33115 return this.add(source.subscribe(subscriber));
33116 };
33117 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
33118 var delay = this.delayTime;
33119 var source = this.source;
33120 var scheduler = this.scheduler;
33121 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
33122 source: source, subscriber: subscriber
33123 });
33124 };
33125 return SubscribeOnObservable;
33126}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
33127
33128//# sourceMappingURL=SubscribeOnObservable.js.map
33129
33130
33131/***/ }),
33132/* 346 */
33133/***/ (function(module, __webpack_exports__, __webpack_require__) {
33134
33135"use strict";
33136__webpack_require__.r(__webpack_exports__);
33137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
33138/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33139/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
33140/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
33141
33142
33143function switchAll() {
33144 return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
33145}
33146//# sourceMappingURL=switchAll.js.map
33147
33148
33149/***/ }),
33150/* 347 */
33151/***/ (function(module, __webpack_exports__, __webpack_require__) {
33152
33153"use strict";
33154__webpack_require__.r(__webpack_exports__);
33155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
33156/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33157/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33158/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
33159/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33160/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
33161/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
33162/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
33163
33164
33165
33166
33167
33168
33169function switchMap(project, resultSelector) {
33170 if (typeof resultSelector === 'function') {
33171 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); })); })); };
33172 }
33173 return function (source) { return source.lift(new SwitchMapOperator(project)); };
33174}
33175var SwitchMapOperator = /*@__PURE__*/ (function () {
33176 function SwitchMapOperator(project) {
33177 this.project = project;
33178 }
33179 SwitchMapOperator.prototype.call = function (subscriber, source) {
33180 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
33181 };
33182 return SwitchMapOperator;
33183}());
33184var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
33185 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
33186 function SwitchMapSubscriber(destination, project) {
33187 var _this = _super.call(this, destination) || this;
33188 _this.project = project;
33189 _this.index = 0;
33190 return _this;
33191 }
33192 SwitchMapSubscriber.prototype._next = function (value) {
33193 var result;
33194 var index = this.index++;
33195 try {
33196 result = this.project(value, index);
33197 }
33198 catch (error) {
33199 this.destination.error(error);
33200 return;
33201 }
33202 this._innerSub(result, value, index);
33203 };
33204 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
33205 var innerSubscription = this.innerSubscription;
33206 if (innerSubscription) {
33207 innerSubscription.unsubscribe();
33208 }
33209 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
33210 var destination = this.destination;
33211 destination.add(innerSubscriber);
33212 this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
33213 if (this.innerSubscription !== innerSubscriber) {
33214 destination.add(this.innerSubscription);
33215 }
33216 };
33217 SwitchMapSubscriber.prototype._complete = function () {
33218 var innerSubscription = this.innerSubscription;
33219 if (!innerSubscription || innerSubscription.closed) {
33220 _super.prototype._complete.call(this);
33221 }
33222 this.unsubscribe();
33223 };
33224 SwitchMapSubscriber.prototype._unsubscribe = function () {
33225 this.innerSubscription = null;
33226 };
33227 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
33228 var destination = this.destination;
33229 destination.remove(innerSub);
33230 this.innerSubscription = null;
33231 if (this.isStopped) {
33232 _super.prototype._complete.call(this);
33233 }
33234 };
33235 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33236 this.destination.next(innerValue);
33237 };
33238 return SwitchMapSubscriber;
33239}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33240//# sourceMappingURL=switchMap.js.map
33241
33242
33243/***/ }),
33244/* 348 */
33245/***/ (function(module, __webpack_exports__, __webpack_require__) {
33246
33247"use strict";
33248__webpack_require__.r(__webpack_exports__);
33249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
33250/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33251/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
33252
33253function switchMapTo(innerObservable, resultSelector) {
33254 return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
33255}
33256//# sourceMappingURL=switchMapTo.js.map
33257
33258
33259/***/ }),
33260/* 349 */
33261/***/ (function(module, __webpack_exports__, __webpack_require__) {
33262
33263"use strict";
33264__webpack_require__.r(__webpack_exports__);
33265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
33266/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33267/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33268/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33269/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33270
33271
33272
33273function takeUntil(notifier) {
33274 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
33275}
33276var TakeUntilOperator = /*@__PURE__*/ (function () {
33277 function TakeUntilOperator(notifier) {
33278 this.notifier = notifier;
33279 }
33280 TakeUntilOperator.prototype.call = function (subscriber, source) {
33281 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
33282 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
33283 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
33284 takeUntilSubscriber.add(notifierSubscription);
33285 return source.subscribe(takeUntilSubscriber);
33286 }
33287 return takeUntilSubscriber;
33288 };
33289 return TakeUntilOperator;
33290}());
33291var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
33292 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
33293 function TakeUntilSubscriber(destination) {
33294 var _this = _super.call(this, destination) || this;
33295 _this.seenValue = false;
33296 return _this;
33297 }
33298 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33299 this.seenValue = true;
33300 this.complete();
33301 };
33302 TakeUntilSubscriber.prototype.notifyComplete = function () {
33303 };
33304 return TakeUntilSubscriber;
33305}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33306//# sourceMappingURL=takeUntil.js.map
33307
33308
33309/***/ }),
33310/* 350 */
33311/***/ (function(module, __webpack_exports__, __webpack_require__) {
33312
33313"use strict";
33314__webpack_require__.r(__webpack_exports__);
33315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
33316/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33317/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33318/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33319
33320
33321function takeWhile(predicate, inclusive) {
33322 if (inclusive === void 0) {
33323 inclusive = false;
33324 }
33325 return function (source) {
33326 return source.lift(new TakeWhileOperator(predicate, inclusive));
33327 };
33328}
33329var TakeWhileOperator = /*@__PURE__*/ (function () {
33330 function TakeWhileOperator(predicate, inclusive) {
33331 this.predicate = predicate;
33332 this.inclusive = inclusive;
33333 }
33334 TakeWhileOperator.prototype.call = function (subscriber, source) {
33335 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
33336 };
33337 return TakeWhileOperator;
33338}());
33339var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
33340 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
33341 function TakeWhileSubscriber(destination, predicate, inclusive) {
33342 var _this = _super.call(this, destination) || this;
33343 _this.predicate = predicate;
33344 _this.inclusive = inclusive;
33345 _this.index = 0;
33346 return _this;
33347 }
33348 TakeWhileSubscriber.prototype._next = function (value) {
33349 var destination = this.destination;
33350 var result;
33351 try {
33352 result = this.predicate(value, this.index++);
33353 }
33354 catch (err) {
33355 destination.error(err);
33356 return;
33357 }
33358 this.nextOrComplete(value, result);
33359 };
33360 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
33361 var destination = this.destination;
33362 if (Boolean(predicateResult)) {
33363 destination.next(value);
33364 }
33365 else {
33366 if (this.inclusive) {
33367 destination.next(value);
33368 }
33369 destination.complete();
33370 }
33371 };
33372 return TakeWhileSubscriber;
33373}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33374//# sourceMappingURL=takeWhile.js.map
33375
33376
33377/***/ }),
33378/* 351 */
33379/***/ (function(module, __webpack_exports__, __webpack_require__) {
33380
33381"use strict";
33382__webpack_require__.r(__webpack_exports__);
33383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
33384/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33385/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33386/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(218);
33387/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
33388/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
33389
33390
33391
33392
33393function tap(nextOrObserver, error, complete) {
33394 return function tapOperatorFunction(source) {
33395 return source.lift(new DoOperator(nextOrObserver, error, complete));
33396 };
33397}
33398var DoOperator = /*@__PURE__*/ (function () {
33399 function DoOperator(nextOrObserver, error, complete) {
33400 this.nextOrObserver = nextOrObserver;
33401 this.error = error;
33402 this.complete = complete;
33403 }
33404 DoOperator.prototype.call = function (subscriber, source) {
33405 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
33406 };
33407 return DoOperator;
33408}());
33409var TapSubscriber = /*@__PURE__*/ (function (_super) {
33410 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
33411 function TapSubscriber(destination, observerOrNext, error, complete) {
33412 var _this = _super.call(this, destination) || this;
33413 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33414 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33415 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33416 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33417 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33418 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
33419 _this._context = _this;
33420 _this._tapNext = observerOrNext;
33421 }
33422 else if (observerOrNext) {
33423 _this._context = observerOrNext;
33424 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33425 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33426 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33427 }
33428 return _this;
33429 }
33430 TapSubscriber.prototype._next = function (value) {
33431 try {
33432 this._tapNext.call(this._context, value);
33433 }
33434 catch (err) {
33435 this.destination.error(err);
33436 return;
33437 }
33438 this.destination.next(value);
33439 };
33440 TapSubscriber.prototype._error = function (err) {
33441 try {
33442 this._tapError.call(this._context, err);
33443 }
33444 catch (err) {
33445 this.destination.error(err);
33446 return;
33447 }
33448 this.destination.error(err);
33449 };
33450 TapSubscriber.prototype._complete = function () {
33451 try {
33452 this._tapComplete.call(this._context);
33453 }
33454 catch (err) {
33455 this.destination.error(err);
33456 return;
33457 }
33458 return this.destination.complete();
33459 };
33460 return TapSubscriber;
33461}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33462//# sourceMappingURL=tap.js.map
33463
33464
33465/***/ }),
33466/* 352 */
33467/***/ (function(module, __webpack_exports__, __webpack_require__) {
33468
33469"use strict";
33470__webpack_require__.r(__webpack_exports__);
33471/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
33472/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
33473/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33474/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33475/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33476/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33477
33478
33479
33480var defaultThrottleConfig = {
33481 leading: true,
33482 trailing: false
33483};
33484function throttle(durationSelector, config) {
33485 if (config === void 0) {
33486 config = defaultThrottleConfig;
33487 }
33488 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
33489}
33490var ThrottleOperator = /*@__PURE__*/ (function () {
33491 function ThrottleOperator(durationSelector, leading, trailing) {
33492 this.durationSelector = durationSelector;
33493 this.leading = leading;
33494 this.trailing = trailing;
33495 }
33496 ThrottleOperator.prototype.call = function (subscriber, source) {
33497 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
33498 };
33499 return ThrottleOperator;
33500}());
33501var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
33502 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
33503 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
33504 var _this = _super.call(this, destination) || this;
33505 _this.destination = destination;
33506 _this.durationSelector = durationSelector;
33507 _this._leading = _leading;
33508 _this._trailing = _trailing;
33509 _this._hasValue = false;
33510 return _this;
33511 }
33512 ThrottleSubscriber.prototype._next = function (value) {
33513 this._hasValue = true;
33514 this._sendValue = value;
33515 if (!this._throttled) {
33516 if (this._leading) {
33517 this.send();
33518 }
33519 else {
33520 this.throttle(value);
33521 }
33522 }
33523 };
33524 ThrottleSubscriber.prototype.send = function () {
33525 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
33526 if (_hasValue) {
33527 this.destination.next(_sendValue);
33528 this.throttle(_sendValue);
33529 }
33530 this._hasValue = false;
33531 this._sendValue = null;
33532 };
33533 ThrottleSubscriber.prototype.throttle = function (value) {
33534 var duration = this.tryDurationSelector(value);
33535 if (!!duration) {
33536 this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
33537 }
33538 };
33539 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
33540 try {
33541 return this.durationSelector(value);
33542 }
33543 catch (err) {
33544 this.destination.error(err);
33545 return null;
33546 }
33547 };
33548 ThrottleSubscriber.prototype.throttlingDone = function () {
33549 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
33550 if (_throttled) {
33551 _throttled.unsubscribe();
33552 }
33553 this._throttled = null;
33554 if (_trailing) {
33555 this.send();
33556 }
33557 };
33558 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33559 this.throttlingDone();
33560 };
33561 ThrottleSubscriber.prototype.notifyComplete = function () {
33562 this.throttlingDone();
33563 };
33564 return ThrottleSubscriber;
33565}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33566//# sourceMappingURL=throttle.js.map
33567
33568
33569/***/ }),
33570/* 353 */
33571/***/ (function(module, __webpack_exports__, __webpack_require__) {
33572
33573"use strict";
33574__webpack_require__.r(__webpack_exports__);
33575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
33576/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33577/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33578/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
33579/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(352);
33580/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
33581
33582
33583
33584
33585function throttleTime(duration, scheduler, config) {
33586 if (scheduler === void 0) {
33587 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
33588 }
33589 if (config === void 0) {
33590 config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
33591 }
33592 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
33593}
33594var ThrottleTimeOperator = /*@__PURE__*/ (function () {
33595 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
33596 this.duration = duration;
33597 this.scheduler = scheduler;
33598 this.leading = leading;
33599 this.trailing = trailing;
33600 }
33601 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
33602 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
33603 };
33604 return ThrottleTimeOperator;
33605}());
33606var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
33607 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
33608 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
33609 var _this = _super.call(this, destination) || this;
33610 _this.duration = duration;
33611 _this.scheduler = scheduler;
33612 _this.leading = leading;
33613 _this.trailing = trailing;
33614 _this._hasTrailingValue = false;
33615 _this._trailingValue = null;
33616 return _this;
33617 }
33618 ThrottleTimeSubscriber.prototype._next = function (value) {
33619 if (this.throttled) {
33620 if (this.trailing) {
33621 this._trailingValue = value;
33622 this._hasTrailingValue = true;
33623 }
33624 }
33625 else {
33626 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
33627 if (this.leading) {
33628 this.destination.next(value);
33629 }
33630 else if (this.trailing) {
33631 this._trailingValue = value;
33632 this._hasTrailingValue = true;
33633 }
33634 }
33635 };
33636 ThrottleTimeSubscriber.prototype._complete = function () {
33637 if (this._hasTrailingValue) {
33638 this.destination.next(this._trailingValue);
33639 this.destination.complete();
33640 }
33641 else {
33642 this.destination.complete();
33643 }
33644 };
33645 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
33646 var throttled = this.throttled;
33647 if (throttled) {
33648 if (this.trailing && this._hasTrailingValue) {
33649 this.destination.next(this._trailingValue);
33650 this._trailingValue = null;
33651 this._hasTrailingValue = false;
33652 }
33653 throttled.unsubscribe();
33654 this.remove(throttled);
33655 this.throttled = null;
33656 }
33657 };
33658 return ThrottleTimeSubscriber;
33659}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33660function dispatchNext(arg) {
33661 var subscriber = arg.subscriber;
33662 subscriber.clearThrottle();
33663}
33664//# sourceMappingURL=throttleTime.js.map
33665
33666
33667/***/ }),
33668/* 354 */
33669/***/ (function(module, __webpack_exports__, __webpack_require__) {
33670
33671"use strict";
33672__webpack_require__.r(__webpack_exports__);
33673/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
33674/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
33675/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33676/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
33677/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248);
33678/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
33679/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
33680
33681
33682
33683
33684function timeInterval(scheduler) {
33685 if (scheduler === void 0) {
33686 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33687 }
33688 return function (source) {
33689 return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
33690 return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
33691 var current = _a.current;
33692 return ({ value: value, current: scheduler.now(), last: current });
33693 }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
33694 var current = _a.current, last = _a.last, value = _a.value;
33695 return new TimeInterval(value, current - last);
33696 }));
33697 });
33698 };
33699}
33700var TimeInterval = /*@__PURE__*/ (function () {
33701 function TimeInterval(value, interval) {
33702 this.value = value;
33703 this.interval = interval;
33704 }
33705 return TimeInterval;
33706}());
33707
33708//# sourceMappingURL=timeInterval.js.map
33709
33710
33711/***/ }),
33712/* 355 */
33713/***/ (function(module, __webpack_exports__, __webpack_require__) {
33714
33715"use strict";
33716__webpack_require__.r(__webpack_exports__);
33717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
33718/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33719/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
33720/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(356);
33721/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(207);
33722/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
33723
33724
33725
33726
33727function timeout(due, scheduler) {
33728 if (scheduler === void 0) {
33729 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33730 }
33731 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);
33732}
33733//# sourceMappingURL=timeout.js.map
33734
33735
33736/***/ }),
33737/* 356 */
33738/***/ (function(module, __webpack_exports__, __webpack_require__) {
33739
33740"use strict";
33741__webpack_require__.r(__webpack_exports__);
33742/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
33743/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33744/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
33745/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
33746/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
33747/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
33748/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33749
33750
33751
33752
33753
33754function timeoutWith(due, withObservable, scheduler) {
33755 if (scheduler === void 0) {
33756 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
33757 }
33758 return function (source) {
33759 var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
33760 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
33761 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
33762 };
33763}
33764var TimeoutWithOperator = /*@__PURE__*/ (function () {
33765 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
33766 this.waitFor = waitFor;
33767 this.absoluteTimeout = absoluteTimeout;
33768 this.withObservable = withObservable;
33769 this.scheduler = scheduler;
33770 }
33771 TimeoutWithOperator.prototype.call = function (subscriber, source) {
33772 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
33773 };
33774 return TimeoutWithOperator;
33775}());
33776var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
33777 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
33778 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
33779 var _this = _super.call(this, destination) || this;
33780 _this.absoluteTimeout = absoluteTimeout;
33781 _this.waitFor = waitFor;
33782 _this.withObservable = withObservable;
33783 _this.scheduler = scheduler;
33784 _this.action = null;
33785 _this.scheduleTimeout();
33786 return _this;
33787 }
33788 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
33789 var withObservable = subscriber.withObservable;
33790 subscriber._unsubscribeAndRecycle();
33791 subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
33792 };
33793 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
33794 var action = this.action;
33795 if (action) {
33796 this.action = action.schedule(this, this.waitFor);
33797 }
33798 else {
33799 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
33800 }
33801 };
33802 TimeoutWithSubscriber.prototype._next = function (value) {
33803 if (!this.absoluteTimeout) {
33804 this.scheduleTimeout();
33805 }
33806 _super.prototype._next.call(this, value);
33807 };
33808 TimeoutWithSubscriber.prototype._unsubscribe = function () {
33809 this.action = null;
33810 this.scheduler = null;
33811 this.withObservable = null;
33812 };
33813 return TimeoutWithSubscriber;
33814}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
33815//# sourceMappingURL=timeoutWith.js.map
33816
33817
33818/***/ }),
33819/* 357 */
33820/***/ (function(module, __webpack_exports__, __webpack_require__) {
33821
33822"use strict";
33823__webpack_require__.r(__webpack_exports__);
33824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
33825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
33826/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33827/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
33828/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
33829
33830
33831function timestamp(scheduler) {
33832 if (scheduler === void 0) {
33833 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33834 }
33835 return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
33836}
33837var Timestamp = /*@__PURE__*/ (function () {
33838 function Timestamp(value, timestamp) {
33839 this.value = value;
33840 this.timestamp = timestamp;
33841 }
33842 return Timestamp;
33843}());
33844
33845//# sourceMappingURL=timestamp.js.map
33846
33847
33848/***/ }),
33849/* 358 */
33850/***/ (function(module, __webpack_exports__, __webpack_require__) {
33851
33852"use strict";
33853__webpack_require__.r(__webpack_exports__);
33854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
33855/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
33856/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
33857
33858function toArrayReducer(arr, item, index) {
33859 if (index === 0) {
33860 return [item];
33861 }
33862 arr.push(item);
33863 return arr;
33864}
33865function toArray() {
33866 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
33867}
33868//# sourceMappingURL=toArray.js.map
33869
33870
33871/***/ }),
33872/* 359 */
33873/***/ (function(module, __webpack_exports__, __webpack_require__) {
33874
33875"use strict";
33876__webpack_require__.r(__webpack_exports__);
33877/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
33878/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33879/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
33880/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
33881/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33882/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33883
33884
33885
33886
33887function window(windowBoundaries) {
33888 return function windowOperatorFunction(source) {
33889 return source.lift(new WindowOperator(windowBoundaries));
33890 };
33891}
33892var WindowOperator = /*@__PURE__*/ (function () {
33893 function WindowOperator(windowBoundaries) {
33894 this.windowBoundaries = windowBoundaries;
33895 }
33896 WindowOperator.prototype.call = function (subscriber, source) {
33897 var windowSubscriber = new WindowSubscriber(subscriber);
33898 var sourceSubscription = source.subscribe(windowSubscriber);
33899 if (!sourceSubscription.closed) {
33900 windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
33901 }
33902 return sourceSubscription;
33903 };
33904 return WindowOperator;
33905}());
33906var WindowSubscriber = /*@__PURE__*/ (function (_super) {
33907 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
33908 function WindowSubscriber(destination) {
33909 var _this = _super.call(this, destination) || this;
33910 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
33911 destination.next(_this.window);
33912 return _this;
33913 }
33914 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33915 this.openWindow();
33916 };
33917 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
33918 this._error(error);
33919 };
33920 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
33921 this._complete();
33922 };
33923 WindowSubscriber.prototype._next = function (value) {
33924 this.window.next(value);
33925 };
33926 WindowSubscriber.prototype._error = function (err) {
33927 this.window.error(err);
33928 this.destination.error(err);
33929 };
33930 WindowSubscriber.prototype._complete = function () {
33931 this.window.complete();
33932 this.destination.complete();
33933 };
33934 WindowSubscriber.prototype._unsubscribe = function () {
33935 this.window = null;
33936 };
33937 WindowSubscriber.prototype.openWindow = function () {
33938 var prevWindow = this.window;
33939 if (prevWindow) {
33940 prevWindow.complete();
33941 }
33942 var destination = this.destination;
33943 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
33944 destination.next(newWindow);
33945 };
33946 return WindowSubscriber;
33947}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
33948//# sourceMappingURL=window.js.map
33949
33950
33951/***/ }),
33952/* 360 */
33953/***/ (function(module, __webpack_exports__, __webpack_require__) {
33954
33955"use strict";
33956__webpack_require__.r(__webpack_exports__);
33957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
33958/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33959/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33960/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
33961/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
33962
33963
33964
33965function windowCount(windowSize, startWindowEvery) {
33966 if (startWindowEvery === void 0) {
33967 startWindowEvery = 0;
33968 }
33969 return function windowCountOperatorFunction(source) {
33970 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
33971 };
33972}
33973var WindowCountOperator = /*@__PURE__*/ (function () {
33974 function WindowCountOperator(windowSize, startWindowEvery) {
33975 this.windowSize = windowSize;
33976 this.startWindowEvery = startWindowEvery;
33977 }
33978 WindowCountOperator.prototype.call = function (subscriber, source) {
33979 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
33980 };
33981 return WindowCountOperator;
33982}());
33983var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
33984 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
33985 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
33986 var _this = _super.call(this, destination) || this;
33987 _this.destination = destination;
33988 _this.windowSize = windowSize;
33989 _this.startWindowEvery = startWindowEvery;
33990 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
33991 _this.count = 0;
33992 destination.next(_this.windows[0]);
33993 return _this;
33994 }
33995 WindowCountSubscriber.prototype._next = function (value) {
33996 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
33997 var destination = this.destination;
33998 var windowSize = this.windowSize;
33999 var windows = this.windows;
34000 var len = windows.length;
34001 for (var i = 0; i < len && !this.closed; i++) {
34002 windows[i].next(value);
34003 }
34004 var c = this.count - windowSize + 1;
34005 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
34006 windows.shift().complete();
34007 }
34008 if (++this.count % startWindowEvery === 0 && !this.closed) {
34009 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
34010 windows.push(window_1);
34011 destination.next(window_1);
34012 }
34013 };
34014 WindowCountSubscriber.prototype._error = function (err) {
34015 var windows = this.windows;
34016 if (windows) {
34017 while (windows.length > 0 && !this.closed) {
34018 windows.shift().error(err);
34019 }
34020 }
34021 this.destination.error(err);
34022 };
34023 WindowCountSubscriber.prototype._complete = function () {
34024 var windows = this.windows;
34025 if (windows) {
34026 while (windows.length > 0 && !this.closed) {
34027 windows.shift().complete();
34028 }
34029 }
34030 this.destination.complete();
34031 };
34032 WindowCountSubscriber.prototype._unsubscribe = function () {
34033 this.count = 0;
34034 this.windows = null;
34035 };
34036 return WindowCountSubscriber;
34037}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
34038//# sourceMappingURL=windowCount.js.map
34039
34040
34041/***/ }),
34042/* 361 */
34043/***/ (function(module, __webpack_exports__, __webpack_require__) {
34044
34045"use strict";
34046__webpack_require__.r(__webpack_exports__);
34047/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
34048/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34049/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34050/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
34051/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
34052/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(255);
34053/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
34054/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
34055
34056
34057
34058
34059
34060
34061function windowTime(windowTimeSpan) {
34062 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
34063 var windowCreationInterval = null;
34064 var maxWindowSize = Number.POSITIVE_INFINITY;
34065 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
34066 scheduler = arguments[3];
34067 }
34068 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
34069 scheduler = arguments[2];
34070 }
34071 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
34072 maxWindowSize = arguments[2];
34073 }
34074 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
34075 scheduler = arguments[1];
34076 }
34077 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
34078 windowCreationInterval = arguments[1];
34079 }
34080 return function windowTimeOperatorFunction(source) {
34081 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
34082 };
34083}
34084var WindowTimeOperator = /*@__PURE__*/ (function () {
34085 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34086 this.windowTimeSpan = windowTimeSpan;
34087 this.windowCreationInterval = windowCreationInterval;
34088 this.maxWindowSize = maxWindowSize;
34089 this.scheduler = scheduler;
34090 }
34091 WindowTimeOperator.prototype.call = function (subscriber, source) {
34092 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
34093 };
34094 return WindowTimeOperator;
34095}());
34096var CountedSubject = /*@__PURE__*/ (function (_super) {
34097 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
34098 function CountedSubject() {
34099 var _this = _super !== null && _super.apply(this, arguments) || this;
34100 _this._numberOfNextedValues = 0;
34101 return _this;
34102 }
34103 CountedSubject.prototype.next = function (value) {
34104 this._numberOfNextedValues++;
34105 _super.prototype.next.call(this, value);
34106 };
34107 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
34108 get: function () {
34109 return this._numberOfNextedValues;
34110 },
34111 enumerable: true,
34112 configurable: true
34113 });
34114 return CountedSubject;
34115}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
34116var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
34117 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
34118 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34119 var _this = _super.call(this, destination) || this;
34120 _this.destination = destination;
34121 _this.windowTimeSpan = windowTimeSpan;
34122 _this.windowCreationInterval = windowCreationInterval;
34123 _this.maxWindowSize = maxWindowSize;
34124 _this.scheduler = scheduler;
34125 _this.windows = [];
34126 var window = _this.openWindow();
34127 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
34128 var closeState = { subscriber: _this, window: window, context: null };
34129 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
34130 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
34131 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
34132 }
34133 else {
34134 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
34135 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
34136 }
34137 return _this;
34138 }
34139 WindowTimeSubscriber.prototype._next = function (value) {
34140 var windows = this.windows;
34141 var len = windows.length;
34142 for (var i = 0; i < len; i++) {
34143 var window_1 = windows[i];
34144 if (!window_1.closed) {
34145 window_1.next(value);
34146 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
34147 this.closeWindow(window_1);
34148 }
34149 }
34150 }
34151 };
34152 WindowTimeSubscriber.prototype._error = function (err) {
34153 var windows = this.windows;
34154 while (windows.length > 0) {
34155 windows.shift().error(err);
34156 }
34157 this.destination.error(err);
34158 };
34159 WindowTimeSubscriber.prototype._complete = function () {
34160 var windows = this.windows;
34161 while (windows.length > 0) {
34162 var window_2 = windows.shift();
34163 if (!window_2.closed) {
34164 window_2.complete();
34165 }
34166 }
34167 this.destination.complete();
34168 };
34169 WindowTimeSubscriber.prototype.openWindow = function () {
34170 var window = new CountedSubject();
34171 this.windows.push(window);
34172 var destination = this.destination;
34173 destination.next(window);
34174 return window;
34175 };
34176 WindowTimeSubscriber.prototype.closeWindow = function (window) {
34177 window.complete();
34178 var windows = this.windows;
34179 windows.splice(windows.indexOf(window), 1);
34180 };
34181 return WindowTimeSubscriber;
34182}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
34183function dispatchWindowTimeSpanOnly(state) {
34184 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
34185 if (window) {
34186 subscriber.closeWindow(window);
34187 }
34188 state.window = subscriber.openWindow();
34189 this.schedule(state, windowTimeSpan);
34190}
34191function dispatchWindowCreation(state) {
34192 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
34193 var window = subscriber.openWindow();
34194 var action = this;
34195 var context = { action: action, subscription: null };
34196 var timeSpanState = { subscriber: subscriber, window: window, context: context };
34197 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
34198 action.add(context.subscription);
34199 action.schedule(state, windowCreationInterval);
34200}
34201function dispatchWindowClose(state) {
34202 var subscriber = state.subscriber, window = state.window, context = state.context;
34203 if (context && context.action && context.subscription) {
34204 context.action.remove(context.subscription);
34205 }
34206 subscriber.closeWindow(window);
34207}
34208//# sourceMappingURL=windowTime.js.map
34209
34210
34211/***/ }),
34212/* 362 */
34213/***/ (function(module, __webpack_exports__, __webpack_require__) {
34214
34215"use strict";
34216__webpack_require__.r(__webpack_exports__);
34217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
34218/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34219/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34220/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
34221/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
34222/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
34223/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34224
34225
34226
34227
34228
34229function windowToggle(openings, closingSelector) {
34230 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
34231}
34232var WindowToggleOperator = /*@__PURE__*/ (function () {
34233 function WindowToggleOperator(openings, closingSelector) {
34234 this.openings = openings;
34235 this.closingSelector = closingSelector;
34236 }
34237 WindowToggleOperator.prototype.call = function (subscriber, source) {
34238 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
34239 };
34240 return WindowToggleOperator;
34241}());
34242var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
34243 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
34244 function WindowToggleSubscriber(destination, openings, closingSelector) {
34245 var _this = _super.call(this, destination) || this;
34246 _this.openings = openings;
34247 _this.closingSelector = closingSelector;
34248 _this.contexts = [];
34249 _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
34250 return _this;
34251 }
34252 WindowToggleSubscriber.prototype._next = function (value) {
34253 var contexts = this.contexts;
34254 if (contexts) {
34255 var len = contexts.length;
34256 for (var i = 0; i < len; i++) {
34257 contexts[i].window.next(value);
34258 }
34259 }
34260 };
34261 WindowToggleSubscriber.prototype._error = function (err) {
34262 var contexts = this.contexts;
34263 this.contexts = null;
34264 if (contexts) {
34265 var len = contexts.length;
34266 var index = -1;
34267 while (++index < len) {
34268 var context_1 = contexts[index];
34269 context_1.window.error(err);
34270 context_1.subscription.unsubscribe();
34271 }
34272 }
34273 _super.prototype._error.call(this, err);
34274 };
34275 WindowToggleSubscriber.prototype._complete = function () {
34276 var contexts = this.contexts;
34277 this.contexts = null;
34278 if (contexts) {
34279 var len = contexts.length;
34280 var index = -1;
34281 while (++index < len) {
34282 var context_2 = contexts[index];
34283 context_2.window.complete();
34284 context_2.subscription.unsubscribe();
34285 }
34286 }
34287 _super.prototype._complete.call(this);
34288 };
34289 WindowToggleSubscriber.prototype._unsubscribe = function () {
34290 var contexts = this.contexts;
34291 this.contexts = null;
34292 if (contexts) {
34293 var len = contexts.length;
34294 var index = -1;
34295 while (++index < len) {
34296 var context_3 = contexts[index];
34297 context_3.window.unsubscribe();
34298 context_3.subscription.unsubscribe();
34299 }
34300 }
34301 };
34302 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34303 if (outerValue === this.openings) {
34304 var closingNotifier = void 0;
34305 try {
34306 var closingSelector = this.closingSelector;
34307 closingNotifier = closingSelector(innerValue);
34308 }
34309 catch (e) {
34310 return this.error(e);
34311 }
34312 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34313 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
34314 var context_4 = { window: window_1, subscription: subscription };
34315 this.contexts.push(context_4);
34316 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
34317 if (innerSubscription.closed) {
34318 this.closeWindow(this.contexts.length - 1);
34319 }
34320 else {
34321 innerSubscription.context = context_4;
34322 subscription.add(innerSubscription);
34323 }
34324 this.destination.next(window_1);
34325 }
34326 else {
34327 this.closeWindow(this.contexts.indexOf(outerValue));
34328 }
34329 };
34330 WindowToggleSubscriber.prototype.notifyError = function (err) {
34331 this.error(err);
34332 };
34333 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
34334 if (inner !== this.openSubscription) {
34335 this.closeWindow(this.contexts.indexOf(inner.context));
34336 }
34337 };
34338 WindowToggleSubscriber.prototype.closeWindow = function (index) {
34339 if (index === -1) {
34340 return;
34341 }
34342 var contexts = this.contexts;
34343 var context = contexts[index];
34344 var window = context.window, subscription = context.subscription;
34345 contexts.splice(index, 1);
34346 window.complete();
34347 subscription.unsubscribe();
34348 };
34349 return WindowToggleSubscriber;
34350}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
34351//# sourceMappingURL=windowToggle.js.map
34352
34353
34354/***/ }),
34355/* 363 */
34356/***/ (function(module, __webpack_exports__, __webpack_require__) {
34357
34358"use strict";
34359__webpack_require__.r(__webpack_exports__);
34360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
34361/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34362/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34363/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
34364/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
34365/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34366
34367
34368
34369
34370function windowWhen(closingSelector) {
34371 return function windowWhenOperatorFunction(source) {
34372 return source.lift(new WindowOperator(closingSelector));
34373 };
34374}
34375var WindowOperator = /*@__PURE__*/ (function () {
34376 function WindowOperator(closingSelector) {
34377 this.closingSelector = closingSelector;
34378 }
34379 WindowOperator.prototype.call = function (subscriber, source) {
34380 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
34381 };
34382 return WindowOperator;
34383}());
34384var WindowSubscriber = /*@__PURE__*/ (function (_super) {
34385 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
34386 function WindowSubscriber(destination, closingSelector) {
34387 var _this = _super.call(this, destination) || this;
34388 _this.destination = destination;
34389 _this.closingSelector = closingSelector;
34390 _this.openWindow();
34391 return _this;
34392 }
34393 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34394 this.openWindow(innerSub);
34395 };
34396 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34397 this._error(error);
34398 };
34399 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34400 this.openWindow(innerSub);
34401 };
34402 WindowSubscriber.prototype._next = function (value) {
34403 this.window.next(value);
34404 };
34405 WindowSubscriber.prototype._error = function (err) {
34406 this.window.error(err);
34407 this.destination.error(err);
34408 this.unsubscribeClosingNotification();
34409 };
34410 WindowSubscriber.prototype._complete = function () {
34411 this.window.complete();
34412 this.destination.complete();
34413 this.unsubscribeClosingNotification();
34414 };
34415 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
34416 if (this.closingNotification) {
34417 this.closingNotification.unsubscribe();
34418 }
34419 };
34420 WindowSubscriber.prototype.openWindow = function (innerSub) {
34421 if (innerSub === void 0) {
34422 innerSub = null;
34423 }
34424 if (innerSub) {
34425 this.remove(innerSub);
34426 innerSub.unsubscribe();
34427 }
34428 var prevWindow = this.window;
34429 if (prevWindow) {
34430 prevWindow.complete();
34431 }
34432 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34433 this.destination.next(window);
34434 var closingNotifier;
34435 try {
34436 var closingSelector = this.closingSelector;
34437 closingNotifier = closingSelector();
34438 }
34439 catch (e) {
34440 this.destination.error(e);
34441 this.window.error(e);
34442 return;
34443 }
34444 this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
34445 };
34446 return WindowSubscriber;
34447}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
34448//# sourceMappingURL=windowWhen.js.map
34449
34450
34451/***/ }),
34452/* 364 */
34453/***/ (function(module, __webpack_exports__, __webpack_require__) {
34454
34455"use strict";
34456__webpack_require__.r(__webpack_exports__);
34457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
34458/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34459/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
34460/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
34461/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34462
34463
34464
34465function withLatestFrom() {
34466 var args = [];
34467 for (var _i = 0; _i < arguments.length; _i++) {
34468 args[_i] = arguments[_i];
34469 }
34470 return function (source) {
34471 var project;
34472 if (typeof args[args.length - 1] === 'function') {
34473 project = args.pop();
34474 }
34475 var observables = args;
34476 return source.lift(new WithLatestFromOperator(observables, project));
34477 };
34478}
34479var WithLatestFromOperator = /*@__PURE__*/ (function () {
34480 function WithLatestFromOperator(observables, project) {
34481 this.observables = observables;
34482 this.project = project;
34483 }
34484 WithLatestFromOperator.prototype.call = function (subscriber, source) {
34485 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
34486 };
34487 return WithLatestFromOperator;
34488}());
34489var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
34490 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
34491 function WithLatestFromSubscriber(destination, observables, project) {
34492 var _this = _super.call(this, destination) || this;
34493 _this.observables = observables;
34494 _this.project = project;
34495 _this.toRespond = [];
34496 var len = observables.length;
34497 _this.values = new Array(len);
34498 for (var i = 0; i < len; i++) {
34499 _this.toRespond.push(i);
34500 }
34501 for (var i = 0; i < len; i++) {
34502 var observable = observables[i];
34503 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
34504 }
34505 return _this;
34506 }
34507 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34508 this.values[outerIndex] = innerValue;
34509 var toRespond = this.toRespond;
34510 if (toRespond.length > 0) {
34511 var found = toRespond.indexOf(outerIndex);
34512 if (found !== -1) {
34513 toRespond.splice(found, 1);
34514 }
34515 }
34516 };
34517 WithLatestFromSubscriber.prototype.notifyComplete = function () {
34518 };
34519 WithLatestFromSubscriber.prototype._next = function (value) {
34520 if (this.toRespond.length === 0) {
34521 var args = [value].concat(this.values);
34522 if (this.project) {
34523 this._tryProject(args);
34524 }
34525 else {
34526 this.destination.next(args);
34527 }
34528 }
34529 };
34530 WithLatestFromSubscriber.prototype._tryProject = function (args) {
34531 var result;
34532 try {
34533 result = this.project.apply(this, args);
34534 }
34535 catch (err) {
34536 this.destination.error(err);
34537 return;
34538 }
34539 this.destination.next(result);
34540 };
34541 return WithLatestFromSubscriber;
34542}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
34543//# sourceMappingURL=withLatestFrom.js.map
34544
34545
34546/***/ }),
34547/* 365 */
34548/***/ (function(module, __webpack_exports__, __webpack_require__) {
34549
34550"use strict";
34551__webpack_require__.r(__webpack_exports__);
34552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
34553/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34554/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34555
34556function zip() {
34557 var observables = [];
34558 for (var _i = 0; _i < arguments.length; _i++) {
34559 observables[_i] = arguments[_i];
34560 }
34561 return function zipOperatorFunction(source) {
34562 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
34563 };
34564}
34565//# sourceMappingURL=zip.js.map
34566
34567
34568/***/ }),
34569/* 366 */
34570/***/ (function(module, __webpack_exports__, __webpack_require__) {
34571
34572"use strict";
34573__webpack_require__.r(__webpack_exports__);
34574/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
34575/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34576/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34577
34578function zipAll(project) {
34579 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
34580}
34581//# sourceMappingURL=zipAll.js.map
34582
34583
34584/***/ }),
34585/* 367 */,
34586/* 368 */,
34587/* 369 */,
34588/* 370 */
34589/***/ (function(module, exports, __webpack_require__) {
34590
34591"use strict";
34592
34593var __importDefault = (this && this.__importDefault) || function (mod) {
34594 return (mod && mod.__esModule) ? mod : { "default": mod };
34595};
34596Object.defineProperty(exports, "__esModule", { value: true });
34597var fast_glob_1 = __importDefault(__webpack_require__(60));
34598var os_1 = __importDefault(__webpack_require__(14));
34599var path_1 = __webpack_require__(13);
34600var rxjs_1 = __webpack_require__(166);
34601var operators_1 = __webpack_require__(269);
34602var vscode_uri_1 = __webpack_require__(149);
34603var fs_1 = __webpack_require__(40);
34604var constant_1 = __webpack_require__(44);
34605var util_1 = __webpack_require__(46);
34606var indexes = {};
34607var indexesFiles = {};
34608var queue = [];
34609var source$;
34610var gap = 100;
34611var count = 3;
34612var customProjectRootPatterns = constant_1.projectRootPatterns;
34613function initSource() {
34614 if (source$) {
34615 return;
34616 }
34617 source$ = new rxjs_1.Subject();
34618 source$.pipe(operators_1.concatMap(function (uri) {
34619 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.URI.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
34620 return rxjs_1.from(util_1.getRealPath(projectRoot));
34621 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
34622 uri: uri,
34623 projectRoot: projectRoot,
34624 }); }));
34625 }), operators_1.filter(function (_a) {
34626 var projectRoot = _a.projectRoot;
34627 if (!indexes[projectRoot]) {
34628 indexes[projectRoot] = true;
34629 return true;
34630 }
34631 return false;
34632 }), operators_1.concatMap(function (_a) {
34633 var projectRoot = _a.projectRoot;
34634 var indexPath = path_1.join(projectRoot, "**/*.vim");
34635 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
34636 process.send({
34637 msglog: [
34638 "Index Workspace Error: " + indexPath,
34639 "Error => " + (error.stack || error.message || error),
34640 ].join("\n"),
34641 });
34642 return rxjs_1.of(undefined);
34643 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
34644 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
34645 if (!indexesFiles[fpath]) {
34646 indexesFiles[fpath] = true;
34647 return true;
34648 }
34649 return false;
34650 }), operators_1.mergeMap(function (fpath) {
34651 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
34652 var content = fs_1.readFileSync(fpath).toString();
34653 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
34654 node: res[0],
34655 uri: vscode_uri_1.URI.file(fpath).toString(),
34656 }); }), operators_1.catchError(function (error) {
34657 process.send({
34658 msglog: fpath + ":\n" + (error.stack || error.message || error),
34659 });
34660 return rxjs_1.of(undefined);
34661 }));
34662 }));
34663 }, count));
34664 }));
34665 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
34666 process.send({
34667 data: res,
34668 });
34669 }, function (error) {
34670 process.send({
34671 msglog: error.stack || error.message || error,
34672 });
34673 });
34674 if (queue.length) {
34675 queue.forEach(function (uri) {
34676 source$.next(uri);
34677 });
34678 queue = [];
34679 }
34680}
34681process.on("message", function (mess) {
34682 var uri = mess.uri, config = mess.config;
34683 if (uri) {
34684 if (source$) {
34685 source$.next(uri);
34686 }
34687 else {
34688 queue.push(uri);
34689 }
34690 }
34691 if (config) {
34692 if (config.gap !== undefined) {
34693 gap = config.gap;
34694 }
34695 if (config.count !== undefined) {
34696 count = config.count;
34697 }
34698 if (config.projectRootPatterns !== undefined) {
34699 customProjectRootPatterns = config.projectRootPatterns;
34700 }
34701 initSource();
34702 }
34703});
34704
34705
34706/***/ })
34707/******/ ])));
\No newline at end of file