1 (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2 /******/ // The module cache
3 /******/ var installedModules = {};
5 /******/ // The require function
6 /******/ function __webpack_require__(moduleId) {
8 /******/ // Check if module is in cache
9 /******/ if(installedModules[moduleId]) {
10 /******/ return installedModules[moduleId].exports;
12 /******/ // Create a new module (and put it into the cache)
13 /******/ var module = installedModules[moduleId] = {
19 /******/ // Execute the module function
20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22 /******/ // Flag the module as loaded
23 /******/ module.l = true;
25 /******/ // Return the exports of the module
26 /******/ return module.exports;
30 /******/ // expose the modules object (__webpack_modules__)
31 /******/ __webpack_require__.m = modules;
33 /******/ // expose the module cache
34 /******/ __webpack_require__.c = installedModules;
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 });
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' });
48 /******/ Object.defineProperty(exports, '__esModule', { value: true });
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));
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;
76 /******/ // Object.prototype.hasOwnProperty.call
77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79 /******/ // __webpack_public_path__
80 /******/ __webpack_require__.p = "";
83 /******/ // Load entry module and return exports
84 /******/ return __webpack_require__(__webpack_require__.s = 34);
86 /************************************************************************/
92 /***/ (function(module, exports) {
94 module.exports = require("path");
108 /***/ (function(module, exports) {
110 module.exports = require("os");
114 /***/ (function(module, exports) {
116 module.exports = require("crypto");
120 /***/ (function(module, exports) {
122 module.exports = require("net");
143 /***/ (function(module, exports, __webpack_require__) {
147 /*---------------------------------------------------------------------------------------------
148 * Copyright (c) Microsoft Corporation. All rights reserved.
149 * Licensed under the MIT License. See License.txt in the project root for license information.
150 *--------------------------------------------------------------------------------------------*/
151 Object.defineProperty(exports, "__esModule", { value: true });
152 const node_1 = __webpack_require__(35);
153 const runner_1 = __webpack_require__(85);
154 const cssServer_1 = __webpack_require__(86);
155 const nodeFs_1 = __webpack_require__(134);
156 // Create a connection for the server.
157 const connection = node_1.createConnection();
158 console.log = connection.console.log.bind(connection.console);
159 console.error = connection.console.error.bind(connection.console);
160 process.on('unhandledRejection', (e) => {
161 connection.console.error(runner_1.formatError(`Unhandled exception`, e));
163 cssServer_1.startServer(connection, { file: nodeFs_1.getNodeFSRequestService() });
168 /***/ (function(module, exports, __webpack_require__) {
171 /* --------------------------------------------------------------------------------------------
172 * Copyright (c) Microsoft Corporation. All rights reserved.
173 * Licensed under the MIT License. See License.txt in the project root for license information.
174 * ----------------------------------------------------------------------------------------- */
177 module.exports = __webpack_require__(36);
181 /***/ (function(module, exports, __webpack_require__) {
185 /* --------------------------------------------------------------------------------------------
186 * Copyright (c) Microsoft Corporation. All rights reserved.
187 * Licensed under the MIT License. See License.txt in the project root for license information.
188 * ------------------------------------------------------------------------------------------ */
189 /// <reference path="../../typings/thenable.d.ts" />
190 function __export(m) {
191 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
193 Object.defineProperty(exports, "__esModule", { value: true });
194 const Is = __webpack_require__(37);
195 const server_1 = __webpack_require__(38);
196 const fm = __webpack_require__(78);
197 const node_1 = __webpack_require__(82);
198 __export(__webpack_require__(83));
201 Files.uriToFilePath = fm.uriToFilePath;
202 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
203 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
204 Files.resolve = fm.resolve;
205 Files.resolveModulePath = fm.resolveModulePath;
206 })(Files = exports.Files || (exports.Files = {}));
207 let _shutdownReceived = false;
208 let exitTimer = undefined;
209 function setupExitTimer() {
210 const argName = '--clientProcessId';
211 function runTimer(value) {
213 let processId = parseInt(value);
214 if (!isNaN(processId)) {
215 exitTimer = setInterval(() => {
217 process.kill(processId, 0);
220 // Parent process doesn't exist anymore. Exit the server.
221 process.exit(_shutdownReceived ? 0 : 1);
230 for (let i = 2; i < process.argv.length; i++) {
231 let arg = process.argv[i];
232 if (arg === argName && i + 1 < process.argv.length) {
233 runTimer(process.argv[i + 1]);
237 let args = arg.split('=');
238 if (args[0] === argName) {
246 initialize: (params) => {
247 const processId = params.processId;
248 if (Is.number(processId) && exitTimer === undefined) {
249 // We received a parent process id. Set up a timer to periodically check
250 // if the parent is still alive.
253 process.kill(processId, 0);
256 // Parent process doesn't exist anymore. Exit the server.
257 process.exit(_shutdownReceived ? 0 : 1);
262 get shutdownReceived() {
263 return _shutdownReceived;
265 set shutdownReceived(value) {
266 _shutdownReceived = value;
272 function createConnection(arg1, arg2, arg3, arg4) {
277 if (arg1 !== void 0 && arg1.__brand === 'features') {
283 if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
291 return _createConnection(input, output, options, factories);
293 exports.createConnection = createConnection;
294 function _createConnection(input, output, options, factories) {
295 if (!input && !output && process.argv.length > 2) {
297 let pipeName = void 0;
298 let argv = process.argv.slice(2);
299 for (let i = 0; i < argv.length; i++) {
301 if (arg === '--node-ipc') {
302 input = new node_1.IPCMessageReader(process);
303 output = new node_1.IPCMessageWriter(process);
306 else if (arg === '--stdio') {
307 input = process.stdin;
308 output = process.stdout;
311 else if (arg === '--socket') {
312 port = parseInt(argv[i + 1]);
315 else if (arg === '--pipe') {
316 pipeName = argv[i + 1];
320 var args = arg.split('=');
321 if (args[0] === '--socket') {
322 port = parseInt(args[1]);
325 else if (args[0] === '--pipe') {
332 let transport = node_1.createServerSocketTransport(port);
333 input = transport[0];
334 output = transport[1];
337 let transport = node_1.createServerPipeTransport(pipeName);
338 input = transport[0];
339 output = transport[1];
342 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
344 throw new Error('Connection input stream is not set. ' + commandLineMessage);
347 throw new Error('Connection output stream is not set. ' + commandLineMessage);
349 // Backwards compatibility
350 if (Is.func(input.read) && Is.func(input.on)) {
351 let inputStream = input;
352 inputStream.on('end', () => {
353 process.exit(_shutdownReceived ? 0 : 1);
355 inputStream.on('close', () => {
356 process.exit(_shutdownReceived ? 0 : 1);
359 const connectionFactory = (logger) => {
360 return node_1.createProtocolConnection(input, output, logger, options);
362 return server_1.createConnection(connectionFactory, watchDog, factories);
364 //# sourceMappingURL=main.js.map
368 /***/ (function(module, exports, __webpack_require__) {
372 /* --------------------------------------------------------------------------------------------
373 * Copyright (c) Microsoft Corporation. All rights reserved.
374 * Licensed under the MIT License. See License.txt in the project root for license information.
375 * ------------------------------------------------------------------------------------------ */
376 Object.defineProperty(exports, "__esModule", { value: true });
377 function boolean(value) {
378 return value === true || value === false;
380 exports.boolean = boolean;
381 function string(value) {
382 return typeof value === 'string' || value instanceof String;
384 exports.string = string;
385 function number(value) {
386 return typeof value === 'number' || value instanceof Number;
388 exports.number = number;
389 function error(value) {
390 return value instanceof Error;
392 exports.error = error;
393 function func(value) {
394 return typeof value === 'function';
397 function array(value) {
398 return Array.isArray(value);
400 exports.array = array;
401 function stringArray(value) {
402 return array(value) && value.every(elem => string(elem));
404 exports.stringArray = stringArray;
405 function typedArray(value, check) {
406 return Array.isArray(value) && value.every(check);
408 exports.typedArray = typedArray;
409 function thenable(value) {
410 return value && func(value.then);
412 exports.thenable = thenable;
413 //# sourceMappingURL=is.js.map
417 /***/ (function(module, exports, __webpack_require__) {
421 /* --------------------------------------------------------------------------------------------
422 * Copyright (c) Microsoft Corporation. All rights reserved.
423 * Licensed under the MIT License. See License.txt in the project root for license information.
424 * ------------------------------------------------------------------------------------------ */
425 Object.defineProperty(exports, "__esModule", { value: true });
426 const vscode_languageserver_protocol_1 = __webpack_require__(39);
427 const Is = __webpack_require__(37);
428 const UUID = __webpack_require__(73);
429 const progress_1 = __webpack_require__(74);
430 const configuration_1 = __webpack_require__(75);
431 const workspaceFolders_1 = __webpack_require__(76);
432 const callHierarchy_1 = __webpack_require__(77);
433 function null2Undefined(value) {
434 if (value === null) {
440 * A manager for simple text documents
442 class TextDocuments {
444 * Create a new text document manager.
446 constructor(configuration) {
447 this._documents = Object.create(null);
448 this._configuration = configuration;
449 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
450 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
451 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
452 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
453 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
456 * An event that fires when a text document managed by this manager
457 * has been opened or the content changes.
459 get onDidChangeContent() {
460 return this._onDidChangeContent.event;
463 * An event that fires when a text document managed by this manager
467 return this._onDidOpen.event;
470 * An event that fires when a text document managed by this manager
474 return this._onWillSave.event;
477 * Sets a handler that will be called if a participant wants to provide
478 * edits during a text document save.
480 onWillSaveWaitUntil(handler) {
481 this._willSaveWaitUntil = handler;
484 * An event that fires when a text document managed by this manager
488 return this._onDidSave.event;
491 * An event that fires when a text document managed by this manager
495 return this._onDidClose.event;
498 * Returns the document for the given URI. Returns undefined if
499 * the document is not mananged by this instance.
501 * @param uri The text document's URI to retrieve.
502 * @return the text document or `undefined`.
505 return this._documents[uri];
508 * Returns all text documents managed by this instance.
510 * @return all text documents.
513 return Object.keys(this._documents).map(key => this._documents[key]);
516 * Returns the URIs of all text documents managed by this instance.
518 * @return the URI's of all text documents.
521 return Object.keys(this._documents);
524 * Listens for `low level` notification on the given connection to
525 * update the text documents managed by this instance.
527 * Please note that the connection only provides handlers not an event model. Therefore
528 * listening on a connection will overwrite the following handlers on a connection:
529 * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
530 * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
532 * Use the correspnding events on the TextDocuments instance instead.
534 * @param connection The connection to listen on.
537 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
538 connection.onDidOpenTextDocument((event) => {
539 let td = event.textDocument;
540 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
541 this._documents[td.uri] = document;
542 let toFire = Object.freeze({ document });
543 this._onDidOpen.fire(toFire);
544 this._onDidChangeContent.fire(toFire);
546 connection.onDidChangeTextDocument((event) => {
547 let td = event.textDocument;
548 let changes = event.contentChanges;
549 if (changes.length === 0) {
552 let document = this._documents[td.uri];
553 const { version } = td;
554 if (version === null || version === undefined) {
555 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
557 document = this._configuration.update(document, changes, version);
558 this._documents[td.uri] = document;
559 this._onDidChangeContent.fire(Object.freeze({ document }));
561 connection.onDidCloseTextDocument((event) => {
562 let document = this._documents[event.textDocument.uri];
564 delete this._documents[event.textDocument.uri];
565 this._onDidClose.fire(Object.freeze({ document }));
568 connection.onWillSaveTextDocument((event) => {
569 let document = this._documents[event.textDocument.uri];
571 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
574 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
575 let document = this._documents[event.textDocument.uri];
576 if (document && this._willSaveWaitUntil) {
577 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
583 connection.onDidSaveTextDocument((event) => {
584 let document = this._documents[event.textDocument.uri];
586 this._onDidSave.fire(Object.freeze({ document }));
591 exports.TextDocuments = TextDocuments;
593 * Helps tracking error message. Equal occurences of the same
594 * message are only stored once. This class is for example
595 * useful if text documents are validated in a loop and equal
596 * error message should be folded into one.
598 class ErrorMessageTracker {
600 this._messages = Object.create(null);
603 * Add a message to the tracker.
605 * @param message The message to add.
608 let count = this._messages[message];
613 this._messages[message] = count;
616 * Send all tracked messages to the connection's window.
618 * @param connection The connection established between client and server.
620 sendErrors(connection) {
621 Object.keys(this._messages).forEach(message => {
622 connection.window.showErrorMessage(message);
626 exports.ErrorMessageTracker = ErrorMessageTracker;
627 class RemoteConsoleImpl {
630 rawAttach(connection) {
631 this._rawConnection = connection;
634 this._connection = connection;
637 if (!this._connection) {
638 throw new Error('Remote is not attached to a connection yet.');
640 return this._connection;
642 fillServerCapabilities(_capabilities) {
644 initialize(_capabilities) {
647 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
650 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
653 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
656 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
658 send(type, message) {
659 if (this._rawConnection) {
660 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
664 class _RemoteWindowImpl {
668 this._connection = connection;
671 if (!this._connection) {
672 throw new Error('Remote is not attached to a connection yet.');
674 return this._connection;
676 initialize(_capabilities) {
678 fillServerCapabilities(_capabilities) {
680 showErrorMessage(message, ...actions) {
681 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
682 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
684 showWarningMessage(message, ...actions) {
685 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
686 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
688 showInformationMessage(message, ...actions) {
689 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
690 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
693 const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
694 var BulkRegistration;
695 (function (BulkRegistration) {
697 * Creates a new bulk registration.
698 * @return an empty bulk registration.
701 return new BulkRegistrationImpl();
703 BulkRegistration.create = create;
704 })(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
705 class BulkRegistrationImpl {
707 this._registrations = [];
708 this._registered = new Set();
710 add(type, registerOptions) {
711 const method = Is.string(type) ? type : type.method;
712 if (this._registered.has(method)) {
713 throw new Error(`${method} is already added to this registration`);
715 const id = UUID.generateUuid();
716 this._registrations.push({
719 registerOptions: registerOptions || {}
721 this._registered.add(method);
723 asRegistrationParams() {
725 registrations: this._registrations
729 var BulkUnregistration;
730 (function (BulkUnregistration) {
732 return new BulkUnregistrationImpl(undefined, []);
734 BulkUnregistration.create = create;
735 })(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
736 class BulkUnregistrationImpl {
737 constructor(_connection, unregistrations) {
738 this._connection = _connection;
739 this._unregistrations = new Map();
740 unregistrations.forEach(unregistration => {
741 this._unregistrations.set(unregistration.method, unregistration);
745 return !!this._connection;
748 this._connection = connection;
750 add(unregistration) {
751 this._unregistrations.set(unregistration.method, unregistration);
754 let unregistrations = [];
755 for (let unregistration of this._unregistrations.values()) {
756 unregistrations.push(unregistration);
759 unregisterations: unregistrations
761 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
762 this._connection.console.info(`Bulk unregistration failed.`);
766 const method = Is.string(arg) ? arg : arg.method;
767 const unregistration = this._unregistrations.get(method);
768 if (!unregistration) {
772 unregisterations: [unregistration]
774 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
775 this._unregistrations.delete(method);
777 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
782 class RemoteClientImpl {
784 this._connection = connection;
787 if (!this._connection) {
788 throw new Error('Remote is not attached to a connection yet.');
790 return this._connection;
792 initialize(_capabilities) {
794 fillServerCapabilities(_capabilities) {
796 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
797 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
798 return this.registerMany(typeOrRegistrations);
800 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
801 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
804 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
807 registerSingle1(unregistration, type, registerOptions) {
808 const method = Is.string(type) ? type : type.method;
809 const id = UUID.generateUuid();
811 registrations: [{ id, method, registerOptions: registerOptions || {} }]
813 if (!unregistration.isAttached) {
814 unregistration.attach(this.connection);
816 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
817 unregistration.add({ id: id, method: method });
818 return unregistration;
820 this.connection.console.info(`Registering request handler for ${method} failed.`);
821 return Promise.reject(_error);
824 registerSingle2(type, registerOptions) {
825 const method = Is.string(type) ? type : type.method;
826 const id = UUID.generateUuid();
828 registrations: [{ id, method, registerOptions: registerOptions || {} }]
830 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
831 return vscode_languageserver_protocol_1.Disposable.create(() => {
832 this.unregisterSingle(id, method);
835 this.connection.console.info(`Registering request handler for ${method} failed.`);
836 return Promise.reject(_error);
839 unregisterSingle(id, method) {
841 unregisterations: [{ id, method }]
843 return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
844 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
847 registerMany(registrations) {
848 let params = registrations.asRegistrationParams();
849 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
850 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
852 this.connection.console.info(`Bulk registration failed.`);
853 return Promise.reject(_error);
857 class _RemoteWorkspaceImpl {
861 this._connection = connection;
864 if (!this._connection) {
865 throw new Error('Remote is not attached to a connection yet.');
867 return this._connection;
869 initialize(_capabilities) {
871 fillServerCapabilities(_capabilities) {
873 applyEdit(paramOrEdit) {
874 function isApplyWorkspaceEditParams(value) {
875 return value && !!value.edit;
877 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
878 return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
881 const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
884 this._trace = vscode_languageserver_protocol_1.Trace.Off;
887 this._connection = connection;
890 if (!this._connection) {
891 throw new Error('Remote is not attached to a connection yet.');
893 return this._connection;
895 initialize(_capabilities) {
897 fillServerCapabilities(_capabilities) {
902 log(message, verbose) {
903 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
906 this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
908 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
912 class TelemetryImpl {
916 this._connection = connection;
919 if (!this._connection) {
920 throw new Error('Remote is not attached to a connection yet.');
922 return this._connection;
924 initialize(_capabilities) {
926 fillServerCapabilities(_capabilities) {
929 this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
932 class _LanguagesImpl {
936 this._connection = connection;
939 if (!this._connection) {
940 throw new Error('Remote is not attached to a connection yet.');
942 return this._connection;
944 initialize(_capabilities) {
946 fillServerCapabilities(_capabilities) {
948 attachWorkDoneProgress(params) {
949 return progress_1.attachWorkDone(this.connection, params);
951 attachPartialResultProgress(_type, params) {
952 return progress_1.attachPartialResult(this.connection, params);
955 exports._LanguagesImpl = _LanguagesImpl;
956 const LanguagesImpl = callHierarchy_1.CallHierarchyFeature(_LanguagesImpl);
957 function combineConsoleFeatures(one, two) {
958 return function (Base) {
959 return two(one(Base));
962 exports.combineConsoleFeatures = combineConsoleFeatures;
963 function combineTelemetryFeatures(one, two) {
964 return function (Base) {
965 return two(one(Base));
968 exports.combineTelemetryFeatures = combineTelemetryFeatures;
969 function combineTracerFeatures(one, two) {
970 return function (Base) {
971 return two(one(Base));
974 exports.combineTracerFeatures = combineTracerFeatures;
975 function combineClientFeatures(one, two) {
976 return function (Base) {
977 return two(one(Base));
980 exports.combineClientFeatures = combineClientFeatures;
981 function combineWindowFeatures(one, two) {
982 return function (Base) {
983 return two(one(Base));
986 exports.combineWindowFeatures = combineWindowFeatures;
987 function combineWorkspaceFeatures(one, two) {
988 return function (Base) {
989 return two(one(Base));
992 exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
993 function combineLanguagesFeatures(one, two) {
994 return function (Base) {
995 return two(one(Base));
998 exports.combineLanguagesFeatures = combineLanguagesFeatures;
999 function combineFeatures(one, two) {
1000 function combine(one, two, func) {
1002 return func(one, two);
1012 __brand: 'features',
1013 console: combine(one.console, two.console, combineConsoleFeatures),
1014 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
1015 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
1016 client: combine(one.client, two.client, combineClientFeatures),
1017 window: combine(one.window, two.window, combineWindowFeatures),
1018 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
1022 exports.combineFeatures = combineFeatures;
1023 function createConnection(connectionFactory, watchDog, factories) {
1024 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
1025 const connection = connectionFactory(logger);
1026 logger.rawAttach(connection);
1027 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
1028 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
1029 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
1030 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
1031 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
1032 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
1033 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
1034 function asPromise(value) {
1035 if (value instanceof Promise) {
1038 else if (Is.thenable(value)) {
1039 return new Promise((resolve, reject) => {
1040 value.then((resolved) => resolve(resolved), (error) => reject(error));
1044 return Promise.resolve(value);
1047 let shutdownHandler = undefined;
1048 let initializeHandler = undefined;
1049 let exitHandler = undefined;
1050 let protocolConnection = {
1051 listen: () => connection.listen(),
1052 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
1053 onRequest: (type, handler) => connection.onRequest(type, handler),
1054 sendNotification: (type, param) => {
1055 const method = Is.string(type) ? type : type.method;
1056 if (arguments.length === 1) {
1057 connection.sendNotification(method);
1060 connection.sendNotification(method, param);
1063 onNotification: (type, handler) => connection.onNotification(type, handler),
1064 onProgress: connection.onProgress,
1065 sendProgress: connection.sendProgress,
1066 onInitialize: (handler) => initializeHandler = handler,
1067 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
1068 onShutdown: (handler) => shutdownHandler = handler,
1069 onExit: (handler) => exitHandler = handler,
1070 get console() { return logger; },
1071 get telemetry() { return telemetry; },
1072 get tracer() { return tracer; },
1073 get client() { return client; },
1074 get window() { return remoteWindow; },
1075 get workspace() { return workspace; },
1076 get languages() { return languages; },
1077 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
1078 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
1079 __textDocumentSync: undefined,
1080 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
1081 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
1082 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
1083 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
1084 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
1085 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
1086 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
1087 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
1088 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1090 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
1091 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1093 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
1094 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
1095 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1097 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
1098 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1100 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
1101 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1103 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
1104 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1106 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
1107 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1109 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
1110 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1112 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
1113 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1115 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
1116 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1118 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
1119 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1121 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
1122 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1124 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
1125 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1127 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
1128 return handler(params, cancel);
1130 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
1131 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1133 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
1134 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1136 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
1137 return handler(params, cancel);
1139 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
1140 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1142 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
1143 return handler(params, cancel);
1145 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
1146 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1148 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
1149 return handler(params, cancel);
1151 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
1152 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1154 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
1155 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1157 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
1158 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1160 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
1161 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1163 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
1164 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1166 dispose: () => connection.dispose()
1168 for (let remote of allRemotes) {
1169 remote.attach(protocolConnection);
1171 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
1172 watchDog.initialize(params);
1173 if (Is.string(params.trace)) {
1174 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
1176 for (let remote of allRemotes) {
1177 remote.initialize(params.capabilities);
1179 if (initializeHandler) {
1180 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
1181 return asPromise(result).then((value) => {
1182 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
1187 result = { capabilities: {} };
1189 let capabilities = result.capabilities;
1190 if (!capabilities) {
1192 result.capabilities = capabilities;
1194 if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {
1195 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1197 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
1198 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1200 for (let remote of allRemotes) {
1201 remote.fillServerCapabilities(capabilities);
1207 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
1208 for (let remote of allRemotes) {
1209 remote.fillServerCapabilities(result.capabilities);
1214 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
1215 watchDog.shutdownReceived = true;
1216 if (shutdownHandler) {
1217 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
1223 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
1230 if (watchDog.shutdownReceived) {
1238 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
1239 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
1241 return protocolConnection;
1243 exports.createConnection = createConnection;
1244 //# sourceMappingURL=server.js.map
1248 /***/ (function(module, exports, __webpack_require__) {
1252 /* --------------------------------------------------------------------------------------------
1253 * Copyright (c) Microsoft Corporation. All rights reserved.
1254 * Licensed under the MIT License. See License.txt in the project root for license information.
1255 * ------------------------------------------------------------------------------------------ */
1256 function __export(m) {
1257 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1259 Object.defineProperty(exports, "__esModule", { value: true });
1260 const node_1 = __webpack_require__(40);
1261 __export(__webpack_require__(40));
1262 __export(__webpack_require__(56));
1263 function createProtocolConnection(input, output, logger, options) {
1264 return node_1.createMessageConnection(input, output, logger, options);
1266 exports.createProtocolConnection = createProtocolConnection;
1267 //# sourceMappingURL=main.js.map
1271 /***/ (function(module, exports, __webpack_require__) {
1274 /* --------------------------------------------------------------------------------------------
1275 * Copyright (c) Microsoft Corporation. All rights reserved.
1276 * Licensed under the MIT License. See License.txt in the project root for license information.
1277 * ----------------------------------------------------------------------------------------- */
1280 module.exports = __webpack_require__(41);
1284 /***/ (function(module, exports, __webpack_require__) {
1288 function __export(m) {
1289 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1291 Object.defineProperty(exports, "__esModule", { value: true });
1292 /* --------------------------------------------------------------------------------------------
1293 * Copyright (c) Microsoft Corporation. All rights reserved.
1294 * Licensed under the MIT License. See License.txt in the project root for license information.
1295 * ----------------------------------------------------------------------------------------- */
1296 const ril_1 = __webpack_require__(42);
1297 // Install the node runtime abstract.
1298 ril_1.default.install();
1299 const api_1 = __webpack_require__(46);
1300 const path = __webpack_require__(3);
1301 const os = __webpack_require__(14);
1302 const crypto_1 = __webpack_require__(15);
1303 const net_1 = __webpack_require__(16);
1304 __export(__webpack_require__(46));
1305 class IPCMessageReader extends api_1.AbstractMessageReader {
1306 constructor(process) {
1308 this.process = process;
1309 let eventEmitter = this.process;
1310 eventEmitter.on('error', (error) => this.fireError(error));
1311 eventEmitter.on('close', () => this.fireClose());
1314 this.process.on('message', callback);
1315 return api_1.Disposable.create(() => this.process.off('message', callback));
1318 exports.IPCMessageReader = IPCMessageReader;
1319 class IPCMessageWriter extends api_1.AbstractMessageWriter {
1320 constructor(process) {
1322 this.process = process;
1323 this.errorCount = 0;
1324 let eventEmitter = this.process;
1325 eventEmitter.on('error', (error) => this.fireError(error));
1326 eventEmitter.on('close', () => this.fireClose);
1330 if (typeof this.process.send === 'function') {
1331 this.process.send(msg, undefined, undefined, (error) => {
1334 this.handleError(error, msg);
1337 this.errorCount = 0;
1341 return Promise.resolve();
1344 this.handleError(error, msg);
1345 return Promise.reject(error);
1348 handleError(error, msg) {
1350 this.fireError(error, msg, this.errorCount);
1353 exports.IPCMessageWriter = IPCMessageWriter;
1354 class SocketMessageReader extends api_1.ReadableStreamMessageReader {
1355 constructor(socket, encoding = 'utf-8') {
1356 super(ril_1.default().stream.asReadableStream(socket), encoding);
1359 exports.SocketMessageReader = SocketMessageReader;
1360 class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
1361 constructor(socket, options) {
1362 super(ril_1.default().stream.asWritableStream(socket), options);
1363 this.socket = socket;
1367 this.socket.destroy();
1370 exports.SocketMessageWriter = SocketMessageWriter;
1371 class StreamMessageReader extends api_1.ReadableStreamMessageReader {
1372 constructor(readble, encoding) {
1373 super(ril_1.default().stream.asReadableStream(readble), encoding);
1376 exports.StreamMessageReader = StreamMessageReader;
1377 class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
1378 constructor(writable, options) {
1379 super(ril_1.default().stream.asWritableStream(writable), options);
1382 exports.StreamMessageWriter = StreamMessageWriter;
1383 function generateRandomPipeName() {
1384 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
1385 if (process.platform === 'win32') {
1386 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
1389 // Mac/Unix: use socket file
1390 return path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
1393 exports.generateRandomPipeName = generateRandomPipeName;
1394 function createClientPipeTransport(pipeName, encoding = 'utf-8') {
1396 const connected = new Promise((resolve, _reject) => {
1397 connectResolve = resolve;
1399 return new Promise((resolve, reject) => {
1400 let server = net_1.createServer((socket) => {
1403 new SocketMessageReader(socket, encoding),
1404 new SocketMessageWriter(socket, encoding)
1407 server.on('error', reject);
1408 server.listen(pipeName, () => {
1409 server.removeListener('error', reject);
1411 onConnected: () => { return connected; }
1416 exports.createClientPipeTransport = createClientPipeTransport;
1417 function createServerPipeTransport(pipeName, encoding = 'utf-8') {
1418 const socket = net_1.createConnection(pipeName);
1420 new SocketMessageReader(socket, encoding),
1421 new SocketMessageWriter(socket, encoding)
1424 exports.createServerPipeTransport = createServerPipeTransport;
1425 function createClientSocketTransport(port, encoding = 'utf-8') {
1427 const connected = new Promise((resolve, _reject) => {
1428 connectResolve = resolve;
1430 return new Promise((resolve, reject) => {
1431 const server = net_1.createServer((socket) => {
1434 new SocketMessageReader(socket, encoding),
1435 new SocketMessageWriter(socket, encoding)
1438 server.on('error', reject);
1439 server.listen(port, '127.0.0.1', () => {
1440 server.removeListener('error', reject);
1442 onConnected: () => { return connected; }
1447 exports.createClientSocketTransport = createClientSocketTransport;
1448 function createServerSocketTransport(port, encoding = 'utf-8') {
1449 const socket = net_1.createConnection(port, '127.0.0.1');
1451 new SocketMessageReader(socket, encoding),
1452 new SocketMessageWriter(socket, encoding)
1455 exports.createServerSocketTransport = createServerSocketTransport;
1456 function isMessageReader(value) {
1457 return value.listen !== undefined && value.read === undefined;
1459 function isMessageWriter(value) {
1460 return value.write !== undefined && value.end === undefined;
1462 function createMessageConnection(input, output, logger, options) {
1464 logger = api_1.NullLogger;
1466 const reader = isMessageReader(input) ? input : new StreamMessageReader(input);
1467 const writer = isMessageWriter(output) ? output : new StreamMessageWriter(output);
1468 if (api_1.ConnectionStrategy.is(options)) {
1469 options = { connectionStrategy: options };
1471 return api_1.createMessageConnection(reader, writer, logger, options);
1473 exports.createMessageConnection = createMessageConnection;
1474 //# sourceMappingURL=main.js.map
1478 /***/ (function(module, exports, __webpack_require__) {
1482 /* --------------------------------------------------------------------------------------------
1483 * Copyright (c) Microsoft Corporation. All rights reserved.
1484 * Licensed under the MIT License. See License.txt in the project root for license information.
1485 * ------------------------------------------------------------------------------------------ */
1486 Object.defineProperty(exports, "__esModule", { value: true });
1487 const ral_1 = __webpack_require__(43);
1488 const disposable_1 = __webpack_require__(44);
1489 const util_1 = __webpack_require__(45);
1490 const DefaultSize = 8192;
1491 const CR = Buffer.from('\r', 'ascii')[0];
1492 const LF = Buffer.from('\n', 'ascii')[0];
1493 const CRLF = '\r\n';
1494 class MessageBuffer {
1495 constructor(encoding = 'utf-8') {
1496 this._encoding = encoding;
1498 this.buffer = Buffer.allocUnsafe(DefaultSize);
1501 return this._encoding;
1505 if (typeof chunk === 'string') {
1506 toAppend = Buffer.from(chunk, this._encoding);
1511 if (this.buffer.length - this.index >= toAppend.length) {
1512 this.buffer.set(toAppend, this.index);
1515 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
1516 if (this.index === 0) {
1517 this.buffer = Buffer.allocUnsafe(newSize);
1518 this.buffer.set(toAppend);
1521 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
1524 this.index += toAppend.length;
1528 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
1531 // No header / body separator found (e.g CRLFCRLF)
1532 if (current + 3 >= this.index) {
1535 const result = new Map();
1536 const headers = this.buffer.toString('ascii', 0, current).split(CRLF);
1537 headers.forEach((header) => {
1538 let index = header.indexOf(':');
1540 throw new Error('Message header must separate key and value using :');
1542 let key = header.substr(0, index);
1543 let value = header.substr(index + 1).trim();
1544 result.set(key, value);
1546 let nextStart = current + 4;
1547 this.buffer = this.buffer.slice(nextStart);
1548 this.index = this.index - nextStart;
1551 tryReadBody(length) {
1552 if (this.index < length) {
1555 const result = Buffer.alloc(length);
1556 this.buffer.copy(result, 0, 0, length);
1557 const nextStart = length;
1558 this.buffer.copy(this.buffer, 0, nextStart);
1559 this.index = this.index - nextStart;
1562 get numberOfBytes() {
1566 class ReadableStreamWrapper {
1567 constructor(stream) {
1568 this.stream = stream;
1571 this.stream.on('close', listener);
1572 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
1575 this.stream.on('error', listener);
1576 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
1579 this.stream.on('end', listener);
1580 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
1583 this.stream.on('data', listener);
1584 return disposable_1.Disposable.create(() => this.stream.off('data', listener));
1587 class WritableStreamWrapper {
1588 constructor(stream) {
1589 this.stream = stream;
1592 this.stream.on('close', listener);
1593 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
1596 this.stream.on('error', listener);
1597 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
1600 this.stream.on('end', listener);
1601 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
1603 write(data, encoding) {
1604 return new Promise((resolve, reject) => {
1605 const callback = (error) => {
1606 if (error === undefined || error === null) {
1613 if (typeof data === 'string') {
1614 this.stream.write(data, encoding, callback);
1617 this.stream.write(data, callback);
1625 const _ril = Object.freeze({
1626 messageBuffer: Object.freeze({
1627 create: (encoding) => new MessageBuffer(encoding)
1629 applicationJson: Object.freeze({
1630 encoder: Object.freeze({
1631 name: 'application/json',
1632 encode: (msg, options) => {
1633 return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
1636 decoder: Object.freeze({
1637 name: 'application/json',
1638 decode: (buffer, options) => {
1639 if (buffer instanceof Buffer) {
1640 return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
1643 return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
1648 stream: Object.freeze({
1649 asReadableStream: (socket) => new ReadableStreamWrapper(socket),
1650 asWritableStream: (socket) => new WritableStreamWrapper(socket)
1653 timer: Object.freeze({
1654 setTimeout(callback, ms, ...args) {
1655 return setTimeout(callback, ms, ...args);
1657 clearTimeout(handle) {
1658 clearTimeout(handle);
1660 setImmediate(callback, ...args) {
1661 return setImmediate(callback, ...args);
1663 clearImmediate(handle) {
1664 clearImmediate(handle);
1672 function install() {
1673 ral_1.default.install(_ril);
1675 RIL.install = install;
1676 })(RIL || (RIL = {}));
1677 exports.default = RIL;
1678 //# sourceMappingURL=ril.js.map
1682 /***/ (function(module, exports, __webpack_require__) {
1686 /* --------------------------------------------------------------------------------------------
1687 * Copyright (c) Microsoft Corporation. All rights reserved.
1688 * Licensed under the MIT License. See License.txt in the project root for license information.
1689 * ------------------------------------------------------------------------------------------ */
1690 Object.defineProperty(exports, "__esModule", { value: true });
1693 if (_ral === undefined) {
1694 throw new Error(`No runtime abstraction layer installed`);
1699 function install(ral) {
1700 if (ral === undefined) {
1701 throw new Error(`No runtime abstraction layer provided`);
1705 RAL.install = install;
1706 })(RAL || (RAL = {}));
1707 exports.default = RAL;
1708 //# sourceMappingURL=ral.js.map
1712 /***/ (function(module, exports, __webpack_require__) {
1716 /*---------------------------------------------------------------------------------------------
1717 * Copyright (c) Microsoft Corporation. All rights reserved.
1718 * Licensed under the MIT License. See License.txt in the project root for license information.
1719 *--------------------------------------------------------------------------------------------*/
1720 Object.defineProperty(exports, "__esModule", { value: true });
1722 (function (Disposable) {
1723 function create(func) {
1728 Disposable.create = create;
1729 })(Disposable = exports.Disposable || (exports.Disposable = {}));
1730 //# sourceMappingURL=disposable.js.map
1734 /***/ (function(module, exports) {
1736 module.exports = require("util");
1740 /***/ (function(module, exports, __webpack_require__) {
1744 /* --------------------------------------------------------------------------------------------
1745 * Copyright (c) Microsoft Corporation. All rights reserved.
1746 * Licensed under the MIT License. See License.txt in the project root for license information.
1747 * ------------------------------------------------------------------------------------------ */
1748 /// <reference path="../../typings/thenable.d.ts" />
1749 Object.defineProperty(exports, "__esModule", { value: true });
1750 const messages_1 = __webpack_require__(47);
1751 exports.RequestType = messages_1.RequestType;
1752 exports.RequestType0 = messages_1.RequestType0;
1753 exports.RequestType1 = messages_1.RequestType1;
1754 exports.RequestType2 = messages_1.RequestType2;
1755 exports.RequestType3 = messages_1.RequestType3;
1756 exports.RequestType4 = messages_1.RequestType4;
1757 exports.RequestType5 = messages_1.RequestType5;
1758 exports.RequestType6 = messages_1.RequestType6;
1759 exports.RequestType7 = messages_1.RequestType7;
1760 exports.RequestType8 = messages_1.RequestType8;
1761 exports.RequestType9 = messages_1.RequestType9;
1762 exports.ResponseError = messages_1.ResponseError;
1763 exports.ErrorCodes = messages_1.ErrorCodes;
1764 exports.NotificationType = messages_1.NotificationType;
1765 exports.NotificationType0 = messages_1.NotificationType0;
1766 exports.NotificationType1 = messages_1.NotificationType1;
1767 exports.NotificationType2 = messages_1.NotificationType2;
1768 exports.NotificationType3 = messages_1.NotificationType3;
1769 exports.NotificationType4 = messages_1.NotificationType4;
1770 exports.NotificationType5 = messages_1.NotificationType5;
1771 exports.NotificationType6 = messages_1.NotificationType6;
1772 exports.NotificationType7 = messages_1.NotificationType7;
1773 exports.NotificationType8 = messages_1.NotificationType8;
1774 exports.NotificationType9 = messages_1.NotificationType9;
1775 const disposable_1 = __webpack_require__(44);
1776 exports.Disposable = disposable_1.Disposable;
1777 const events_1 = __webpack_require__(49);
1778 exports.Event = events_1.Event;
1779 exports.Emitter = events_1.Emitter;
1780 const cancellation_1 = __webpack_require__(50);
1781 exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1782 exports.CancellationToken = cancellation_1.CancellationToken;
1783 const messageReader_1 = __webpack_require__(51);
1784 exports.MessageReader = messageReader_1.MessageReader;
1785 exports.AbstractMessageReader = messageReader_1.AbstractMessageReader;
1786 exports.ReadableStreamMessageReader = messageReader_1.ReadableStreamMessageReader;
1787 const messageWriter_1 = __webpack_require__(52);
1788 exports.MessageWriter = messageWriter_1.MessageWriter;
1789 exports.AbstractMessageWriter = messageWriter_1.AbstractMessageWriter;
1790 exports.WriteableStreamMessageWriter = messageWriter_1.WriteableStreamMessageWriter;
1791 const connection_1 = __webpack_require__(54);
1792 exports.ConnectionStrategy = connection_1.ConnectionStrategy;
1793 exports.ConnectionOptions = connection_1.ConnectionOptions;
1794 exports.NullLogger = connection_1.NullLogger;
1795 exports.createMessageConnection = connection_1.createMessageConnection;
1796 exports.ProgressType = connection_1.ProgressType;
1797 exports.Trace = connection_1.Trace;
1798 exports.TraceFormat = connection_1.TraceFormat;
1799 exports.SetTraceNotification = connection_1.SetTraceNotification;
1800 exports.LogTraceNotification = connection_1.LogTraceNotification;
1801 exports.ConnectionErrors = connection_1.ConnectionErrors;
1802 exports.ConnectionError = connection_1.ConnectionError;
1803 exports.CancellationReceiverStrategy = connection_1.CancellationReceiverStrategy;
1804 exports.CancellationSenderStrategy = connection_1.CancellationSenderStrategy;
1805 exports.CancellationStrategy = connection_1.CancellationStrategy;
1806 const ral_1 = __webpack_require__(43);
1807 exports.RAL = ral_1.default;
1808 //# sourceMappingURL=api.js.map
1812 /***/ (function(module, exports, __webpack_require__) {
1816 /* --------------------------------------------------------------------------------------------
1817 * Copyright (c) Microsoft Corporation. All rights reserved.
1818 * Licensed under the MIT License. See License.txt in the project root for license information.
1819 * ------------------------------------------------------------------------------------------ */
1820 Object.defineProperty(exports, "__esModule", { value: true });
1821 const is = __webpack_require__(48);
1823 * Predefined error codes.
1826 (function (ErrorCodes) {
1827 // Defined by JSON RPC
1828 ErrorCodes.ParseError = -32700;
1829 ErrorCodes.InvalidRequest = -32600;
1830 ErrorCodes.MethodNotFound = -32601;
1831 ErrorCodes.InvalidParams = -32602;
1832 ErrorCodes.InternalError = -32603;
1833 ErrorCodes.serverErrorStart = -32099;
1834 ErrorCodes.serverErrorEnd = -32000;
1835 ErrorCodes.ServerNotInitialized = -32002;
1836 ErrorCodes.UnknownErrorCode = -32001;
1837 // Defined by the protocol.
1838 ErrorCodes.RequestCancelled = -32800;
1839 ErrorCodes.ContentModified = -32801;
1840 // Defined by VSCode library.
1841 ErrorCodes.MessageWriteError = 1;
1842 ErrorCodes.MessageReadError = 2;
1843 })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
1845 * An error object return in a response in case a request
1848 class ResponseError extends Error {
1849 constructor(code, message, data) {
1851 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
1853 Object.setPrototypeOf(this, ResponseError.prototype);
1858 message: this.message,
1863 exports.ResponseError = ResponseError;
1865 * An abstract implementation of a MessageType.
1867 class AbstractMessageSignature {
1868 constructor(_method, _numberOfParams) {
1869 this._method = _method;
1870 this._numberOfParams = _numberOfParams;
1873 return this._method;
1875 get numberOfParams() {
1876 return this._numberOfParams;
1879 exports.AbstractMessageSignature = AbstractMessageSignature;
1881 * Classes to type request response pairs
1883 * The type parameter RO will be removed in the next major version
1884 * of the JSON RPC library since it is a LSP concept and doesn't
1885 * belong here. For now it is tagged as default never.
1887 class RequestType0 extends AbstractMessageSignature {
1888 constructor(method) {
1892 exports.RequestType0 = RequestType0;
1893 class RequestType extends AbstractMessageSignature {
1894 constructor(method) {
1898 exports.RequestType = RequestType;
1899 class RequestType1 extends AbstractMessageSignature {
1900 constructor(method) {
1904 exports.RequestType1 = RequestType1;
1905 class RequestType2 extends AbstractMessageSignature {
1906 constructor(method) {
1910 exports.RequestType2 = RequestType2;
1911 class RequestType3 extends AbstractMessageSignature {
1912 constructor(method) {
1916 exports.RequestType3 = RequestType3;
1917 class RequestType4 extends AbstractMessageSignature {
1918 constructor(method) {
1922 exports.RequestType4 = RequestType4;
1923 class RequestType5 extends AbstractMessageSignature {
1924 constructor(method) {
1928 exports.RequestType5 = RequestType5;
1929 class RequestType6 extends AbstractMessageSignature {
1930 constructor(method) {
1934 exports.RequestType6 = RequestType6;
1935 class RequestType7 extends AbstractMessageSignature {
1936 constructor(method) {
1940 exports.RequestType7 = RequestType7;
1941 class RequestType8 extends AbstractMessageSignature {
1942 constructor(method) {
1946 exports.RequestType8 = RequestType8;
1947 class RequestType9 extends AbstractMessageSignature {
1948 constructor(method) {
1952 exports.RequestType9 = RequestType9;
1954 * The type parameter RO will be removed in the next major version
1955 * of the JSON RPC library since it is a LSP concept and doesn't
1956 * belong here. For now it is tagged as default never.
1958 class NotificationType extends AbstractMessageSignature {
1959 constructor(method) {
1964 exports.NotificationType = NotificationType;
1965 class NotificationType0 extends AbstractMessageSignature {
1966 constructor(method) {
1970 exports.NotificationType0 = NotificationType0;
1971 class NotificationType1 extends AbstractMessageSignature {
1972 constructor(method) {
1976 exports.NotificationType1 = NotificationType1;
1977 class NotificationType2 extends AbstractMessageSignature {
1978 constructor(method) {
1982 exports.NotificationType2 = NotificationType2;
1983 class NotificationType3 extends AbstractMessageSignature {
1984 constructor(method) {
1988 exports.NotificationType3 = NotificationType3;
1989 class NotificationType4 extends AbstractMessageSignature {
1990 constructor(method) {
1994 exports.NotificationType4 = NotificationType4;
1995 class NotificationType5 extends AbstractMessageSignature {
1996 constructor(method) {
2000 exports.NotificationType5 = NotificationType5;
2001 class NotificationType6 extends AbstractMessageSignature {
2002 constructor(method) {
2006 exports.NotificationType6 = NotificationType6;
2007 class NotificationType7 extends AbstractMessageSignature {
2008 constructor(method) {
2012 exports.NotificationType7 = NotificationType7;
2013 class NotificationType8 extends AbstractMessageSignature {
2014 constructor(method) {
2018 exports.NotificationType8 = NotificationType8;
2019 class NotificationType9 extends AbstractMessageSignature {
2020 constructor(method) {
2024 exports.NotificationType9 = NotificationType9;
2026 * Tests if the given message is a request message
2028 function isRequestMessage(message) {
2029 const candidate = message;
2030 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2032 exports.isRequestMessage = isRequestMessage;
2034 * Tests if the given message is a notification message
2036 function isNotificationMessage(message) {
2037 const candidate = message;
2038 return candidate && is.string(candidate.method) && message.id === void 0;
2040 exports.isNotificationMessage = isNotificationMessage;
2042 * Tests if the given message is a response message
2044 function isResponseMessage(message) {
2045 const candidate = message;
2046 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2048 exports.isResponseMessage = isResponseMessage;
2049 //# sourceMappingURL=messages.js.map
2053 /***/ (function(module, exports, __webpack_require__) {
2057 /* --------------------------------------------------------------------------------------------
2058 * Copyright (c) Microsoft Corporation. All rights reserved.
2059 * Licensed under the MIT License. See License.txt in the project root for license information.
2060 * ------------------------------------------------------------------------------------------ */
2061 Object.defineProperty(exports, "__esModule", { value: true });
2062 function boolean(value) {
2063 return value === true || value === false;
2065 exports.boolean = boolean;
2066 function string(value) {
2067 return typeof value === 'string' || value instanceof String;
2069 exports.string = string;
2070 function number(value) {
2071 return typeof value === 'number' || value instanceof Number;
2073 exports.number = number;
2074 function error(value) {
2075 return value instanceof Error;
2077 exports.error = error;
2078 function func(value) {
2079 return typeof value === 'function';
2081 exports.func = func;
2082 function array(value) {
2083 return Array.isArray(value);
2085 exports.array = array;
2086 function stringArray(value) {
2087 return array(value) && value.every(elem => string(elem));
2089 exports.stringArray = stringArray;
2090 //# sourceMappingURL=is.js.map
2094 /***/ (function(module, exports, __webpack_require__) {
2098 /* --------------------------------------------------------------------------------------------
2099 * Copyright (c) Microsoft Corporation. All rights reserved.
2100 * Licensed under the MIT License. See License.txt in the project root for license information.
2101 * ------------------------------------------------------------------------------------------ */
2102 Object.defineProperty(exports, "__esModule", { value: true });
2103 const ral_1 = __webpack_require__(43);
2106 const _disposable = { dispose() { } };
2107 Event.None = function () { return _disposable; };
2108 })(Event = exports.Event || (exports.Event = {}));
2109 class CallbackList {
2110 add(callback, context = null, bucket) {
2111 if (!this._callbacks) {
2112 this._callbacks = [];
2113 this._contexts = [];
2115 this._callbacks.push(callback);
2116 this._contexts.push(context);
2117 if (Array.isArray(bucket)) {
2118 bucket.push({ dispose: () => this.remove(callback, context) });
2121 remove(callback, context = null) {
2122 if (!this._callbacks) {
2125 let foundCallbackWithDifferentContext = false;
2126 for (let i = 0, len = this._callbacks.length; i < len; i++) {
2127 if (this._callbacks[i] === callback) {
2128 if (this._contexts[i] === context) {
2129 // callback & context match => remove it
2130 this._callbacks.splice(i, 1);
2131 this._contexts.splice(i, 1);
2135 foundCallbackWithDifferentContext = true;
2139 if (foundCallbackWithDifferentContext) {
2140 throw new Error('When adding a listener with a context, you should remove it with the same context');
2144 if (!this._callbacks) {
2147 const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2148 for (let i = 0, len = callbacks.length; i < len; i++) {
2150 ret.push(callbacks[i].apply(contexts[i], args));
2153 // eslint-disable-next-line no-console
2154 ral_1.default().console.error(e);
2160 return !this._callbacks || this._callbacks.length === 0;
2163 this._callbacks = undefined;
2164 this._contexts = undefined;
2168 constructor(_options) {
2169 this._options = _options;
2172 * For the public to allow to subscribe
2173 * to events from this Emitter
2177 this._event = (listener, thisArgs, disposables) => {
2178 if (!this._callbacks) {
2179 this._callbacks = new CallbackList();
2181 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2182 this._options.onFirstListenerAdd(this);
2184 this._callbacks.add(listener, thisArgs);
2187 if (!this._callbacks) {
2188 // disposable is disposed after emitter is disposed.
2191 this._callbacks.remove(listener, thisArgs);
2192 result.dispose = Emitter._noop;
2193 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2194 this._options.onLastListenerRemove(this);
2198 if (Array.isArray(disposables)) {
2199 disposables.push(result);
2207 * To be kept private to fire an event to
2211 if (this._callbacks) {
2212 this._callbacks.invoke.call(this._callbacks, event);
2216 if (this._callbacks) {
2217 this._callbacks.dispose();
2218 this._callbacks = undefined;
2222 exports.Emitter = Emitter;
2223 Emitter._noop = function () { };
2224 //# sourceMappingURL=events.js.map
2228 /***/ (function(module, exports, __webpack_require__) {
2232 /*---------------------------------------------------------------------------------------------
2233 * Copyright (c) Microsoft Corporation. All rights reserved.
2234 * Licensed under the MIT License. See License.txt in the project root for license information.
2235 *--------------------------------------------------------------------------------------------*/
2236 Object.defineProperty(exports, "__esModule", { value: true });
2237 const ral_1 = __webpack_require__(43);
2238 const Is = __webpack_require__(48);
2239 const events_1 = __webpack_require__(49);
2240 var CancellationToken;
2241 (function (CancellationToken) {
2242 CancellationToken.None = Object.freeze({
2243 isCancellationRequested: false,
2244 onCancellationRequested: events_1.Event.None
2246 CancellationToken.Cancelled = Object.freeze({
2247 isCancellationRequested: true,
2248 onCancellationRequested: events_1.Event.None
2250 function is(value) {
2251 const candidate = value;
2252 return candidate && (candidate === CancellationToken.None
2253 || candidate === CancellationToken.Cancelled
2254 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
2256 CancellationToken.is = is;
2257 })(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
2258 const shortcutEvent = Object.freeze(function (callback, context) {
2259 const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0);
2260 return { dispose() { ral_1.default().timer.clearTimeout(handle); } };
2262 class MutableToken {
2264 this._isCancelled = false;
2267 if (!this._isCancelled) {
2268 this._isCancelled = true;
2269 if (this._emitter) {
2270 this._emitter.fire(undefined);
2275 get isCancellationRequested() {
2276 return this._isCancelled;
2278 get onCancellationRequested() {
2279 if (this._isCancelled) {
2280 return shortcutEvent;
2282 if (!this._emitter) {
2283 this._emitter = new events_1.Emitter();
2285 return this._emitter.event;
2288 if (this._emitter) {
2289 this._emitter.dispose();
2290 this._emitter = undefined;
2294 class CancellationTokenSource {
2297 // be lazy and create the token only when
2299 this._token = new MutableToken();
2305 // save an object by returning the default
2306 // cancelled token when cancellation happens
2307 // before someone asks for the token
2308 this._token = CancellationToken.Cancelled;
2311 this._token.cancel();
2316 // ensure to initialize with an empty token if we had none
2317 this._token = CancellationToken.None;
2319 else if (this._token instanceof MutableToken) {
2321 this._token.dispose();
2325 exports.CancellationTokenSource = CancellationTokenSource;
2326 //# sourceMappingURL=cancellation.js.map
2330 /***/ (function(module, exports, __webpack_require__) {
2334 /* --------------------------------------------------------------------------------------------
2335 * Copyright (c) Microsoft Corporation. All rights reserved.
2336 * Licensed under the MIT License. See License.txt in the project root for license information.
2337 * ------------------------------------------------------------------------------------------ */
2338 Object.defineProperty(exports, "__esModule", { value: true });
2339 const ral_1 = __webpack_require__(43);
2340 const Is = __webpack_require__(48);
2341 const events_1 = __webpack_require__(49);
2343 (function (MessageReader) {
2344 function is(value) {
2345 let candidate = value;
2346 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2347 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2349 MessageReader.is = is;
2350 })(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2351 class AbstractMessageReader {
2353 this.errorEmitter = new events_1.Emitter();
2354 this.closeEmitter = new events_1.Emitter();
2355 this.partialMessageEmitter = new events_1.Emitter();
2358 this.errorEmitter.dispose();
2359 this.closeEmitter.dispose();
2362 return this.errorEmitter.event;
2365 this.errorEmitter.fire(this.asError(error));
2368 return this.closeEmitter.event;
2371 this.closeEmitter.fire(undefined);
2373 get onPartialMessage() {
2374 return this.partialMessageEmitter.event;
2376 firePartialMessage(info) {
2377 this.partialMessageEmitter.fire(info);
2380 if (error instanceof Error) {
2384 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2388 exports.AbstractMessageReader = AbstractMessageReader;
2389 var ResolvedMessageReaderOptions;
2390 (function (ResolvedMessageReaderOptions) {
2391 function fromOptions(options) {
2396 const contentDecoders = new Map();
2397 let contentTypeDecoder;
2398 const contentTypeDecoders = new Map();
2399 if (options === undefined || typeof options === 'string') {
2400 charset = options !== null && options !== void 0 ? options : 'utf-8';
2403 charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8';
2404 if (options.contentDecoder !== undefined) {
2405 contentDecoder = options.contentDecoder;
2406 contentDecoders.set(contentDecoder.name, contentDecoder);
2408 if (options.contentDecoders !== undefined) {
2409 for (const decoder of options.contentDecoders) {
2410 contentDecoders.set(decoder.name, decoder);
2413 if (options.contentTypeDecoder !== undefined) {
2414 contentTypeDecoder = options.contentTypeDecoder;
2415 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
2417 if (options.contentTypeDecoders !== undefined) {
2418 for (const decoder of options.contentTypeDecoders) {
2419 contentTypeDecoders.set(decoder.name, decoder);
2423 if (contentTypeDecoder === undefined) {
2424 contentTypeDecoder = ral_1.default().applicationJson.decoder;
2425 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
2427 return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
2429 ResolvedMessageReaderOptions.fromOptions = fromOptions;
2430 })(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
2431 class ReadableStreamMessageReader extends AbstractMessageReader {
2432 constructor(readable, options) {
2434 this.readable = readable;
2435 this.options = ResolvedMessageReaderOptions.fromOptions(options);
2436 this.buffer = ral_1.default().messageBuffer.create(this.options.charset);
2437 this._partialMessageTimeout = 10000;
2438 this.nextMessageLength = -1;
2439 this.messageToken = 0;
2441 set partialMessageTimeout(timeout) {
2442 this._partialMessageTimeout = timeout;
2444 get partialMessageTimeout() {
2445 return this._partialMessageTimeout;
2448 this.nextMessageLength = -1;
2449 this.messageToken = 0;
2450 this.partialMessageTimer = undefined;
2451 this.callback = callback;
2452 const result = this.readable.onData((data) => {
2455 this.readable.onError((error) => this.fireError(error));
2456 this.readable.onClose(() => this.fireClose());
2460 this.buffer.append(data);
2462 if (this.nextMessageLength === -1) {
2463 const headers = this.buffer.tryReadHeaders();
2467 const contentLength = headers.get('Content-Length');
2468 if (!contentLength) {
2469 throw new Error('Header must provide a Content-Length property.');
2471 const length = parseInt(contentLength);
2472 if (isNaN(length)) {
2473 throw new Error('Content-Length value must be a number.');
2475 this.nextMessageLength = length;
2477 const body = this.buffer.tryReadBody(this.nextMessageLength);
2478 if (body === undefined) {
2479 /** We haven't received the full message yet. */
2480 this.setPartialMessageTimer();
2483 this.clearPartialMessageTimer();
2484 this.nextMessageLength = -1;
2486 if (this.options.contentDecoder !== undefined) {
2487 p = this.options.contentDecoder.decode(body);
2490 p = Promise.resolve(body);
2493 this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
2496 this.fireError(error);
2499 this.fireError(error);
2503 clearPartialMessageTimer() {
2504 if (this.partialMessageTimer) {
2505 ral_1.default().timer.clearTimeout(this.partialMessageTimer);
2506 this.partialMessageTimer = undefined;
2509 setPartialMessageTimer() {
2510 this.clearPartialMessageTimer();
2511 if (this._partialMessageTimeout <= 0) {
2514 this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => {
2515 this.partialMessageTimer = undefined;
2516 if (token === this.messageToken) {
2517 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2518 this.setPartialMessageTimer();
2520 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2523 exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
2524 //# sourceMappingURL=messageReader.js.map
2528 /***/ (function(module, exports, __webpack_require__) {
2532 /* --------------------------------------------------------------------------------------------
2533 * Copyright (c) Microsoft Corporation. All rights reserved.
2534 * Licensed under the MIT License. See License.txt in the project root for license information.
2535 * ------------------------------------------------------------------------------------------ */
2536 Object.defineProperty(exports, "__esModule", { value: true });
2537 const ral_1 = __webpack_require__(43);
2538 const Is = __webpack_require__(48);
2539 const semaphore_1 = __webpack_require__(53);
2540 const events_1 = __webpack_require__(49);
2541 const ContentLength = 'Content-Length: ';
2542 const CRLF = '\r\n';
2544 (function (MessageWriter) {
2545 function is(value) {
2546 let candidate = value;
2547 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2548 Is.func(candidate.onError) && Is.func(candidate.write);
2550 MessageWriter.is = is;
2551 })(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2552 class AbstractMessageWriter {
2554 this.errorEmitter = new events_1.Emitter();
2555 this.closeEmitter = new events_1.Emitter();
2558 this.errorEmitter.dispose();
2559 this.closeEmitter.dispose();
2562 return this.errorEmitter.event;
2564 fireError(error, message, count) {
2565 this.errorEmitter.fire([this.asError(error), message, count]);
2568 return this.closeEmitter.event;
2571 this.closeEmitter.fire(undefined);
2574 if (error instanceof Error) {
2578 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2582 exports.AbstractMessageWriter = AbstractMessageWriter;
2583 var ResolvedMessageWriterOptions;
2584 (function (ResolvedMessageWriterOptions) {
2585 function fromOptions(options) {
2587 if (options === undefined || typeof options === 'string') {
2588 return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder };
2591 return { charset: (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: (_b = options.contentTypeEncoder) !== null && _b !== void 0 ? _b : ral_1.default().applicationJson.encoder };
2594 ResolvedMessageWriterOptions.fromOptions = fromOptions;
2595 })(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
2596 class WriteableStreamMessageWriter extends AbstractMessageWriter {
2597 constructor(writable, options) {
2599 this.writable = writable;
2600 this.options = ResolvedMessageWriterOptions.fromOptions(options);
2601 this.errorCount = 0;
2602 this.writeSemaphore = new semaphore_1.Semaphore(1);
2603 this.writable.onError((error) => this.fireError(error));
2604 this.writable.onClose(() => this.fireClose());
2607 const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
2608 if (this.options.contentEncoder !== undefined) {
2609 return this.options.contentEncoder.encode(buffer);
2615 return payload.then((buffer) => {
2617 headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
2619 return this.doWrite(msg, headers, buffer);
2621 this.fireError(error);
2625 doWrite(msg, headers, data) {
2626 return this.writeSemaphore.lock(async () => {
2628 await this.writable.write(headers.join(''), 'ascii');
2629 return this.writable.write(data);
2632 this.handleError(error, msg);
2636 handleError(error, msg) {
2638 this.fireError(error, msg, this.errorCount);
2641 exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
2642 //# sourceMappingURL=messageWriter.js.map
2646 /***/ (function(module, exports, __webpack_require__) {
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 Object.defineProperty(exports, "__esModule", { value: true });
2655 const ral_1 = __webpack_require__(43);
2657 constructor(capacity = 1) {
2658 if (capacity <= 0) {
2659 throw new Error('Capacity must be greater than 0');
2661 this._capacity = capacity;
2666 return new Promise((resolve, reject) => {
2667 this._waiting.push({ thunk, resolve, reject });
2672 return this._active;
2675 if (this._waiting.length === 0 || this._active === this._capacity) {
2678 ral_1.default().timer.setImmediate(() => this.doRunNext());
2681 if (this._waiting.length === 0 || this._active === this._capacity) {
2684 const next = this._waiting.shift();
2686 if (this._active > this._capacity) {
2687 throw new Error(`To many thunks active`);
2690 const result = next.thunk();
2691 if (result instanceof Promise) {
2692 result.then((value) => {
2694 next.resolve(value);
2704 next.resolve(result);
2715 exports.Semaphore = Semaphore;
2716 //# sourceMappingURL=semaphore.js.map
2720 /***/ (function(module, exports, __webpack_require__) {
2724 /* --------------------------------------------------------------------------------------------
2725 * Copyright (c) Microsoft Corporation. All rights reserved.
2726 * Licensed under the MIT License. See License.txt in the project root for license information.
2727 * ------------------------------------------------------------------------------------------ */
2728 Object.defineProperty(exports, "__esModule", { value: true });
2729 const ral_1 = __webpack_require__(43);
2730 const Is = __webpack_require__(48);
2731 const messages_1 = __webpack_require__(47);
2732 const linkedMap_1 = __webpack_require__(55);
2733 const events_1 = __webpack_require__(49);
2734 const cancellation_1 = __webpack_require__(50);
2735 var CancelNotification;
2736 (function (CancelNotification) {
2737 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
2738 })(CancelNotification || (CancelNotification = {}));
2739 var ProgressNotification;
2740 (function (ProgressNotification) {
2741 ProgressNotification.type = new messages_1.NotificationType('$/progress');
2742 })(ProgressNotification || (ProgressNotification = {}));
2743 class ProgressType {
2747 exports.ProgressType = ProgressType;
2748 exports.NullLogger = Object.freeze({
2756 Trace[Trace["Off"] = 0] = "Off";
2757 Trace[Trace["Messages"] = 1] = "Messages";
2758 Trace[Trace["Verbose"] = 2] = "Verbose";
2759 })(Trace = exports.Trace || (exports.Trace = {}));
2761 function fromString(value) {
2762 if (!Is.string(value)) {
2765 value = value.toLowerCase();
2770 return Trace.Messages;
2772 return Trace.Verbose;
2777 Trace.fromString = fromString;
2778 function toString(value) {
2782 case Trace.Messages:
2790 Trace.toString = toString;
2791 })(Trace = exports.Trace || (exports.Trace = {}));
2793 (function (TraceFormat) {
2794 TraceFormat["Text"] = "text";
2795 TraceFormat["JSON"] = "json";
2796 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
2797 (function (TraceFormat) {
2798 function fromString(value) {
2799 value = value.toLowerCase();
2800 if (value === 'json') {
2801 return TraceFormat.JSON;
2804 return TraceFormat.Text;
2807 TraceFormat.fromString = fromString;
2808 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
2809 var SetTraceNotification;
2810 (function (SetTraceNotification) {
2811 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
2812 })(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
2813 var LogTraceNotification;
2814 (function (LogTraceNotification) {
2815 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
2816 })(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
2817 var ConnectionErrors;
2818 (function (ConnectionErrors) {
2820 * The connection is closed.
2822 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
2824 * The connection got disposed.
2826 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
2828 * The connection is already in listening mode.
2830 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
2831 })(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
2832 class ConnectionError extends Error {
2833 constructor(code, message) {
2836 Object.setPrototypeOf(this, ConnectionError.prototype);
2839 exports.ConnectionError = ConnectionError;
2840 var ConnectionStrategy;
2841 (function (ConnectionStrategy) {
2842 function is(value) {
2843 const candidate = value;
2844 return candidate && Is.func(candidate.cancelUndispatched);
2846 ConnectionStrategy.is = is;
2847 })(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
2848 var CancellationReceiverStrategy;
2849 (function (CancellationReceiverStrategy) {
2850 CancellationReceiverStrategy.Message = Object.freeze({
2851 createCancellationTokenSource(_) {
2852 return new cancellation_1.CancellationTokenSource();
2855 function is(value) {
2856 const candidate = value;
2857 return candidate && Is.func(candidate.createCancellationTokenSource);
2859 CancellationReceiverStrategy.is = is;
2860 })(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
2861 var CancellationSenderStrategy;
2862 (function (CancellationSenderStrategy) {
2863 CancellationSenderStrategy.Message = Object.freeze({
2864 sendCancellation(conn, id) {
2865 conn.sendNotification(CancelNotification.type, { id });
2869 function is(value) {
2870 const candidate = value;
2871 return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
2873 CancellationSenderStrategy.is = is;
2874 })(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
2875 var CancellationStrategy;
2876 (function (CancellationStrategy) {
2877 CancellationStrategy.Message = Object.freeze({
2878 receiver: CancellationReceiverStrategy.Message,
2879 sender: CancellationSenderStrategy.Message
2881 function is(value) {
2882 const candidate = value;
2883 return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
2885 CancellationStrategy.is = is;
2886 })(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
2887 var ConnectionOptions;
2888 (function (ConnectionOptions) {
2889 function is(value) {
2890 const candidate = value;
2891 return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
2893 ConnectionOptions.is = is;
2894 })(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));
2895 var ConnectionState;
2896 (function (ConnectionState) {
2897 ConnectionState[ConnectionState["New"] = 1] = "New";
2898 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
2899 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
2900 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
2901 })(ConnectionState || (ConnectionState = {}));
2902 function createMessageConnection(messageReader, messageWriter, _logger, options) {
2903 const logger = _logger !== undefined ? _logger : exports.NullLogger;
2904 let sequenceNumber = 0;
2905 let notificationSquenceNumber = 0;
2906 let unknownResponseSquenceNumber = 0;
2907 const version = '2.0';
2908 let starRequestHandler = undefined;
2909 const requestHandlers = Object.create(null);
2910 let starNotificationHandler = undefined;
2911 const notificationHandlers = Object.create(null);
2912 const progressHandlers = new Map();
2914 let messageQueue = new linkedMap_1.LinkedMap();
2915 let responsePromises = Object.create(null);
2916 let requestTokens = Object.create(null);
2917 let trace = Trace.Off;
2918 let traceFormat = TraceFormat.Text;
2920 let state = ConnectionState.New;
2921 const errorEmitter = new events_1.Emitter();
2922 const closeEmitter = new events_1.Emitter();
2923 const unhandledNotificationEmitter = new events_1.Emitter();
2924 const unhandledProgressEmitter = new events_1.Emitter();
2925 const disposeEmitter = new events_1.Emitter();
2926 const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
2927 function createRequestQueueKey(id) {
2928 return 'req-' + id.toString();
2930 function createResponseQueueKey(id) {
2932 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
2935 return 'res-' + id.toString();
2938 function createNotificationQueueKey() {
2939 return 'not-' + (++notificationSquenceNumber).toString();
2941 function addMessageToQueue(queue, message) {
2942 if (messages_1.isRequestMessage(message)) {
2943 queue.set(createRequestQueueKey(message.id), message);
2945 else if (messages_1.isResponseMessage(message)) {
2946 queue.set(createResponseQueueKey(message.id), message);
2949 queue.set(createNotificationQueueKey(), message);
2952 function cancelUndispatched(_message) {
2955 function isListening() {
2956 return state === ConnectionState.Listening;
2958 function isClosed() {
2959 return state === ConnectionState.Closed;
2961 function isDisposed() {
2962 return state === ConnectionState.Disposed;
2964 function closeHandler() {
2965 if (state === ConnectionState.New || state === ConnectionState.Listening) {
2966 state = ConnectionState.Closed;
2967 closeEmitter.fire(undefined);
2969 // If the connection is disposed don't sent close events.
2971 function readErrorHandler(error) {
2972 errorEmitter.fire([error, undefined, undefined]);
2974 function writeErrorHandler(data) {
2975 errorEmitter.fire(data);
2977 messageReader.onClose(closeHandler);
2978 messageReader.onError(readErrorHandler);
2979 messageWriter.onClose(closeHandler);
2980 messageWriter.onError(writeErrorHandler);
2981 function triggerMessageQueue() {
2982 if (timer || messageQueue.size === 0) {
2985 timer = ral_1.default().timer.setImmediate(() => {
2987 processMessageQueue();
2990 function processMessageQueue() {
2991 if (messageQueue.size === 0) {
2994 const message = messageQueue.shift();
2996 if (messages_1.isRequestMessage(message)) {
2997 handleRequest(message);
2999 else if (messages_1.isNotificationMessage(message)) {
3000 handleNotification(message);
3002 else if (messages_1.isResponseMessage(message)) {
3003 handleResponse(message);
3006 handleInvalidMessage(message);
3010 triggerMessageQueue();
3013 const callback = (message) => {
3015 // We have received a cancellation message. Check if the message is still in the queue
3016 // and cancel it if allowed to do so.
3017 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
3018 const key = createRequestQueueKey(message.params.id);
3019 const toCancel = messageQueue.get(key);
3020 if (messages_1.isRequestMessage(toCancel)) {
3021 const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy;
3022 const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
3023 if (response && (response.error !== undefined || response.result !== undefined)) {
3024 messageQueue.delete(key);
3025 response.id = toCancel.id;
3026 traceSendingResponse(response, message.method, Date.now());
3027 messageWriter.write(response);
3032 addMessageToQueue(messageQueue, message);
3035 triggerMessageQueue();
3038 function handleRequest(requestMessage) {
3040 // we return here silently since we fired an event when the
3041 // connection got disposed.
3044 function reply(resultOrError, method, startTime) {
3047 id: requestMessage.id
3049 if (resultOrError instanceof messages_1.ResponseError) {
3050 message.error = resultOrError.toJson();
3053 message.result = resultOrError === undefined ? null : resultOrError;
3055 traceSendingResponse(message, method, startTime);
3056 messageWriter.write(message);
3058 function replyError(error, method, startTime) {
3061 id: requestMessage.id,
3062 error: error.toJson()
3064 traceSendingResponse(message, method, startTime);
3065 messageWriter.write(message);
3067 function replySuccess(result, method, startTime) {
3068 // The JSON RPC defines that a response must either have a result or an error
3069 // So we can't treat undefined as a valid response result.
3070 if (result === undefined) {
3075 id: requestMessage.id,
3078 traceSendingResponse(message, method, startTime);
3079 messageWriter.write(message);
3081 traceReceivedRequest(requestMessage);
3082 const element = requestHandlers[requestMessage.method];
3086 type = element.type;
3087 requestHandler = element.handler;
3089 const startTime = Date.now();
3090 if (requestHandler || starRequestHandler) {
3091 const tokenKey = String(requestMessage.id);
3092 const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
3093 requestTokens[tokenKey] = cancellationSource;
3096 if (requestMessage.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
3097 handlerResult = requestHandler
3098 ? requestHandler(cancellationSource.token)
3099 : starRequestHandler(requestMessage.method, cancellationSource.token);
3101 else if (Is.array(requestMessage.params) && (type === undefined || type.numberOfParams > 1)) {
3102 handlerResult = requestHandler
3103 ? requestHandler(...requestMessage.params, cancellationSource.token)
3104 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
3107 handlerResult = requestHandler
3108 ? requestHandler(requestMessage.params, cancellationSource.token)
3109 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
3111 const promise = handlerResult;
3112 if (!handlerResult) {
3113 delete requestTokens[tokenKey];
3114 replySuccess(handlerResult, requestMessage.method, startTime);
3116 else if (promise.then) {
3117 promise.then((resultOrError) => {
3118 delete requestTokens[tokenKey];
3119 reply(resultOrError, requestMessage.method, startTime);
3121 delete requestTokens[tokenKey];
3122 if (error instanceof messages_1.ResponseError) {
3123 replyError(error, requestMessage.method, startTime);
3125 else if (error && Is.string(error.message)) {
3126 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
3129 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
3134 delete requestTokens[tokenKey];
3135 reply(handlerResult, requestMessage.method, startTime);
3139 delete requestTokens[tokenKey];
3140 if (error instanceof messages_1.ResponseError) {
3141 reply(error, requestMessage.method, startTime);
3143 else if (error && Is.string(error.message)) {
3144 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
3147 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
3152 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
3155 function handleResponse(responseMessage) {
3157 // See handle request.
3160 if (responseMessage.id === null) {
3161 if (responseMessage.error) {
3162 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
3165 logger.error(`Received response message without id. No further error information provided.`);
3169 const key = String(responseMessage.id);
3170 const responsePromise = responsePromises[key];
3171 traceReceivedResponse(responseMessage, responsePromise);
3172 if (responsePromise) {
3173 delete responsePromises[key];
3175 if (responseMessage.error) {
3176 const error = responseMessage.error;
3177 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
3179 else if (responseMessage.result !== undefined) {
3180 responsePromise.resolve(responseMessage.result);
3183 throw new Error('Should never happen.');
3187 if (error.message) {
3188 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
3191 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
3197 function handleNotification(message) {
3199 // See handle request.
3202 let type = undefined;
3203 let notificationHandler;
3204 if (message.method === CancelNotification.type.method) {
3205 notificationHandler = (params) => {
3206 const id = params.id;
3207 const source = requestTokens[String(id)];
3214 const element = notificationHandlers[message.method];
3216 notificationHandler = element.handler;
3217 type = element.type;
3220 if (notificationHandler || starNotificationHandler) {
3222 traceReceivedNotification(message);
3223 if (message.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
3224 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
3226 else if (Is.array(message.params) && (type === undefined || type.numberOfParams > 1)) {
3227 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
3230 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
3234 if (error.message) {
3235 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
3238 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
3243 unhandledNotificationEmitter.fire(message);
3246 function handleInvalidMessage(message) {
3248 logger.error('Received empty message.');
3251 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
3252 // Test whether we find an id to reject the promise
3253 const responseMessage = message;
3254 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
3255 const key = String(responseMessage.id);
3256 const responseHandler = responsePromises[key];
3257 if (responseHandler) {
3258 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
3262 function traceSendingRequest(message) {
3263 if (trace === Trace.Off || !tracer) {
3266 if (traceFormat === TraceFormat.Text) {
3267 let data = undefined;
3268 if (trace === Trace.Verbose && message.params) {
3269 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3271 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
3274 logLSPMessage('send-request', message);
3277 function traceSendingNotification(message) {
3278 if (trace === Trace.Off || !tracer) {
3281 if (traceFormat === TraceFormat.Text) {
3282 let data = undefined;
3283 if (trace === Trace.Verbose) {
3284 if (message.params) {
3285 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3288 data = 'No parameters provided.\n\n';
3291 tracer.log(`Sending notification '${message.method}'.`, data);
3294 logLSPMessage('send-notification', message);
3297 function traceSendingResponse(message, method, startTime) {
3298 if (trace === Trace.Off || !tracer) {
3301 if (traceFormat === TraceFormat.Text) {
3302 let data = undefined;
3303 if (trace === Trace.Verbose) {
3304 if (message.error && message.error.data) {
3305 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
3308 if (message.result) {
3309 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
3311 else if (message.error === undefined) {
3312 data = 'No result returned.\n\n';
3316 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
3319 logLSPMessage('send-response', message);
3322 function traceReceivedRequest(message) {
3323 if (trace === Trace.Off || !tracer) {
3326 if (traceFormat === TraceFormat.Text) {
3327 let data = undefined;
3328 if (trace === Trace.Verbose && message.params) {
3329 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3331 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
3334 logLSPMessage('receive-request', message);
3337 function traceReceivedNotification(message) {
3338 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
3341 if (traceFormat === TraceFormat.Text) {
3342 let data = undefined;
3343 if (trace === Trace.Verbose) {
3344 if (message.params) {
3345 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3348 data = 'No parameters provided.\n\n';
3351 tracer.log(`Received notification '${message.method}'.`, data);
3354 logLSPMessage('receive-notification', message);
3357 function traceReceivedResponse(message, responsePromise) {
3358 if (trace === Trace.Off || !tracer) {
3361 if (traceFormat === TraceFormat.Text) {
3362 let data = undefined;
3363 if (trace === Trace.Verbose) {
3364 if (message.error && message.error.data) {
3365 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
3368 if (message.result) {
3369 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
3371 else if (message.error === undefined) {
3372 data = 'No result returned.\n\n';
3376 if (responsePromise) {
3377 const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
3378 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
3381 tracer.log(`Received response ${message.id} without active response promise.`, data);
3385 logLSPMessage('receive-response', message);
3388 function logLSPMessage(type, message) {
3389 if (!tracer || trace === Trace.Off) {
3392 const lspMessage = {
3396 timestamp: Date.now()
3398 tracer.log(lspMessage);
3400 function throwIfClosedOrDisposed() {
3402 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
3405 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
3408 function throwIfListening() {
3409 if (isListening()) {
3410 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
3413 function throwIfNotListening() {
3414 if (!isListening()) {
3415 throw new Error('Call listen() first.');
3418 function undefinedToNull(param) {
3419 if (param === undefined) {
3426 function computeMessageParams(type, params) {
3428 const numberOfParams = type.numberOfParams;
3429 switch (numberOfParams) {
3434 result = undefinedToNull(params[0]);
3438 for (let i = 0; i < params.length && i < numberOfParams; i++) {
3439 result.push(undefinedToNull(params[i]));
3441 if (params.length < numberOfParams) {
3442 for (let i = params.length; i < numberOfParams; i++) {
3450 const connection = {
3451 sendNotification: (type, ...params) => {
3452 throwIfClosedOrDisposed();
3455 if (Is.string(type)) {
3457 switch (params.length) {
3459 messageParams = null;
3462 messageParams = params[0];
3465 messageParams = params;
3470 method = type.method;
3471 messageParams = computeMessageParams(type, params);
3473 const notificationMessage = {
3476 params: messageParams
3478 traceSendingNotification(notificationMessage);
3479 messageWriter.write(notificationMessage);
3481 onNotification: (type, handler) => {
3482 throwIfClosedOrDisposed();
3483 if (Is.func(type)) {
3484 starNotificationHandler = type;
3487 if (Is.string(type)) {
3488 notificationHandlers[type] = { type: undefined, handler };
3491 notificationHandlers[type.method] = { type, handler };
3495 onProgress: (_type, token, handler) => {
3496 if (progressHandlers.has(token)) {
3497 throw new Error(`Progress handler for token ${token} already registered`);
3499 progressHandlers.set(token, handler);
3502 progressHandlers.delete(token);
3506 sendProgress: (_type, token, value) => {
3507 connection.sendNotification(ProgressNotification.type, { token, value });
3509 onUnhandledProgress: unhandledProgressEmitter.event,
3510 sendRequest: (type, ...params) => {
3511 throwIfClosedOrDisposed();
3512 throwIfNotListening();
3515 let token = undefined;
3516 if (Is.string(type)) {
3518 switch (params.length) {
3520 messageParams = null;
3523 // The cancellation token is optional so it can also be undefined.
3524 if (cancellation_1.CancellationToken.is(params[0])) {
3525 messageParams = null;
3529 messageParams = undefinedToNull(params[0]);
3533 const last = params.length - 1;
3534 if (cancellation_1.CancellationToken.is(params[last])) {
3535 token = params[last];
3536 if (params.length === 2) {
3537 messageParams = undefinedToNull(params[0]);
3540 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
3544 messageParams = params.map(value => undefinedToNull(value));
3550 method = type.method;
3551 messageParams = computeMessageParams(type, params);
3552 const numberOfParams = type.numberOfParams;
3553 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
3555 const id = sequenceNumber++;
3558 disposable = token.onCancellationRequested(() => {
3559 cancellationStrategy.sender.sendCancellation(connection, id);
3562 const result = new Promise((resolve, reject) => {
3563 const requestMessage = {
3567 params: messageParams
3569 const resolveWithCleanup = (r) => {
3571 cancellationStrategy.sender.cleanup(id);
3572 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
3574 const rejectWithCleanup = (r) => {
3576 cancellationStrategy.sender.cleanup(id);
3577 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
3579 let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
3580 traceSendingRequest(requestMessage);
3582 messageWriter.write(requestMessage);
3585 // Writing the message failed. So we need to reject the promise.
3586 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
3587 responsePromise = null;
3589 if (responsePromise) {
3590 responsePromises[String(id)] = responsePromise;
3595 onRequest: (type, handler) => {
3596 throwIfClosedOrDisposed();
3597 if (Is.func(type)) {
3598 starRequestHandler = type;
3601 if (Is.string(type)) {
3602 requestHandlers[type] = { type: undefined, handler };
3605 requestHandlers[type.method] = { type, handler };
3609 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
3610 let _sendNotification = false;
3611 let _traceFormat = TraceFormat.Text;
3612 if (sendNotificationOrTraceOptions !== undefined) {
3613 if (Is.boolean(sendNotificationOrTraceOptions)) {
3614 _sendNotification = sendNotificationOrTraceOptions;
3617 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
3618 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
3622 traceFormat = _traceFormat;
3623 if (trace === Trace.Off) {
3629 if (_sendNotification && !isClosed() && !isDisposed()) {
3630 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
3633 onError: errorEmitter.event,
3634 onClose: closeEmitter.event,
3635 onUnhandledNotification: unhandledNotificationEmitter.event,
3636 onDispose: disposeEmitter.event,
3641 state = ConnectionState.Disposed;
3642 disposeEmitter.fire(undefined);
3643 const error = new Error('Connection got disposed.');
3644 Object.keys(responsePromises).forEach((key) => {
3645 responsePromises[key].reject(error);
3647 responsePromises = Object.create(null);
3648 requestTokens = Object.create(null);
3649 messageQueue = new linkedMap_1.LinkedMap();
3650 // Test for backwards compatibility
3651 if (Is.func(messageWriter.dispose)) {
3652 messageWriter.dispose();
3654 if (Is.func(messageReader.dispose)) {
3655 messageReader.dispose();
3659 throwIfClosedOrDisposed();
3661 state = ConnectionState.Listening;
3662 messageReader.listen(callback);
3665 // eslint-disable-next-line no-console
3666 ral_1.default().console.log('inspect');
3669 connection.onNotification(LogTraceNotification.type, (params) => {
3670 if (trace === Trace.Off || !tracer) {
3673 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
3675 connection.onNotification(ProgressNotification.type, (params) => {
3676 const handler = progressHandlers.get(params.token);
3678 handler(params.value);
3681 unhandledProgressEmitter.fire(params);
3686 exports.createMessageConnection = createMessageConnection;
3687 //# sourceMappingURL=connection.js.map
3691 /***/ (function(module, exports, __webpack_require__) {
3695 /*---------------------------------------------------------------------------------------------
3696 * Copyright (c) Microsoft Corporation. All rights reserved.
3697 * Licensed under the MIT License. See License.txt in the project root for license information.
3698 *--------------------------------------------------------------------------------------------*/
3699 Object.defineProperty(exports, "__esModule", { value: true });
3704 Touch.AsOld = Touch.First;
3706 Touch.AsNew = Touch.Last;
3707 })(Touch = exports.Touch || (exports.Touch = {}));
3710 this[Symbol.toStringTag] = 'LinkedMap';
3711 this._map = new Map();
3712 this._head = undefined;
3713 this._tail = undefined;
3719 this._head = undefined;
3720 this._tail = undefined;
3725 return !this._head && !this._tail;
3732 return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;
3736 return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;
3739 return this._map.has(key);
3741 get(key, touch = Touch.None) {
3742 const item = this._map.get(key);
3746 if (touch !== Touch.None) {
3747 this.touch(item, touch);
3751 set(key, value, touch = Touch.None) {
3752 let item = this._map.get(key);
3755 if (touch !== Touch.None) {
3756 this.touch(item, touch);
3760 item = { key, value, next: undefined, previous: undefined };
3763 this.addItemLast(item);
3766 this.addItemFirst(item);
3769 this.addItemLast(item);
3772 this.addItemLast(item);
3775 this._map.set(key, item);
3781 return !!this.remove(key);
3784 const item = this._map.get(key);
3788 this._map.delete(key);
3789 this.removeItem(item);
3794 if (!this._head && !this._tail) {
3797 if (!this._head || !this._tail) {
3798 throw new Error('Invalid list');
3800 const item = this._head;
3801 this._map.delete(item.key);
3802 this.removeItem(item);
3806 forEach(callbackfn, thisArg) {
3807 const state = this._state;
3808 let current = this._head;
3811 callbackfn.bind(thisArg)(current.value, current.key, this);
3814 callbackfn(current.value, current.key, this);
3816 if (this._state !== state) {
3817 throw new Error(`LinkedMap got modified during iteration.`);
3819 current = current.next;
3824 const state = this._state;
3825 let current = this._head;
3827 [Symbol.iterator]() {
3831 if (map._state !== state) {
3832 throw new Error(`LinkedMap got modified during iteration.`);
3835 const result = { value: current.key, done: false };
3836 current = current.next;
3840 return { value: undefined, done: true };
3848 const state = this._state;
3849 let current = this._head;
3851 [Symbol.iterator]() {
3855 if (map._state !== state) {
3856 throw new Error(`LinkedMap got modified during iteration.`);
3859 const result = { value: current.value, done: false };
3860 current = current.next;
3864 return { value: undefined, done: true };
3872 const state = this._state;
3873 let current = this._head;
3875 [Symbol.iterator]() {
3879 if (map._state !== state) {
3880 throw new Error(`LinkedMap got modified during iteration.`);
3883 const result = { value: [current.key, current.value], done: false };
3884 current = current.next;
3888 return { value: undefined, done: true };
3894 [Symbol.iterator]() {
3895 return this.entries();
3898 if (newSize >= this.size) {
3901 if (newSize === 0) {
3905 let current = this._head;
3906 let currentSize = this.size;
3907 while (current && currentSize > newSize) {
3908 this._map.delete(current.key);
3909 current = current.next;
3912 this._head = current;
3913 this._size = currentSize;
3915 current.previous = undefined;
3919 addItemFirst(item) {
3920 // First time Insert
3921 if (!this._head && !this._tail) {
3924 else if (!this._head) {
3925 throw new Error('Invalid list');
3928 item.next = this._head;
3929 this._head.previous = item;
3935 // First time Insert
3936 if (!this._head && !this._tail) {
3939 else if (!this._tail) {
3940 throw new Error('Invalid list');
3943 item.previous = this._tail;
3944 this._tail.next = item;
3950 if (item === this._head && item === this._tail) {
3951 this._head = undefined;
3952 this._tail = undefined;
3954 else if (item === this._head) {
3955 // This can only happend if size === 1 which is handle
3956 // by the case above.
3958 throw new Error('Invalid list');
3960 item.next.previous = undefined;
3961 this._head = item.next;
3963 else if (item === this._tail) {
3964 // This can only happend if size === 1 which is handle
3965 // by the case above.
3966 if (!item.previous) {
3967 throw new Error('Invalid list');
3969 item.previous.next = undefined;
3970 this._tail = item.previous;
3973 const next = item.next;
3974 const previous = item.previous;
3975 if (!next || !previous) {
3976 throw new Error('Invalid list');
3978 next.previous = previous;
3979 previous.next = next;
3981 item.next = undefined;
3982 item.previous = undefined;
3985 touch(item, touch) {
3986 if (!this._head || !this._tail) {
3987 throw new Error('Invalid list');
3989 if ((touch !== Touch.First && touch !== Touch.Last)) {
3992 if (touch === Touch.First) {
3993 if (item === this._head) {
3996 const next = item.next;
3997 const previous = item.previous;
3999 if (item === this._tail) {
4000 // previous must be defined since item was not head but is tail
4001 // So there are more than on item in the map
4002 previous.next = undefined;
4003 this._tail = previous;
4006 // Both next and previous are not undefined since item was neither head nor tail.
4007 next.previous = previous;
4008 previous.next = next;
4010 // Insert the node at head
4011 item.previous = undefined;
4012 item.next = this._head;
4013 this._head.previous = item;
4017 else if (touch === Touch.Last) {
4018 if (item === this._tail) {
4021 const next = item.next;
4022 const previous = item.previous;
4024 if (item === this._head) {
4025 // next must be defined since item was not tail but is head
4026 // So there are more than on item in the map
4027 next.previous = undefined;
4031 // Both next and previous are not undefined since item was neither head nor tail.
4032 next.previous = previous;
4033 previous.next = next;
4035 item.next = undefined;
4036 item.previous = this._tail;
4037 this._tail.next = item;
4044 this.forEach((value, key) => {
4045 data.push([key, value]);
4051 for (const [key, value] of data) {
4052 this.set(key, value);
4056 exports.LinkedMap = LinkedMap;
4057 class LRUCache extends LinkedMap {
4058 constructor(limit, ratio = 1) {
4060 this._limit = limit;
4061 this._ratio = Math.min(Math.max(0, ratio), 1);
4067 this._limit = limit;
4074 this._ratio = Math.min(Math.max(0, ratio), 1);
4077 get(key, touch = Touch.AsNew) {
4078 return super.get(key, touch);
4081 return super.get(key, Touch.None);
4084 super.set(key, value, Touch.Last);
4089 if (this.size > this._limit) {
4090 this.trimOld(Math.round(this._limit * this._ratio));
4094 exports.LRUCache = LRUCache;
4095 //# sourceMappingURL=linkedMap.js.map
4099 /***/ (function(module, exports, __webpack_require__) {
4103 /* --------------------------------------------------------------------------------------------
4104 * Copyright (c) Microsoft Corporation. All rights reserved.
4105 * Licensed under the MIT License. See License.txt in the project root for license information.
4106 * ------------------------------------------------------------------------------------------ */
4107 function __export(m) {
4108 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4110 Object.defineProperty(exports, "__esModule", { value: true });
4111 __export(__webpack_require__(41));
4112 __export(__webpack_require__(57));
4113 __export(__webpack_require__(58));
4114 __export(__webpack_require__(59));
4115 var connection_1 = __webpack_require__(71);
4116 exports.createProtocolConnection = connection_1.createProtocolConnection;
4117 const st = __webpack_require__(72);
4119 (function (Proposed) {
4120 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
4121 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
4122 Proposed.SemanticTokens = st.SemanticTokens;
4123 let SemanticTokensRequest;
4124 (function (SemanticTokensRequest) {
4125 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
4126 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
4127 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
4128 let SemanticTokensEditsRequest;
4129 (function (SemanticTokensEditsRequest) {
4130 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
4131 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
4132 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
4133 let SemanticTokensRangeRequest;
4134 (function (SemanticTokensRangeRequest) {
4135 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
4136 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
4137 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
4138 })(Proposed = exports.Proposed || (exports.Proposed = {}));
4139 //# sourceMappingURL=api.js.map
4143 /***/ (function(module, __webpack_exports__, __webpack_require__) {
4146 __webpack_require__.r(__webpack_exports__);
4147 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
4148 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
4149 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
4150 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
4151 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
4152 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
4153 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
4154 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
4155 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
4156 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
4157 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
4158 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
4159 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticCode", function() { return DiagnosticCode; });
4160 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
4161 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
4162 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
4163 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
4164 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
4165 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
4166 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
4167 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
4168 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
4169 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
4170 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
4171 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
4172 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
4173 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
4174 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
4175 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
4176 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
4177 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertReplaceEdit", function() { return InsertReplaceEdit; });
4178 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
4179 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
4180 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
4181 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
4182 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
4183 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
4184 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
4185 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
4186 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
4187 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
4188 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
4189 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
4190 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
4191 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
4192 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
4193 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
4194 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
4195 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
4196 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
4197 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
4198 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
4199 /* --------------------------------------------------------------------------------------------
4200 * Copyright (c) Microsoft Corporation. All rights reserved.
4201 * Licensed under the MIT License. See License.txt in the project root for license information.
4202 * ------------------------------------------------------------------------------------------ */
4205 * The Position namespace provides helper functions to work with
4206 * [Position](#Position) literals.
4209 (function (Position) {
4211 * Creates a new Position literal from the given line and character.
4212 * @param line The position's line.
4213 * @param character The position's character.
4215 function create(line, character) {
4216 return { line: line, character: character };
4218 Position.create = create;
4220 * Checks whether the given liternal conforms to the [Position](#Position) interface.
4222 function is(value) {
4223 var candidate = value;
4224 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
4227 })(Position || (Position = {}));
4229 * The Range namespace provides helper functions to work with
4230 * [Range](#Range) literals.
4234 function create(one, two, three, four) {
4235 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
4236 return { start: Position.create(one, two), end: Position.create(three, four) };
4238 else if (Position.is(one) && Position.is(two)) {
4239 return { start: one, end: two };
4242 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
4245 Range.create = create;
4247 * Checks whether the given literal conforms to the [Range](#Range) interface.
4249 function is(value) {
4250 var candidate = value;
4251 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
4254 })(Range || (Range = {}));
4256 * The Location namespace provides helper functions to work with
4257 * [Location](#Location) literals.
4260 (function (Location) {
4262 * Creates a Location literal.
4263 * @param uri The location's uri.
4264 * @param range The location's range.
4266 function create(uri, range) {
4267 return { uri: uri, range: range };
4269 Location.create = create;
4271 * Checks whether the given literal conforms to the [Location](#Location) interface.
4273 function is(value) {
4274 var candidate = value;
4275 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
4278 })(Location || (Location = {}));
4280 * The LocationLink namespace provides helper functions to work with
4281 * [LocationLink](#LocationLink) literals.
4284 (function (LocationLink) {
4286 * Creates a LocationLink literal.
4287 * @param targetUri The definition's uri.
4288 * @param targetRange The full range of the definition.
4289 * @param targetSelectionRange The span of the symbol definition at the target.
4290 * @param originSelectionRange The span of the symbol being defined in the originating source file.
4292 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
4293 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
4295 LocationLink.create = create;
4297 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
4299 function is(value) {
4300 var candidate = value;
4301 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
4302 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
4303 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
4305 LocationLink.is = is;
4306 })(LocationLink || (LocationLink = {}));
4308 * The Color namespace provides helper functions to work with
4309 * [Color](#Color) literals.
4314 * Creates a new Color literal.
4316 function create(red, green, blue, alpha) {
4324 Color.create = create;
4326 * Checks whether the given literal conforms to the [Color](#Color) interface.
4328 function is(value) {
4329 var candidate = value;
4330 return Is.number(candidate.red)
4331 && Is.number(candidate.green)
4332 && Is.number(candidate.blue)
4333 && Is.number(candidate.alpha);
4336 })(Color || (Color = {}));
4338 * The ColorInformation namespace provides helper functions to work with
4339 * [ColorInformation](#ColorInformation) literals.
4341 var ColorInformation;
4342 (function (ColorInformation) {
4344 * Creates a new ColorInformation literal.
4346 function create(range, color) {
4352 ColorInformation.create = create;
4354 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
4356 function is(value) {
4357 var candidate = value;
4358 return Range.is(candidate.range) && Color.is(candidate.color);
4360 ColorInformation.is = is;
4361 })(ColorInformation || (ColorInformation = {}));
4363 * The Color namespace provides helper functions to work with
4364 * [ColorPresentation](#ColorPresentation) literals.
4366 var ColorPresentation;
4367 (function (ColorPresentation) {
4369 * Creates a new ColorInformation literal.
4371 function create(label, textEdit, additionalTextEdits) {
4375 additionalTextEdits: additionalTextEdits,
4378 ColorPresentation.create = create;
4380 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
4382 function is(value) {
4383 var candidate = value;
4384 return Is.string(candidate.label)
4385 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
4386 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
4388 ColorPresentation.is = is;
4389 })(ColorPresentation || (ColorPresentation = {}));
4391 * Enum of known range kinds
4393 var FoldingRangeKind;
4394 (function (FoldingRangeKind) {
4396 * Folding range for a comment
4398 FoldingRangeKind["Comment"] = "comment";
4400 * Folding range for a imports or includes
4402 FoldingRangeKind["Imports"] = "imports";
4404 * Folding range for a region (e.g. `#region`)
4406 FoldingRangeKind["Region"] = "region";
4407 })(FoldingRangeKind || (FoldingRangeKind = {}));
4409 * The folding range namespace provides helper functions to work with
4410 * [FoldingRange](#FoldingRange) literals.
4413 (function (FoldingRange) {
4415 * Creates a new FoldingRange literal.
4417 function create(startLine, endLine, startCharacter, endCharacter, kind) {
4419 startLine: startLine,
4422 if (Is.defined(startCharacter)) {
4423 result.startCharacter = startCharacter;
4425 if (Is.defined(endCharacter)) {
4426 result.endCharacter = endCharacter;
4428 if (Is.defined(kind)) {
4433 FoldingRange.create = create;
4435 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
4437 function is(value) {
4438 var candidate = value;
4439 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
4440 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
4441 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
4442 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
4444 FoldingRange.is = is;
4445 })(FoldingRange || (FoldingRange = {}));
4447 * The DiagnosticRelatedInformation namespace provides helper functions to work with
4448 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
4450 var DiagnosticRelatedInformation;
4451 (function (DiagnosticRelatedInformation) {
4453 * Creates a new DiagnosticRelatedInformation literal.
4455 function create(location, message) {
4461 DiagnosticRelatedInformation.create = create;
4463 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
4465 function is(value) {
4466 var candidate = value;
4467 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
4469 DiagnosticRelatedInformation.is = is;
4470 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
4472 * The diagnostic's severity.
4474 var DiagnosticSeverity;
4475 (function (DiagnosticSeverity) {
4479 DiagnosticSeverity.Error = 1;
4481 * Reports a warning.
4483 DiagnosticSeverity.Warning = 2;
4485 * Reports an information.
4487 DiagnosticSeverity.Information = 3;
4491 DiagnosticSeverity.Hint = 4;
4492 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
4494 * The diagnostic tags.
4499 (function (DiagnosticTag) {
4501 * Unused or unnecessary code.
4503 * Clients are allowed to render diagnostics with this tag faded out instead of having
4504 * an error squiggle.
4506 DiagnosticTag.Unnecessary = 1;
4508 * Deprecated or obsolete code.
4510 * Clients are allowed to rendered diagnostics with this tag strike through.
4512 DiagnosticTag.Deprecated = 2;
4513 })(DiagnosticTag || (DiagnosticTag = {}));
4515 * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
4517 * @since 3.16.0 - Proposed state
4520 (function (DiagnosticCode) {
4522 * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
4524 function is(value) {
4525 var candidate = value;
4526 return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
4528 DiagnosticCode.is = is;
4529 })(DiagnosticCode || (DiagnosticCode = {}));
4531 * The Diagnostic namespace provides helper functions to work with
4532 * [Diagnostic](#Diagnostic) literals.
4535 (function (Diagnostic) {
4537 * Creates a new Diagnostic literal.
4539 function create(range, message, severity, code, source, relatedInformation) {
4540 var result = { range: range, message: message };
4541 if (Is.defined(severity)) {
4542 result.severity = severity;
4544 if (Is.defined(code)) {
4547 if (Is.defined(source)) {
4548 result.source = source;
4550 if (Is.defined(relatedInformation)) {
4551 result.relatedInformation = relatedInformation;
4555 Diagnostic.create = create;
4557 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
4559 function is(value) {
4560 var candidate = value;
4561 return Is.defined(candidate)
4562 && Range.is(candidate.range)
4563 && Is.string(candidate.message)
4564 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
4565 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
4566 && (Is.string(candidate.source) || Is.undefined(candidate.source))
4567 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
4570 })(Diagnostic || (Diagnostic = {}));
4572 * The Command namespace provides helper functions to work with
4573 * [Command](#Command) literals.
4576 (function (Command) {
4578 * Creates a new Command literal.
4580 function create(title, command) {
4582 for (var _i = 2; _i < arguments.length; _i++) {
4583 args[_i - 2] = arguments[_i];
4585 var result = { title: title, command: command };
4586 if (Is.defined(args) && args.length > 0) {
4587 result.arguments = args;
4591 Command.create = create;
4593 * Checks whether the given literal conforms to the [Command](#Command) interface.
4595 function is(value) {
4596 var candidate = value;
4597 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
4600 })(Command || (Command = {}));
4602 * The TextEdit namespace provides helper function to create replace,
4603 * insert and delete edits more easily.
4606 (function (TextEdit) {
4608 * Creates a replace text edit.
4609 * @param range The range of text to be replaced.
4610 * @param newText The new text.
4612 function replace(range, newText) {
4613 return { range: range, newText: newText };
4615 TextEdit.replace = replace;
4617 * Creates a insert text edit.
4618 * @param position The position to insert the text at.
4619 * @param newText The text to be inserted.
4621 function insert(position, newText) {
4622 return { range: { start: position, end: position }, newText: newText };
4624 TextEdit.insert = insert;
4626 * Creates a delete text edit.
4627 * @param range The range of text to be deleted.
4629 function del(range) {
4630 return { range: range, newText: '' };
4633 function is(value) {
4634 var candidate = value;
4635 return Is.objectLiteral(candidate)
4636 && Is.string(candidate.newText)
4637 && Range.is(candidate.range);
4640 })(TextEdit || (TextEdit = {}));
4642 * The TextDocumentEdit namespace provides helper function to create
4643 * an edit that manipulates a text document.
4645 var TextDocumentEdit;
4646 (function (TextDocumentEdit) {
4648 * Creates a new `TextDocumentEdit`
4650 function create(textDocument, edits) {
4651 return { textDocument: textDocument, edits: edits };
4653 TextDocumentEdit.create = create;
4654 function is(value) {
4655 var candidate = value;
4656 return Is.defined(candidate)
4657 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
4658 && Array.isArray(candidate.edits);
4660 TextDocumentEdit.is = is;
4661 })(TextDocumentEdit || (TextDocumentEdit = {}));
4663 (function (CreateFile) {
4664 function create(uri, options) {
4669 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4670 result.options = options;
4674 CreateFile.create = create;
4675 function is(value) {
4676 var candidate = value;
4677 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
4678 (candidate.options === void 0 ||
4679 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4682 })(CreateFile || (CreateFile = {}));
4684 (function (RenameFile) {
4685 function create(oldUri, newUri, options) {
4691 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4692 result.options = options;
4696 RenameFile.create = create;
4697 function is(value) {
4698 var candidate = value;
4699 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
4700 (candidate.options === void 0 ||
4701 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4704 })(RenameFile || (RenameFile = {}));
4706 (function (DeleteFile) {
4707 function create(uri, options) {
4712 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
4713 result.options = options;
4717 DeleteFile.create = create;
4718 function is(value) {
4719 var candidate = value;
4720 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
4721 (candidate.options === void 0 ||
4722 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
4725 })(DeleteFile || (DeleteFile = {}));
4727 (function (WorkspaceEdit) {
4728 function is(value) {
4729 var candidate = value;
4731 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
4732 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
4733 if (Is.string(change.kind)) {
4734 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
4737 return TextDocumentEdit.is(change);
4741 WorkspaceEdit.is = is;
4742 })(WorkspaceEdit || (WorkspaceEdit = {}));
4743 var TextEditChangeImpl = /** @class */ (function () {
4744 function TextEditChangeImpl(edits) {
4747 TextEditChangeImpl.prototype.insert = function (position, newText) {
4748 this.edits.push(TextEdit.insert(position, newText));
4750 TextEditChangeImpl.prototype.replace = function (range, newText) {
4751 this.edits.push(TextEdit.replace(range, newText));
4753 TextEditChangeImpl.prototype.delete = function (range) {
4754 this.edits.push(TextEdit.del(range));
4756 TextEditChangeImpl.prototype.add = function (edit) {
4757 this.edits.push(edit);
4759 TextEditChangeImpl.prototype.all = function () {
4762 TextEditChangeImpl.prototype.clear = function () {
4763 this.edits.splice(0, this.edits.length);
4765 return TextEditChangeImpl;
4768 * A workspace change helps constructing changes to a workspace.
4770 var WorkspaceChange = /** @class */ (function () {
4771 function WorkspaceChange(workspaceEdit) {
4773 this._textEditChanges = Object.create(null);
4774 if (workspaceEdit) {
4775 this._workspaceEdit = workspaceEdit;
4776 if (workspaceEdit.documentChanges) {
4777 workspaceEdit.documentChanges.forEach(function (change) {
4778 if (TextDocumentEdit.is(change)) {
4779 var textEditChange = new TextEditChangeImpl(change.edits);
4780 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4784 else if (workspaceEdit.changes) {
4785 Object.keys(workspaceEdit.changes).forEach(function (key) {
4786 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4787 _this._textEditChanges[key] = textEditChange;
4792 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4794 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4795 * use to be returned from a workspace edit operation like rename.
4798 if (this._workspaceEdit === undefined) {
4799 return { documentChanges: [] };
4801 return this._workspaceEdit;
4806 WorkspaceChange.prototype.getTextEditChange = function (key) {
4807 if (VersionedTextDocumentIdentifier.is(key)) {
4808 if (!this._workspaceEdit) {
4809 this._workspaceEdit = {
4813 if (!this._workspaceEdit.documentChanges) {
4814 throw new Error('Workspace edit is not configured for document changes.');
4816 var textDocument = key;
4817 var result = this._textEditChanges[textDocument.uri];
4820 var textDocumentEdit = {
4821 textDocument: textDocument,
4824 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4825 result = new TextEditChangeImpl(edits);
4826 this._textEditChanges[textDocument.uri] = result;
4831 if (!this._workspaceEdit) {
4832 this._workspaceEdit = {
4833 changes: Object.create(null)
4836 if (!this._workspaceEdit.changes) {
4837 throw new Error('Workspace edit is not configured for normal text edit changes.');
4839 var result = this._textEditChanges[key];
4842 this._workspaceEdit.changes[key] = edits;
4843 result = new TextEditChangeImpl(edits);
4844 this._textEditChanges[key] = result;
4849 WorkspaceChange.prototype.createFile = function (uri, options) {
4850 this.checkDocumentChanges();
4851 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4853 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4854 this.checkDocumentChanges();
4855 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4857 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4858 this.checkDocumentChanges();
4859 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4861 WorkspaceChange.prototype.checkDocumentChanges = function () {
4862 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4863 throw new Error('Workspace edit is not configured for document changes.');
4866 return WorkspaceChange;
4870 * The TextDocumentIdentifier namespace provides helper functions to work with
4871 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4873 var TextDocumentIdentifier;
4874 (function (TextDocumentIdentifier) {
4876 * Creates a new TextDocumentIdentifier literal.
4877 * @param uri The document's uri.
4879 function create(uri) {
4880 return { uri: uri };
4882 TextDocumentIdentifier.create = create;
4884 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4886 function is(value) {
4887 var candidate = value;
4888 return Is.defined(candidate) && Is.string(candidate.uri);
4890 TextDocumentIdentifier.is = is;
4891 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4893 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4894 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4896 var VersionedTextDocumentIdentifier;
4897 (function (VersionedTextDocumentIdentifier) {
4899 * Creates a new VersionedTextDocumentIdentifier literal.
4900 * @param uri The document's uri.
4901 * @param uri The document's text.
4903 function create(uri, version) {
4904 return { uri: uri, version: version };
4906 VersionedTextDocumentIdentifier.create = create;
4908 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4910 function is(value) {
4911 var candidate = value;
4912 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4914 VersionedTextDocumentIdentifier.is = is;
4915 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4917 * The TextDocumentItem namespace provides helper functions to work with
4918 * [TextDocumentItem](#TextDocumentItem) literals.
4920 var TextDocumentItem;
4921 (function (TextDocumentItem) {
4923 * Creates a new TextDocumentItem literal.
4924 * @param uri The document's uri.
4925 * @param languageId The document's language identifier.
4926 * @param version The document's version number.
4927 * @param text The document's text.
4929 function create(uri, languageId, version, text) {
4930 return { uri: uri, languageId: languageId, version: version, text: text };
4932 TextDocumentItem.create = create;
4934 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4936 function is(value) {
4937 var candidate = value;
4938 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4940 TextDocumentItem.is = is;
4941 })(TextDocumentItem || (TextDocumentItem = {}));
4943 * Describes the content type that a client supports in various
4944 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4946 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4947 * are reserved for internal usage.
4950 (function (MarkupKind) {
4952 * Plain text is supported as a content format
4954 MarkupKind.PlainText = 'plaintext';
4956 * Markdown is supported as a content format
4958 MarkupKind.Markdown = 'markdown';
4959 })(MarkupKind || (MarkupKind = {}));
4960 (function (MarkupKind) {
4962 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4964 function is(value) {
4965 var candidate = value;
4966 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4969 })(MarkupKind || (MarkupKind = {}));
4971 (function (MarkupContent) {
4973 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4975 function is(value) {
4976 var candidate = value;
4977 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4979 MarkupContent.is = is;
4980 })(MarkupContent || (MarkupContent = {}));
4982 * The kind of a completion entry.
4984 var CompletionItemKind;
4985 (function (CompletionItemKind) {
4986 CompletionItemKind.Text = 1;
4987 CompletionItemKind.Method = 2;
4988 CompletionItemKind.Function = 3;
4989 CompletionItemKind.Constructor = 4;
4990 CompletionItemKind.Field = 5;
4991 CompletionItemKind.Variable = 6;
4992 CompletionItemKind.Class = 7;
4993 CompletionItemKind.Interface = 8;
4994 CompletionItemKind.Module = 9;
4995 CompletionItemKind.Property = 10;
4996 CompletionItemKind.Unit = 11;
4997 CompletionItemKind.Value = 12;
4998 CompletionItemKind.Enum = 13;
4999 CompletionItemKind.Keyword = 14;
5000 CompletionItemKind.Snippet = 15;
5001 CompletionItemKind.Color = 16;
5002 CompletionItemKind.File = 17;
5003 CompletionItemKind.Reference = 18;
5004 CompletionItemKind.Folder = 19;
5005 CompletionItemKind.EnumMember = 20;
5006 CompletionItemKind.Constant = 21;
5007 CompletionItemKind.Struct = 22;
5008 CompletionItemKind.Event = 23;
5009 CompletionItemKind.Operator = 24;
5010 CompletionItemKind.TypeParameter = 25;
5011 })(CompletionItemKind || (CompletionItemKind = {}));
5013 * Defines whether the insert text in a completion item should be interpreted as
5014 * plain text or a snippet.
5016 var InsertTextFormat;
5017 (function (InsertTextFormat) {
5019 * The primary text to be inserted is treated as a plain string.
5021 InsertTextFormat.PlainText = 1;
5023 * The primary text to be inserted is treated as a snippet.
5025 * A snippet can define tab stops and placeholders with `$1`, `$2`
5026 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
5027 * the end of the snippet. Placeholders with equal identifiers are linked,
5028 * that is typing in one will update others too.
5030 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
5032 InsertTextFormat.Snippet = 2;
5033 })(InsertTextFormat || (InsertTextFormat = {}));
5035 * Completion item tags are extra annotations that tweak the rendering of a completion
5040 var CompletionItemTag;
5041 (function (CompletionItemTag) {
5043 * Render a completion as obsolete, usually using a strike-out.
5045 CompletionItemTag.Deprecated = 1;
5046 })(CompletionItemTag || (CompletionItemTag = {}));
5048 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
5050 * @since 3.16.0 - Proposed state
5052 var InsertReplaceEdit;
5053 (function (InsertReplaceEdit) {
5055 * Creates a new insert / replace edit
5057 function create(newText, insert, replace) {
5058 return { newText: newText, insert: insert, replace: replace };
5060 InsertReplaceEdit.create = create;
5062 * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
5064 function is(value) {
5065 var candidate = value;
5066 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
5068 InsertReplaceEdit.is = is;
5069 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
5071 * The CompletionItem namespace provides functions to deal with
5075 (function (CompletionItem) {
5077 * Create a completion item and seed it with a label.
5078 * @param label The completion item's label
5080 function create(label) {
5081 return { label: label };
5083 CompletionItem.create = create;
5084 })(CompletionItem || (CompletionItem = {}));
5086 * The CompletionList namespace provides functions to deal with
5090 (function (CompletionList) {
5092 * Creates a new completion list.
5094 * @param items The completion items.
5095 * @param isIncomplete The list is not complete.
5097 function create(items, isIncomplete) {
5098 return { items: items ? items : [], isIncomplete: !!isIncomplete };
5100 CompletionList.create = create;
5101 })(CompletionList || (CompletionList = {}));
5103 (function (MarkedString) {
5105 * Creates a marked string from plain text.
5107 * @param plainText The plain text.
5109 function fromPlainText(plainText) {
5110 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
5112 MarkedString.fromPlainText = fromPlainText;
5114 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
5116 function is(value) {
5117 var candidate = value;
5118 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
5120 MarkedString.is = is;
5121 })(MarkedString || (MarkedString = {}));
5125 * Checks whether the given value conforms to the [Hover](#Hover) interface.
5127 function is(value) {
5128 var candidate = value;
5129 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
5130 MarkedString.is(candidate.contents) ||
5131 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
5134 })(Hover || (Hover = {}));
5136 * The ParameterInformation namespace provides helper functions to work with
5137 * [ParameterInformation](#ParameterInformation) literals.
5139 var ParameterInformation;
5140 (function (ParameterInformation) {
5142 * Creates a new parameter information literal.
5144 * @param label A label string.
5145 * @param documentation A doc string.
5147 function create(label, documentation) {
5148 return documentation ? { label: label, documentation: documentation } : { label: label };
5150 ParameterInformation.create = create;
5151 })(ParameterInformation || (ParameterInformation = {}));
5153 * The SignatureInformation namespace provides helper functions to work with
5154 * [SignatureInformation](#SignatureInformation) literals.
5156 var SignatureInformation;
5157 (function (SignatureInformation) {
5158 function create(label, documentation) {
5159 var parameters = [];
5160 for (var _i = 2; _i < arguments.length; _i++) {
5161 parameters[_i - 2] = arguments[_i];
5163 var result = { label: label };
5164 if (Is.defined(documentation)) {
5165 result.documentation = documentation;
5167 if (Is.defined(parameters)) {
5168 result.parameters = parameters;
5171 result.parameters = [];
5175 SignatureInformation.create = create;
5176 })(SignatureInformation || (SignatureInformation = {}));
5178 * A document highlight kind.
5180 var DocumentHighlightKind;
5181 (function (DocumentHighlightKind) {
5183 * A textual occurrence.
5185 DocumentHighlightKind.Text = 1;
5187 * Read-access of a symbol, like reading a variable.
5189 DocumentHighlightKind.Read = 2;
5191 * Write-access of a symbol, like writing to a variable.
5193 DocumentHighlightKind.Write = 3;
5194 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
5196 * DocumentHighlight namespace to provide helper functions to work with
5197 * [DocumentHighlight](#DocumentHighlight) literals.
5199 var DocumentHighlight;
5200 (function (DocumentHighlight) {
5202 * Create a DocumentHighlight object.
5203 * @param range The range the highlight applies to.
5205 function create(range, kind) {
5206 var result = { range: range };
5207 if (Is.number(kind)) {
5212 DocumentHighlight.create = create;
5213 })(DocumentHighlight || (DocumentHighlight = {}));
5218 (function (SymbolKind) {
5219 SymbolKind.File = 1;
5220 SymbolKind.Module = 2;
5221 SymbolKind.Namespace = 3;
5222 SymbolKind.Package = 4;
5223 SymbolKind.Class = 5;
5224 SymbolKind.Method = 6;
5225 SymbolKind.Property = 7;
5226 SymbolKind.Field = 8;
5227 SymbolKind.Constructor = 9;
5228 SymbolKind.Enum = 10;
5229 SymbolKind.Interface = 11;
5230 SymbolKind.Function = 12;
5231 SymbolKind.Variable = 13;
5232 SymbolKind.Constant = 14;
5233 SymbolKind.String = 15;
5234 SymbolKind.Number = 16;
5235 SymbolKind.Boolean = 17;
5236 SymbolKind.Array = 18;
5237 SymbolKind.Object = 19;
5238 SymbolKind.Key = 20;
5239 SymbolKind.Null = 21;
5240 SymbolKind.EnumMember = 22;
5241 SymbolKind.Struct = 23;
5242 SymbolKind.Event = 24;
5243 SymbolKind.Operator = 25;
5244 SymbolKind.TypeParameter = 26;
5245 })(SymbolKind || (SymbolKind = {}));
5247 * Symbol tags are extra annotations that tweak the rendering of a symbol.
5251 (function (SymbolTag) {
5253 * Render a symbol as obsolete, usually using a strike-out.
5255 SymbolTag.Deprecated = 1;
5256 })(SymbolTag || (SymbolTag = {}));
5257 var SymbolInformation;
5258 (function (SymbolInformation) {
5260 * Creates a new symbol information literal.
5262 * @param name The name of the symbol.
5263 * @param kind The kind of the symbol.
5264 * @param range The range of the location of the symbol.
5265 * @param uri The resource of the location of symbol, defaults to the current document.
5266 * @param containerName The name of the symbol containing the symbol.
5268 function create(name, kind, range, uri, containerName) {
5272 location: { uri: uri, range: range }
5274 if (containerName) {
5275 result.containerName = containerName;
5279 SymbolInformation.create = create;
5280 })(SymbolInformation || (SymbolInformation = {}));
5282 (function (DocumentSymbol) {
5284 * Creates a new symbol information literal.
5286 * @param name The name of the symbol.
5287 * @param detail The detail of the symbol.
5288 * @param kind The kind of the symbol.
5289 * @param range The range of the symbol.
5290 * @param selectionRange The selectionRange of the symbol.
5291 * @param children Children of the symbol.
5293 function create(name, detail, kind, range, selectionRange, children) {
5299 selectionRange: selectionRange
5301 if (children !== void 0) {
5302 result.children = children;
5306 DocumentSymbol.create = create;
5308 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
5310 function is(value) {
5311 var candidate = value;
5313 Is.string(candidate.name) && Is.number(candidate.kind) &&
5314 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
5315 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
5316 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
5317 (candidate.children === void 0 || Array.isArray(candidate.children)) &&
5318 (candidate.tags === void 0 || Array.isArray(candidate.tags));
5320 DocumentSymbol.is = is;
5321 })(DocumentSymbol || (DocumentSymbol = {}));
5323 * A set of predefined code action kinds
5326 (function (CodeActionKind) {
5330 CodeActionKind.Empty = '';
5332 * Base kind for quickfix actions: 'quickfix'
5334 CodeActionKind.QuickFix = 'quickfix';
5336 * Base kind for refactoring actions: 'refactor'
5338 CodeActionKind.Refactor = 'refactor';
5340 * Base kind for refactoring extraction actions: 'refactor.extract'
5342 * Example extract actions:
5345 * - Extract function
5346 * - Extract variable
5347 * - Extract interface from class
5350 CodeActionKind.RefactorExtract = 'refactor.extract';
5352 * Base kind for refactoring inline actions: 'refactor.inline'
5354 * Example inline actions:
5361 CodeActionKind.RefactorInline = 'refactor.inline';
5363 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
5365 * Example rewrite actions:
5367 * - Convert JavaScript function to class
5368 * - Add or remove parameter
5369 * - Encapsulate field
5370 * - Make method static
5371 * - Move method to base class
5374 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
5376 * Base kind for source actions: `source`
5378 * Source code actions apply to the entire file.
5380 CodeActionKind.Source = 'source';
5382 * Base kind for an organize imports source action: `source.organizeImports`
5384 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
5386 * Base kind for auto-fix source actions: `source.fixAll`.
5388 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
5389 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
5393 CodeActionKind.SourceFixAll = 'source.fixAll';
5394 })(CodeActionKind || (CodeActionKind = {}));
5396 * The CodeActionContext namespace provides helper functions to work with
5397 * [CodeActionContext](#CodeActionContext) literals.
5399 var CodeActionContext;
5400 (function (CodeActionContext) {
5402 * Creates a new CodeActionContext literal.
5404 function create(diagnostics, only) {
5405 var result = { diagnostics: diagnostics };
5406 if (only !== void 0 && only !== null) {
5411 CodeActionContext.create = create;
5413 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
5415 function is(value) {
5416 var candidate = value;
5417 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
5419 CodeActionContext.is = is;
5420 })(CodeActionContext || (CodeActionContext = {}));
5422 (function (CodeAction) {
5423 function create(title, commandOrEdit, kind) {
5424 var result = { title: title };
5425 if (Command.is(commandOrEdit)) {
5426 result.command = commandOrEdit;
5429 result.edit = commandOrEdit;
5431 if (kind !== void 0) {
5436 CodeAction.create = create;
5437 function is(value) {
5438 var candidate = value;
5439 return candidate && Is.string(candidate.title) &&
5440 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
5441 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
5442 (candidate.edit !== void 0 || candidate.command !== void 0) &&
5443 (candidate.command === void 0 || Command.is(candidate.command)) &&
5444 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
5445 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
5448 })(CodeAction || (CodeAction = {}));
5450 * The CodeLens namespace provides helper functions to work with
5451 * [CodeLens](#CodeLens) literals.
5454 (function (CodeLens) {
5456 * Creates a new CodeLens literal.
5458 function create(range, data) {
5459 var result = { range: range };
5460 if (Is.defined(data)) {
5465 CodeLens.create = create;
5467 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
5469 function is(value) {
5470 var candidate = value;
5471 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
5474 })(CodeLens || (CodeLens = {}));
5476 * The FormattingOptions namespace provides helper functions to work with
5477 * [FormattingOptions](#FormattingOptions) literals.
5479 var FormattingOptions;
5480 (function (FormattingOptions) {
5482 * Creates a new FormattingOptions literal.
5484 function create(tabSize, insertSpaces) {
5485 return { tabSize: tabSize, insertSpaces: insertSpaces };
5487 FormattingOptions.create = create;
5489 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
5491 function is(value) {
5492 var candidate = value;
5493 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
5495 FormattingOptions.is = is;
5496 })(FormattingOptions || (FormattingOptions = {}));
5498 * The DocumentLink namespace provides helper functions to work with
5499 * [DocumentLink](#DocumentLink) literals.
5502 (function (DocumentLink) {
5504 * Creates a new DocumentLink literal.
5506 function create(range, target, data) {
5507 return { range: range, target: target, data: data };
5509 DocumentLink.create = create;
5511 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
5513 function is(value) {
5514 var candidate = value;
5515 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
5517 DocumentLink.is = is;
5518 })(DocumentLink || (DocumentLink = {}));
5520 * The SelectionRange namespace provides helper function to work with
5521 * SelectionRange literals.
5524 (function (SelectionRange) {
5526 * Creates a new SelectionRange
5527 * @param range the range.
5528 * @param parent an optional parent.
5530 function create(range, parent) {
5531 return { range: range, parent: parent };
5533 SelectionRange.create = create;
5534 function is(value) {
5535 var candidate = value;
5536 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
5538 SelectionRange.is = is;
5539 })(SelectionRange || (SelectionRange = {}));
5540 var EOL = ['\n', '\r\n', '\r'];
5542 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
5545 (function (TextDocument) {
5547 * Creates a new ITextDocument literal from the given uri and content.
5548 * @param uri The document's uri.
5549 * @param languageId The document's language Id.
5550 * @param content The document's content.
5552 function create(uri, languageId, version, content) {
5553 return new FullTextDocument(uri, languageId, version, content);
5555 TextDocument.create = create;
5557 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
5559 function is(value) {
5560 var candidate = value;
5561 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
5562 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
5564 TextDocument.is = is;
5565 function applyEdits(document, edits) {
5566 var text = document.getText();
5567 var sortedEdits = mergeSort(edits, function (a, b) {
5568 var diff = a.range.start.line - b.range.start.line;
5570 return a.range.start.character - b.range.start.character;
5574 var lastModifiedOffset = text.length;
5575 for (var i = sortedEdits.length - 1; i >= 0; i--) {
5576 var e = sortedEdits[i];
5577 var startOffset = document.offsetAt(e.range.start);
5578 var endOffset = document.offsetAt(e.range.end);
5579 if (endOffset <= lastModifiedOffset) {
5580 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
5583 throw new Error('Overlapping edit');
5585 lastModifiedOffset = startOffset;
5589 TextDocument.applyEdits = applyEdits;
5590 function mergeSort(data, compare) {
5591 if (data.length <= 1) {
5595 var p = (data.length / 2) | 0;
5596 var left = data.slice(0, p);
5597 var right = data.slice(p);
5598 mergeSort(left, compare);
5599 mergeSort(right, compare);
5603 while (leftIdx < left.length && rightIdx < right.length) {
5604 var ret = compare(left[leftIdx], right[rightIdx]);
5606 // smaller_equal -> take left to preserve order
5607 data[i++] = left[leftIdx++];
5610 // greater -> take right
5611 data[i++] = right[rightIdx++];
5614 while (leftIdx < left.length) {
5615 data[i++] = left[leftIdx++];
5617 while (rightIdx < right.length) {
5618 data[i++] = right[rightIdx++];
5622 })(TextDocument || (TextDocument = {}));
5623 var FullTextDocument = /** @class */ (function () {
5624 function FullTextDocument(uri, languageId, version, content) {
5626 this._languageId = languageId;
5627 this._version = version;
5628 this._content = content;
5629 this._lineOffsets = undefined;
5631 Object.defineProperty(FullTextDocument.prototype, "uri", {
5638 Object.defineProperty(FullTextDocument.prototype, "languageId", {
5640 return this._languageId;
5645 Object.defineProperty(FullTextDocument.prototype, "version", {
5647 return this._version;
5652 FullTextDocument.prototype.getText = function (range) {
5654 var start = this.offsetAt(range.start);
5655 var end = this.offsetAt(range.end);
5656 return this._content.substring(start, end);
5658 return this._content;
5660 FullTextDocument.prototype.update = function (event, version) {
5661 this._content = event.text;
5662 this._version = version;
5663 this._lineOffsets = undefined;
5665 FullTextDocument.prototype.getLineOffsets = function () {
5666 if (this._lineOffsets === undefined) {
5667 var lineOffsets = [];
5668 var text = this._content;
5669 var isLineStart = true;
5670 for (var i = 0; i < text.length; i++) {
5672 lineOffsets.push(i);
5673 isLineStart = false;
5675 var ch = text.charAt(i);
5676 isLineStart = (ch === '\r' || ch === '\n');
5677 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
5681 if (isLineStart && text.length > 0) {
5682 lineOffsets.push(text.length);
5684 this._lineOffsets = lineOffsets;
5686 return this._lineOffsets;
5688 FullTextDocument.prototype.positionAt = function (offset) {
5689 offset = Math.max(Math.min(offset, this._content.length), 0);
5690 var lineOffsets = this.getLineOffsets();
5691 var low = 0, high = lineOffsets.length;
5693 return Position.create(0, offset);
5695 while (low < high) {
5696 var mid = Math.floor((low + high) / 2);
5697 if (lineOffsets[mid] > offset) {
5704 // low is the least x for which the line offset is larger than the current offset
5705 // or array.length if no line offset is larger than the current offset
5707 return Position.create(line, offset - lineOffsets[line]);
5709 FullTextDocument.prototype.offsetAt = function (position) {
5710 var lineOffsets = this.getLineOffsets();
5711 if (position.line >= lineOffsets.length) {
5712 return this._content.length;
5714 else if (position.line < 0) {
5717 var lineOffset = lineOffsets[position.line];
5718 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
5719 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
5721 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
5723 return this.getLineOffsets().length;
5728 return FullTextDocument;
5732 var toString = Object.prototype.toString;
5733 function defined(value) {
5734 return typeof value !== 'undefined';
5736 Is.defined = defined;
5737 function undefined(value) {
5738 return typeof value === 'undefined';
5740 Is.undefined = undefined;
5741 function boolean(value) {
5742 return value === true || value === false;
5744 Is.boolean = boolean;
5745 function string(value) {
5746 return toString.call(value) === '[object String]';
5749 function number(value) {
5750 return toString.call(value) === '[object Number]';
5753 function func(value) {
5754 return toString.call(value) === '[object Function]';
5757 function objectLiteral(value) {
5758 // Strictly speaking class instances pass this check as well. Since the LSP
5759 // doesn't use classes we ignore this for now. If we do we need to add something
5760 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5761 return value !== null && typeof value === 'object';
5763 Is.objectLiteral = objectLiteral;
5764 function typedArray(value, check) {
5765 return Array.isArray(value) && value.every(check);
5767 Is.typedArray = typedArray;
5768 })(Is || (Is = {}));
5773 /***/ (function(module, exports, __webpack_require__) {
5777 /* --------------------------------------------------------------------------------------------
5778 * Copyright (c) Microsoft Corporation. All rights reserved.
5779 * Licensed under the MIT License. See License.txt in the project root for license information.
5780 * ------------------------------------------------------------------------------------------ */
5781 Object.defineProperty(exports, "__esModule", { value: true });
5782 const vscode_jsonrpc_1 = __webpack_require__(41);
5783 class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5784 constructor(method) {
5788 exports.ProtocolRequestType0 = ProtocolRequestType0;
5789 class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5790 constructor(method) {
5794 exports.ProtocolRequestType = ProtocolRequestType;
5795 class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5796 constructor(method) {
5800 exports.ProtocolNotificationType = ProtocolNotificationType;
5801 class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5802 constructor(method) {
5806 exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5807 //# sourceMappingURL=messages.js.map
5811 /***/ (function(module, exports, __webpack_require__) {
5815 /* --------------------------------------------------------------------------------------------
5816 * Copyright (c) Microsoft Corporation. All rights reserved.
5817 * Licensed under the MIT License. See License.txt in the project root for license information.
5818 * ------------------------------------------------------------------------------------------ */
5819 Object.defineProperty(exports, "__esModule", { value: true });
5820 const Is = __webpack_require__(60);
5821 const vscode_jsonrpc_1 = __webpack_require__(41);
5822 const messages_1 = __webpack_require__(58);
5823 const protocol_implementation_1 = __webpack_require__(61);
5824 exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
5825 const protocol_typeDefinition_1 = __webpack_require__(62);
5826 exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
5827 const protocol_workspaceFolders_1 = __webpack_require__(63);
5828 exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
5829 exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
5830 const protocol_configuration_1 = __webpack_require__(64);
5831 exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
5832 const protocol_colorProvider_1 = __webpack_require__(65);
5833 exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
5834 exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
5835 const protocol_foldingRange_1 = __webpack_require__(66);
5836 exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
5837 const protocol_declaration_1 = __webpack_require__(67);
5838 exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
5839 const protocol_selectionRange_1 = __webpack_require__(68);
5840 exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
5841 const protocol_progress_1 = __webpack_require__(69);
5842 exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
5843 exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
5844 exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
5845 const protocol_callHierarchy_1 = __webpack_require__(70);
5846 exports.CallHierarchyIncomingCallsRequest = protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest;
5847 exports.CallHierarchyOutgoingCallsRequest = protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest;
5848 exports.CallHierarchyPrepareRequest = protocol_callHierarchy_1.CallHierarchyPrepareRequest;
5849 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
5850 let __noDynamicImport;
5852 * The DocumentFilter namespace provides helper functions to work with
5853 * [DocumentFilter](#DocumentFilter) literals.
5856 (function (DocumentFilter) {
5857 function is(value) {
5858 const candidate = value;
5859 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5861 DocumentFilter.is = is;
5862 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5864 * The DocumentSelector namespace provides helper functions to work with
5865 * [DocumentSelector](#DocumentSelector)s.
5867 var DocumentSelector;
5868 (function (DocumentSelector) {
5869 function is(value) {
5870 if (!Array.isArray(value)) {
5873 for (let elem of value) {
5874 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5880 DocumentSelector.is = is;
5881 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5883 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5884 * handler on the client side.
5886 var RegistrationRequest;
5887 (function (RegistrationRequest) {
5888 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5889 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5891 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5892 * handler on the client side.
5894 var UnregistrationRequest;
5895 (function (UnregistrationRequest) {
5896 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5897 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5898 var ResourceOperationKind;
5899 (function (ResourceOperationKind) {
5901 * Supports creating new files and folders.
5903 ResourceOperationKind.Create = 'create';
5905 * Supports renaming existing files and folders.
5907 ResourceOperationKind.Rename = 'rename';
5909 * Supports deleting existing files and folders.
5911 ResourceOperationKind.Delete = 'delete';
5912 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5913 var FailureHandlingKind;
5914 (function (FailureHandlingKind) {
5916 * Applying the workspace change is simply aborted if one of the changes provided
5917 * fails. All operations executed before the failing operation stay executed.
5919 FailureHandlingKind.Abort = 'abort';
5921 * All operations are executed transactional. That means they either all
5922 * succeed or no changes at all are applied to the workspace.
5924 FailureHandlingKind.Transactional = 'transactional';
5926 * If the workspace edit contains only textual file changes they are executed transactional.
5927 * If resource changes (create, rename or delete file) are part of the change the failure
5928 * handling startegy is abort.
5930 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5932 * The client tries to undo the operations already executed. But there is no
5933 * guarantee that this is succeeding.
5935 FailureHandlingKind.Undo = 'undo';
5936 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5938 * The StaticRegistrationOptions namespace provides helper functions to work with
5939 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5941 var StaticRegistrationOptions;
5942 (function (StaticRegistrationOptions) {
5943 function hasId(value) {
5944 const candidate = value;
5945 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5947 StaticRegistrationOptions.hasId = hasId;
5948 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5950 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5951 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5953 var TextDocumentRegistrationOptions;
5954 (function (TextDocumentRegistrationOptions) {
5955 function is(value) {
5956 const candidate = value;
5957 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5959 TextDocumentRegistrationOptions.is = is;
5960 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5962 * The WorkDoneProgressOptions namespace provides helper functions to work with
5963 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5965 var WorkDoneProgressOptions;
5966 (function (WorkDoneProgressOptions) {
5967 function is(value) {
5968 const candidate = value;
5969 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5971 WorkDoneProgressOptions.is = is;
5972 function hasWorkDoneProgress(value) {
5973 const candidate = value;
5974 return candidate && Is.boolean(candidate.workDoneProgress);
5976 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5977 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5979 * The initialize request is sent from the client to the server.
5980 * It is sent once as the request after starting up the server.
5981 * The requests parameter is of type [InitializeParams](#InitializeParams)
5982 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5985 var InitializeRequest;
5986 (function (InitializeRequest) {
5987 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5988 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5990 * Known error codes for an `InitializeError`;
5992 var InitializeError;
5993 (function (InitializeError) {
5995 * If the protocol version provided by the client can't be handled by the server.
5996 * @deprecated This initialize error got replaced by client capabilities. There is
5997 * no version handshake in version 3.0x
5999 InitializeError.unknownProtocolVersion = 1;
6000 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
6002 * The intialized notification is sent from the client to the
6003 * server after the client is fully initialized and the server
6004 * is allowed to send requests from the server to the client.
6006 var InitializedNotification;
6007 (function (InitializedNotification) {
6008 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
6009 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
6010 //---- Shutdown Method ----
6012 * A shutdown request is sent from the client to the server.
6013 * It is sent once when the client decides to shutdown the
6014 * server. The only notification that is sent after a shutdown request
6015 * is the exit event.
6017 var ShutdownRequest;
6018 (function (ShutdownRequest) {
6019 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
6020 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
6021 //---- Exit Notification ----
6023 * The exit event is sent from the client to the server to
6024 * ask the server to exit its process.
6026 var ExitNotification;
6027 (function (ExitNotification) {
6028 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
6029 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
6031 * The configuration change notification is sent from the client to the server
6032 * when the client's configuration has changed. The notification contains
6033 * the changed configuration as defined by the language client.
6035 var DidChangeConfigurationNotification;
6036 (function (DidChangeConfigurationNotification) {
6037 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
6038 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
6039 //---- Message show and log notifications ----
6044 (function (MessageType) {
6048 MessageType.Error = 1;
6050 * A warning message.
6052 MessageType.Warning = 2;
6054 * An information message.
6056 MessageType.Info = 3;
6060 MessageType.Log = 4;
6061 })(MessageType = exports.MessageType || (exports.MessageType = {}));
6063 * The show message notification is sent from a server to a client to ask
6064 * the client to display a particular message in the user interface.
6066 var ShowMessageNotification;
6067 (function (ShowMessageNotification) {
6068 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
6069 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
6071 * The show message request is sent from the server to the client to show a message
6072 * and a set of options actions to the user.
6074 var ShowMessageRequest;
6075 (function (ShowMessageRequest) {
6076 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
6077 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
6079 * The log message notification is sent from the server to the client to ask
6080 * the client to log a particular message.
6082 var LogMessageNotification;
6083 (function (LogMessageNotification) {
6084 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
6085 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
6086 //---- Telemetry notification
6088 * The telemetry event notification is sent from the server to the client to ask
6089 * the client to log telemetry data.
6091 var TelemetryEventNotification;
6092 (function (TelemetryEventNotification) {
6093 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
6094 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
6096 * Defines how the host (editor) should sync
6097 * document changes to the language server.
6099 var TextDocumentSyncKind;
6100 (function (TextDocumentSyncKind) {
6102 * Documents should not be synced at all.
6104 TextDocumentSyncKind.None = 0;
6106 * Documents are synced by always sending the full content
6109 TextDocumentSyncKind.Full = 1;
6111 * Documents are synced by sending the full content on open.
6112 * After that only incremental updates to the document are
6115 TextDocumentSyncKind.Incremental = 2;
6116 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
6118 * The document open notification is sent from the client to the server to signal
6119 * newly opened text documents. The document's truth is now managed by the client
6120 * and the server must not try to read the document's truth using the document's
6121 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
6122 * mean that its content is presented in an editor. An open notification must not
6123 * be sent more than once without a corresponding close notification send before.
6124 * This means open and close notification must be balanced and the max open count
6127 var DidOpenTextDocumentNotification;
6128 (function (DidOpenTextDocumentNotification) {
6129 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
6130 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
6131 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
6133 * The document change notification is sent from the client to the server to signal
6134 * changes to a text document.
6136 var DidChangeTextDocumentNotification;
6137 (function (DidChangeTextDocumentNotification) {
6138 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
6139 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
6140 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
6142 * The document close notification is sent from the client to the server when
6143 * the document got closed in the client. The document's truth now exists where
6144 * the document's uri points to (e.g. if the document's uri is a file uri the
6145 * truth now exists on disk). As with the open notification the close notification
6146 * is about managing the document's content. Receiving a close notification
6147 * doesn't mean that the document was open in an editor before. A close
6148 * notification requires a previous open notification to be sent.
6150 var DidCloseTextDocumentNotification;
6151 (function (DidCloseTextDocumentNotification) {
6152 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
6153 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
6154 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
6156 * The document save notification is sent from the client to the server when
6157 * the document got saved in the client.
6159 var DidSaveTextDocumentNotification;
6160 (function (DidSaveTextDocumentNotification) {
6161 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
6162 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
6163 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
6165 * Represents reasons why a text document is saved.
6167 var TextDocumentSaveReason;
6168 (function (TextDocumentSaveReason) {
6170 * Manually triggered, e.g. by the user pressing save, by starting debugging,
6171 * or by an API call.
6173 TextDocumentSaveReason.Manual = 1;
6175 * Automatic after a delay.
6177 TextDocumentSaveReason.AfterDelay = 2;
6179 * When the editor lost focus.
6181 TextDocumentSaveReason.FocusOut = 3;
6182 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
6184 * A document will save notification is sent from the client to the server before
6185 * the document is actually saved.
6187 var WillSaveTextDocumentNotification;
6188 (function (WillSaveTextDocumentNotification) {
6189 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
6190 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
6191 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
6193 * A document will save request is sent from the client to the server before
6194 * the document is actually saved. The request can return an array of TextEdits
6195 * which will be applied to the text document before it is saved. Please note that
6196 * clients might drop results if computing the text edits took too long or if a
6197 * server constantly fails on this request. This is done to keep the save fast and
6200 var WillSaveTextDocumentWaitUntilRequest;
6201 (function (WillSaveTextDocumentWaitUntilRequest) {
6202 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
6203 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
6204 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
6206 * The watched files notification is sent from the client to the server when
6207 * the client detects changes to file watched by the language client.
6209 var DidChangeWatchedFilesNotification;
6210 (function (DidChangeWatchedFilesNotification) {
6211 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
6212 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
6214 * The file event type
6217 (function (FileChangeType) {
6219 * The file got created.
6221 FileChangeType.Created = 1;
6223 * The file got changed.
6225 FileChangeType.Changed = 2;
6227 * The file got deleted.
6229 FileChangeType.Deleted = 3;
6230 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
6232 (function (WatchKind) {
6234 * Interested in create events.
6236 WatchKind.Create = 1;
6238 * Interested in change events
6240 WatchKind.Change = 2;
6242 * Interested in delete events
6244 WatchKind.Delete = 4;
6245 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
6247 * Diagnostics notification are sent from the server to the client to signal
6248 * results of validation runs.
6250 var PublishDiagnosticsNotification;
6251 (function (PublishDiagnosticsNotification) {
6252 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
6253 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
6255 * How a completion was triggered
6257 var CompletionTriggerKind;
6258 (function (CompletionTriggerKind) {
6260 * Completion was triggered by typing an identifier (24x7 code
6261 * complete), manual invocation (e.g Ctrl+Space) or via API.
6263 CompletionTriggerKind.Invoked = 1;
6265 * Completion was triggered by a trigger character specified by
6266 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
6268 CompletionTriggerKind.TriggerCharacter = 2;
6270 * Completion was re-triggered as current completion list is incomplete
6272 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
6273 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
6275 * Request to request completion at a given text document position. The request's
6276 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
6277 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
6278 * or a Thenable that resolves to such.
6280 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
6281 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
6282 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
6283 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
6285 var CompletionRequest;
6286 (function (CompletionRequest) {
6287 CompletionRequest.method = 'textDocument/completion';
6288 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
6289 /** @deprecated Use CompletionRequest.type */
6290 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6291 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
6293 * Request to resolve additional information for a given completion item.The request's
6294 * parameter is of type [CompletionItem](#CompletionItem) the response
6295 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
6297 var CompletionResolveRequest;
6298 (function (CompletionResolveRequest) {
6299 CompletionResolveRequest.method = 'completionItem/resolve';
6300 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
6301 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
6303 * Request to request hover information at a given text document position. The request's
6304 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
6305 * type [Hover](#Hover) or a Thenable that resolves to such.
6308 (function (HoverRequest) {
6309 HoverRequest.method = 'textDocument/hover';
6310 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
6311 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
6313 * How a signature help was triggered.
6317 var SignatureHelpTriggerKind;
6318 (function (SignatureHelpTriggerKind) {
6320 * Signature help was invoked manually by the user or by a command.
6322 SignatureHelpTriggerKind.Invoked = 1;
6324 * Signature help was triggered by a trigger character.
6326 SignatureHelpTriggerKind.TriggerCharacter = 2;
6328 * Signature help was triggered by the cursor moving or by the document content changing.
6330 SignatureHelpTriggerKind.ContentChange = 3;
6331 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
6332 var SignatureHelpRequest;
6333 (function (SignatureHelpRequest) {
6334 SignatureHelpRequest.method = 'textDocument/signatureHelp';
6335 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
6336 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
6338 * A request to resolve the definition location of a symbol at a given text
6339 * document position. The request's parameter is of type [TextDocumentPosition]
6340 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
6341 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
6344 var DefinitionRequest;
6345 (function (DefinitionRequest) {
6346 DefinitionRequest.method = 'textDocument/definition';
6347 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
6348 /** @deprecated Use DefinitionRequest.type */
6349 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6350 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
6352 * A request to resolve project-wide references for the symbol denoted
6353 * by the given text document position. The request's parameter is of
6354 * type [ReferenceParams](#ReferenceParams) the response is of type
6355 * [Location[]](#Location) or a Thenable that resolves to such.
6357 var ReferencesRequest;
6358 (function (ReferencesRequest) {
6359 ReferencesRequest.method = 'textDocument/references';
6360 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
6361 /** @deprecated Use ReferencesRequest.type */
6362 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6363 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
6365 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
6366 * text document position. The request's parameter is of type [TextDocumentPosition]
6367 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
6368 * (#DocumentHighlight) or a Thenable that resolves to such.
6370 var DocumentHighlightRequest;
6371 (function (DocumentHighlightRequest) {
6372 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
6373 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
6374 /** @deprecated Use DocumentHighlightRequest.type */
6375 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6376 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
6378 * A request to list all symbols found in a given text document. The request's
6379 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
6380 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
6381 * that resolves to such.
6383 var DocumentSymbolRequest;
6384 (function (DocumentSymbolRequest) {
6385 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
6386 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
6387 /** @deprecated Use DocumentSymbolRequest.type */
6388 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6389 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
6391 * A request to provide commands for the given text document and range.
6393 var CodeActionRequest;
6394 (function (CodeActionRequest) {
6395 CodeActionRequest.method = 'textDocument/codeAction';
6396 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
6397 /** @deprecated Use CodeActionRequest.type */
6398 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6399 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
6401 * A request to list project-wide symbols matching the query string given
6402 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
6403 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
6406 var WorkspaceSymbolRequest;
6407 (function (WorkspaceSymbolRequest) {
6408 WorkspaceSymbolRequest.method = 'workspace/symbol';
6409 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
6410 /** @deprecated Use WorkspaceSymbolRequest.type */
6411 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6412 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
6414 * A request to provide code lens for the given text document.
6416 var CodeLensRequest;
6417 (function (CodeLensRequest) {
6418 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
6419 /** @deprecated Use CodeLensRequest.type */
6420 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6421 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
6423 * A request to resolve a command for a given code lens.
6425 var CodeLensResolveRequest;
6426 (function (CodeLensResolveRequest) {
6427 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
6428 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
6430 * A request to provide document links
6432 var DocumentLinkRequest;
6433 (function (DocumentLinkRequest) {
6434 DocumentLinkRequest.method = 'textDocument/documentLink';
6435 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
6436 /** @deprecated Use DocumentLinkRequest.type */
6437 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6438 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
6440 * Request to resolve additional information for a given document link. The request's
6441 * parameter is of type [DocumentLink](#DocumentLink) the response
6442 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
6444 var DocumentLinkResolveRequest;
6445 (function (DocumentLinkResolveRequest) {
6446 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
6447 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
6449 * A request to to format a whole document.
6451 var DocumentFormattingRequest;
6452 (function (DocumentFormattingRequest) {
6453 DocumentFormattingRequest.method = 'textDocument/formatting';
6454 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
6455 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
6457 * A request to to format a range in a document.
6459 var DocumentRangeFormattingRequest;
6460 (function (DocumentRangeFormattingRequest) {
6461 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
6462 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
6463 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
6465 * A request to format a document on type.
6467 var DocumentOnTypeFormattingRequest;
6468 (function (DocumentOnTypeFormattingRequest) {
6469 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
6470 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
6471 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
6473 * A request to rename a symbol.
6476 (function (RenameRequest) {
6477 RenameRequest.method = 'textDocument/rename';
6478 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
6479 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
6481 * A request to test and perform the setup necessary for a rename.
6483 var PrepareRenameRequest;
6484 (function (PrepareRenameRequest) {
6485 PrepareRenameRequest.method = 'textDocument/prepareRename';
6486 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
6487 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
6489 * A request send from the client to the server to execute a command. The request might return
6490 * a workspace edit which the client will apply to the workspace.
6492 var ExecuteCommandRequest;
6493 (function (ExecuteCommandRequest) {
6494 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
6495 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
6497 * A request sent from the server to the client to modified certain resources.
6499 var ApplyWorkspaceEditRequest;
6500 (function (ApplyWorkspaceEditRequest) {
6501 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
6502 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
6503 //# sourceMappingURL=protocol.js.map
6507 /***/ (function(module, exports, __webpack_require__) {
6510 /* --------------------------------------------------------------------------------------------
6511 * Copyright (c) Microsoft Corporation. All rights reserved.
6512 * Licensed under the MIT License. See License.txt in the project root for license information.
6513 * ------------------------------------------------------------------------------------------ */
6515 Object.defineProperty(exports, "__esModule", { value: true });
6516 function boolean(value) {
6517 return value === true || value === false;
6519 exports.boolean = boolean;
6520 function string(value) {
6521 return typeof value === 'string' || value instanceof String;
6523 exports.string = string;
6524 function number(value) {
6525 return typeof value === 'number' || value instanceof Number;
6527 exports.number = number;
6528 function error(value) {
6529 return value instanceof Error;
6531 exports.error = error;
6532 function func(value) {
6533 return typeof value === 'function';
6535 exports.func = func;
6536 function array(value) {
6537 return Array.isArray(value);
6539 exports.array = array;
6540 function stringArray(value) {
6541 return array(value) && value.every(elem => string(elem));
6543 exports.stringArray = stringArray;
6544 function typedArray(value, check) {
6545 return Array.isArray(value) && value.every(check);
6547 exports.typedArray = typedArray;
6548 function objectLiteral(value) {
6549 // Strictly speaking class instances pass this check as well. Since the LSP
6550 // doesn't use classes we ignore this for now. If we do we need to add something
6551 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
6552 return value !== null && typeof value === 'object';
6554 exports.objectLiteral = objectLiteral;
6555 //# sourceMappingURL=is.js.map
6559 /***/ (function(module, exports, __webpack_require__) {
6563 /* --------------------------------------------------------------------------------------------
6564 * Copyright (c) Microsoft Corporation. All rights reserved.
6565 * Licensed under the MIT License. See License.txt in the project root for license information.
6566 * ------------------------------------------------------------------------------------------ */
6567 Object.defineProperty(exports, "__esModule", { value: true });
6568 const vscode_jsonrpc_1 = __webpack_require__(41);
6569 const messages_1 = __webpack_require__(58);
6570 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6571 let __noDynamicImport;
6573 * A request to resolve the implementation locations of a symbol at a given text
6574 * document position. The request's parameter is of type [TextDocumentPositioParams]
6575 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6576 * Thenable that resolves to such.
6578 var ImplementationRequest;
6579 (function (ImplementationRequest) {
6580 ImplementationRequest.method = 'textDocument/implementation';
6581 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
6582 /** @deprecated Use ImplementationRequest.type */
6583 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6584 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
6585 //# sourceMappingURL=protocol.implementation.js.map
6589 /***/ (function(module, exports, __webpack_require__) {
6593 /* --------------------------------------------------------------------------------------------
6594 * Copyright (c) Microsoft Corporation. All rights reserved.
6595 * Licensed under the MIT License. See License.txt in the project root for license information.
6596 * ------------------------------------------------------------------------------------------ */
6597 Object.defineProperty(exports, "__esModule", { value: true });
6598 const vscode_jsonrpc_1 = __webpack_require__(41);
6599 const messages_1 = __webpack_require__(58);
6600 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6601 let __noDynamicImport;
6603 * A request to resolve the type definition locations of a symbol at a given text
6604 * document position. The request's parameter is of type [TextDocumentPositioParams]
6605 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6606 * Thenable that resolves to such.
6608 var TypeDefinitionRequest;
6609 (function (TypeDefinitionRequest) {
6610 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
6611 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
6612 /** @deprecated Use TypeDefinitionRequest.type */
6613 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6614 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
6615 //# sourceMappingURL=protocol.typeDefinition.js.map
6619 /***/ (function(module, exports, __webpack_require__) {
6623 /* --------------------------------------------------------------------------------------------
6624 * Copyright (c) Microsoft Corporation. All rights reserved.
6625 * Licensed under the MIT License. See License.txt in the project root for license information.
6626 * ------------------------------------------------------------------------------------------ */
6627 Object.defineProperty(exports, "__esModule", { value: true });
6628 const messages_1 = __webpack_require__(58);
6630 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
6632 var WorkspaceFoldersRequest;
6633 (function (WorkspaceFoldersRequest) {
6634 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
6635 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
6637 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
6638 * folder configuration changes.
6640 var DidChangeWorkspaceFoldersNotification;
6641 (function (DidChangeWorkspaceFoldersNotification) {
6642 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
6643 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
6644 //# sourceMappingURL=protocol.workspaceFolders.js.map
6648 /***/ (function(module, exports, __webpack_require__) {
6652 /* --------------------------------------------------------------------------------------------
6653 * Copyright (c) Microsoft Corporation. All rights reserved.
6654 * Licensed under the MIT License. See License.txt in the project root for license information.
6655 * ------------------------------------------------------------------------------------------ */
6656 Object.defineProperty(exports, "__esModule", { value: true });
6657 const messages_1 = __webpack_require__(58);
6659 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
6660 * configuration setting.
6662 * This pull model replaces the old push model were the client signaled configuration change via an
6663 * event. If the server still needs to react to configuration changes (since the server caches the
6664 * result of `workspace/configuration` requests) the server should register for an empty configuration
6665 * change event and empty the cache if such an event is received.
6667 var ConfigurationRequest;
6668 (function (ConfigurationRequest) {
6669 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
6670 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
6671 //# sourceMappingURL=protocol.configuration.js.map
6675 /***/ (function(module, exports, __webpack_require__) {
6679 /* --------------------------------------------------------------------------------------------
6680 * Copyright (c) Microsoft Corporation. All rights reserved.
6681 * Licensed under the MIT License. See License.txt in the project root for license information.
6682 * ------------------------------------------------------------------------------------------ */
6683 Object.defineProperty(exports, "__esModule", { value: true });
6684 const vscode_jsonrpc_1 = __webpack_require__(41);
6685 const messages_1 = __webpack_require__(58);
6687 * A request to list all color symbols found in a given text document. The request's
6688 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
6689 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6690 * that resolves to such.
6692 var DocumentColorRequest;
6693 (function (DocumentColorRequest) {
6694 DocumentColorRequest.method = 'textDocument/documentColor';
6695 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
6696 /** @deprecated Use DocumentColorRequest.type */
6697 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6698 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
6700 * A request to list all presentation for a color. The request's
6701 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
6702 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6703 * that resolves to such.
6705 var ColorPresentationRequest;
6706 (function (ColorPresentationRequest) {
6707 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
6708 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
6709 //# sourceMappingURL=protocol.colorProvider.js.map
6713 /***/ (function(module, exports, __webpack_require__) {
6717 /*---------------------------------------------------------------------------------------------
6718 * Copyright (c) Microsoft Corporation. All rights reserved.
6719 * Licensed under the MIT License. See License.txt in the project root for license information.
6720 *--------------------------------------------------------------------------------------------*/
6721 Object.defineProperty(exports, "__esModule", { value: true });
6722 const vscode_jsonrpc_1 = __webpack_require__(41);
6723 const messages_1 = __webpack_require__(58);
6725 * Enum of known range kinds
6727 var FoldingRangeKind;
6728 (function (FoldingRangeKind) {
6730 * Folding range for a comment
6732 FoldingRangeKind["Comment"] = "comment";
6734 * Folding range for a imports or includes
6736 FoldingRangeKind["Imports"] = "imports";
6738 * Folding range for a region (e.g. `#region`)
6740 FoldingRangeKind["Region"] = "region";
6741 })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
6743 * A request to provide folding ranges in a document. The request's
6744 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
6745 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
6746 * that resolves to such.
6748 var FoldingRangeRequest;
6749 (function (FoldingRangeRequest) {
6750 FoldingRangeRequest.method = 'textDocument/foldingRange';
6751 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
6752 /** @deprecated Use FoldingRangeRequest.type */
6753 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6754 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
6755 //# sourceMappingURL=protocol.foldingRange.js.map
6759 /***/ (function(module, exports, __webpack_require__) {
6763 /* --------------------------------------------------------------------------------------------
6764 * Copyright (c) Microsoft Corporation. All rights reserved.
6765 * Licensed under the MIT License. See License.txt in the project root for license information.
6766 * ------------------------------------------------------------------------------------------ */
6767 Object.defineProperty(exports, "__esModule", { value: true });
6768 const vscode_jsonrpc_1 = __webpack_require__(41);
6769 const messages_1 = __webpack_require__(58);
6770 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6771 let __noDynamicImport;
6773 * A request to resolve the type definition locations of a symbol at a given text
6774 * document position. The request's parameter is of type [TextDocumentPositioParams]
6775 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6776 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6779 var DeclarationRequest;
6780 (function (DeclarationRequest) {
6781 DeclarationRequest.method = 'textDocument/declaration';
6782 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6783 /** @deprecated Use DeclarationRequest.type */
6784 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6785 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6786 //# sourceMappingURL=protocol.declaration.js.map
6790 /***/ (function(module, exports, __webpack_require__) {
6794 /*---------------------------------------------------------------------------------------------
6795 * Copyright (c) Microsoft Corporation. All rights reserved.
6796 * Licensed under the MIT License. See License.txt in the project root for license information.
6797 *--------------------------------------------------------------------------------------------*/
6798 Object.defineProperty(exports, "__esModule", { value: true });
6799 const vscode_jsonrpc_1 = __webpack_require__(41);
6800 const messages_1 = __webpack_require__(58);
6802 * A request to provide selection ranges in a document. The request's
6803 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6804 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6805 * that resolves to such.
6807 var SelectionRangeRequest;
6808 (function (SelectionRangeRequest) {
6809 SelectionRangeRequest.method = 'textDocument/selectionRange';
6810 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6811 /** @deprecated Use SelectionRangeRequest.type */
6812 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6813 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6814 //# sourceMappingURL=protocol.selectionRange.js.map
6818 /***/ (function(module, exports, __webpack_require__) {
6822 /* --------------------------------------------------------------------------------------------
6823 * Copyright (c) Microsoft Corporation. All rights reserved.
6824 * Licensed under the MIT License. See License.txt in the project root for license information.
6825 * ------------------------------------------------------------------------------------------ */
6826 Object.defineProperty(exports, "__esModule", { value: true });
6827 const vscode_jsonrpc_1 = __webpack_require__(41);
6828 const messages_1 = __webpack_require__(58);
6829 var WorkDoneProgress;
6830 (function (WorkDoneProgress) {
6831 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6832 })(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6834 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6835 * reporting from the server.
6837 var WorkDoneProgressCreateRequest;
6838 (function (WorkDoneProgressCreateRequest) {
6839 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6840 })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6842 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6843 * initiated on the server side.
6845 var WorkDoneProgressCancelNotification;
6846 (function (WorkDoneProgressCancelNotification) {
6847 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6848 })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6849 //# sourceMappingURL=protocol.progress.js.map
6853 /***/ (function(module, exports, __webpack_require__) {
6857 /* --------------------------------------------------------------------------------------------
6858 * Copyright (c) TypeFox and others. All rights reserved.
6859 * Licensed under the MIT License. See License.txt in the project root for license information.
6860 * ------------------------------------------------------------------------------------------ */
6861 Object.defineProperty(exports, "__esModule", { value: true });
6862 const messages_1 = __webpack_require__(58);
6864 * A request to result a `CallHierarchyItem` in a document at a given position.
6865 * Can be used as an input to a incoming or outgoing call hierarchy.
6869 var CallHierarchyPrepareRequest;
6870 (function (CallHierarchyPrepareRequest) {
6871 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6872 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6873 })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6875 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6879 var CallHierarchyIncomingCallsRequest;
6880 (function (CallHierarchyIncomingCallsRequest) {
6881 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6882 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6883 })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6885 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6889 var CallHierarchyOutgoingCallsRequest;
6890 (function (CallHierarchyOutgoingCallsRequest) {
6891 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6892 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6893 })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6894 //# sourceMappingURL=protocol.callHierarchy.js.map
6898 /***/ (function(module, exports, __webpack_require__) {
6902 /* --------------------------------------------------------------------------------------------
6903 * Copyright (c) Microsoft Corporation. All rights reserved.
6904 * Licensed under the MIT License. See License.txt in the project root for license information.
6905 * ------------------------------------------------------------------------------------------ */
6906 Object.defineProperty(exports, "__esModule", { value: true });
6907 const vscode_jsonrpc_1 = __webpack_require__(41);
6908 function createProtocolConnection(input, output, logger, options) {
6909 if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
6910 options = { connectionStrategy: options };
6912 return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
6914 exports.createProtocolConnection = createProtocolConnection;
6915 //# sourceMappingURL=connection.js.map
6919 /***/ (function(module, exports, __webpack_require__) {
6923 /* --------------------------------------------------------------------------------------------
6924 * Copyright (c) Microsoft Corporation. All rights reserved.
6925 * Licensed under the MIT License. See License.txt in the project root for license information.
6926 * ------------------------------------------------------------------------------------------ */
6927 Object.defineProperty(exports, "__esModule", { value: true });
6928 const messages_1 = __webpack_require__(58);
6930 * A set of predefined token types. This set is not fixed
6931 * an clients can specify additional token types via the
6932 * corresponding client capabilities.
6934 * @since 3.16.0 - Proposed state
6936 var SemanticTokenTypes;
6937 (function (SemanticTokenTypes) {
6938 SemanticTokenTypes["namespace"] = "namespace";
6939 SemanticTokenTypes["type"] = "type";
6940 SemanticTokenTypes["class"] = "class";
6941 SemanticTokenTypes["enum"] = "enum";
6942 SemanticTokenTypes["interface"] = "interface";
6943 SemanticTokenTypes["struct"] = "struct";
6944 SemanticTokenTypes["typeParameter"] = "typeParameter";
6945 SemanticTokenTypes["parameter"] = "parameter";
6946 SemanticTokenTypes["variable"] = "variable";
6947 SemanticTokenTypes["property"] = "property";
6948 SemanticTokenTypes["enumMember"] = "enumMember";
6949 SemanticTokenTypes["event"] = "event";
6950 SemanticTokenTypes["function"] = "function";
6951 SemanticTokenTypes["member"] = "member";
6952 SemanticTokenTypes["macro"] = "macro";
6953 SemanticTokenTypes["keyword"] = "keyword";
6954 SemanticTokenTypes["modifier"] = "modifier";
6955 SemanticTokenTypes["comment"] = "comment";
6956 SemanticTokenTypes["string"] = "string";
6957 SemanticTokenTypes["number"] = "number";
6958 SemanticTokenTypes["regexp"] = "regexp";
6959 SemanticTokenTypes["operator"] = "operator";
6960 })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6962 * A set of predefined token modifiers. This set is not fixed
6963 * an clients can specify additional token types via the
6964 * corresponding client capabilities.
6966 * @since 3.16.0 - Proposed state
6968 var SemanticTokenModifiers;
6969 (function (SemanticTokenModifiers) {
6970 SemanticTokenModifiers["declaration"] = "declaration";
6971 SemanticTokenModifiers["definition"] = "definition";
6972 SemanticTokenModifiers["readonly"] = "readonly";
6973 SemanticTokenModifiers["static"] = "static";
6974 SemanticTokenModifiers["deprecated"] = "deprecated";
6975 SemanticTokenModifiers["abstract"] = "abstract";
6976 SemanticTokenModifiers["async"] = "async";
6977 SemanticTokenModifiers["modification"] = "modification";
6978 SemanticTokenModifiers["documentation"] = "documentation";
6979 SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
6980 })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6982 * @since 3.16.0 - Proposed state
6985 (function (SemanticTokens) {
6986 function is(value) {
6987 const candidate = value;
6988 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6989 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6991 SemanticTokens.is = is;
6992 })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6994 * @since 3.16.0 - Proposed state
6996 var SemanticTokensRequest;
6997 (function (SemanticTokensRequest) {
6998 SemanticTokensRequest.method = 'textDocument/semanticTokens';
6999 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
7000 })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
7002 * @since 3.16.0 - Proposed state
7004 var SemanticTokensEditsRequest;
7005 (function (SemanticTokensEditsRequest) {
7006 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
7007 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
7008 })(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
7010 * @since 3.16.0 - Proposed state
7012 var SemanticTokensRangeRequest;
7013 (function (SemanticTokensRangeRequest) {
7014 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
7015 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
7016 })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
7017 //# sourceMappingURL=protocol.semanticTokens.proposed.js.map
7021 /***/ (function(module, exports, __webpack_require__) {
7025 /*---------------------------------------------------------------------------------------------
7026 * Copyright (c) Microsoft Corporation. All rights reserved.
7027 * Licensed under the MIT License. See License.txt in the project root for license information.
7028 *--------------------------------------------------------------------------------------------*/
7029 Object.defineProperty(exports, "__esModule", { value: true });
7031 constructor(_value) {
7032 this._value = _value;
7039 return this.asHex() === other.asHex();
7042 class V4UUID extends ValueUUID {
7045 V4UUID._randomHex(),
7046 V4UUID._randomHex(),
7047 V4UUID._randomHex(),
7048 V4UUID._randomHex(),
7049 V4UUID._randomHex(),
7050 V4UUID._randomHex(),
7051 V4UUID._randomHex(),
7052 V4UUID._randomHex(),
7054 V4UUID._randomHex(),
7055 V4UUID._randomHex(),
7056 V4UUID._randomHex(),
7057 V4UUID._randomHex(),
7060 V4UUID._randomHex(),
7061 V4UUID._randomHex(),
7062 V4UUID._randomHex(),
7064 V4UUID._oneOf(V4UUID._timeHighBits),
7065 V4UUID._randomHex(),
7066 V4UUID._randomHex(),
7067 V4UUID._randomHex(),
7069 V4UUID._randomHex(),
7070 V4UUID._randomHex(),
7071 V4UUID._randomHex(),
7072 V4UUID._randomHex(),
7073 V4UUID._randomHex(),
7074 V4UUID._randomHex(),
7075 V4UUID._randomHex(),
7076 V4UUID._randomHex(),
7077 V4UUID._randomHex(),
7078 V4UUID._randomHex(),
7079 V4UUID._randomHex(),
7080 V4UUID._randomHex(),
7083 static _oneOf(array) {
7084 return array[Math.floor(array.length * Math.random())];
7086 static _randomHex() {
7087 return V4UUID._oneOf(V4UUID._chars);
7090 V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
7091 V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
7093 * An empty UUID that contains only zeros.
7095 exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
7097 return new V4UUID();
7100 const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
7101 function isUUID(value) {
7102 return _UUIDPattern.test(value);
7104 exports.isUUID = isUUID;
7106 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
7107 * @param value A uuid string.
7109 function parse(value) {
7110 if (!isUUID(value)) {
7111 throw new Error('invalid uuid');
7113 return new ValueUUID(value);
7115 exports.parse = parse;
7116 function generateUuid() {
7117 return v4().asHex();
7119 exports.generateUuid = generateUuid;
7120 //# sourceMappingURL=uuid.js.map
7124 /***/ (function(module, exports, __webpack_require__) {
7128 /* --------------------------------------------------------------------------------------------
7129 * Copyright (c) Microsoft Corporation. All rights reserved.
7130 * Licensed under the MIT License. See License.txt in the project root for license information.
7131 * ------------------------------------------------------------------------------------------ */
7132 Object.defineProperty(exports, "__esModule", { value: true });
7133 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7134 const uuid_1 = __webpack_require__(73);
7135 class WorkDoneProgressReporterImpl {
7136 constructor(_connection, _token) {
7137 this._connection = _connection;
7138 this._token = _token;
7139 WorkDoneProgressReporterImpl.Instances.set(this._token, this);
7141 begin(title, percentage, message, cancellable) {
7149 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
7151 report(arg0, arg1) {
7155 if (typeof arg0 === 'number') {
7156 param.percentage = arg0;
7157 if (arg1 !== undefined) {
7158 param.message = arg1;
7162 param.message = arg0;
7164 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
7167 WorkDoneProgressReporterImpl.Instances.delete(this._token);
7168 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
7171 WorkDoneProgressReporterImpl.Instances = new Map();
7172 class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {
7173 constructor(connection, token) {
7174 super(connection, token);
7175 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
7178 return this._source.token;
7181 this._source.dispose();
7185 this._source.cancel();
7188 class NullProgressReporter {
7198 class NullProgressServerReporter extends NullProgressReporter {
7201 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
7204 return this._source.token;
7207 this._source.dispose();
7210 this._source.cancel();
7213 function attachWorkDone(connection, params) {
7214 if (params === undefined || params.workDoneToken === undefined) {
7215 return new NullProgressReporter();
7217 const token = params.workDoneToken;
7218 delete params.workDoneToken;
7219 return new WorkDoneProgressReporterImpl(connection, token);
7221 exports.attachWorkDone = attachWorkDone;
7222 exports.ProgressFeature = (Base) => {
7223 return class extends Base {
7226 this._progressSupported = false;
7228 initialize(capabilities) {
7230 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
7231 this._progressSupported = true;
7232 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
7233 let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
7234 if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
7240 attachWorkDoneProgress(token) {
7241 if (token === undefined) {
7242 return new NullProgressReporter();
7245 return new WorkDoneProgressReporterImpl(this.connection, token);
7248 createWorkDoneProgress() {
7249 if (this._progressSupported) {
7250 const token = uuid_1.generateUuid();
7251 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
7252 const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
7257 return Promise.resolve(new NullProgressServerReporter());
7263 (function (ResultProgress) {
7264 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
7265 })(ResultProgress || (ResultProgress = {}));
7266 class ResultProgressReporterImpl {
7267 constructor(_connection, _token) {
7268 this._connection = _connection;
7269 this._token = _token;
7272 this._connection.sendProgress(ResultProgress.type, this._token, data);
7275 function attachPartialResult(connection, params) {
7276 if (params === undefined || params.partialResultToken === undefined) {
7279 const token = params.partialResultToken;
7280 delete params.partialResultToken;
7281 return new ResultProgressReporterImpl(connection, token);
7283 exports.attachPartialResult = attachPartialResult;
7284 //# sourceMappingURL=progress.js.map
7288 /***/ (function(module, exports, __webpack_require__) {
7291 /* --------------------------------------------------------------------------------------------
7292 * Copyright (c) Microsoft Corporation. All rights reserved.
7293 * Licensed under the MIT License. See License.txt in the project root for license information.
7294 * ------------------------------------------------------------------------------------------ */
7296 Object.defineProperty(exports, "__esModule", { value: true });
7297 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7298 const Is = __webpack_require__(37);
7299 exports.ConfigurationFeature = (Base) => {
7300 return class extends Base {
7301 getConfiguration(arg) {
7303 return this._getConfiguration({});
7305 else if (Is.string(arg)) {
7306 return this._getConfiguration({ section: arg });
7309 return this._getConfiguration(arg);
7312 _getConfiguration(arg) {
7314 items: Array.isArray(arg) ? arg : [arg]
7316 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
7317 return Array.isArray(arg) ? result : result[0];
7322 //# sourceMappingURL=configuration.js.map
7326 /***/ (function(module, exports, __webpack_require__) {
7329 /* --------------------------------------------------------------------------------------------
7330 * Copyright (c) Microsoft Corporation. All rights reserved.
7331 * Licensed under the MIT License. See License.txt in the project root for license information.
7332 * ------------------------------------------------------------------------------------------ */
7334 Object.defineProperty(exports, "__esModule", { value: true });
7335 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7336 exports.WorkspaceFoldersFeature = (Base) => {
7337 return class extends Base {
7338 initialize(capabilities) {
7339 let workspaceCapabilities = capabilities.workspace;
7340 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
7341 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
7342 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
7343 this._onDidChangeWorkspaceFolders.fire(params.event);
7347 getWorkspaceFolders() {
7348 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
7350 get onDidChangeWorkspaceFolders() {
7351 if (!this._onDidChangeWorkspaceFolders) {
7352 throw new Error('Client doesn\'t support sending workspace folder change events.');
7354 if (!this._unregistration) {
7355 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
7357 return this._onDidChangeWorkspaceFolders.event;
7361 //# sourceMappingURL=workspaceFolders.js.map
7365 /***/ (function(module, exports, __webpack_require__) {
7368 /* --------------------------------------------------------------------------------------------
7369 * Copyright (c) Microsoft Corporation. All rights reserved.
7370 * Licensed under the MIT License. See License.txt in the project root for license information.
7371 * ------------------------------------------------------------------------------------------ */
7373 Object.defineProperty(exports, "__esModule", { value: true });
7374 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7375 exports.CallHierarchyFeature = (Base) => {
7376 return class extends Base {
7377 get callHierarchy() {
7379 onPrepare: (handler) => {
7380 this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
7381 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
7384 onIncomingCalls: (handler) => {
7385 const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
7386 this.connection.onRequest(type, (params, cancel) => {
7387 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7390 onOutgoingCalls: (handler) => {
7391 const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
7392 this.connection.onRequest(type, (params, cancel) => {
7393 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7400 //# sourceMappingURL=callHierarchy.js.map
7404 /***/ (function(module, exports, __webpack_require__) {
7407 /* WEBPACK VAR INJECTION */(function(__filename) {
7408 /* --------------------------------------------------------------------------------------------
7409 * Copyright (c) Microsoft Corporation. All rights reserved.
7410 * Licensed under the MIT License. See License.txt in the project root for license information.
7411 * ------------------------------------------------------------------------------------------ */
7412 Object.defineProperty(exports, "__esModule", { value: true });
7413 const url = __webpack_require__(79);
7414 const path = __webpack_require__(3);
7415 const fs = __webpack_require__(80);
7416 const child_process_1 = __webpack_require__(81);
7418 * @deprecated Use the `vscode-uri` npm module which provides a more
7419 * complete implementation of handling VS Code URIs.
7421 function uriToFilePath(uri) {
7422 let parsed = url.parse(uri);
7423 if (parsed.protocol !== 'file:' || !parsed.path) {
7426 let segments = parsed.path.split('/');
7427 for (var i = 0, len = segments.length; i < len; i++) {
7428 segments[i] = decodeURIComponent(segments[i]);
7430 if (process.platform === 'win32' && segments.length > 1) {
7431 let first = segments[0];
7432 let second = segments[1];
7433 // Do we have a drive letter and we started with a / which is the
7434 // case if the first segement is empty (see split above)
7435 if (first.length === 0 && second.length > 1 && second[1] === ':') {
7436 // Remove first slash
7440 return path.normalize(segments.join('/'));
7442 exports.uriToFilePath = uriToFilePath;
7443 function isWindows() {
7444 return process.platform === 'win32';
7446 function resolve(moduleName, nodePath, cwd, tracer) {
7447 const nodePathKey = 'NODE_PATH';
7450 'p.on(\'message\',function(m){',
7454 'else if(m.c===\'rs\'){',
7456 'var r=require.resolve(m.a);',
7457 'p.send({c:\'r\',s:true,r:r});',
7460 'p.send({c:\'r\',s:false});',
7465 return new Promise((resolve, reject) => {
7466 let env = process.env;
7467 let newEnv = Object.create(null);
7468 Object.keys(env).forEach(key => newEnv[key] = env[key]);
7469 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
7470 if (newEnv[nodePathKey]) {
7471 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
7474 newEnv[nodePathKey] = nodePath;
7477 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
7480 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
7482 let cp = child_process_1.fork('', [], {
7485 execArgv: ['-e', app]
7487 if (cp.pid === void 0) {
7488 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
7491 cp.on('error', (error) => {
7494 cp.on('message', (message) => {
7495 if (message.c === 'r') {
7496 cp.send({ c: 'e' });
7501 reject(new Error(`Failed to resolve module: ${moduleName}`));
7516 exports.resolve = resolve;
7518 * Resolve the global npm package path.
7519 * @deprecated Since this depends on the used package manager and their version the best is that servers
7520 * implement this themselves since they know best what kind of package managers to support.
7521 * @param tracer the tracer to use
7523 function resolveGlobalNodePath(tracer) {
7524 let npmCommand = 'npm';
7525 const env = Object.create(null);
7526 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
7527 env['NO_UPDATE_NOTIFIER'] = 'true';
7533 npmCommand = 'npm.cmd';
7534 options.shell = true;
7536 let handler = () => { };
7538 process.on('SIGPIPE', handler);
7539 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
7542 tracer(`'npm config get prefix' didn't return a value.`);
7546 let prefix = stdout.trim();
7548 tracer(`'npm config get prefix' value is: ${prefix}`);
7550 if (prefix.length > 0) {
7552 return path.join(prefix, 'node_modules');
7555 return path.join(prefix, 'lib', 'node_modules');
7564 process.removeListener('SIGPIPE', handler);
7567 exports.resolveGlobalNodePath = resolveGlobalNodePath;
7569 * Resolve the global yarn pakage path.
7570 * @deprecated Since this depends on the used package manager and their version the best is that servers
7571 * implement this themselves since they know best what kind of package managers to support.
7572 * @param tracer the tracer to use
7574 function resolveGlobalYarnPath(tracer) {
7575 let yarnCommand = 'yarn';
7580 yarnCommand = 'yarn.cmd';
7581 options.shell = true;
7583 let handler = () => { };
7585 process.on('SIGPIPE', handler);
7586 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
7587 let stdout = results.stdout;
7590 tracer(`'yarn global dir' didn't return a value.`);
7591 if (results.stderr) {
7592 tracer(results.stderr);
7597 let lines = stdout.trim().split(/\r?\n/);
7598 for (let line of lines) {
7600 let yarn = JSON.parse(line);
7601 if (yarn.type === 'log') {
7602 return path.join(yarn.data, 'node_modules');
7606 // Do nothing. Ignore the line
7615 process.removeListener('SIGPIPE', handler);
7618 exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
7620 (function (FileSystem) {
7621 let _isCaseSensitive = undefined;
7622 function isCaseSensitive() {
7623 if (_isCaseSensitive !== void 0) {
7624 return _isCaseSensitive;
7626 if (process.platform === 'win32') {
7627 _isCaseSensitive = false;
7630 // convert current file name to upper case / lower case and check if file exists
7631 // (guards against cases when name is already all uppercase or lowercase)
7632 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
7634 return _isCaseSensitive;
7636 FileSystem.isCaseSensitive = isCaseSensitive;
7637 function isParent(parent, child) {
7638 if (isCaseSensitive()) {
7639 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
7642 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
7645 FileSystem.isParent = isParent;
7646 })(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
7647 function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
7649 if (!path.isAbsolute(nodePath)) {
7650 nodePath = path.join(workspaceRoot, nodePath);
7652 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
7653 if (FileSystem.isParent(nodePath, value)) {
7657 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
7659 }).then(undefined, (_error) => {
7660 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
7664 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
7667 exports.resolveModulePath = resolveModulePath;
7668 //# sourceMappingURL=files.js.map
7669 /* WEBPACK VAR INJECTION */}.call(this, "/index.js"))
7673 /***/ (function(module, exports) {
7675 module.exports = require("url");
7679 /***/ (function(module, exports) {
7681 module.exports = require("fs");
7685 /***/ (function(module, exports) {
7687 module.exports = require("child_process");
7691 /***/ (function(module, exports, __webpack_require__) {
7694 /* --------------------------------------------------------------------------------------------
7695 * Copyright (c) Microsoft Corporation. All rights reserved.
7696 * Licensed under the MIT License. See License.txt in the project root for license information.
7697 * ----------------------------------------------------------------------------------------- */
7700 module.exports = __webpack_require__(39);
7704 /***/ (function(module, exports, __webpack_require__) {
7708 /* --------------------------------------------------------------------------------------------
7709 * Copyright (c) Microsoft Corporation. All rights reserved.
7710 * Licensed under the MIT License. See License.txt in the project root for license information.
7711 * ------------------------------------------------------------------------------------------ */
7712 function __export(m) {
7713 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
7715 Object.defineProperty(exports, "__esModule", { value: true });
7716 const st = __webpack_require__(84);
7717 __export(__webpack_require__(39));
7718 __export(__webpack_require__(38));
7719 var ProposedFeatures;
7720 (function (ProposedFeatures) {
7721 ProposedFeatures.all = {
7722 __brand: 'features',
7723 languages: st.SemanticTokensFeature
7725 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
7726 })(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
7727 //# sourceMappingURL=api.js.map
7731 /***/ (function(module, exports, __webpack_require__) {
7735 /* --------------------------------------------------------------------------------------------
7736 * Copyright (c) Microsoft Corporation. All rights reserved.
7737 * Licensed under the MIT License. See License.txt in the project root for license information.
7738 * ------------------------------------------------------------------------------------------ */
7739 Object.defineProperty(exports, "__esModule", { value: true });
7740 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7741 exports.SemanticTokensFeature = (Base) => {
7742 return class extends Base {
7743 get semanticTokens() {
7746 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
7747 this.connection.onRequest(type, (params, cancel) => {
7748 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7751 onEdits: (handler) => {
7752 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
7753 this.connection.onRequest(type, (params, cancel) => {
7754 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7757 onRange: (handler) => {
7758 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
7759 this.connection.onRequest(type, (params, cancel) => {
7760 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7767 class SemanticTokensBuilder {
7769 this._prevData = undefined;
7773 this._id = Date.now();
7779 push(line, char, length, tokenType, tokenModifiers) {
7780 let pushLine = line;
7781 let pushChar = char;
7782 if (this._dataLen > 0) {
7783 pushLine -= this._prevLine;
7784 if (pushLine === 0) {
7785 pushChar -= this._prevChar;
7788 this._data[this._dataLen++] = pushLine;
7789 this._data[this._dataLen++] = pushChar;
7790 this._data[this._dataLen++] = length;
7791 this._data[this._dataLen++] = tokenType;
7792 this._data[this._dataLen++] = tokenModifiers;
7793 this._prevLine = line;
7794 this._prevChar = char;
7797 return this._id.toString();
7799 previousResult(id) {
7800 if (this.id === id) {
7801 this._prevData = this._data;
7806 this._prevData = undefined;
7813 return this._prevData !== undefined;
7816 if (this._prevData !== undefined) {
7817 const prevDataLength = this._prevData.length;
7818 const dataLength = this._data.length;
7820 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
7823 if (startIndex < dataLength && startIndex < prevDataLength) {
7826 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
7829 const newData = this._data.slice(startIndex, dataLength - endIndex);
7833 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
7838 else if (startIndex < dataLength) {
7839 return { resultId: this.id, edits: [
7840 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
7843 else if (startIndex < prevDataLength) {
7844 return { resultId: this.id, edits: [
7845 { start: startIndex, deleteCount: prevDataLength - startIndex }
7849 return { resultId: this.id, edits: [] };
7853 return this.build();
7857 exports.SemanticTokensBuilder = SemanticTokensBuilder;
7858 //# sourceMappingURL=semanticTokens.proposed.js.map
7862 /***/ (function(module, exports, __webpack_require__) {
7866 /*---------------------------------------------------------------------------------------------
7867 * Copyright (c) Microsoft Corporation. All rights reserved.
7868 * Licensed under the MIT License. See License.txt in the project root for license information.
7869 *--------------------------------------------------------------------------------------------*/
7870 Object.defineProperty(exports, "__esModule", { value: true });
7871 exports.runSafeAsync = exports.formatError = void 0;
7872 const vscode_languageserver_1 = __webpack_require__(36);
7873 function formatError(message, err) {
7874 if (err instanceof Error) {
7876 return `${message}: ${error.message}\n${error.stack}`;
7878 else if (typeof err === 'string') {
7879 return `${message}: ${err}`;
7882 return `${message}: ${err.toString()}`;
7886 exports.formatError = formatError;
7887 function runSafeAsync(func, errorVal, errorMessage, token) {
7888 return new Promise((resolve) => {
7889 setImmediate(() => {
7890 if (token.isCancellationRequested) {
7891 resolve(cancelValue());
7893 return func().then(result => {
7894 if (token.isCancellationRequested) {
7895 resolve(cancelValue());
7902 console.error(formatError(errorMessage, e));
7908 exports.runSafeAsync = runSafeAsync;
7909 function cancelValue() {
7910 return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.RequestCancelled, 'Request cancelled');
7916 /***/ (function(module, exports, __webpack_require__) {
7920 /*---------------------------------------------------------------------------------------------
7921 * Copyright (c) Microsoft Corporation. All rights reserved.
7922 * Licensed under the MIT License. See License.txt in the project root for license information.
7923 *--------------------------------------------------------------------------------------------*/
7924 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7925 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7926 return new (P || (P = Promise))(function (resolve, reject) {
7927 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7928 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7929 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7930 step((generator = generator.apply(thisArg, _arguments || [])).next());
7933 Object.defineProperty(exports, "__esModule", { value: true });
7934 exports.startServer = void 0;
7935 const vscode_languageserver_1 = __webpack_require__(36);
7936 const vscode_uri_1 = __webpack_require__(87);
7937 const vscode_css_languageservice_1 = __webpack_require__(88);
7938 const languageModelCache_1 = __webpack_require__(129);
7939 const runner_1 = __webpack_require__(85);
7940 const documentContext_1 = __webpack_require__(130);
7941 const customData_1 = __webpack_require__(133);
7942 const requests_1 = __webpack_require__(132);
7943 var CustomDataChangedNotification;
7944 (function (CustomDataChangedNotification) {
7945 CustomDataChangedNotification.type = new vscode_languageserver_1.NotificationType('css/customDataChanged');
7946 })(CustomDataChangedNotification || (CustomDataChangedNotification = {}));
7947 function startServer(connection, runtime) {
7948 // Create a text document manager.
7949 const documents = new vscode_languageserver_1.TextDocuments(vscode_css_languageservice_1.TextDocument);
7950 // Make the text document manager listen on the connection
7951 // for open, change and close text document events
7952 documents.listen(connection);
7953 const stylesheets = languageModelCache_1.getLanguageModelCache(10, 60, document => getLanguageService(document).parseStylesheet(document));
7954 documents.onDidClose(e => {
7955 stylesheets.onDocumentRemoved(e.document);
7957 connection.onShutdown(() => {
7958 stylesheets.dispose();
7960 let scopedSettingsSupport = false;
7961 let foldingRangeLimit = Number.MAX_VALUE;
7962 let workspaceFolders;
7963 let dataProvidersReady = Promise.resolve();
7964 const languageServices = {};
7965 const notReady = () => Promise.reject('Not Ready');
7966 let requestService = { getContent: notReady, stat: notReady, readDirectory: notReady };
7967 // After the server has started the client sends an initialize request. The server receives
7968 // in the passed params the rootPath of the workspace plus the client capabilities.
7969 connection.onInitialize((params) => {
7970 workspaceFolders = params.workspaceFolders;
7971 if (!Array.isArray(workspaceFolders)) {
7972 workspaceFolders = [];
7973 if (params.rootPath) {
7974 workspaceFolders.push({ name: '', uri: vscode_uri_1.URI.file(params.rootPath).toString() });
7977 requestService = requests_1.getRequestService(params.initializationOptions.handledSchemas || ['file'], connection, runtime);
7978 function getClientCapability(name, def) {
7979 const keys = name.split('.');
7980 let c = params.capabilities;
7981 for (let i = 0; c && i < keys.length; i++) {
7982 if (!c.hasOwnProperty(keys[i])) {
7989 const snippetSupport = !!getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
7990 scopedSettingsSupport = !!getClientCapability('workspace.configuration', false);
7991 foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
7992 languageServices.css = vscode_css_languageservice_1.getCSSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7993 languageServices.scss = vscode_css_languageservice_1.getSCSSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7994 languageServices.less = vscode_css_languageservice_1.getLESSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7995 const capabilities = {
7996 textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
7997 completionProvider: snippetSupport ? { resolveProvider: false, triggerCharacters: ['/', '-'] } : undefined,
7998 hoverProvider: true,
7999 documentSymbolProvider: true,
8000 referencesProvider: true,
8001 definitionProvider: true,
8002 documentHighlightProvider: true,
8003 documentLinkProvider: {
8004 resolveProvider: false
8006 codeActionProvider: true,
8007 renameProvider: true,
8009 foldingRangeProvider: true,
8010 selectionRangeProvider: true
8012 return { capabilities };
8014 function getLanguageService(document) {
8015 let service = languageServices[document.languageId];
8017 connection.console.log('Document type is ' + document.languageId + ', using css instead.');
8018 service = languageServices['css'];
8022 let documentSettings = {};
8023 // remove document settings on close
8024 documents.onDidClose(e => {
8025 delete documentSettings[e.document.uri];
8027 function getDocumentSettings(textDocument) {
8028 if (scopedSettingsSupport) {
8029 let promise = documentSettings[textDocument.uri];
8031 const configRequestParam = { items: [{ scopeUri: textDocument.uri, section: textDocument.languageId }] };
8032 promise = connection.sendRequest(vscode_languageserver_1.ConfigurationRequest.type, configRequestParam).then(s => s[0]);
8033 documentSettings[textDocument.uri] = promise;
8037 return Promise.resolve(undefined);
8039 // The settings have changed. Is send on server activation as well.
8040 connection.onDidChangeConfiguration(change => {
8041 updateConfiguration(change.settings);
8043 function updateConfiguration(settings) {
8044 for (const languageId in languageServices) {
8045 languageServices[languageId].configure(settings[languageId]);
8047 // reset all document settings
8048 documentSettings = {};
8049 // Revalidate any open text documents
8050 documents.all().forEach(triggerValidation);
8052 const pendingValidationRequests = {};
8053 const validationDelayMs = 500;
8054 // The content of a text document has changed. This event is emitted
8055 // when the text document first opened or when its content has changed.
8056 documents.onDidChangeContent(change => {
8057 triggerValidation(change.document);
8059 // a document has closed: clear all diagnostics
8060 documents.onDidClose(event => {
8061 cleanPendingValidation(event.document);
8062 connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
8064 function cleanPendingValidation(textDocument) {
8065 const request = pendingValidationRequests[textDocument.uri];
8067 clearTimeout(request);
8068 delete pendingValidationRequests[textDocument.uri];
8071 function triggerValidation(textDocument) {
8072 cleanPendingValidation(textDocument);
8073 pendingValidationRequests[textDocument.uri] = setTimeout(() => {
8074 delete pendingValidationRequests[textDocument.uri];
8075 validateTextDocument(textDocument);
8076 }, validationDelayMs);
8078 function validateTextDocument(textDocument) {
8079 const settingsPromise = getDocumentSettings(textDocument);
8080 Promise.all([settingsPromise, dataProvidersReady]).then(([settings]) => __awaiter(this, void 0, void 0, function* () {
8081 const stylesheet = stylesheets.get(textDocument);
8082 const diagnostics = getLanguageService(textDocument).doValidation(textDocument, stylesheet, settings);
8083 // Send the computed diagnostics to VSCode.
8084 connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
8086 connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, e));
8089 function updateDataProviders(dataPaths) {
8090 dataProvidersReady = customData_1.fetchDataProviders(dataPaths, requestService).then(customDataProviders => {
8091 for (const lang in languageServices) {
8092 languageServices[lang].setDataProviders(true, customDataProviders);
8096 connection.onCompletion((textDocumentPosition, token) => {
8097 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8098 const document = documents.get(textDocumentPosition.textDocument.uri);
8100 yield dataProvidersReady;
8101 const styleSheet = stylesheets.get(document);
8102 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
8103 return getLanguageService(document).doComplete2(document, textDocumentPosition.position, styleSheet, documentContext);
8106 }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
8108 connection.onHover((textDocumentPosition, token) => {
8109 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8110 const document = documents.get(textDocumentPosition.textDocument.uri);
8112 yield dataProvidersReady;
8113 const styleSheet = stylesheets.get(document);
8114 return getLanguageService(document).doHover(document, textDocumentPosition.position, styleSheet);
8117 }), null, `Error while computing hover for ${textDocumentPosition.textDocument.uri}`, token);
8119 connection.onDocumentSymbol((documentSymbolParams, token) => {
8120 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8121 const document = documents.get(documentSymbolParams.textDocument.uri);
8123 yield dataProvidersReady;
8124 const stylesheet = stylesheets.get(document);
8125 return getLanguageService(document).findDocumentSymbols(document, stylesheet);
8128 }), [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
8130 connection.onDefinition((documentDefinitionParams, token) => {
8131 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8132 const document = documents.get(documentDefinitionParams.textDocument.uri);
8134 yield dataProvidersReady;
8135 const stylesheet = stylesheets.get(document);
8136 return getLanguageService(document).findDefinition(document, documentDefinitionParams.position, stylesheet);
8139 }), null, `Error while computing definitions for ${documentDefinitionParams.textDocument.uri}`, token);
8141 connection.onDocumentHighlight((documentHighlightParams, token) => {
8142 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8143 const document = documents.get(documentHighlightParams.textDocument.uri);
8145 yield dataProvidersReady;
8146 const stylesheet = stylesheets.get(document);
8147 return getLanguageService(document).findDocumentHighlights(document, documentHighlightParams.position, stylesheet);
8150 }), [], `Error while computing document highlights for ${documentHighlightParams.textDocument.uri}`, token);
8152 connection.onDocumentLinks((documentLinkParams, token) => __awaiter(this, void 0, void 0, function* () {
8153 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8154 const document = documents.get(documentLinkParams.textDocument.uri);
8156 yield dataProvidersReady;
8157 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
8158 const stylesheet = stylesheets.get(document);
8159 return getLanguageService(document).findDocumentLinks2(document, stylesheet, documentContext);
8162 }), [], `Error while computing document links for ${documentLinkParams.textDocument.uri}`, token);
8164 connection.onReferences((referenceParams, token) => {
8165 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8166 const document = documents.get(referenceParams.textDocument.uri);
8168 yield dataProvidersReady;
8169 const stylesheet = stylesheets.get(document);
8170 return getLanguageService(document).findReferences(document, referenceParams.position, stylesheet);
8173 }), [], `Error while computing references for ${referenceParams.textDocument.uri}`, token);
8175 connection.onCodeAction((codeActionParams, token) => {
8176 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8177 const document = documents.get(codeActionParams.textDocument.uri);
8179 yield dataProvidersReady;
8180 const stylesheet = stylesheets.get(document);
8181 return getLanguageService(document).doCodeActions(document, codeActionParams.range, codeActionParams.context, stylesheet);
8184 }), [], `Error while computing code actions for ${codeActionParams.textDocument.uri}`, token);
8186 connection.onDocumentColor((params, token) => {
8187 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8188 const document = documents.get(params.textDocument.uri);
8190 yield dataProvidersReady;
8191 const stylesheet = stylesheets.get(document);
8192 return getLanguageService(document).findDocumentColors(document, stylesheet);
8195 }), [], `Error while computing document colors for ${params.textDocument.uri}`, token);
8197 connection.onColorPresentation((params, token) => {
8198 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8199 const document = documents.get(params.textDocument.uri);
8201 yield dataProvidersReady;
8202 const stylesheet = stylesheets.get(document);
8203 return getLanguageService(document).getColorPresentations(document, stylesheet, params.color, params.range);
8206 }), [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
8208 connection.onRenameRequest((renameParameters, token) => {
8209 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8210 const document = documents.get(renameParameters.textDocument.uri);
8212 yield dataProvidersReady;
8213 const stylesheet = stylesheets.get(document);
8214 return getLanguageService(document).doRename(document, renameParameters.position, renameParameters.newName, stylesheet);
8217 }), null, `Error while computing renames for ${renameParameters.textDocument.uri}`, token);
8219 connection.onFoldingRanges((params, token) => {
8220 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8221 const document = documents.get(params.textDocument.uri);
8223 yield dataProvidersReady;
8224 return getLanguageService(document).getFoldingRanges(document, { rangeLimit: foldingRangeLimit });
8227 }), null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
8229 connection.onSelectionRanges((params, token) => {
8230 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8231 const document = documents.get(params.textDocument.uri);
8232 const positions = params.positions;
8234 yield dataProvidersReady;
8235 const stylesheet = stylesheets.get(document);
8236 return getLanguageService(document).getSelectionRanges(document, positions, stylesheet);
8239 }), [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
8241 connection.onNotification(CustomDataChangedNotification.type, updateDataProviders);
8242 // Listen on the connection
8243 connection.listen();
8245 exports.startServer = startServer;
8250 /***/ (function(module, __webpack_exports__, __webpack_require__) {
8253 __webpack_require__.r(__webpack_exports__);
8254 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
8255 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uriToFsPath", function() { return uriToFsPath; });
8256 /*---------------------------------------------------------------------------------------------
8257 * Copyright (c) Microsoft Corporation. All rights reserved.
8258 * Licensed under the MIT License. See License.txt in the project root for license information.
8259 *--------------------------------------------------------------------------------------------*/
8261 var __extends = (undefined && undefined.__extends) || (function () {
8262 var extendStatics = function (d, b) {
8263 extendStatics = Object.setPrototypeOf ||
8264 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8265 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8266 return extendStatics(d, b);
8268 return function (d, b) {
8269 extendStatics(d, b);
8270 function __() { this.constructor = d; }
8271 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8276 if (typeof process === 'object') {
8277 isWindows = process.platform === 'win32';
8279 else if (typeof navigator === 'object') {
8280 var userAgent = navigator.userAgent;
8281 isWindows = userAgent.indexOf('Windows') >= 0;
8283 function isHighSurrogate(charCode) {
8284 return (0xD800 <= charCode && charCode <= 0xDBFF);
8286 function isLowSurrogate(charCode) {
8287 return (0xDC00 <= charCode && charCode <= 0xDFFF);
8289 function isLowerAsciiHex(code) {
8290 return code >= 97 /* a */ && code <= 102 /* f */;
8292 function isLowerAsciiLetter(code) {
8293 return code >= 97 /* a */ && code <= 122 /* z */;
8295 function isUpperAsciiLetter(code) {
8296 return code >= 65 /* A */ && code <= 90 /* Z */;
8298 function isAsciiLetter(code) {
8299 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
8302 var _schemePattern = /^\w[\w\d+.-]*$/;
8303 var _singleSlashStart = /^\//;
8304 var _doubleSlashStart = /^\/\//;
8305 function _validateUri(ret, _strict) {
8306 // scheme, must be set
8307 if (!ret.scheme && _strict) {
8308 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
8310 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
8311 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
8312 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
8313 throw new Error('[UriError]: Scheme contains illegal characters.');
8315 // path, http://tools.ietf.org/html/rfc3986#section-3.3
8316 // If a URI contains an authority component, then the path component
8317 // must either be empty or begin with a slash ("/") character. If a URI
8318 // does not contain an authority component, then the path cannot begin
8319 // with two slash characters ("//").
8321 if (ret.authority) {
8322 if (!_singleSlashStart.test(ret.path)) {
8323 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');
8327 if (_doubleSlashStart.test(ret.path)) {
8328 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
8333 // for a while we allowed uris *without* schemes and this is the migration
8334 // for them, e.g. an uri without scheme and without strict-mode warns and falls
8335 // back to the file-scheme. that should cause the least carnage and still be a
8337 function _schemeFix(scheme, _strict) {
8338 if (!scheme && !_strict) {
8343 // implements a bit of https://tools.ietf.org/html/rfc3986#section-5
8344 function _referenceResolution(scheme, path) {
8345 // the slash-character is our 'default base' as we don't
8346 // support constructing URIs relative to other URIs. This
8347 // also means that we alter and potentially break paths.
8348 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
8356 else if (path[0] !== _slash) {
8357 path = _slash + path;
8365 var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
8367 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
8368 * This class is a simple parser which creates the basic component parts
8369 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
8373 * foo://example.com:8042/over/there?name=ferret#nose
8374 * \_/ \______________/\_________/ \_________/ \__/
8376 * scheme authority path query fragment
8377 * | _____________________|__
8379 * urn:example:animal:ferret:nose
8382 var URI = /** @class */ (function () {
8386 function URI(schemeOrData, authority, path, query, fragment, _strict) {
8387 if (_strict === void 0) { _strict = false; }
8388 if (typeof schemeOrData === 'object') {
8389 this.scheme = schemeOrData.scheme || _empty;
8390 this.authority = schemeOrData.authority || _empty;
8391 this.path = schemeOrData.path || _empty;
8392 this.query = schemeOrData.query || _empty;
8393 this.fragment = schemeOrData.fragment || _empty;
8394 // no validation because it's this URI
8395 // that creates uri components.
8396 // _validateUri(this);
8399 this.scheme = _schemeFix(schemeOrData, _strict);
8400 this.authority = authority || _empty;
8401 this.path = _referenceResolution(this.scheme, path || _empty);
8402 this.query = query || _empty;
8403 this.fragment = fragment || _empty;
8404 _validateUri(this, _strict);
8407 URI.isUri = function (thing) {
8408 if (thing instanceof URI) {
8414 return typeof thing.authority === 'string'
8415 && typeof thing.fragment === 'string'
8416 && typeof thing.path === 'string'
8417 && typeof thing.query === 'string'
8418 && typeof thing.scheme === 'string'
8419 && typeof thing.fsPath === 'function'
8420 && typeof thing.with === 'function'
8421 && typeof thing.toString === 'function';
8423 Object.defineProperty(URI.prototype, "fsPath", {
8424 // ---- filesystem path -----------------------
8426 * Returns a string representing the corresponding file system path of this URI.
8427 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
8428 * platform specific path separator.
8430 * * Will *not* validate the path for invalid characters and semantics.
8431 * * Will *not* look at the scheme of this URI.
8432 * * The result shall *not* be used for display purposes but for accessing a file on disk.
8435 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
8436 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
8439 const u = URI.parse('file://server/c$/folder/file.txt')
8440 u.authority === 'server'
8441 u.path === '/shares/c$/file.txt'
8442 u.fsPath === '\\server\c$\folder\file.txt'
8445 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
8446 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
8447 * with URIs that represent files on disk (`file` scheme).
8450 // if (this.scheme !== 'file') {
8451 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
8453 return uriToFsPath(this, false);
8458 // ---- modify to new -------------------------
8459 URI.prototype.with = function (change) {
8463 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
8464 if (scheme === undefined) {
8465 scheme = this.scheme;
8467 else if (scheme === null) {
8470 if (authority === undefined) {
8471 authority = this.authority;
8473 else if (authority === null) {
8476 if (path === undefined) {
8479 else if (path === null) {
8482 if (query === undefined) {
8485 else if (query === null) {
8488 if (fragment === undefined) {
8489 fragment = this.fragment;
8491 else if (fragment === null) {
8494 if (scheme === this.scheme
8495 && authority === this.authority
8496 && path === this.path
8497 && query === this.query
8498 && fragment === this.fragment) {
8501 return new _URI(scheme, authority, path, query, fragment);
8503 // ---- parse & validate ------------------------
8505 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
8506 * `file:///usr/home`, or `scheme:with/path`.
8508 * @param value A string which represents an URI (see `URI#toString`).
8510 URI.parse = function (value, _strict) {
8511 if (_strict === void 0) { _strict = false; }
8512 var match = _regexp.exec(value);
8514 return new _URI(_empty, _empty, _empty, _empty, _empty);
8516 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
8519 * Creates a new URI from a file system path, e.g. `c:\my\files`,
8520 * `/usr/home`, or `\\server\share\some\path`.
8522 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
8523 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
8524 * `URI.parse('file://' + path)` because the path might contain characters that are
8525 * interpreted (# and ?). See the following sample:
8527 const good = URI.file('/coding/c#/project1');
8528 good.scheme === 'file';
8529 good.path === '/coding/c#/project1';
8530 good.fragment === '';
8531 const bad = URI.parse('file://' + '/coding/c#/project1');
8532 bad.scheme === 'file';
8533 bad.path === '/coding/c'; // path is now broken
8534 bad.fragment === '/project1';
8537 * @param path A file system path (see `URI#fsPath`)
8539 URI.file = function (path) {
8540 var authority = _empty;
8541 // normalize to fwd-slashes on windows,
8542 // on other systems bwd-slashes are valid
8543 // filename character, eg /f\oo/ba\r.txt
8545 path = path.replace(/\\/g, _slash);
8547 // check for authority as used in UNC shares
8548 // or use the path as given
8549 if (path[0] === _slash && path[1] === _slash) {
8550 var idx = path.indexOf(_slash, 2);
8552 authority = path.substring(2);
8556 authority = path.substring(2, idx);
8557 path = path.substring(idx) || _slash;
8560 return new _URI('file', authority, path, _empty, _empty);
8562 URI.from = function (components) {
8563 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
8566 // * Join a URI path with path fragments and normalizes the resulting path.
8568 // * @param uri The input URI.
8569 // * @param pathFragment The path fragment to add to the URI path.
8570 // * @returns The resulting URI.
8572 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
8574 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
8576 // let newPath: string;
8577 // if (isWindows && uri.scheme === 'file') {
8578 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
8580 // newPath = paths.posix.join(uri.path, ...pathFragment);
8582 // return uri.with({ path: newPath });
8584 // ---- printing/externalize ---------------------------
8586 * Creates a string representation for this URI. It's guaranteed that calling
8587 * `URI.parse` with the result of this function creates an URI which is equal
8590 * * The result shall *not* be used for display purposes but for externalization or transport.
8591 * * The result will be encoded using the percentage encoding and encoding happens mostly
8592 * ignore the scheme-specific encoding rules.
8594 * @param skipEncoding Do not encode the result, default is `false`
8596 URI.prototype.toString = function (skipEncoding) {
8597 if (skipEncoding === void 0) { skipEncoding = false; }
8598 return _asFormatted(this, skipEncoding);
8600 URI.prototype.toJSON = function () {
8603 URI.revive = function (data) {
8607 else if (data instanceof URI) {
8611 var result = new _URI(data);
8612 result._formatted = data.external;
8613 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
8620 var _pathSepMarker = isWindows ? 1 : undefined;
8621 // eslint-disable-next-line @typescript-eslint/class-name-casing
8622 var _URI = /** @class */ (function (_super) {
8623 __extends(_URI, _super);
8625 var _this = _super !== null && _super.apply(this, arguments) || this;
8626 _this._formatted = null;
8627 _this._fsPath = null;
8630 Object.defineProperty(_URI.prototype, "fsPath", {
8632 if (!this._fsPath) {
8633 this._fsPath = uriToFsPath(this, false);
8635 return this._fsPath;
8640 _URI.prototype.toString = function (skipEncoding) {
8641 if (skipEncoding === void 0) { skipEncoding = false; }
8642 if (!skipEncoding) {
8643 if (!this._formatted) {
8644 this._formatted = _asFormatted(this, false);
8646 return this._formatted;
8649 // we don't cache that
8650 return _asFormatted(this, true);
8653 _URI.prototype.toJSON = function () {
8659 res.fsPath = this._fsPath;
8660 res._sep = _pathSepMarker;
8662 if (this._formatted) {
8663 res.external = this._formatted;
8667 res.path = this.path;
8670 res.scheme = this.scheme;
8672 if (this.authority) {
8673 res.authority = this.authority;
8676 res.query = this.query;
8678 if (this.fragment) {
8679 res.fragment = this.fragment;
8685 // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
8686 var encodeTable = (_a = {},
8687 _a[58 /* Colon */] = '%3A',
8688 _a[47 /* Slash */] = '%2F',
8689 _a[63 /* QuestionMark */] = '%3F',
8690 _a[35 /* Hash */] = '%23',
8691 _a[91 /* OpenSquareBracket */] = '%5B',
8692 _a[93 /* CloseSquareBracket */] = '%5D',
8693 _a[64 /* AtSign */] = '%40',
8694 _a[33 /* ExclamationMark */] = '%21',
8695 _a[36 /* DollarSign */] = '%24',
8696 _a[38 /* Ampersand */] = '%26',
8697 _a[39 /* SingleQuote */] = '%27',
8698 _a[40 /* OpenParen */] = '%28',
8699 _a[41 /* CloseParen */] = '%29',
8700 _a[42 /* Asterisk */] = '%2A',
8701 _a[43 /* Plus */] = '%2B',
8702 _a[44 /* Comma */] = '%2C',
8703 _a[59 /* Semicolon */] = '%3B',
8704 _a[61 /* Equals */] = '%3D',
8705 _a[32 /* Space */] = '%20',
8707 function encodeURIComponentFast(uriComponent, allowSlash) {
8708 var res = undefined;
8709 var nativeEncodePos = -1;
8710 for (var pos = 0; pos < uriComponent.length; pos++) {
8711 var code = uriComponent.charCodeAt(pos);
8712 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
8713 if ((code >= 97 /* a */ && code <= 122 /* z */)
8714 || (code >= 65 /* A */ && code <= 90 /* Z */)
8715 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
8716 || code === 45 /* Dash */
8717 || code === 46 /* Period */
8718 || code === 95 /* Underline */
8719 || code === 126 /* Tilde */
8720 || (allowSlash && code === 47 /* Slash */)) {
8721 // check if we are delaying native encode
8722 if (nativeEncodePos !== -1) {
8723 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
8724 nativeEncodePos = -1;
8726 // check if we write into a new string (by default we try to return the param)
8727 if (res !== undefined) {
8728 res += uriComponent.charAt(pos);
8732 // encoding needed, we need to allocate a new string
8733 if (res === undefined) {
8734 res = uriComponent.substr(0, pos);
8736 // check with default table first
8737 var escaped = encodeTable[code];
8738 if (escaped !== undefined) {
8739 // check if we are delaying native encode
8740 if (nativeEncodePos !== -1) {
8741 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
8742 nativeEncodePos = -1;
8744 // append escaped variant to result
8747 else if (nativeEncodePos === -1) {
8748 // use native encode only when needed
8749 nativeEncodePos = pos;
8753 if (nativeEncodePos !== -1) {
8754 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
8756 return res !== undefined ? res : uriComponent;
8758 function encodeURIComponentMinimal(path) {
8759 var res = undefined;
8760 for (var pos = 0; pos < path.length; pos++) {
8761 var code = path.charCodeAt(pos);
8762 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
8763 if (res === undefined) {
8764 res = path.substr(0, pos);
8766 res += encodeTable[code];
8769 if (res !== undefined) {
8774 return res !== undefined ? res : path;
8777 * Compute `fsPath` for the given uri
8779 function uriToFsPath(uri, keepDriveLetterCasing) {
8781 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
8782 // unc path: file://shares/c$/far/boo
8783 value = "//" + uri.authority + uri.path;
8785 else if (uri.path.charCodeAt(0) === 47 /* Slash */
8786 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
8787 && uri.path.charCodeAt(2) === 58 /* Colon */) {
8788 if (!keepDriveLetterCasing) {
8789 // windows drive letter: file:///c:/far/boo
8790 value = uri.path[1].toLowerCase() + uri.path.substr(2);
8793 value = uri.path.substr(1);
8801 value = value.replace(/\//g, '\\');
8806 * Create the external version of a uri
8808 function _asFormatted(uri, skipEncoding) {
8809 var encoder = !skipEncoding
8810 ? encodeURIComponentFast
8811 : encodeURIComponentMinimal;
8813 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
8818 if (authority || scheme === 'file') {
8823 var idx = authority.indexOf('@');
8826 var userinfo = authority.substr(0, idx);
8827 authority = authority.substr(idx + 1);
8828 idx = userinfo.indexOf(':');
8830 res += encoder(userinfo, false);
8833 // <user>:<pass>@<auth>
8834 res += encoder(userinfo.substr(0, idx), false);
8836 res += encoder(userinfo.substr(idx + 1), false);
8840 authority = authority.toLowerCase();
8841 idx = authority.indexOf(':');
8843 res += encoder(authority, false);
8847 res += encoder(authority.substr(0, idx), false);
8848 res += authority.substr(idx);
8852 // lower-case windows drive letters in /C:/fff or C:/fff
8853 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
8854 var code = path.charCodeAt(1);
8855 if (code >= 65 /* A */ && code <= 90 /* Z */) {
8856 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
8859 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
8860 var code = path.charCodeAt(0);
8861 if (code >= 65 /* A */ && code <= 90 /* Z */) {
8862 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
8865 // encode the rest of the path
8866 res += encoder(path, true);
8870 res += encoder(query, false);
8874 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
8879 function decodeURIComponentGraceful(str) {
8881 return decodeURIComponent(str);
8884 if (str.length > 3) {
8885 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
8892 var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
8893 function percentDecode(str) {
8894 if (!str.match(_rEncodedAsHex)) {
8897 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
8903 /***/ (function(module, __webpack_exports__, __webpack_require__) {
8906 __webpack_require__.r(__webpack_exports__);
8907 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultCSSDataProvider", function() { return getDefaultCSSDataProvider; });
8908 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newCSSDataProvider", function() { return newCSSDataProvider; });
8909 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCSSLanguageService", function() { return getCSSLanguageService; });
8910 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSCSSLanguageService", function() { return getSCSSLanguageService; });
8911 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLESSLanguageService", function() { return getLESSLanguageService; });
8912 /* harmony import */ var _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89);
8913 /* harmony import */ var _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
8914 /* harmony import */ var _services_cssHover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(108);
8915 /* harmony import */ var _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110);
8916 /* harmony import */ var _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(111);
8917 /* harmony import */ var _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(113);
8918 /* harmony import */ var _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(116);
8919 /* harmony import */ var _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(119);
8920 /* harmony import */ var _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(120);
8921 /* harmony import */ var _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(122);
8922 /* harmony import */ var _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(123);
8923 /* harmony import */ var _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(124);
8924 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(126);
8925 /* harmony import */ var _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(127);
8926 /* harmony import */ var _services_scssNavigation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(128);
8927 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(125);
8928 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(103);
8929 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["TextDocument"]; });
8931 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Position"]; });
8933 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Range"]; });
8935 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Location"]; });
8937 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["LocationLink"]; });
8939 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Color"]; });
8941 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["ColorInformation"]; });
8943 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["ColorPresentation"]; });
8945 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["FoldingRangeKind"]; });
8947 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["FoldingRange"]; });
8949 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DiagnosticRelatedInformation"]; });
8951 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DiagnosticSeverity"]; });
8953 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DiagnosticTag"]; });
8955 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticCode", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DiagnosticCode"]; });
8957 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Diagnostic"]; });
8959 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Command"]; });
8961 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["TextEdit"]; });
8963 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["TextDocumentEdit"]; });
8965 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CreateFile"]; });
8967 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["RenameFile"]; });
8969 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DeleteFile"]; });
8971 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["WorkspaceEdit"]; });
8973 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["WorkspaceChange"]; });
8975 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["TextDocumentIdentifier"]; });
8977 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["VersionedTextDocumentIdentifier"]; });
8979 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["TextDocumentItem"]; });
8981 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["MarkupKind"]; });
8983 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["MarkupContent"]; });
8985 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CompletionItemKind"]; });
8987 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["InsertTextFormat"]; });
8989 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CompletionItemTag"]; });
8991 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertReplaceEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["InsertReplaceEdit"]; });
8993 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CompletionItem"]; });
8995 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CompletionList"]; });
8997 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["MarkedString"]; });
8999 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["Hover"]; });
9001 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["ParameterInformation"]; });
9003 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["SignatureInformation"]; });
9005 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DocumentHighlightKind"]; });
9007 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DocumentHighlight"]; });
9009 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["SymbolKind"]; });
9011 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["SymbolTag"]; });
9013 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["SymbolInformation"]; });
9015 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DocumentSymbol"]; });
9017 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CodeActionKind"]; });
9019 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CodeActionContext"]; });
9021 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CodeAction"]; });
9023 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["CodeLens"]; });
9025 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["FormattingOptions"]; });
9027 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["DocumentLink"]; });
9029 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["SelectionRange"]; });
9031 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["EOL"]; });
9033 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["ClientCapabilities"]; });
9035 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FileType", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__["FileType"]; });
9037 /*---------------------------------------------------------------------------------------------
9038 * Copyright (c) Microsoft Corporation. All rights reserved.
9039 * Licensed under the MIT License. See License.txt in the project root for license information.
9040 *--------------------------------------------------------------------------------------------*/
9059 function getDefaultCSSDataProvider() {
9060 return newCSSDataProvider(_data_webCustomData__WEBPACK_IMPORTED_MODULE_15__["cssData"]);
9062 function newCSSDataProvider(data) {
9063 return new _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__["CSSDataProvider"](data);
9065 function createFacade(parser, completion, hover, navigation, codeActions, validation, cssDataManager) {
9067 configure: function (settings) {
9068 validation.configure(settings);
9069 completion.configure(settings);
9071 setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
9072 doValidation: validation.doValidation.bind(validation),
9073 parseStylesheet: parser.parseStylesheet.bind(parser),
9074 doComplete: completion.doComplete.bind(completion),
9075 doComplete2: completion.doComplete2.bind(completion),
9076 setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
9077 doHover: hover.doHover.bind(hover),
9078 findDefinition: navigation.findDefinition.bind(navigation),
9079 findReferences: navigation.findReferences.bind(navigation),
9080 findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
9081 findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
9082 findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
9083 findDocumentSymbols: navigation.findDocumentSymbols.bind(navigation),
9084 doCodeActions: codeActions.doCodeActions.bind(codeActions),
9085 doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
9086 findColorSymbols: function (d, s) { return navigation.findDocumentColors(d, s).map(function (s) { return s.range; }); },
9087 findDocumentColors: navigation.findDocumentColors.bind(navigation),
9088 getColorPresentations: navigation.getColorPresentations.bind(navigation),
9089 doRename: navigation.doRename.bind(navigation),
9090 getFoldingRanges: _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__["getFoldingRanges"],
9091 getSelectionRanges: _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__["getSelectionRanges"]
9094 var defaultLanguageServiceOptions = {};
9095 function getCSSLanguageService(options) {
9096 if (options === void 0) { options = defaultLanguageServiceOptions; }
9097 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__["CSSDataManager"](options);
9098 return createFacade(new _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__["Parser"](), new _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__["CSSCompletion"](null, options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities, cssDataManager), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__["CSSNavigation"](options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"](cssDataManager), cssDataManager);
9100 function getSCSSLanguageService(options) {
9101 if (options === void 0) { options = defaultLanguageServiceOptions; }
9102 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__["CSSDataManager"](options);
9103 return createFacade(new _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__["SCSSParser"](), new _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__["SCSSCompletion"](options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities, cssDataManager), new _services_scssNavigation__WEBPACK_IMPORTED_MODULE_14__["SCSSNavigation"](options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"](cssDataManager), cssDataManager);
9105 function getLESSLanguageService(options) {
9106 if (options === void 0) { options = defaultLanguageServiceOptions; }
9107 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__["CSSDataManager"](options);
9108 return createFacade(new _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__["LESSParser"](), new _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__["LESSCompletion"](options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities, cssDataManager), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__["CSSNavigation"](options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"](cssDataManager), cssDataManager);
9114 /***/ (function(module, __webpack_exports__, __webpack_require__) {
9117 __webpack_require__.r(__webpack_exports__);
9118 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
9119 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
9120 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
9121 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93);
9122 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95);
9123 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99);
9124 /*---------------------------------------------------------------------------------------------
9125 * Copyright (c) Microsoft Corporation. All rights reserved.
9126 * Licensed under the MIT License. See License.txt in the project root for license information.
9127 *--------------------------------------------------------------------------------------------*/
9129 var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
9130 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
9131 for (var r = Array(s), k = 0, i = 0; i < il; i++)
9132 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
9142 /// A parser for the css core specification. See for reference:
9143 /// https://www.w3.org/TR/CSS21/grammar.html
9144 /// http://www.w3.org/TR/CSS21/syndata.html#tokenization
9146 var Parser = /** @class */ (function () {
9147 function Parser(scnr) {
9148 if (scnr === void 0) { scnr = new _cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"](); }
9149 this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i;
9150 this.scanner = scnr;
9151 this.token = { type: _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF, offset: -1, len: 0, text: '' };
9152 this.prevToken = undefined;
9154 Parser.prototype.peekIdent = function (text) {
9155 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
9157 Parser.prototype.peekKeyword = function (text) {
9158 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
9160 Parser.prototype.peekDelim = function (text) {
9161 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim === this.token.type && text === this.token.text;
9163 Parser.prototype.peek = function (type) {
9164 return type === this.token.type;
9166 Parser.prototype.peekRegExp = function (type, regEx) {
9167 if (type !== this.token.type) {
9170 return regEx.test(this.token.text);
9172 Parser.prototype.hasWhitespace = function () {
9173 return !!this.prevToken && (this.prevToken.offset + this.prevToken.len !== this.token.offset);
9175 Parser.prototype.consumeToken = function () {
9176 this.prevToken = this.token;
9177 this.token = this.scanner.scan();
9179 Parser.prototype.mark = function () {
9181 prev: this.prevToken,
9183 pos: this.scanner.pos()
9186 Parser.prototype.restoreAtMark = function (mark) {
9187 this.prevToken = mark.prev;
9188 this.token = mark.curr;
9189 this.scanner.goBackTo(mark.pos);
9191 Parser.prototype.try = function (func) {
9192 var pos = this.mark();
9195 this.restoreAtMark(pos);
9200 Parser.prototype.acceptOneKeyword = function (keywords) {
9201 if (_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword === this.token.type) {
9202 for (var _i = 0, keywords_1 = keywords; _i < keywords_1.length; _i++) {
9203 var keyword = keywords_1[_i];
9204 if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) {
9205 this.consumeToken();
9212 Parser.prototype.accept = function (type) {
9213 if (type === this.token.type) {
9214 this.consumeToken();
9219 Parser.prototype.acceptIdent = function (text) {
9220 if (this.peekIdent(text)) {
9221 this.consumeToken();
9226 Parser.prototype.acceptKeyword = function (text) {
9227 if (this.peekKeyword(text)) {
9228 this.consumeToken();
9233 Parser.prototype.acceptDelim = function (text) {
9234 if (this.peekDelim(text)) {
9235 this.consumeToken();
9240 Parser.prototype.acceptRegexp = function (regEx) {
9241 if (regEx.test(this.token.text)) {
9242 this.consumeToken();
9247 Parser.prototype._parseRegexp = function (regEx) {
9248 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Identifier);
9249 do { } while (this.acceptRegexp(regEx));
9250 return this.finish(node);
9252 Parser.prototype.acceptUnquotedString = function () {
9253 var pos = this.scanner.pos();
9254 this.scanner.goBackTo(this.token.offset);
9255 var unquoted = this.scanner.scanUnquotedString();
9257 this.token = unquoted;
9258 this.consumeToken();
9261 this.scanner.goBackTo(pos);
9264 Parser.prototype.resync = function (resyncTokens, resyncStopTokens) {
9266 if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) {
9267 this.consumeToken();
9270 else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) {
9274 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) {
9277 this.token = this.scanner.scan();
9281 Parser.prototype.createNode = function (nodeType) {
9282 return new _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"](this.token.offset, this.token.len, nodeType);
9284 Parser.prototype.create = function (ctor) {
9285 return new ctor(this.token.offset, this.token.len);
9287 Parser.prototype.finish = function (node, error, resyncTokens, resyncStopTokens) {
9288 // parseNumeric misuses error for boolean flagging (however the real error mustn't be a false)
9289 // + nodelist offsets mustn't be modified, because there is a offset hack in rulesets for smartselection
9290 if (!(node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Nodelist"])) {
9292 this.markError(node, error, resyncTokens, resyncStopTokens);
9294 // set the node end position
9295 if (this.prevToken) {
9296 // length with more elements belonging together
9297 var prevEnd = this.prevToken.offset + this.prevToken.len;
9298 node.length = prevEnd > node.offset ? prevEnd - node.offset : 0; // offset is taken from current token, end from previous: Use 0 for empty nodes
9303 Parser.prototype.markError = function (node, error, resyncTokens, resyncStopTokens) {
9304 if (this.token !== this.lastErrorToken) { // do not report twice on the same token
9305 node.addIssue(new _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Marker"](node, error, _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Level"].Error, undefined, this.token.offset, this.token.len));
9306 this.lastErrorToken = this.token;
9308 if (resyncTokens || resyncStopTokens) {
9309 this.resync(resyncTokens, resyncStopTokens);
9312 Parser.prototype.parseStylesheet = function (textDocument) {
9313 var versionId = textDocument.version;
9314 var text = textDocument.getText();
9315 var textProvider = function (offset, length) {
9316 if (textDocument.version !== versionId) {
9317 throw new Error('Underlying model has changed, AST is no longer valid');
9319 return text.substr(offset, length);
9321 return this.internalParse(text, this._parseStylesheet, textProvider);
9323 Parser.prototype.internalParse = function (input, parseFunc, textProvider) {
9324 this.scanner.setSource(input);
9325 this.token = this.scanner.scan();
9326 var node = parseFunc.bind(this)();
9329 node.textProvider = textProvider;
9332 node.textProvider = function (offset, length) { return input.substr(offset, length); };
9337 Parser.prototype._parseStylesheet = function () {
9338 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"]);
9339 while (node.addChild(this._parseStylesheetStart())) {
9340 // Parse statements only valid at the beginning of stylesheets.
9342 var inRecovery = false;
9344 var hasMatch = false;
9347 var statement = this._parseStylesheetStatement();
9349 node.addChild(statement);
9352 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) && this._needsSemicolonAfter(statement) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9353 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
9356 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CDO) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CDC)) {
9357 // accept empty statements
9362 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF)) {
9366 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
9367 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownAtRule);
9370 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RuleOrSelectorExpected);
9374 this.consumeToken();
9375 } while (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF));
9376 return this.finish(node);
9378 Parser.prototype._parseStylesheetStart = function () {
9379 return this._parseCharset();
9381 Parser.prototype._parseStylesheetStatement = function (isNested) {
9382 if (isNested === void 0) { isNested = false; }
9383 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
9384 return this._parseStylesheetAtStatement(isNested);
9386 return this._parseRuleset(isNested);
9388 Parser.prototype._parseStylesheetAtStatement = function (isNested) {
9389 if (isNested === void 0) { isNested = false; }
9390 return this._parseImport()
9391 || this._parseMedia(isNested)
9392 || this._parsePage()
9393 || this._parseFontFace()
9394 || this._parseKeyframe()
9395 || this._parseSupports(isNested)
9396 || this._parseViewPort()
9397 || this._parseNamespace()
9398 || this._parseDocument()
9399 || this._parseUnknownAtRule();
9401 Parser.prototype._tryParseRuleset = function (isNested) {
9402 var mark = this.mark();
9403 if (this._parseSelector(isNested)) {
9404 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma) && this._parseSelector(isNested)) {
9407 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
9408 this.restoreAtMark(mark);
9409 return this._parseRuleset(isNested);
9412 this.restoreAtMark(mark);
9415 Parser.prototype._parseRuleset = function (isNested) {
9416 if (isNested === void 0) { isNested = false; }
9417 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["RuleSet"]);
9418 var selectors = node.getSelectors();
9419 if (!selectors.addChild(this._parseSelector(isNested))) {
9422 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
9423 if (!selectors.addChild(this._parseSelector(isNested))) {
9424 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SelectorExpected);
9427 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9429 Parser.prototype._parseRuleSetDeclarationAtStatement = function () {
9430 return this._parseAtApply()
9431 || this._parseUnknownAtRule();
9433 Parser.prototype._parseRuleSetDeclaration = function () {
9434 // https://www.w3.org/TR/css-syntax-3/#consume-a-list-of-declarations0
9435 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
9436 return this._parseRuleSetDeclarationAtStatement();
9438 return this._tryParseCustomPropertyDeclaration()
9439 || this._parseDeclaration();
9442 * Parses declarations like:
9443 * @apply --my-theme;
9445 * Follows https://tabatkins.github.io/specs/css-apply-rule/#using
9447 Parser.prototype._parseAtApply = function () {
9448 if (!this.peekKeyword('@apply')) {
9451 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["AtApplyRule"]);
9452 this.consumeToken();
9453 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Variable]))) {
9454 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9456 return this.finish(node);
9458 Parser.prototype._needsSemicolonAfter = function (node) {
9459 switch (node.type) {
9460 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Keyframe:
9461 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ViewPort:
9462 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Media:
9463 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Ruleset:
9464 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Namespace:
9465 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].If:
9466 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].For:
9467 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Each:
9468 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].While:
9469 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinDeclaration:
9470 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].FunctionDeclaration:
9471 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinContentDeclaration:
9473 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ExtendsReference:
9474 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinContentReference:
9475 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ReturnStatement:
9476 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MediaQuery:
9477 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Debug:
9478 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Import:
9479 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].AtApplyRule:
9480 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].CustomPropertyDeclaration:
9482 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].VariableDeclaration:
9483 return node.needsSemicolon;
9484 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinReference:
9485 return !node.getContent();
9486 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Declaration:
9487 return !node.getNestedProperties();
9491 Parser.prototype._parseDeclarations = function (parseDeclaration) {
9492 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Declarations"]);
9493 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
9496 var decl = parseDeclaration();
9497 while (node.addChild(decl)) {
9498 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR)) {
9501 if (this._needsSemicolonAfter(decl) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9502 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR]);
9504 // We accepted semicolon token. Link it to declaration.
9505 if (decl && this.prevToken && this.prevToken.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon) {
9506 decl.semicolonPosition = this.prevToken.offset;
9508 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9509 // accept empty statements
9511 decl = parseDeclaration();
9513 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR)) {
9514 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightCurlyExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]);
9516 return this.finish(node);
9518 Parser.prototype._parseBody = function (node, parseDeclaration) {
9519 if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
9520 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftCurlyExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]);
9522 return this.finish(node);
9524 Parser.prototype._parseSelector = function (isNested) {
9525 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Selector"]);
9526 var hasContent = false;
9528 // nested selectors can start with a combinator
9529 hasContent = node.addChild(this._parseCombinator());
9531 while (node.addChild(this._parseSimpleSelector())) {
9533 node.addChild(this._parseCombinator()); // optional
9535 return hasContent ? this.finish(node) : null;
9537 Parser.prototype._parseDeclaration = function (resyncStopTokens) {
9538 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Declaration"]);
9539 if (!node.setProperty(this._parseProperty())) {
9542 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9543 var stopTokens = resyncStopTokens ? __spreadArrays(resyncStopTokens, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]) : [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon];
9544 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon], stopTokens);
9546 if (this.prevToken) {
9547 node.colonPosition = this.prevToken.offset;
9549 if (!node.setValue(this._parseExpr())) {
9550 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PropertyValueExpected);
9552 node.addChild(this._parsePrio());
9553 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9554 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9556 return this.finish(node);
9558 Parser.prototype._tryParseCustomPropertyDeclaration = function () {
9559 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^--/)) {
9562 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["CustomPropertyDeclaration"]);
9563 if (!node.setProperty(this._parseProperty())) {
9566 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9567 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon]);
9569 if (this.prevToken) {
9570 node.colonPosition = this.prevToken.offset;
9572 var mark = this.mark();
9573 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
9574 // try to parse it as nested declaration
9575 var propertySet = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["CustomPropertySet"]);
9576 var declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));
9577 if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) {
9578 propertySet.addChild(this._parsePrio());
9579 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9580 this.finish(propertySet);
9581 node.setPropertySet(propertySet);
9582 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9583 return this.finish(node);
9586 this.restoreAtMark(mark);
9588 // try tp parse as expression
9589 var expression = this._parseExpr();
9590 if (expression && !expression.isErroneous(true)) {
9592 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9593 node.setValue(expression);
9594 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9595 return this.finish(node);
9598 this.restoreAtMark(mark);
9599 node.addChild(this._parseCustomPropertyValue());
9600 node.addChild(this._parsePrio());
9601 if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(node.colonPosition) && this.token.offset === node.colonPosition + 1) {
9602 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PropertyValueExpected);
9604 return this.finish(node);
9607 * Parse custom property values.
9609 * Based on https://www.w3.org/TR/css-variables/#syntax
9611 * This code is somewhat unusual, as the allowed syntax is incredibly broad,
9612 * parsing almost any sequence of tokens, save for a small set of exceptions.
9613 * Unbalanced delimitors, invalid tokens, and declaration
9614 * terminators like semicolons and !important directives (when not inside
9617 Parser.prototype._parseCustomPropertyValue = function () {
9618 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9619 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
9621 var parensDepth = 0;
9622 var bracketsDepth = 0;
9623 done: while (true) {
9624 switch (this.token.type) {
9625 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon:
9626 // A semicolon only ends things if we're not inside a delimitor.
9631 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation:
9632 // An exclamation ends the value if we're not inside delims.
9637 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
9640 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR:
9642 if (curlyDepth < 0) {
9643 // The property value has been terminated without a semicolon, and
9644 // this is the last declaration in the ruleset.
9645 if (parensDepth === 0 && bracketsDepth === 0) {
9648 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftCurlyExpected);
9651 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL:
9654 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR:
9656 if (parensDepth < 0) {
9657 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected);
9660 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL:
9663 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR:
9665 if (bracketsDepth < 0) {
9666 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftSquareBracketExpected);
9669 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString: // fall through
9671 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF:
9672 // We shouldn't have reached the end of input, something is
9674 var error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightCurlyExpected;
9675 if (bracketsDepth > 0) {
9676 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected;
9678 else if (parensDepth > 0) {
9679 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected;
9681 return this.finish(node, error);
9683 this.consumeToken();
9685 return this.finish(node);
9687 Parser.prototype._tryToParseDeclaration = function () {
9688 var mark = this.mark();
9689 if (this._parseProperty() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9690 // looks like a declaration, go ahead
9691 this.restoreAtMark(mark);
9692 return this._parseDeclaration();
9694 this.restoreAtMark(mark);
9697 Parser.prototype._parseProperty = function () {
9698 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Property"]);
9699 var mark = this.mark();
9700 if (this.acceptDelim('*') || this.acceptDelim('_')) {
9701 // support for IE 5.x, 6 and 7 star hack: see http://en.wikipedia.org/wiki/CSS_filter#Star_hack
9702 if (this.hasWhitespace()) {
9703 this.restoreAtMark(mark);
9707 if (node.setIdentifier(this._parsePropertyIdentifier())) {
9708 return this.finish(node);
9712 Parser.prototype._parsePropertyIdentifier = function () {
9713 return this._parseIdent();
9715 Parser.prototype._parseCharset = function () {
9716 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Charset)) {
9719 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9720 this.consumeToken(); // charset
9721 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String)) {
9722 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9724 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9725 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
9727 return this.finish(node);
9729 Parser.prototype._parseImport = function () {
9730 if (!this.peekKeyword('@import')) {
9733 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Import"]);
9734 this.consumeToken(); // @import
9735 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
9736 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].URIOrStringExpected);
9738 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF)) {
9739 node.setMedialist(this._parseMediaQueryList());
9741 return this.finish(node);
9743 Parser.prototype._parseNamespace = function () {
9744 // http://www.w3.org/TR/css3-namespace/
9745 // namespace : NAMESPACE_SYM S* [IDENT S*]? [STRING|URI] S* ';' S*
9746 if (!this.peekKeyword('@namespace')) {
9749 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Namespace"]);
9750 this.consumeToken(); // @namespace
9751 if (!node.addChild(this._parseURILiteral())) { // url literal also starts with ident
9752 node.addChild(this._parseIdent()); // optional prefix
9753 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
9754 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].URIExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]);
9757 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
9758 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
9760 return this.finish(node);
9762 Parser.prototype._parseFontFace = function () {
9763 if (!this.peekKeyword('@font-face')) {
9766 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["FontFace"]);
9767 this.consumeToken(); // @font-face
9768 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9770 Parser.prototype._parseViewPort = function () {
9771 if (!this.peekKeyword('@-ms-viewport') &&
9772 !this.peekKeyword('@-o-viewport') &&
9773 !this.peekKeyword('@viewport')) {
9776 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ViewPort"]);
9777 this.consumeToken(); // @-ms-viewport
9778 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9780 Parser.prototype._parseKeyframe = function () {
9781 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword, this.keyframeRegex)) {
9784 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Keyframe"]);
9785 var atNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9786 this.consumeToken(); // atkeyword
9787 node.setKeyword(this.finish(atNode));
9788 if (atNode.matches('@-ms-keyframes')) { // -ms-keyframes never existed
9789 this.markError(atNode, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownKeyword);
9791 if (!node.setIdentifier(this._parseKeyframeIdent())) {
9792 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR]);
9794 return this._parseBody(node, this._parseKeyframeSelector.bind(this));
9796 Parser.prototype._parseKeyframeIdent = function () {
9797 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Keyframe]);
9799 Parser.prototype._parseKeyframeSelector = function () {
9800 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["KeyframeSelector"]);
9801 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
9804 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
9805 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
9806 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PercentageExpected);
9809 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9811 Parser.prototype._tryParseKeyframeSelector = function () {
9812 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["KeyframeSelector"]);
9813 var pos = this.mark();
9814 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
9817 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
9818 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
9819 this.restoreAtMark(pos);
9823 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
9824 this.restoreAtMark(pos);
9827 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9829 Parser.prototype._parseSupports = function (isNested) {
9830 if (isNested === void 0) { isNested = false; }
9831 // SUPPORTS_SYM S* supports_condition '{' S* ruleset* '}' S*
9832 if (!this.peekKeyword('@supports')) {
9835 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Supports"]);
9836 this.consumeToken(); // @supports
9837 node.addChild(this._parseSupportsCondition());
9838 return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested));
9840 Parser.prototype._parseSupportsDeclaration = function (isNested) {
9841 if (isNested === void 0) { isNested = false; }
9843 // if nested, the body can contain rulesets, but also declarations
9844 return this._tryParseRuleset(true)
9845 || this._tryToParseDeclaration()
9846 || this._parseStylesheetStatement(true);
9848 return this._parseStylesheetStatement(false);
9850 Parser.prototype._parseSupportsCondition = function () {
9851 // supports_condition : supports_negation | supports_conjunction | supports_disjunction | supports_condition_in_parens ;
9852 // supports_condition_in_parens: ( '(' S* supports_condition S* ')' ) | supports_declaration_condition | general_enclosed ;
9853 // supports_negation: NOT S+ supports_condition_in_parens ;
9854 // supports_conjunction: supports_condition_in_parens ( S+ AND S+ supports_condition_in_parens )+;
9855 // supports_disjunction: supports_condition_in_parens ( S+ OR S+ supports_condition_in_parens )+;
9856 // supports_declaration_condition: '(' S* declaration ')';
9857 // general_enclosed: ( FUNCTION | '(' ) ( any | unused )* ')' ;
9858 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SupportsCondition"]);
9859 if (this.acceptIdent('not')) {
9860 node.addChild(this._parseSupportsConditionInParens());
9863 node.addChild(this._parseSupportsConditionInParens());
9864 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^(and|or)$/i)) {
9865 var text = this.token.text.toLowerCase();
9866 while (this.acceptIdent(text)) {
9867 node.addChild(this._parseSupportsConditionInParens());
9871 return this.finish(node);
9873 Parser.prototype._parseSupportsConditionInParens = function () {
9874 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SupportsCondition"]);
9875 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9876 if (this.prevToken) {
9877 node.lParent = this.prevToken.offset;
9879 if (!node.addChild(this._tryToParseDeclaration())) {
9880 if (!this._parseSupportsCondition()) {
9881 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ConditionExpected);
9884 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9885 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR], []);
9887 if (this.prevToken) {
9888 node.rParent = this.prevToken.offset;
9890 return this.finish(node);
9892 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
9893 var pos = this.mark();
9894 this.consumeToken();
9895 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9896 var openParentCount = 1;
9897 while (this.token.type !== _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF && openParentCount !== 0) {
9898 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL) {
9901 else if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR) {
9904 this.consumeToken();
9906 return this.finish(node);
9909 this.restoreAtMark(pos);
9912 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL]);
9914 Parser.prototype._parseMediaDeclaration = function (isNested) {
9915 if (isNested === void 0) { isNested = false; }
9917 // if nested, the body can contain rulesets, but also declarations
9918 return this._tryParseRuleset(true)
9919 || this._tryToParseDeclaration()
9920 || this._parseStylesheetStatement(true);
9922 return this._parseStylesheetStatement(false);
9924 Parser.prototype._parseMedia = function (isNested) {
9925 if (isNested === void 0) { isNested = false; }
9926 // MEDIA_SYM S* media_query_list '{' S* ruleset* '}' S*
9927 // media_query_list : S* [media_query [ ',' S* media_query ]* ]?
9928 if (!this.peekKeyword('@media')) {
9931 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Media"]);
9932 this.consumeToken(); // @media
9933 if (!node.addChild(this._parseMediaQueryList())) {
9934 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
9936 return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested));
9938 Parser.prototype._parseMediaQueryList = function () {
9939 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Medialist"]);
9940 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]))) {
9941 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
9943 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
9944 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]))) {
9945 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
9948 return this.finish(node);
9950 Parser.prototype._parseMediaQuery = function (resyncStopToken) {
9951 // http://www.w3.org/TR/css3-mediaqueries/
9952 // media_query : [ONLY | NOT]? S* IDENT S* [ AND S* expression ]* | expression [ AND S* expression ]*
9953 // expression : '(' S* IDENT S* [ ':' S* expr ]? ')' S*
9954 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]);
9955 var parseExpression = true;
9956 var hasContent = false;
9957 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9958 if (this.acceptIdent('only') || this.acceptIdent('not')) {
9961 if (!node.addChild(this._parseIdent())) {
9965 parseExpression = this.acceptIdent('and');
9967 while (parseExpression) {
9968 // Allow short-circuting for other language constructs.
9969 if (node.addChild(this._parseMediaContentStart())) {
9970 parseExpression = this.acceptIdent('and');
9973 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9975 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected, [], resyncStopToken);
9979 if (!node.addChild(this._parseMediaFeatureName())) {
9980 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected, [], resyncStopToken);
9982 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9983 if (!node.addChild(this._parseExpr())) {
9984 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].TermExpected, [], resyncStopToken);
9987 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9988 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected, [], resyncStopToken);
9990 parseExpression = this.acceptIdent('and');
9992 return this.finish(node);
9994 Parser.prototype._parseMediaContentStart = function () {
9997 Parser.prototype._parseMediaFeatureName = function () {
9998 return this._parseIdent();
10000 Parser.prototype._parseMedium = function () {
10001 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10002 if (node.addChild(this._parseIdent())) {
10003 return this.finish(node);
10009 Parser.prototype._parsePageDeclaration = function () {
10010 return this._parsePageMarginBox() || this._parseRuleSetDeclaration();
10012 Parser.prototype._parsePage = function () {
10013 // http://www.w3.org/TR/css3-page/
10014 // page_rule : PAGE_SYM S* page_selector_list '{' S* page_body '}' S*
10015 // page_body : /* Can be empty */ declaration? [ ';' S* page_body ]? | page_margin_box page_body
10016 if (!this.peekKeyword('@page')) {
10019 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Page"]);
10020 this.consumeToken();
10021 if (node.addChild(this._parsePageSelector())) {
10022 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
10023 if (!node.addChild(this._parsePageSelector())) {
10024 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10028 return this._parseBody(node, this._parsePageDeclaration.bind(this));
10030 Parser.prototype._parsePageMarginBox = function () {
10031 // page_margin_box : margin_sym S* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
10032 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
10035 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["PageBoxMarginBox"]);
10036 if (!this.acceptOneKeyword(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__["pageBoxDirectives"])) {
10037 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownAtRule, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]);
10039 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10041 Parser.prototype._parsePageSelector = function () {
10042 // page_selector : pseudo_page+ | IDENT pseudo_page*
10043 // pseudo_page : ':' [ "left" | "right" | "first" | "blank" ];
10044 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
10047 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10048 node.addChild(this._parseIdent()); // optional ident
10049 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
10050 if (!node.addChild(this._parseIdent())) { // optional ident
10051 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10054 return this.finish(node);
10056 Parser.prototype._parseDocument = function () {
10057 // -moz-document is experimental but has been pushed to css4
10058 if (!this.peekKeyword('@-moz-document')) {
10061 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Document"]);
10062 this.consumeToken(); // @-moz-document
10063 this.resync([], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]); // ignore all the rules
10064 return this._parseBody(node, this._parseStylesheetStatement.bind(this));
10066 // https://www.w3.org/TR/css-syntax-3/#consume-an-at-rule
10067 Parser.prototype._parseUnknownAtRule = function () {
10068 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
10071 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["UnknownAtRule"]);
10072 node.addChild(this._parseUnknownAtRuleName());
10073 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
10074 var curlyLCount = 0;
10075 var curlyDepth = 0;
10076 var parensDepth = 0;
10077 var bracketsDepth = 0;
10078 done: while (true) {
10079 switch (this.token.type) {
10080 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon:
10081 if (isTopLevel()) {
10085 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF:
10086 if (curlyDepth > 0) {
10087 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightCurlyExpected);
10089 else if (bracketsDepth > 0) {
10090 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
10092 else if (parensDepth > 0) {
10093 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10096 return this.finish(node);
10098 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
10102 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR:
10104 // End of at-rule, consume CurlyR and return node
10105 if (curlyLCount > 0 && curlyDepth === 0) {
10106 this.consumeToken();
10107 if (bracketsDepth > 0) {
10108 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
10110 else if (parensDepth > 0) {
10111 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10115 if (curlyDepth < 0) {
10116 // The property value has been terminated without a semicolon, and
10117 // this is the last declaration in the ruleset.
10118 if (parensDepth === 0 && bracketsDepth === 0) {
10121 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftCurlyExpected);
10124 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL:
10127 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR:
10129 if (parensDepth < 0) {
10130 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected);
10133 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL:
10136 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR:
10138 if (bracketsDepth < 0) {
10139 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftSquareBracketExpected);
10143 this.consumeToken();
10147 Parser.prototype._parseUnknownAtRuleName = function () {
10148 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10149 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
10150 return this.finish(node);
10154 Parser.prototype._parseOperator = function () {
10155 // these are operators for binary expressions
10156 if (this.peekDelim('/') ||
10157 this.peekDelim('*') ||
10158 this.peekDelim('+') ||
10159 this.peekDelim('-') ||
10160 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Dashmatch) ||
10161 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Includes) ||
10162 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SubstringOperator) ||
10163 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].PrefixOperator) ||
10164 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SuffixOperator) ||
10165 this.peekDelim('=')) { // doesn't stick to the standard here
10166 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Operator);
10167 this.consumeToken();
10168 return this.finish(node);
10174 Parser.prototype._parseUnaryOperator = function () {
10175 if (!this.peekDelim('+') && !this.peekDelim('-')) {
10178 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10179 this.consumeToken();
10180 return this.finish(node);
10182 Parser.prototype._parseCombinator = function () {
10183 if (this.peekDelim('>')) {
10184 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10185 this.consumeToken();
10186 var mark = this.mark();
10187 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10188 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10189 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorShadowPiercingDescendant;
10190 return this.finish(node);
10192 this.restoreAtMark(mark);
10194 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorParent;
10195 return this.finish(node);
10197 else if (this.peekDelim('+')) {
10198 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10199 this.consumeToken();
10200 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorSibling;
10201 return this.finish(node);
10203 else if (this.peekDelim('~')) {
10204 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10205 this.consumeToken();
10206 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorAllSiblings;
10207 return this.finish(node);
10209 else if (this.peekDelim('/')) {
10210 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10211 this.consumeToken();
10212 var mark = this.mark();
10213 if (!this.hasWhitespace() && this.acceptIdent('deep') && !this.hasWhitespace() && this.acceptDelim('/')) {
10214 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorShadowPiercingDescendant;
10215 return this.finish(node);
10217 this.restoreAtMark(mark);
10221 Parser.prototype._parseSimpleSelector = function () {
10223 // : element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+ ;
10224 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SimpleSelector"]);
10226 if (node.addChild(this._parseElementName())) {
10229 while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) {
10232 return c > 0 ? this.finish(node) : null;
10234 Parser.prototype._parseSimpleSelectorBody = function () {
10235 return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib();
10237 Parser.prototype._parseSelectorIdent = function () {
10238 return this._parseIdent();
10240 Parser.prototype._parseHash = function () {
10241 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Hash) && !this.peekDelim('#')) {
10244 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].IdentifierSelector);
10245 if (this.acceptDelim('#')) {
10246 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10247 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10251 this.consumeToken(); // TokenType.Hash
10253 return this.finish(node);
10255 Parser.prototype._parseClass = function () {
10256 // class: '.' IDENT ;
10257 if (!this.peekDelim('.')) {
10260 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ClassSelector);
10261 this.consumeToken(); // '.'
10262 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10263 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10265 return this.finish(node);
10267 Parser.prototype._parseElementName = function () {
10268 // element_name: (ns? '|')? IDENT | '*';
10269 var pos = this.mark();
10270 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ElementNameSelector);
10271 node.addChild(this._parseNamespacePrefix());
10272 if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim('*')) {
10273 this.restoreAtMark(pos);
10276 return this.finish(node);
10278 Parser.prototype._parseNamespacePrefix = function () {
10279 var pos = this.mark();
10280 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].NamespacePrefix);
10281 if (!node.addChild(this._parseIdent()) && !this.acceptDelim('*')) {
10284 if (!this.acceptDelim('|')) {
10285 this.restoreAtMark(pos);
10288 return this.finish(node);
10290 Parser.prototype._parseAttrib = function () {
10291 // attrib : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
10292 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL)) {
10295 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["AttributeSelector"]);
10296 this.consumeToken(); // BracketL
10297 // Optional attrib namespace
10298 node.setNamespacePrefix(this._parseNamespacePrefix());
10299 if (!node.setIdentifier(this._parseIdent())) {
10300 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10302 if (node.setOperator(this._parseOperator())) {
10303 node.setValue(this._parseBinaryExpr());
10304 this.acceptIdent('i'); // case insensitive matching
10306 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR)) {
10307 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
10309 return this.finish(node);
10311 Parser.prototype._parsePseudo = function () {
10313 // pseudo: ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]
10314 var node = this._tryParsePseudoIdentifier();
10316 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
10317 var tryAsSelector = function () {
10318 var selectors = _this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10319 if (!selectors.addChild(_this._parseSelector(false))) {
10322 while (_this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma) && selectors.addChild(_this._parseSelector(false))) {
10325 if (_this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10326 return _this.finish(selectors);
10330 node.addChild(this.try(tryAsSelector) || this._parseBinaryExpr());
10331 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10332 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10335 return this.finish(node);
10339 Parser.prototype._tryParsePseudoIdentifier = function () {
10340 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
10343 var pos = this.mark();
10344 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].PseudoSelector);
10345 this.consumeToken(); // Colon
10346 if (this.hasWhitespace()) {
10347 this.restoreAtMark(pos);
10350 // optional, support ::
10351 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon) && this.hasWhitespace()) {
10352 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10354 if (!node.addChild(this._parseIdent())) {
10355 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
10359 Parser.prototype._tryParsePrio = function () {
10360 var mark = this.mark();
10361 var prio = this._parsePrio();
10365 this.restoreAtMark(mark);
10368 Parser.prototype._parsePrio = function () {
10369 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation)) {
10372 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Prio);
10373 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation) && this.acceptIdent('important')) {
10374 return this.finish(node);
10378 Parser.prototype._parseExpr = function (stopOnComma) {
10379 if (stopOnComma === void 0) { stopOnComma = false; }
10380 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Expression"]);
10381 if (!node.addChild(this._parseBinaryExpr())) {
10385 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) { // optional
10387 return this.finish(node);
10389 this.consumeToken();
10391 if (!node.addChild(this._parseBinaryExpr())) {
10395 return this.finish(node);
10397 Parser.prototype._parseNamedLine = function () {
10398 // https://www.w3.org/TR/css-grid-1/#named-lines
10399 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL)) {
10402 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].GridLine);
10403 this.consumeToken();
10404 while (node.addChild(this._parseIdent())) {
10407 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR)) {
10408 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
10410 return this.finish(node);
10412 Parser.prototype._parseBinaryExpr = function (preparsedLeft, preparsedOper) {
10413 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["BinaryExpression"]);
10414 if (!node.setLeft((preparsedLeft || this._parseTerm()))) {
10417 if (!node.setOperator(preparsedOper || this._parseOperator())) {
10418 return this.finish(node);
10420 if (!node.setRight(this._parseTerm())) {
10421 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].TermExpected);
10423 // things needed for multiple binary expressions
10424 node = this.finish(node);
10425 var operator = this._parseOperator();
10427 node = this._parseBinaryExpr(node, operator);
10429 return this.finish(node);
10431 Parser.prototype._parseTerm = function () {
10432 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Term"]);
10433 node.setOperator(this._parseUnaryOperator()); // optional
10434 if (node.setExpression(this._parseTermExpression())) {
10435 return this.finish(node);
10439 Parser.prototype._parseTermExpression = function () {
10440 return this._parseURILiteral() || // url before function
10441 this._parseFunction() || // function before ident
10442 this._parseIdent() ||
10443 this._parseStringLiteral() ||
10444 this._parseNumeric() ||
10445 this._parseHexColor() ||
10446 this._parseOperation() ||
10447 this._parseNamedLine();
10449 Parser.prototype._parseOperation = function () {
10450 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
10453 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10454 this.consumeToken(); // ParenthesisL
10455 node.addChild(this._parseExpr());
10456 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10457 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10459 return this.finish(node);
10461 Parser.prototype._parseNumeric = function () {
10462 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Num) ||
10463 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage) ||
10464 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Resolution) ||
10465 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Length) ||
10466 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EMS) ||
10467 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EXS) ||
10468 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Angle) ||
10469 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Time) ||
10470 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Dimension) ||
10471 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Freq)) {
10472 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NumericValue"]);
10473 this.consumeToken();
10474 return this.finish(node);
10478 Parser.prototype._parseStringLiteral = function () {
10479 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString)) {
10482 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].StringLiteral);
10483 this.consumeToken();
10484 return this.finish(node);
10486 Parser.prototype._parseURILiteral = function () {
10487 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^url(-prefix)?$/i)) {
10490 var pos = this.mark();
10491 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].URILiteral);
10492 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident);
10493 if (this.hasWhitespace() || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
10494 this.restoreAtMark(pos);
10497 this.scanner.inURL = true;
10498 this.consumeToken(); // consume ()
10499 node.addChild(this._parseURLArgument()); // argument is optional
10500 this.scanner.inURL = false;
10501 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10502 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10504 return this.finish(node);
10506 Parser.prototype._parseURLArgument = function () {
10507 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
10508 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString) && !this.acceptUnquotedString()) {
10511 return this.finish(node);
10513 Parser.prototype._parseIdent = function (referenceTypes) {
10514 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
10517 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Identifier"]);
10518 if (referenceTypes) {
10519 node.referenceTypes = referenceTypes;
10521 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^--/);
10522 this.consumeToken();
10523 return this.finish(node);
10525 Parser.prototype._parseFunction = function () {
10526 var pos = this.mark();
10527 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Function"]);
10528 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
10531 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
10532 this.restoreAtMark(pos);
10535 if (node.getArguments().addChild(this._parseFunctionArgument())) {
10536 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
10537 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10540 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
10541 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ExpressionExpected);
10545 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
10546 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
10548 return this.finish(node);
10550 Parser.prototype._parseFunctionIdentifier = function () {
10551 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
10554 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Identifier"]);
10555 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Function];
10556 if (this.acceptIdent('progid')) {
10557 // support for IE7 specific filters: 'progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)'
10558 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
10559 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident) && this.acceptDelim('.')) {
10563 return this.finish(node);
10565 this.consumeToken();
10566 return this.finish(node);
10568 Parser.prototype._parseFunctionArgument = function () {
10569 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["FunctionArgument"]);
10570 if (node.setValue(this._parseExpr(true))) {
10571 return this.finish(node);
10575 Parser.prototype._parseHexColor = function () {
10576 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) {
10577 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["HexColorValue"]);
10578 this.consumeToken();
10579 return this.finish(node);
10592 /***/ (function(module, __webpack_exports__, __webpack_require__) {
10595 __webpack_require__.r(__webpack_exports__);
10596 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenType", function() { return TokenType; });
10597 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLineStream", function() { return MultiLineStream; });
10598 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scanner", function() { return Scanner; });
10599 /*---------------------------------------------------------------------------------------------
10600 * Copyright (c) Microsoft Corporation. All rights reserved.
10601 * Licensed under the MIT License. See License.txt in the project root for license information.
10602 *--------------------------------------------------------------------------------------------*/
10605 (function (TokenType) {
10606 TokenType[TokenType["Ident"] = 0] = "Ident";
10607 TokenType[TokenType["AtKeyword"] = 1] = "AtKeyword";
10608 TokenType[TokenType["String"] = 2] = "String";
10609 TokenType[TokenType["BadString"] = 3] = "BadString";
10610 TokenType[TokenType["UnquotedString"] = 4] = "UnquotedString";
10611 TokenType[TokenType["Hash"] = 5] = "Hash";
10612 TokenType[TokenType["Num"] = 6] = "Num";
10613 TokenType[TokenType["Percentage"] = 7] = "Percentage";
10614 TokenType[TokenType["Dimension"] = 8] = "Dimension";
10615 TokenType[TokenType["UnicodeRange"] = 9] = "UnicodeRange";
10616 TokenType[TokenType["CDO"] = 10] = "CDO";
10617 TokenType[TokenType["CDC"] = 11] = "CDC";
10618 TokenType[TokenType["Colon"] = 12] = "Colon";
10619 TokenType[TokenType["SemiColon"] = 13] = "SemiColon";
10620 TokenType[TokenType["CurlyL"] = 14] = "CurlyL";
10621 TokenType[TokenType["CurlyR"] = 15] = "CurlyR";
10622 TokenType[TokenType["ParenthesisL"] = 16] = "ParenthesisL";
10623 TokenType[TokenType["ParenthesisR"] = 17] = "ParenthesisR";
10624 TokenType[TokenType["BracketL"] = 18] = "BracketL";
10625 TokenType[TokenType["BracketR"] = 19] = "BracketR";
10626 TokenType[TokenType["Whitespace"] = 20] = "Whitespace";
10627 TokenType[TokenType["Includes"] = 21] = "Includes";
10628 TokenType[TokenType["Dashmatch"] = 22] = "Dashmatch";
10629 TokenType[TokenType["SubstringOperator"] = 23] = "SubstringOperator";
10630 TokenType[TokenType["PrefixOperator"] = 24] = "PrefixOperator";
10631 TokenType[TokenType["SuffixOperator"] = 25] = "SuffixOperator";
10632 TokenType[TokenType["Delim"] = 26] = "Delim";
10633 TokenType[TokenType["EMS"] = 27] = "EMS";
10634 TokenType[TokenType["EXS"] = 28] = "EXS";
10635 TokenType[TokenType["Length"] = 29] = "Length";
10636 TokenType[TokenType["Angle"] = 30] = "Angle";
10637 TokenType[TokenType["Time"] = 31] = "Time";
10638 TokenType[TokenType["Freq"] = 32] = "Freq";
10639 TokenType[TokenType["Exclamation"] = 33] = "Exclamation";
10640 TokenType[TokenType["Resolution"] = 34] = "Resolution";
10641 TokenType[TokenType["Comma"] = 35] = "Comma";
10642 TokenType[TokenType["Charset"] = 36] = "Charset";
10643 TokenType[TokenType["EscapedJavaScript"] = 37] = "EscapedJavaScript";
10644 TokenType[TokenType["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript";
10645 TokenType[TokenType["Comment"] = 39] = "Comment";
10646 TokenType[TokenType["SingleLineComment"] = 40] = "SingleLineComment";
10647 TokenType[TokenType["EOF"] = 41] = "EOF";
10648 TokenType[TokenType["CustomToken"] = 42] = "CustomToken";
10649 })(TokenType || (TokenType = {}));
10650 var MultiLineStream = /** @class */ (function () {
10651 function MultiLineStream(source) {
10652 this.source = source;
10653 this.len = source.length;
10656 MultiLineStream.prototype.substring = function (from, to) {
10657 if (to === void 0) { to = this.position; }
10658 return this.source.substring(from, to);
10660 MultiLineStream.prototype.eos = function () {
10661 return this.len <= this.position;
10663 MultiLineStream.prototype.pos = function () {
10664 return this.position;
10666 MultiLineStream.prototype.goBackTo = function (pos) {
10667 this.position = pos;
10669 MultiLineStream.prototype.goBack = function (n) {
10670 this.position -= n;
10672 MultiLineStream.prototype.advance = function (n) {
10673 this.position += n;
10675 MultiLineStream.prototype.nextChar = function () {
10676 return this.source.charCodeAt(this.position++) || 0;
10678 MultiLineStream.prototype.peekChar = function (n) {
10679 if (n === void 0) { n = 0; }
10680 return this.source.charCodeAt(this.position + n) || 0;
10682 MultiLineStream.prototype.lookbackChar = function (n) {
10683 if (n === void 0) { n = 0; }
10684 return this.source.charCodeAt(this.position - n) || 0;
10686 MultiLineStream.prototype.advanceIfChar = function (ch) {
10687 if (ch === this.source.charCodeAt(this.position)) {
10693 MultiLineStream.prototype.advanceIfChars = function (ch) {
10694 if (this.position + ch.length > this.source.length) {
10698 for (; i < ch.length; i++) {
10699 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
10706 MultiLineStream.prototype.advanceWhileChar = function (condition) {
10707 var posNow = this.position;
10708 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
10711 return this.position - posNow;
10713 return MultiLineStream;
10716 var _a = 'a'.charCodeAt(0);
10717 var _f = 'f'.charCodeAt(0);
10718 var _z = 'z'.charCodeAt(0);
10719 var _A = 'A'.charCodeAt(0);
10720 var _F = 'F'.charCodeAt(0);
10721 var _Z = 'Z'.charCodeAt(0);
10722 var _0 = '0'.charCodeAt(0);
10723 var _9 = '9'.charCodeAt(0);
10724 var _TLD = '~'.charCodeAt(0);
10725 var _HAT = '^'.charCodeAt(0);
10726 var _EQS = '='.charCodeAt(0);
10727 var _PIP = '|'.charCodeAt(0);
10728 var _MIN = '-'.charCodeAt(0);
10729 var _USC = '_'.charCodeAt(0);
10730 var _PRC = '%'.charCodeAt(0);
10731 var _MUL = '*'.charCodeAt(0);
10732 var _LPA = '('.charCodeAt(0);
10733 var _RPA = ')'.charCodeAt(0);
10734 var _LAN = '<'.charCodeAt(0);
10735 var _RAN = '>'.charCodeAt(0);
10736 var _ATS = '@'.charCodeAt(0);
10737 var _HSH = '#'.charCodeAt(0);
10738 var _DLR = '$'.charCodeAt(0);
10739 var _BSL = '\\'.charCodeAt(0);
10740 var _FSL = '/'.charCodeAt(0);
10741 var _NWL = '\n'.charCodeAt(0);
10742 var _CAR = '\r'.charCodeAt(0);
10743 var _LFD = '\f'.charCodeAt(0);
10744 var _DQO = '"'.charCodeAt(0);
10745 var _SQO = '\''.charCodeAt(0);
10746 var _WSP = ' '.charCodeAt(0);
10747 var _TAB = '\t'.charCodeAt(0);
10748 var _SEM = ';'.charCodeAt(0);
10749 var _COL = ':'.charCodeAt(0);
10750 var _CUL = '{'.charCodeAt(0);
10751 var _CUR = '}'.charCodeAt(0);
10752 var _BRL = '['.charCodeAt(0);
10753 var _BRR = ']'.charCodeAt(0);
10754 var _CMA = ','.charCodeAt(0);
10755 var _DOT = '.'.charCodeAt(0);
10756 var _BNG = '!'.charCodeAt(0);
10757 var staticTokenTable = {};
10758 staticTokenTable[_SEM] = TokenType.SemiColon;
10759 staticTokenTable[_COL] = TokenType.Colon;
10760 staticTokenTable[_CUL] = TokenType.CurlyL;
10761 staticTokenTable[_CUR] = TokenType.CurlyR;
10762 staticTokenTable[_BRR] = TokenType.BracketR;
10763 staticTokenTable[_BRL] = TokenType.BracketL;
10764 staticTokenTable[_LPA] = TokenType.ParenthesisL;
10765 staticTokenTable[_RPA] = TokenType.ParenthesisR;
10766 staticTokenTable[_CMA] = TokenType.Comma;
10767 var staticUnitTable = {};
10768 staticUnitTable['em'] = TokenType.EMS;
10769 staticUnitTable['ex'] = TokenType.EXS;
10770 staticUnitTable['px'] = TokenType.Length;
10771 staticUnitTable['cm'] = TokenType.Length;
10772 staticUnitTable['mm'] = TokenType.Length;
10773 staticUnitTable['in'] = TokenType.Length;
10774 staticUnitTable['pt'] = TokenType.Length;
10775 staticUnitTable['pc'] = TokenType.Length;
10776 staticUnitTable['deg'] = TokenType.Angle;
10777 staticUnitTable['rad'] = TokenType.Angle;
10778 staticUnitTable['grad'] = TokenType.Angle;
10779 staticUnitTable['ms'] = TokenType.Time;
10780 staticUnitTable['s'] = TokenType.Time;
10781 staticUnitTable['hz'] = TokenType.Freq;
10782 staticUnitTable['khz'] = TokenType.Freq;
10783 staticUnitTable['%'] = TokenType.Percentage;
10784 staticUnitTable['fr'] = TokenType.Percentage;
10785 staticUnitTable['dpi'] = TokenType.Resolution;
10786 staticUnitTable['dpcm'] = TokenType.Resolution;
10787 var Scanner = /** @class */ (function () {
10788 function Scanner() {
10789 this.stream = new MultiLineStream('');
10790 this.ignoreComment = true;
10791 this.ignoreWhitespace = true;
10792 this.inURL = false;
10794 Scanner.prototype.setSource = function (input) {
10795 this.stream = new MultiLineStream(input);
10797 Scanner.prototype.finishToken = function (offset, type, text) {
10800 len: this.stream.pos() - offset,
10802 text: text || this.stream.substring(offset)
10805 Scanner.prototype.substring = function (offset, len) {
10806 return this.stream.substring(offset, offset + len);
10808 Scanner.prototype.pos = function () {
10809 return this.stream.pos();
10811 Scanner.prototype.goBackTo = function (pos) {
10812 this.stream.goBackTo(pos);
10814 Scanner.prototype.scanUnquotedString = function () {
10815 var offset = this.stream.pos();
10817 if (this._unquotedString(content)) {
10818 return this.finishToken(offset, TokenType.UnquotedString, content.join(''));
10822 Scanner.prototype.scan = function () {
10823 // processes all whitespaces and comments
10824 var triviaToken = this.trivia();
10825 if (triviaToken !== null) {
10826 return triviaToken;
10828 var offset = this.stream.pos();
10829 // End of file/input
10830 if (this.stream.eos()) {
10831 return this.finishToken(offset, TokenType.EOF);
10833 return this.scanNext(offset);
10835 Scanner.prototype.scanNext = function (offset) {
10837 if (this.stream.advanceIfChars([_LAN, _BNG, _MIN, _MIN])) {
10838 return this.finishToken(offset, TokenType.CDO);
10841 if (this.stream.advanceIfChars([_MIN, _MIN, _RAN])) {
10842 return this.finishToken(offset, TokenType.CDC);
10845 if (this.ident(content)) {
10846 return this.finishToken(offset, TokenType.Ident, content.join(''));
10849 if (this.stream.advanceIfChar(_ATS)) {
10851 if (this._name(content)) {
10852 var keywordText = content.join('');
10853 if (keywordText === '@charset') {
10854 return this.finishToken(offset, TokenType.Charset, keywordText);
10856 return this.finishToken(offset, TokenType.AtKeyword, keywordText);
10859 return this.finishToken(offset, TokenType.Delim);
10863 if (this.stream.advanceIfChar(_HSH)) {
10865 if (this._name(content)) {
10866 return this.finishToken(offset, TokenType.Hash, content.join(''));
10869 return this.finishToken(offset, TokenType.Delim);
10873 if (this.stream.advanceIfChar(_BNG)) {
10874 return this.finishToken(offset, TokenType.Exclamation);
10877 if (this._number()) {
10878 var pos = this.stream.pos();
10879 content = [this.stream.substring(offset, pos)];
10880 if (this.stream.advanceIfChar(_PRC)) {
10882 return this.finishToken(offset, TokenType.Percentage);
10884 else if (this.ident(content)) {
10885 var dim = this.stream.substring(pos).toLowerCase();
10886 var tokenType_1 = staticUnitTable[dim];
10887 if (typeof tokenType_1 !== 'undefined') {
10888 // Known dimension 43px
10889 return this.finishToken(offset, tokenType_1, content.join(''));
10892 // Unknown dimension 43ft
10893 return this.finishToken(offset, TokenType.Dimension, content.join(''));
10896 return this.finishToken(offset, TokenType.Num);
10898 // String, BadString
10900 var tokenType = this._string(content);
10901 if (tokenType !== null) {
10902 return this.finishToken(offset, tokenType, content.join(''));
10904 // single character tokens
10905 tokenType = staticTokenTable[this.stream.peekChar()];
10906 if (typeof tokenType !== 'undefined') {
10907 this.stream.advance(1);
10908 return this.finishToken(offset, tokenType);
10911 if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS) {
10912 this.stream.advance(2);
10913 return this.finishToken(offset, TokenType.Includes);
10916 if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS) {
10917 this.stream.advance(2);
10918 return this.finishToken(offset, TokenType.Dashmatch);
10920 // Substring operator *=
10921 if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS) {
10922 this.stream.advance(2);
10923 return this.finishToken(offset, TokenType.SubstringOperator);
10925 // Substring operator ^=
10926 if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS) {
10927 this.stream.advance(2);
10928 return this.finishToken(offset, TokenType.PrefixOperator);
10930 // Substring operator $=
10931 if (this.stream.peekChar(0) === _DLR && this.stream.peekChar(1) === _EQS) {
10932 this.stream.advance(2);
10933 return this.finishToken(offset, TokenType.SuffixOperator);
10936 this.stream.nextChar();
10937 return this.finishToken(offset, TokenType.Delim);
10939 Scanner.prototype.trivia = function () {
10941 var offset = this.stream.pos();
10942 if (this._whitespace()) {
10943 if (!this.ignoreWhitespace) {
10944 return this.finishToken(offset, TokenType.Whitespace);
10947 else if (this.comment()) {
10948 if (!this.ignoreComment) {
10949 return this.finishToken(offset, TokenType.Comment);
10957 Scanner.prototype.comment = function () {
10958 if (this.stream.advanceIfChars([_FSL, _MUL])) {
10959 var success_1 = false, hot_1 = false;
10960 this.stream.advanceWhileChar(function (ch) {
10961 if (hot_1 && ch === _FSL) {
10965 hot_1 = ch === _MUL;
10969 this.stream.advance(1);
10975 Scanner.prototype._number = function () {
10977 if (this.stream.peekChar() === _DOT) {
10980 ch = this.stream.peekChar(npeek);
10981 if (ch >= _0 && ch <= _9) {
10982 this.stream.advance(npeek + 1);
10983 this.stream.advanceWhileChar(function (ch) {
10984 return ch >= _0 && ch <= _9 || npeek === 0 && ch === _DOT;
10990 Scanner.prototype._newline = function (result) {
10991 var ch = this.stream.peekChar();
10996 this.stream.advance(1);
10997 result.push(String.fromCharCode(ch));
10998 if (ch === _CAR && this.stream.advanceIfChar(_NWL)) {
11005 Scanner.prototype._escape = function (result, includeNewLines) {
11006 var ch = this.stream.peekChar();
11008 this.stream.advance(1);
11009 ch = this.stream.peekChar();
11010 var hexNumCount = 0;
11011 while (hexNumCount < 6 && (ch >= _0 && ch <= _9 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) {
11012 this.stream.advance(1);
11013 ch = this.stream.peekChar();
11016 if (hexNumCount > 0) {
11018 var hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16);
11020 result.push(String.fromCharCode(hexVal));
11026 // optional whitespace or new line, not part of result text
11027 if (ch === _WSP || ch === _TAB) {
11028 this.stream.advance(1);
11035 if (ch !== _CAR && ch !== _LFD && ch !== _NWL) {
11036 this.stream.advance(1);
11037 result.push(String.fromCharCode(ch));
11040 else if (includeNewLines) {
11041 return this._newline(result);
11046 Scanner.prototype._stringChar = function (closeQuote, result) {
11047 // not closeQuote, not backslash, not newline
11048 var ch = this.stream.peekChar();
11049 if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR && ch !== _LFD && ch !== _NWL) {
11050 this.stream.advance(1);
11051 result.push(String.fromCharCode(ch));
11056 Scanner.prototype._string = function (result) {
11057 if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) {
11058 var closeQuote = this.stream.nextChar();
11059 result.push(String.fromCharCode(closeQuote));
11060 while (this._stringChar(closeQuote, result) || this._escape(result, true)) {
11063 if (this.stream.peekChar() === closeQuote) {
11064 this.stream.nextChar();
11065 result.push(String.fromCharCode(closeQuote));
11066 return TokenType.String;
11069 return TokenType.BadString;
11074 Scanner.prototype._unquotedChar = function (result) {
11075 // not closeQuote, not backslash, not newline
11076 var ch = this.stream.peekChar();
11077 if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL && ch !== _LFD && ch !== _CAR) {
11078 this.stream.advance(1);
11079 result.push(String.fromCharCode(ch));
11084 Scanner.prototype._unquotedString = function (result) {
11085 var hasContent = false;
11086 while (this._unquotedChar(result) || this._escape(result)) {
11091 Scanner.prototype._whitespace = function () {
11092 var n = this.stream.advanceWhileChar(function (ch) {
11093 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
11097 Scanner.prototype._name = function (result) {
11098 var matched = false;
11099 while (this._identChar(result) || this._escape(result)) {
11104 Scanner.prototype.ident = function (result) {
11105 var pos = this.stream.pos();
11106 var hasMinus = this._minus(result);
11107 if (hasMinus && this._minus(result) /* -- */) {
11108 if (this._identFirstChar(result) || this._escape(result)) {
11109 while (this._identChar(result) || this._escape(result)) {
11115 else if (this._identFirstChar(result) || this._escape(result)) {
11116 while (this._identChar(result) || this._escape(result)) {
11121 this.stream.goBackTo(pos);
11124 Scanner.prototype._identFirstChar = function (result) {
11125 var ch = this.stream.peekChar();
11126 if (ch === _USC || // _
11127 ch >= _a && ch <= _z || // a-z
11128 ch >= _A && ch <= _Z || // A-Z
11129 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
11130 this.stream.advance(1);
11131 result.push(String.fromCharCode(ch));
11136 Scanner.prototype._minus = function (result) {
11137 var ch = this.stream.peekChar();
11139 this.stream.advance(1);
11140 result.push(String.fromCharCode(ch));
11145 Scanner.prototype._identChar = function (result) {
11146 var ch = this.stream.peekChar();
11147 if (ch === _USC || // _
11148 ch === _MIN || // -
11149 ch >= _a && ch <= _z || // a-z
11150 ch >= _A && ch <= _Z || // A-Z
11151 ch >= _0 && ch <= _9 || // 0/9
11152 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
11153 this.stream.advance(1);
11154 result.push(String.fromCharCode(ch));
11166 /***/ (function(module, __webpack_exports__, __webpack_require__) {
11169 __webpack_require__.r(__webpack_exports__);
11170 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NodeType", function() { return NodeType; });
11171 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceType", function() { return ReferenceType; });
11172 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodeAtOffset", function() { return getNodeAtOffset; });
11173 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodePath", function() { return getNodePath; });
11174 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParentDeclaration", function() { return getParentDeclaration; });
11175 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; });
11176 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nodelist", function() { return Nodelist; });
11177 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Identifier", function() { return Identifier; });
11178 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stylesheet", function() { return Stylesheet; });
11179 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Declarations", function() { return Declarations; });
11180 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDeclaration", function() { return BodyDeclaration; });
11181 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RuleSet", function() { return RuleSet; });
11182 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selector", function() { return Selector; });
11183 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleSelector", function() { return SimpleSelector; });
11184 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AtApplyRule", function() { return AtApplyRule; });
11185 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractDeclaration", function() { return AbstractDeclaration; });
11186 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomPropertyDeclaration", function() { return CustomPropertyDeclaration; });
11187 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomPropertySet", function() { return CustomPropertySet; });
11188 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Declaration", function() { return Declaration; });
11189 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Property", function() { return Property; });
11190 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Invocation", function() { return Invocation; });
11191 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Function", function() { return Function; });
11192 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionParameter", function() { return FunctionParameter; });
11193 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionArgument", function() { return FunctionArgument; });
11194 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IfStatement", function() { return IfStatement; });
11195 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForStatement", function() { return ForStatement; });
11196 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EachStatement", function() { return EachStatement; });
11197 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WhileStatement", function() { return WhileStatement; });
11198 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElseStatement", function() { return ElseStatement; });
11199 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionDeclaration", function() { return FunctionDeclaration; });
11200 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewPort", function() { return ViewPort; });
11201 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontFace", function() { return FontFace; });
11202 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NestedProperties", function() { return NestedProperties; });
11203 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Keyframe", function() { return Keyframe; });
11204 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyframeSelector", function() { return KeyframeSelector; });
11205 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Import", function() { return Import; });
11206 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Use", function() { return Use; });
11207 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleConfiguration", function() { return ModuleConfiguration; });
11208 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Forward", function() { return Forward; });
11209 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForwardVisibility", function() { return ForwardVisibility; });
11210 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return Namespace; });
11211 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Media", function() { return Media; });
11212 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Supports", function() { return Supports; });
11213 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Document", function() { return Document; });
11214 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Medialist", function() { return Medialist; });
11215 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaQuery", function() { return MediaQuery; });
11216 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SupportsCondition", function() { return SupportsCondition; });
11217 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return Page; });
11218 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageBoxMarginBox", function() { return PageBoxMarginBox; });
11219 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expression", function() { return Expression; });
11220 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BinaryExpression", function() { return BinaryExpression; });
11221 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Term", function() { return Term; });
11222 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributeSelector", function() { return AttributeSelector; });
11223 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Operator", function() { return Operator; });
11224 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HexColorValue", function() { return HexColorValue; });
11225 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumericValue", function() { return NumericValue; });
11226 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableDeclaration", function() { return VariableDeclaration; });
11227 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interpolation", function() { return Interpolation; });
11228 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return Variable; });
11229 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExtendsReference", function() { return ExtendsReference; });
11230 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinContentReference", function() { return MixinContentReference; });
11231 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinContentDeclaration", function() { return MixinContentDeclaration; });
11232 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinReference", function() { return MixinReference; });
11233 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinDeclaration", function() { return MixinDeclaration; });
11234 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnknownAtRule", function() { return UnknownAtRule; });
11235 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListEntry", function() { return ListEntry; });
11236 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LessGuard", function() { return LessGuard; });
11237 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardCondition", function() { return GuardCondition; });
11238 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Module", function() { return Module; });
11239 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Level", function() { return Level; });
11240 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Marker", function() { return Marker; });
11241 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseErrorCollector", function() { return ParseErrorCollector; });
11242 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
11243 /*---------------------------------------------------------------------------------------------
11244 * Copyright (c) Microsoft Corporation. All rights reserved.
11245 * Licensed under the MIT License. See License.txt in the project root for license information.
11246 *--------------------------------------------------------------------------------------------*/
11248 var __extends = (undefined && undefined.__extends) || (function () {
11249 var extendStatics = function (d, b) {
11250 extendStatics = Object.setPrototypeOf ||
11251 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11252 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11253 return extendStatics(d, b);
11255 return function (d, b) {
11256 extendStatics(d, b);
11257 function __() { this.constructor = d; }
11258 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11263 /// Nodes for the css 2.1 specification. See for reference:
11264 /// http://www.w3.org/TR/CSS21/grammar.html#grammar
11267 (function (NodeType) {
11268 NodeType[NodeType["Undefined"] = 0] = "Undefined";
11269 NodeType[NodeType["Identifier"] = 1] = "Identifier";
11270 NodeType[NodeType["Stylesheet"] = 2] = "Stylesheet";
11271 NodeType[NodeType["Ruleset"] = 3] = "Ruleset";
11272 NodeType[NodeType["Selector"] = 4] = "Selector";
11273 NodeType[NodeType["SimpleSelector"] = 5] = "SimpleSelector";
11274 NodeType[NodeType["SelectorInterpolation"] = 6] = "SelectorInterpolation";
11275 NodeType[NodeType["SelectorCombinator"] = 7] = "SelectorCombinator";
11276 NodeType[NodeType["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent";
11277 NodeType[NodeType["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling";
11278 NodeType[NodeType["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings";
11279 NodeType[NodeType["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant";
11280 NodeType[NodeType["Page"] = 12] = "Page";
11281 NodeType[NodeType["PageBoxMarginBox"] = 13] = "PageBoxMarginBox";
11282 NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
11283 NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
11284 NodeType[NodeType["ElementNameSelector"] = 16] = "ElementNameSelector";
11285 NodeType[NodeType["PseudoSelector"] = 17] = "PseudoSelector";
11286 NodeType[NodeType["AttributeSelector"] = 18] = "AttributeSelector";
11287 NodeType[NodeType["Declaration"] = 19] = "Declaration";
11288 NodeType[NodeType["Declarations"] = 20] = "Declarations";
11289 NodeType[NodeType["Property"] = 21] = "Property";
11290 NodeType[NodeType["Expression"] = 22] = "Expression";
11291 NodeType[NodeType["BinaryExpression"] = 23] = "BinaryExpression";
11292 NodeType[NodeType["Term"] = 24] = "Term";
11293 NodeType[NodeType["Operator"] = 25] = "Operator";
11294 NodeType[NodeType["Value"] = 26] = "Value";
11295 NodeType[NodeType["StringLiteral"] = 27] = "StringLiteral";
11296 NodeType[NodeType["URILiteral"] = 28] = "URILiteral";
11297 NodeType[NodeType["EscapedValue"] = 29] = "EscapedValue";
11298 NodeType[NodeType["Function"] = 30] = "Function";
11299 NodeType[NodeType["NumericValue"] = 31] = "NumericValue";
11300 NodeType[NodeType["HexColorValue"] = 32] = "HexColorValue";
11301 NodeType[NodeType["MixinDeclaration"] = 33] = "MixinDeclaration";
11302 NodeType[NodeType["MixinReference"] = 34] = "MixinReference";
11303 NodeType[NodeType["VariableName"] = 35] = "VariableName";
11304 NodeType[NodeType["VariableDeclaration"] = 36] = "VariableDeclaration";
11305 NodeType[NodeType["Prio"] = 37] = "Prio";
11306 NodeType[NodeType["Interpolation"] = 38] = "Interpolation";
11307 NodeType[NodeType["NestedProperties"] = 39] = "NestedProperties";
11308 NodeType[NodeType["ExtendsReference"] = 40] = "ExtendsReference";
11309 NodeType[NodeType["SelectorPlaceholder"] = 41] = "SelectorPlaceholder";
11310 NodeType[NodeType["Debug"] = 42] = "Debug";
11311 NodeType[NodeType["If"] = 43] = "If";
11312 NodeType[NodeType["Else"] = 44] = "Else";
11313 NodeType[NodeType["For"] = 45] = "For";
11314 NodeType[NodeType["Each"] = 46] = "Each";
11315 NodeType[NodeType["While"] = 47] = "While";
11316 NodeType[NodeType["MixinContentReference"] = 48] = "MixinContentReference";
11317 NodeType[NodeType["MixinContentDeclaration"] = 49] = "MixinContentDeclaration";
11318 NodeType[NodeType["Media"] = 50] = "Media";
11319 NodeType[NodeType["Keyframe"] = 51] = "Keyframe";
11320 NodeType[NodeType["FontFace"] = 52] = "FontFace";
11321 NodeType[NodeType["Import"] = 53] = "Import";
11322 NodeType[NodeType["Namespace"] = 54] = "Namespace";
11323 NodeType[NodeType["Invocation"] = 55] = "Invocation";
11324 NodeType[NodeType["FunctionDeclaration"] = 56] = "FunctionDeclaration";
11325 NodeType[NodeType["ReturnStatement"] = 57] = "ReturnStatement";
11326 NodeType[NodeType["MediaQuery"] = 58] = "MediaQuery";
11327 NodeType[NodeType["FunctionParameter"] = 59] = "FunctionParameter";
11328 NodeType[NodeType["FunctionArgument"] = 60] = "FunctionArgument";
11329 NodeType[NodeType["KeyframeSelector"] = 61] = "KeyframeSelector";
11330 NodeType[NodeType["ViewPort"] = 62] = "ViewPort";
11331 NodeType[NodeType["Document"] = 63] = "Document";
11332 NodeType[NodeType["AtApplyRule"] = 64] = "AtApplyRule";
11333 NodeType[NodeType["CustomPropertyDeclaration"] = 65] = "CustomPropertyDeclaration";
11334 NodeType[NodeType["CustomPropertySet"] = 66] = "CustomPropertySet";
11335 NodeType[NodeType["ListEntry"] = 67] = "ListEntry";
11336 NodeType[NodeType["Supports"] = 68] = "Supports";
11337 NodeType[NodeType["SupportsCondition"] = 69] = "SupportsCondition";
11338 NodeType[NodeType["NamespacePrefix"] = 70] = "NamespacePrefix";
11339 NodeType[NodeType["GridLine"] = 71] = "GridLine";
11340 NodeType[NodeType["Plugin"] = 72] = "Plugin";
11341 NodeType[NodeType["UnknownAtRule"] = 73] = "UnknownAtRule";
11342 NodeType[NodeType["Use"] = 74] = "Use";
11343 NodeType[NodeType["ModuleConfiguration"] = 75] = "ModuleConfiguration";
11344 NodeType[NodeType["Forward"] = 76] = "Forward";
11345 NodeType[NodeType["ForwardVisibility"] = 77] = "ForwardVisibility";
11346 NodeType[NodeType["Module"] = 78] = "Module";
11347 })(NodeType || (NodeType = {}));
11349 (function (ReferenceType) {
11350 ReferenceType[ReferenceType["Mixin"] = 0] = "Mixin";
11351 ReferenceType[ReferenceType["Rule"] = 1] = "Rule";
11352 ReferenceType[ReferenceType["Variable"] = 2] = "Variable";
11353 ReferenceType[ReferenceType["Function"] = 3] = "Function";
11354 ReferenceType[ReferenceType["Keyframe"] = 4] = "Keyframe";
11355 ReferenceType[ReferenceType["Unknown"] = 5] = "Unknown";
11356 ReferenceType[ReferenceType["Module"] = 6] = "Module";
11357 ReferenceType[ReferenceType["Forward"] = 7] = "Forward";
11358 ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
11359 })(ReferenceType || (ReferenceType = {}));
11360 function getNodeAtOffset(node, offset) {
11361 var candidate = null;
11362 if (!node || offset < node.offset || offset > node.end) {
11365 // Find the shortest node at the position
11366 node.accept(function (node) {
11367 if (node.offset === -1 && node.length === -1) {
11370 if (node.offset <= offset && node.end >= offset) {
11374 else if (node.length <= candidate.length) {
11383 function getNodePath(node, offset) {
11384 var candidate = getNodeAtOffset(node, offset);
11386 while (candidate) {
11387 path.unshift(candidate);
11388 candidate = candidate.parent;
11392 function getParentDeclaration(node) {
11393 var decl = node.findParent(NodeType.Declaration);
11394 var value = decl && decl.getValue();
11395 if (value && value.encloses(node)) {
11400 var Node = /** @class */ (function () {
11401 function Node(offset, len, nodeType) {
11402 if (offset === void 0) { offset = -1; }
11403 if (len === void 0) { len = -1; }
11404 this.parent = null;
11405 this.offset = offset;
11408 this.nodeType = nodeType;
11411 Object.defineProperty(Node.prototype, "end", {
11412 get: function () { return this.offset + this.length; },
11416 Object.defineProperty(Node.prototype, "type", {
11418 return this.nodeType || NodeType.Undefined;
11420 set: function (type) {
11421 this.nodeType = type;
11426 Node.prototype.getTextProvider = function () {
11428 while (node && !node.textProvider) {
11429 node = node.parent;
11432 return node.textProvider;
11434 return function () { return 'unknown'; };
11436 Node.prototype.getText = function () {
11437 return this.getTextProvider()(this.offset, this.length);
11439 Node.prototype.matches = function (str) {
11440 return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
11442 Node.prototype.startsWith = function (str) {
11443 return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
11445 Node.prototype.endsWith = function (str) {
11446 return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
11448 Node.prototype.accept = function (visitor) {
11449 if (visitor(this) && this.children) {
11450 for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
11451 var child = _a[_i];
11452 child.accept(visitor);
11456 Node.prototype.acceptVisitor = function (visitor) {
11457 this.accept(visitor.visitNode.bind(visitor));
11459 Node.prototype.adoptChild = function (node, index) {
11460 if (index === void 0) { index = -1; }
11461 if (node.parent && node.parent.children) {
11462 var idx = node.parent.children.indexOf(node);
11464 node.parent.children.splice(idx, 1);
11467 node.parent = this;
11468 var children = this.children;
11470 children = this.children = [];
11472 if (index !== -1) {
11473 children.splice(index, 0, node);
11476 children.push(node);
11480 Node.prototype.attachTo = function (parent, index) {
11481 if (index === void 0) { index = -1; }
11483 parent.adoptChild(this, index);
11487 Node.prototype.collectIssues = function (results) {
11489 results.push.apply(results, this.issues);
11492 Node.prototype.addIssue = function (issue) {
11493 if (!this.issues) {
11496 this.issues.push(issue);
11498 Node.prototype.hasIssue = function (rule) {
11499 return Array.isArray(this.issues) && this.issues.some(function (i) { return i.getRule() === rule; });
11501 Node.prototype.isErroneous = function (recursive) {
11502 if (recursive === void 0) { recursive = false; }
11503 if (this.issues && this.issues.length > 0) {
11506 return recursive && Array.isArray(this.children) && this.children.some(function (c) { return c.isErroneous(true); });
11508 Node.prototype.setNode = function (field, node, index) {
11509 if (index === void 0) { index = -1; }
11511 node.attachTo(this, index);
11512 this[field] = node;
11517 Node.prototype.addChild = function (node) {
11519 if (!this.children) {
11520 this.children = [];
11522 node.attachTo(this);
11523 this.updateOffsetAndLength(node);
11528 Node.prototype.updateOffsetAndLength = function (node) {
11529 if (node.offset < this.offset || this.offset === -1) {
11530 this.offset = node.offset;
11532 var nodeEnd = node.end;
11533 if ((nodeEnd > this.end) || this.length === -1) {
11534 this.length = nodeEnd - this.offset;
11537 Node.prototype.hasChildren = function () {
11538 return !!this.children && this.children.length > 0;
11540 Node.prototype.getChildren = function () {
11541 return this.children ? this.children.slice(0) : [];
11543 Node.prototype.getChild = function (index) {
11544 if (this.children && index < this.children.length) {
11545 return this.children[index];
11549 Node.prototype.addChildren = function (nodes) {
11550 for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
11551 var node = nodes_1[_i];
11552 this.addChild(node);
11555 Node.prototype.findFirstChildBeforeOffset = function (offset) {
11556 if (this.children) {
11557 var current = null;
11558 for (var i = this.children.length - 1; i >= 0; i--) {
11559 // iterate until we find a child that has a start offset smaller than the input offset
11560 current = this.children[i];
11561 if (current.offset <= offset) {
11568 Node.prototype.findChildAtOffset = function (offset, goDeep) {
11569 var current = this.findFirstChildBeforeOffset(offset);
11570 if (current && current.end >= offset) {
11572 return current.findChildAtOffset(offset, true) || current;
11578 Node.prototype.encloses = function (candidate) {
11579 return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
11581 Node.prototype.getParent = function () {
11582 var result = this.parent;
11583 while (result instanceof Nodelist) {
11584 result = result.parent;
11588 Node.prototype.findParent = function (type) {
11590 while (result && result.type !== type) {
11591 result = result.parent;
11595 Node.prototype.findAParent = function () {
11597 for (var _i = 0; _i < arguments.length; _i++) {
11598 types[_i] = arguments[_i];
11601 while (result && !types.some(function (t) { return result.type === t; })) {
11602 result = result.parent;
11606 Node.prototype.setData = function (key, value) {
11607 if (!this.options) {
11610 this.options[key] = value;
11612 Node.prototype.getData = function (key) {
11613 if (!this.options || !this.options.hasOwnProperty(key)) {
11616 return this.options[key];
11621 var Nodelist = /** @class */ (function (_super) {
11622 __extends(Nodelist, _super);
11623 function Nodelist(parent, index) {
11624 if (index === void 0) { index = -1; }
11625 var _this = _super.call(this, -1, -1) || this;
11626 _this.attachTo(parent, index);
11634 var Identifier = /** @class */ (function (_super) {
11635 __extends(Identifier, _super);
11636 function Identifier(offset, length) {
11637 var _this = _super.call(this, offset, length) || this;
11638 _this.isCustomProperty = false;
11641 Object.defineProperty(Identifier.prototype, "type", {
11643 return NodeType.Identifier;
11648 Identifier.prototype.containsInterpolation = function () {
11649 return this.hasChildren();
11654 var Stylesheet = /** @class */ (function (_super) {
11655 __extends(Stylesheet, _super);
11656 function Stylesheet(offset, length) {
11657 return _super.call(this, offset, length) || this;
11659 Object.defineProperty(Stylesheet.prototype, "type", {
11661 return NodeType.Stylesheet;
11669 var Declarations = /** @class */ (function (_super) {
11670 __extends(Declarations, _super);
11671 function Declarations(offset, length) {
11672 return _super.call(this, offset, length) || this;
11674 Object.defineProperty(Declarations.prototype, "type", {
11676 return NodeType.Declarations;
11681 return Declarations;
11684 var BodyDeclaration = /** @class */ (function (_super) {
11685 __extends(BodyDeclaration, _super);
11686 function BodyDeclaration(offset, length) {
11687 return _super.call(this, offset, length) || this;
11689 BodyDeclaration.prototype.getDeclarations = function () {
11690 return this.declarations;
11692 BodyDeclaration.prototype.setDeclarations = function (decls) {
11693 return this.setNode('declarations', decls);
11695 return BodyDeclaration;
11698 var RuleSet = /** @class */ (function (_super) {
11699 __extends(RuleSet, _super);
11700 function RuleSet(offset, length) {
11701 return _super.call(this, offset, length) || this;
11703 Object.defineProperty(RuleSet.prototype, "type", {
11705 return NodeType.Ruleset;
11710 RuleSet.prototype.getSelectors = function () {
11711 if (!this.selectors) {
11712 this.selectors = new Nodelist(this);
11714 return this.selectors;
11716 RuleSet.prototype.isNested = function () {
11717 return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null;
11720 }(BodyDeclaration));
11722 var Selector = /** @class */ (function (_super) {
11723 __extends(Selector, _super);
11724 function Selector(offset, length) {
11725 return _super.call(this, offset, length) || this;
11727 Object.defineProperty(Selector.prototype, "type", {
11729 return NodeType.Selector;
11737 var SimpleSelector = /** @class */ (function (_super) {
11738 __extends(SimpleSelector, _super);
11739 function SimpleSelector(offset, length) {
11740 return _super.call(this, offset, length) || this;
11742 Object.defineProperty(SimpleSelector.prototype, "type", {
11744 return NodeType.SimpleSelector;
11749 return SimpleSelector;
11752 var AtApplyRule = /** @class */ (function (_super) {
11753 __extends(AtApplyRule, _super);
11754 function AtApplyRule(offset, length) {
11755 return _super.call(this, offset, length) || this;
11757 Object.defineProperty(AtApplyRule.prototype, "type", {
11759 return NodeType.AtApplyRule;
11764 AtApplyRule.prototype.setIdentifier = function (node) {
11765 return this.setNode('identifier', node, 0);
11767 AtApplyRule.prototype.getIdentifier = function () {
11768 return this.identifier;
11770 AtApplyRule.prototype.getName = function () {
11771 return this.identifier ? this.identifier.getText() : '';
11773 return AtApplyRule;
11776 var AbstractDeclaration = /** @class */ (function (_super) {
11777 __extends(AbstractDeclaration, _super);
11778 function AbstractDeclaration(offset, length) {
11779 return _super.call(this, offset, length) || this;
11781 return AbstractDeclaration;
11784 var CustomPropertyDeclaration = /** @class */ (function (_super) {
11785 __extends(CustomPropertyDeclaration, _super);
11786 function CustomPropertyDeclaration(offset, length) {
11787 return _super.call(this, offset, length) || this;
11789 Object.defineProperty(CustomPropertyDeclaration.prototype, "type", {
11791 return NodeType.CustomPropertyDeclaration;
11796 CustomPropertyDeclaration.prototype.setProperty = function (node) {
11797 return this.setNode('property', node);
11799 CustomPropertyDeclaration.prototype.getProperty = function () {
11800 return this.property;
11802 CustomPropertyDeclaration.prototype.setValue = function (value) {
11803 return this.setNode('value', value);
11805 CustomPropertyDeclaration.prototype.getValue = function () {
11808 CustomPropertyDeclaration.prototype.setPropertySet = function (value) {
11809 return this.setNode('propertySet', value);
11811 CustomPropertyDeclaration.prototype.getPropertySet = function () {
11812 return this.propertySet;
11814 return CustomPropertyDeclaration;
11815 }(AbstractDeclaration));
11817 var CustomPropertySet = /** @class */ (function (_super) {
11818 __extends(CustomPropertySet, _super);
11819 function CustomPropertySet(offset, length) {
11820 return _super.call(this, offset, length) || this;
11822 Object.defineProperty(CustomPropertySet.prototype, "type", {
11824 return NodeType.CustomPropertySet;
11829 return CustomPropertySet;
11830 }(BodyDeclaration));
11832 var Declaration = /** @class */ (function (_super) {
11833 __extends(Declaration, _super);
11834 function Declaration(offset, length) {
11835 var _this = _super.call(this, offset, length) || this;
11836 _this.property = null;
11839 Object.defineProperty(Declaration.prototype, "type", {
11841 return NodeType.Declaration;
11846 Declaration.prototype.setProperty = function (node) {
11847 return this.setNode('property', node);
11849 Declaration.prototype.getProperty = function () {
11850 return this.property;
11852 Declaration.prototype.getFullPropertyName = function () {
11853 var propertyName = this.property ? this.property.getName() : 'unknown';
11854 if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
11855 var parentDecl = this.parent.getParent().getParent();
11856 if (parentDecl instanceof Declaration) {
11857 return parentDecl.getFullPropertyName() + propertyName;
11860 return propertyName;
11862 Declaration.prototype.getNonPrefixedPropertyName = function () {
11863 var propertyName = this.getFullPropertyName();
11864 if (propertyName && propertyName.charAt(0) === '-') {
11865 var vendorPrefixEnd = propertyName.indexOf('-', 1);
11866 if (vendorPrefixEnd !== -1) {
11867 return propertyName.substring(vendorPrefixEnd + 1);
11870 return propertyName;
11872 Declaration.prototype.setValue = function (value) {
11873 return this.setNode('value', value);
11875 Declaration.prototype.getValue = function () {
11878 Declaration.prototype.setNestedProperties = function (value) {
11879 return this.setNode('nestedProperties', value);
11881 Declaration.prototype.getNestedProperties = function () {
11882 return this.nestedProperties;
11884 return Declaration;
11885 }(AbstractDeclaration));
11887 var Property = /** @class */ (function (_super) {
11888 __extends(Property, _super);
11889 function Property(offset, length) {
11890 return _super.call(this, offset, length) || this;
11892 Object.defineProperty(Property.prototype, "type", {
11894 return NodeType.Property;
11899 Property.prototype.setIdentifier = function (value) {
11900 return this.setNode('identifier', value);
11902 Property.prototype.getIdentifier = function () {
11903 return this.identifier;
11905 Property.prototype.getName = function () {
11906 return Object(_utils_strings__WEBPACK_IMPORTED_MODULE_0__["trim"])(this.getText(), /[_\+]+$/); /* +_: less merge */
11908 Property.prototype.isCustomProperty = function () {
11909 return !!this.identifier && this.identifier.isCustomProperty;
11914 var Invocation = /** @class */ (function (_super) {
11915 __extends(Invocation, _super);
11916 function Invocation(offset, length) {
11917 return _super.call(this, offset, length) || this;
11919 Object.defineProperty(Invocation.prototype, "type", {
11921 return NodeType.Invocation;
11926 Invocation.prototype.getArguments = function () {
11927 if (!this.arguments) {
11928 this.arguments = new Nodelist(this);
11930 return this.arguments;
11935 var Function = /** @class */ (function (_super) {
11936 __extends(Function, _super);
11937 function Function(offset, length) {
11938 return _super.call(this, offset, length) || this;
11940 Object.defineProperty(Function.prototype, "type", {
11942 return NodeType.Function;
11947 Function.prototype.setIdentifier = function (node) {
11948 return this.setNode('identifier', node, 0);
11950 Function.prototype.getIdentifier = function () {
11951 return this.identifier;
11953 Function.prototype.getName = function () {
11954 return this.identifier ? this.identifier.getText() : '';
11959 var FunctionParameter = /** @class */ (function (_super) {
11960 __extends(FunctionParameter, _super);
11961 function FunctionParameter(offset, length) {
11962 return _super.call(this, offset, length) || this;
11964 Object.defineProperty(FunctionParameter.prototype, "type", {
11966 return NodeType.FunctionParameter;
11971 FunctionParameter.prototype.setIdentifier = function (node) {
11972 return this.setNode('identifier', node, 0);
11974 FunctionParameter.prototype.getIdentifier = function () {
11975 return this.identifier;
11977 FunctionParameter.prototype.getName = function () {
11978 return this.identifier ? this.identifier.getText() : '';
11980 FunctionParameter.prototype.setDefaultValue = function (node) {
11981 return this.setNode('defaultValue', node, 0);
11983 FunctionParameter.prototype.getDefaultValue = function () {
11984 return this.defaultValue;
11986 return FunctionParameter;
11989 var FunctionArgument = /** @class */ (function (_super) {
11990 __extends(FunctionArgument, _super);
11991 function FunctionArgument(offset, length) {
11992 return _super.call(this, offset, length) || this;
11994 Object.defineProperty(FunctionArgument.prototype, "type", {
11996 return NodeType.FunctionArgument;
12001 FunctionArgument.prototype.setIdentifier = function (node) {
12002 return this.setNode('identifier', node, 0);
12004 FunctionArgument.prototype.getIdentifier = function () {
12005 return this.identifier;
12007 FunctionArgument.prototype.getName = function () {
12008 return this.identifier ? this.identifier.getText() : '';
12010 FunctionArgument.prototype.setValue = function (node) {
12011 return this.setNode('value', node, 0);
12013 FunctionArgument.prototype.getValue = function () {
12016 return FunctionArgument;
12019 var IfStatement = /** @class */ (function (_super) {
12020 __extends(IfStatement, _super);
12021 function IfStatement(offset, length) {
12022 return _super.call(this, offset, length) || this;
12024 Object.defineProperty(IfStatement.prototype, "type", {
12026 return NodeType.If;
12031 IfStatement.prototype.setExpression = function (node) {
12032 return this.setNode('expression', node, 0);
12034 IfStatement.prototype.setElseClause = function (elseClause) {
12035 return this.setNode('elseClause', elseClause);
12037 return IfStatement;
12038 }(BodyDeclaration));
12040 var ForStatement = /** @class */ (function (_super) {
12041 __extends(ForStatement, _super);
12042 function ForStatement(offset, length) {
12043 return _super.call(this, offset, length) || this;
12045 Object.defineProperty(ForStatement.prototype, "type", {
12047 return NodeType.For;
12052 ForStatement.prototype.setVariable = function (node) {
12053 return this.setNode('variable', node, 0);
12055 return ForStatement;
12056 }(BodyDeclaration));
12058 var EachStatement = /** @class */ (function (_super) {
12059 __extends(EachStatement, _super);
12060 function EachStatement(offset, length) {
12061 return _super.call(this, offset, length) || this;
12063 Object.defineProperty(EachStatement.prototype, "type", {
12065 return NodeType.Each;
12070 EachStatement.prototype.getVariables = function () {
12071 if (!this.variables) {
12072 this.variables = new Nodelist(this);
12074 return this.variables;
12076 return EachStatement;
12077 }(BodyDeclaration));
12079 var WhileStatement = /** @class */ (function (_super) {
12080 __extends(WhileStatement, _super);
12081 function WhileStatement(offset, length) {
12082 return _super.call(this, offset, length) || this;
12084 Object.defineProperty(WhileStatement.prototype, "type", {
12086 return NodeType.While;
12091 return WhileStatement;
12092 }(BodyDeclaration));
12094 var ElseStatement = /** @class */ (function (_super) {
12095 __extends(ElseStatement, _super);
12096 function ElseStatement(offset, length) {
12097 return _super.call(this, offset, length) || this;
12099 Object.defineProperty(ElseStatement.prototype, "type", {
12101 return NodeType.Else;
12106 return ElseStatement;
12107 }(BodyDeclaration));
12109 var FunctionDeclaration = /** @class */ (function (_super) {
12110 __extends(FunctionDeclaration, _super);
12111 function FunctionDeclaration(offset, length) {
12112 return _super.call(this, offset, length) || this;
12114 Object.defineProperty(FunctionDeclaration.prototype, "type", {
12116 return NodeType.FunctionDeclaration;
12121 FunctionDeclaration.prototype.setIdentifier = function (node) {
12122 return this.setNode('identifier', node, 0);
12124 FunctionDeclaration.prototype.getIdentifier = function () {
12125 return this.identifier;
12127 FunctionDeclaration.prototype.getName = function () {
12128 return this.identifier ? this.identifier.getText() : '';
12130 FunctionDeclaration.prototype.getParameters = function () {
12131 if (!this.parameters) {
12132 this.parameters = new Nodelist(this);
12134 return this.parameters;
12136 return FunctionDeclaration;
12137 }(BodyDeclaration));
12139 var ViewPort = /** @class */ (function (_super) {
12140 __extends(ViewPort, _super);
12141 function ViewPort(offset, length) {
12142 return _super.call(this, offset, length) || this;
12144 Object.defineProperty(ViewPort.prototype, "type", {
12146 return NodeType.ViewPort;
12152 }(BodyDeclaration));
12154 var FontFace = /** @class */ (function (_super) {
12155 __extends(FontFace, _super);
12156 function FontFace(offset, length) {
12157 return _super.call(this, offset, length) || this;
12159 Object.defineProperty(FontFace.prototype, "type", {
12161 return NodeType.FontFace;
12167 }(BodyDeclaration));
12169 var NestedProperties = /** @class */ (function (_super) {
12170 __extends(NestedProperties, _super);
12171 function NestedProperties(offset, length) {
12172 return _super.call(this, offset, length) || this;
12174 Object.defineProperty(NestedProperties.prototype, "type", {
12176 return NodeType.NestedProperties;
12181 return NestedProperties;
12182 }(BodyDeclaration));
12184 var Keyframe = /** @class */ (function (_super) {
12185 __extends(Keyframe, _super);
12186 function Keyframe(offset, length) {
12187 return _super.call(this, offset, length) || this;
12189 Object.defineProperty(Keyframe.prototype, "type", {
12191 return NodeType.Keyframe;
12196 Keyframe.prototype.setKeyword = function (keyword) {
12197 return this.setNode('keyword', keyword, 0);
12199 Keyframe.prototype.getKeyword = function () {
12200 return this.keyword;
12202 Keyframe.prototype.setIdentifier = function (node) {
12203 return this.setNode('identifier', node, 0);
12205 Keyframe.prototype.getIdentifier = function () {
12206 return this.identifier;
12208 Keyframe.prototype.getName = function () {
12209 return this.identifier ? this.identifier.getText() : '';
12212 }(BodyDeclaration));
12214 var KeyframeSelector = /** @class */ (function (_super) {
12215 __extends(KeyframeSelector, _super);
12216 function KeyframeSelector(offset, length) {
12217 return _super.call(this, offset, length) || this;
12219 Object.defineProperty(KeyframeSelector.prototype, "type", {
12221 return NodeType.KeyframeSelector;
12226 return KeyframeSelector;
12227 }(BodyDeclaration));
12229 var Import = /** @class */ (function (_super) {
12230 __extends(Import, _super);
12231 function Import(offset, length) {
12232 return _super.call(this, offset, length) || this;
12234 Object.defineProperty(Import.prototype, "type", {
12236 return NodeType.Import;
12241 Import.prototype.setMedialist = function (node) {
12243 node.attachTo(this);
12251 var Use = /** @class */ (function (_super) {
12252 __extends(Use, _super);
12254 return _super !== null && _super.apply(this, arguments) || this;
12256 Object.defineProperty(Use.prototype, "type", {
12258 return NodeType.Use;
12263 Use.prototype.getParameters = function () {
12264 if (!this.parameters) {
12265 this.parameters = new Nodelist(this);
12267 return this.parameters;
12269 Use.prototype.setIdentifier = function (node) {
12270 return this.setNode('identifier', node, 0);
12272 Use.prototype.getIdentifier = function () {
12273 return this.identifier;
12278 var ModuleConfiguration = /** @class */ (function (_super) {
12279 __extends(ModuleConfiguration, _super);
12280 function ModuleConfiguration() {
12281 return _super !== null && _super.apply(this, arguments) || this;
12283 Object.defineProperty(ModuleConfiguration.prototype, "type", {
12285 return NodeType.ModuleConfiguration;
12290 ModuleConfiguration.prototype.setIdentifier = function (node) {
12291 return this.setNode('identifier', node, 0);
12293 ModuleConfiguration.prototype.getIdentifier = function () {
12294 return this.identifier;
12296 ModuleConfiguration.prototype.getName = function () {
12297 return this.identifier ? this.identifier.getText() : '';
12299 ModuleConfiguration.prototype.setValue = function (node) {
12300 return this.setNode('value', node, 0);
12302 ModuleConfiguration.prototype.getValue = function () {
12305 return ModuleConfiguration;
12308 var Forward = /** @class */ (function (_super) {
12309 __extends(Forward, _super);
12310 function Forward() {
12311 return _super !== null && _super.apply(this, arguments) || this;
12313 Object.defineProperty(Forward.prototype, "type", {
12315 return NodeType.Forward;
12320 Forward.prototype.setIdentifier = function (node) {
12321 return this.setNode('identifier', node, 0);
12323 Forward.prototype.getIdentifier = function () {
12324 return this.identifier;
12329 var ForwardVisibility = /** @class */ (function (_super) {
12330 __extends(ForwardVisibility, _super);
12331 function ForwardVisibility() {
12332 return _super !== null && _super.apply(this, arguments) || this;
12334 Object.defineProperty(ForwardVisibility.prototype, "type", {
12336 return NodeType.ForwardVisibility;
12341 ForwardVisibility.prototype.setIdentifier = function (node) {
12342 return this.setNode('identifier', node, 0);
12344 ForwardVisibility.prototype.getIdentifier = function () {
12345 return this.identifier;
12347 return ForwardVisibility;
12350 var Namespace = /** @class */ (function (_super) {
12351 __extends(Namespace, _super);
12352 function Namespace(offset, length) {
12353 return _super.call(this, offset, length) || this;
12355 Object.defineProperty(Namespace.prototype, "type", {
12357 return NodeType.Namespace;
12365 var Media = /** @class */ (function (_super) {
12366 __extends(Media, _super);
12367 function Media(offset, length) {
12368 return _super.call(this, offset, length) || this;
12370 Object.defineProperty(Media.prototype, "type", {
12372 return NodeType.Media;
12378 }(BodyDeclaration));
12380 var Supports = /** @class */ (function (_super) {
12381 __extends(Supports, _super);
12382 function Supports(offset, length) {
12383 return _super.call(this, offset, length) || this;
12385 Object.defineProperty(Supports.prototype, "type", {
12387 return NodeType.Supports;
12393 }(BodyDeclaration));
12395 var Document = /** @class */ (function (_super) {
12396 __extends(Document, _super);
12397 function Document(offset, length) {
12398 return _super.call(this, offset, length) || this;
12400 Object.defineProperty(Document.prototype, "type", {
12402 return NodeType.Document;
12408 }(BodyDeclaration));
12410 var Medialist = /** @class */ (function (_super) {
12411 __extends(Medialist, _super);
12412 function Medialist(offset, length) {
12413 return _super.call(this, offset, length) || this;
12415 Medialist.prototype.getMediums = function () {
12416 if (!this.mediums) {
12417 this.mediums = new Nodelist(this);
12419 return this.mediums;
12424 var MediaQuery = /** @class */ (function (_super) {
12425 __extends(MediaQuery, _super);
12426 function MediaQuery(offset, length) {
12427 return _super.call(this, offset, length) || this;
12429 Object.defineProperty(MediaQuery.prototype, "type", {
12431 return NodeType.MediaQuery;
12439 var SupportsCondition = /** @class */ (function (_super) {
12440 __extends(SupportsCondition, _super);
12441 function SupportsCondition(offset, length) {
12442 return _super.call(this, offset, length) || this;
12444 Object.defineProperty(SupportsCondition.prototype, "type", {
12446 return NodeType.SupportsCondition;
12451 return SupportsCondition;
12454 var Page = /** @class */ (function (_super) {
12455 __extends(Page, _super);
12456 function Page(offset, length) {
12457 return _super.call(this, offset, length) || this;
12459 Object.defineProperty(Page.prototype, "type", {
12461 return NodeType.Page;
12467 }(BodyDeclaration));
12469 var PageBoxMarginBox = /** @class */ (function (_super) {
12470 __extends(PageBoxMarginBox, _super);
12471 function PageBoxMarginBox(offset, length) {
12472 return _super.call(this, offset, length) || this;
12474 Object.defineProperty(PageBoxMarginBox.prototype, "type", {
12476 return NodeType.PageBoxMarginBox;
12481 return PageBoxMarginBox;
12482 }(BodyDeclaration));
12484 var Expression = /** @class */ (function (_super) {
12485 __extends(Expression, _super);
12486 function Expression(offset, length) {
12487 return _super.call(this, offset, length) || this;
12489 Object.defineProperty(Expression.prototype, "type", {
12491 return NodeType.Expression;
12499 var BinaryExpression = /** @class */ (function (_super) {
12500 __extends(BinaryExpression, _super);
12501 function BinaryExpression(offset, length) {
12502 return _super.call(this, offset, length) || this;
12504 Object.defineProperty(BinaryExpression.prototype, "type", {
12506 return NodeType.BinaryExpression;
12511 BinaryExpression.prototype.setLeft = function (left) {
12512 return this.setNode('left', left);
12514 BinaryExpression.prototype.getLeft = function () {
12517 BinaryExpression.prototype.setRight = function (right) {
12518 return this.setNode('right', right);
12520 BinaryExpression.prototype.getRight = function () {
12523 BinaryExpression.prototype.setOperator = function (value) {
12524 return this.setNode('operator', value);
12526 BinaryExpression.prototype.getOperator = function () {
12527 return this.operator;
12529 return BinaryExpression;
12532 var Term = /** @class */ (function (_super) {
12533 __extends(Term, _super);
12534 function Term(offset, length) {
12535 return _super.call(this, offset, length) || this;
12537 Object.defineProperty(Term.prototype, "type", {
12539 return NodeType.Term;
12544 Term.prototype.setOperator = function (value) {
12545 return this.setNode('operator', value);
12547 Term.prototype.getOperator = function () {
12548 return this.operator;
12550 Term.prototype.setExpression = function (value) {
12551 return this.setNode('expression', value);
12553 Term.prototype.getExpression = function () {
12554 return this.expression;
12559 var AttributeSelector = /** @class */ (function (_super) {
12560 __extends(AttributeSelector, _super);
12561 function AttributeSelector(offset, length) {
12562 return _super.call(this, offset, length) || this;
12564 Object.defineProperty(AttributeSelector.prototype, "type", {
12566 return NodeType.AttributeSelector;
12571 AttributeSelector.prototype.setNamespacePrefix = function (value) {
12572 return this.setNode('namespacePrefix', value);
12574 AttributeSelector.prototype.getNamespacePrefix = function () {
12575 return this.namespacePrefix;
12577 AttributeSelector.prototype.setIdentifier = function (value) {
12578 return this.setNode('identifier', value);
12580 AttributeSelector.prototype.getIdentifier = function () {
12581 return this.identifier;
12583 AttributeSelector.prototype.setOperator = function (operator) {
12584 return this.setNode('operator', operator);
12586 AttributeSelector.prototype.getOperator = function () {
12587 return this.operator;
12589 AttributeSelector.prototype.setValue = function (value) {
12590 return this.setNode('value', value);
12592 AttributeSelector.prototype.getValue = function () {
12595 return AttributeSelector;
12598 var Operator = /** @class */ (function (_super) {
12599 __extends(Operator, _super);
12600 function Operator(offset, length) {
12601 return _super.call(this, offset, length) || this;
12603 Object.defineProperty(Operator.prototype, "type", {
12605 return NodeType.Operator;
12613 var HexColorValue = /** @class */ (function (_super) {
12614 __extends(HexColorValue, _super);
12615 function HexColorValue(offset, length) {
12616 return _super.call(this, offset, length) || this;
12618 Object.defineProperty(HexColorValue.prototype, "type", {
12620 return NodeType.HexColorValue;
12625 return HexColorValue;
12628 var _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
12629 var NumericValue = /** @class */ (function (_super) {
12630 __extends(NumericValue, _super);
12631 function NumericValue(offset, length) {
12632 return _super.call(this, offset, length) || this;
12634 Object.defineProperty(NumericValue.prototype, "type", {
12636 return NodeType.NumericValue;
12641 NumericValue.prototype.getValue = function () {
12642 var raw = this.getText();
12645 for (var i = 0, len = raw.length; i < len; i++) {
12646 code = raw.charCodeAt(i);
12647 if (!(_0 <= code && code <= _9 || code === _dot)) {
12653 value: raw.substring(0, unitIdx),
12654 unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
12657 return NumericValue;
12660 var VariableDeclaration = /** @class */ (function (_super) {
12661 __extends(VariableDeclaration, _super);
12662 function VariableDeclaration(offset, length) {
12663 var _this = _super.call(this, offset, length) || this;
12664 _this.variable = null;
12665 _this.value = null;
12666 _this.needsSemicolon = true;
12669 Object.defineProperty(VariableDeclaration.prototype, "type", {
12671 return NodeType.VariableDeclaration;
12676 VariableDeclaration.prototype.setVariable = function (node) {
12678 node.attachTo(this);
12679 this.variable = node;
12684 VariableDeclaration.prototype.getVariable = function () {
12685 return this.variable;
12687 VariableDeclaration.prototype.getName = function () {
12688 return this.variable ? this.variable.getName() : '';
12690 VariableDeclaration.prototype.setValue = function (node) {
12692 node.attachTo(this);
12698 VariableDeclaration.prototype.getValue = function () {
12701 return VariableDeclaration;
12702 }(AbstractDeclaration));
12704 var Interpolation = /** @class */ (function (_super) {
12705 __extends(Interpolation, _super);
12706 // private _interpolations: void; // workaround for https://github.com/Microsoft/TypeScript/issues/18276
12707 function Interpolation(offset, length) {
12708 return _super.call(this, offset, length) || this;
12710 Object.defineProperty(Interpolation.prototype, "type", {
12712 return NodeType.Interpolation;
12717 return Interpolation;
12720 var Variable = /** @class */ (function (_super) {
12721 __extends(Variable, _super);
12722 function Variable(offset, length) {
12723 return _super.call(this, offset, length) || this;
12725 Object.defineProperty(Variable.prototype, "type", {
12727 return NodeType.VariableName;
12732 Variable.prototype.getName = function () {
12733 return this.getText();
12738 var ExtendsReference = /** @class */ (function (_super) {
12739 __extends(ExtendsReference, _super);
12740 function ExtendsReference(offset, length) {
12741 return _super.call(this, offset, length) || this;
12743 Object.defineProperty(ExtendsReference.prototype, "type", {
12745 return NodeType.ExtendsReference;
12750 ExtendsReference.prototype.getSelectors = function () {
12751 if (!this.selectors) {
12752 this.selectors = new Nodelist(this);
12754 return this.selectors;
12756 return ExtendsReference;
12759 var MixinContentReference = /** @class */ (function (_super) {
12760 __extends(MixinContentReference, _super);
12761 function MixinContentReference(offset, length) {
12762 return _super.call(this, offset, length) || this;
12764 Object.defineProperty(MixinContentReference.prototype, "type", {
12766 return NodeType.MixinContentReference;
12771 MixinContentReference.prototype.getArguments = function () {
12772 if (!this.arguments) {
12773 this.arguments = new Nodelist(this);
12775 return this.arguments;
12777 return MixinContentReference;
12780 var MixinContentDeclaration = /** @class */ (function (_super) {
12781 __extends(MixinContentDeclaration, _super);
12782 function MixinContentDeclaration(offset, length) {
12783 return _super.call(this, offset, length) || this;
12785 Object.defineProperty(MixinContentDeclaration.prototype, "type", {
12787 return NodeType.MixinContentReference;
12792 MixinContentDeclaration.prototype.getParameters = function () {
12793 if (!this.parameters) {
12794 this.parameters = new Nodelist(this);
12796 return this.parameters;
12798 return MixinContentDeclaration;
12799 }(BodyDeclaration));
12801 var MixinReference = /** @class */ (function (_super) {
12802 __extends(MixinReference, _super);
12803 function MixinReference(offset, length) {
12804 return _super.call(this, offset, length) || this;
12806 Object.defineProperty(MixinReference.prototype, "type", {
12808 return NodeType.MixinReference;
12813 MixinReference.prototype.getNamespaces = function () {
12814 if (!this.namespaces) {
12815 this.namespaces = new Nodelist(this);
12817 return this.namespaces;
12819 MixinReference.prototype.setIdentifier = function (node) {
12820 return this.setNode('identifier', node, 0);
12822 MixinReference.prototype.getIdentifier = function () {
12823 return this.identifier;
12825 MixinReference.prototype.getName = function () {
12826 return this.identifier ? this.identifier.getText() : '';
12828 MixinReference.prototype.getArguments = function () {
12829 if (!this.arguments) {
12830 this.arguments = new Nodelist(this);
12832 return this.arguments;
12834 MixinReference.prototype.setContent = function (node) {
12835 return this.setNode('content', node);
12837 MixinReference.prototype.getContent = function () {
12838 return this.content;
12840 return MixinReference;
12843 var MixinDeclaration = /** @class */ (function (_super) {
12844 __extends(MixinDeclaration, _super);
12845 function MixinDeclaration(offset, length) {
12846 return _super.call(this, offset, length) || this;
12848 Object.defineProperty(MixinDeclaration.prototype, "type", {
12850 return NodeType.MixinDeclaration;
12855 MixinDeclaration.prototype.setIdentifier = function (node) {
12856 return this.setNode('identifier', node, 0);
12858 MixinDeclaration.prototype.getIdentifier = function () {
12859 return this.identifier;
12861 MixinDeclaration.prototype.getName = function () {
12862 return this.identifier ? this.identifier.getText() : '';
12864 MixinDeclaration.prototype.getParameters = function () {
12865 if (!this.parameters) {
12866 this.parameters = new Nodelist(this);
12868 return this.parameters;
12870 MixinDeclaration.prototype.setGuard = function (node) {
12872 node.attachTo(this);
12877 return MixinDeclaration;
12878 }(BodyDeclaration));
12880 var UnknownAtRule = /** @class */ (function (_super) {
12881 __extends(UnknownAtRule, _super);
12882 function UnknownAtRule(offset, length) {
12883 return _super.call(this, offset, length) || this;
12885 Object.defineProperty(UnknownAtRule.prototype, "type", {
12887 return NodeType.UnknownAtRule;
12892 UnknownAtRule.prototype.setAtRuleName = function (atRuleName) {
12893 this.atRuleName = atRuleName;
12895 UnknownAtRule.prototype.getAtRuleName = function () {
12896 return this.atRuleName;
12898 return UnknownAtRule;
12899 }(BodyDeclaration));
12901 var ListEntry = /** @class */ (function (_super) {
12902 __extends(ListEntry, _super);
12903 function ListEntry() {
12904 return _super !== null && _super.apply(this, arguments) || this;
12906 Object.defineProperty(ListEntry.prototype, "type", {
12908 return NodeType.ListEntry;
12913 ListEntry.prototype.setKey = function (node) {
12914 return this.setNode('key', node, 0);
12916 ListEntry.prototype.setValue = function (node) {
12917 return this.setNode('value', node, 1);
12922 var LessGuard = /** @class */ (function (_super) {
12923 __extends(LessGuard, _super);
12924 function LessGuard() {
12925 return _super !== null && _super.apply(this, arguments) || this;
12927 LessGuard.prototype.getConditions = function () {
12928 if (!this.conditions) {
12929 this.conditions = new Nodelist(this);
12931 return this.conditions;
12936 var GuardCondition = /** @class */ (function (_super) {
12937 __extends(GuardCondition, _super);
12938 function GuardCondition() {
12939 return _super !== null && _super.apply(this, arguments) || this;
12941 GuardCondition.prototype.setVariable = function (node) {
12942 return this.setNode('variable', node);
12944 return GuardCondition;
12947 var Module = /** @class */ (function (_super) {
12948 __extends(Module, _super);
12949 function Module() {
12950 return _super !== null && _super.apply(this, arguments) || this;
12952 Object.defineProperty(Module.prototype, "type", {
12954 return NodeType.Module;
12959 Module.prototype.setIdentifier = function (node) {
12960 return this.setNode('identifier', node, 0);
12962 Module.prototype.getIdentifier = function () {
12963 return this.identifier;
12969 (function (Level) {
12970 Level[Level["Ignore"] = 1] = "Ignore";
12971 Level[Level["Warning"] = 2] = "Warning";
12972 Level[Level["Error"] = 4] = "Error";
12973 })(Level || (Level = {}));
12974 var Marker = /** @class */ (function () {
12975 function Marker(node, rule, level, message, offset, length) {
12976 if (offset === void 0) { offset = node.offset; }
12977 if (length === void 0) { length = node.length; }
12980 this.level = level;
12981 this.message = message || rule.message;
12982 this.offset = offset;
12983 this.length = length;
12985 Marker.prototype.getRule = function () {
12988 Marker.prototype.getLevel = function () {
12991 Marker.prototype.getOffset = function () {
12992 return this.offset;
12994 Marker.prototype.getLength = function () {
12995 return this.length;
12997 Marker.prototype.getNode = function () {
13000 Marker.prototype.getMessage = function () {
13001 return this.message;
13007 export class DefaultVisitor implements IVisitor {
13009 public visitNode(node:Node):boolean {
13010 switch (node.type) {
13011 case NodeType.Stylesheet:
13012 return this.visitStylesheet(<Stylesheet> node);
13013 case NodeType.FontFace:
13014 return this.visitFontFace(<FontFace> node);
13015 case NodeType.Ruleset:
13016 return this.visitRuleSet(<RuleSet> node);
13017 case NodeType.Selector:
13018 return this.visitSelector(<Selector> node);
13019 case NodeType.SimpleSelector:
13020 return this.visitSimpleSelector(<SimpleSelector> node);
13021 case NodeType.Declaration:
13022 return this.visitDeclaration(<Declaration> node);
13023 case NodeType.Function:
13024 return this.visitFunction(<Function> node);
13025 case NodeType.FunctionDeclaration:
13026 return this.visitFunctionDeclaration(<FunctionDeclaration> node);
13027 case NodeType.FunctionParameter:
13028 return this.visitFunctionParameter(<FunctionParameter> node);
13029 case NodeType.FunctionArgument:
13030 return this.visitFunctionArgument(<FunctionArgument> node);
13031 case NodeType.Term:
13032 return this.visitTerm(<Term> node);
13033 case NodeType.Declaration:
13034 return this.visitExpression(<Expression> node);
13035 case NodeType.NumericValue:
13036 return this.visitNumericValue(<NumericValue> node);
13037 case NodeType.Page:
13038 return this.visitPage(<Page> node);
13039 case NodeType.PageBoxMarginBox:
13040 return this.visitPageBoxMarginBox(<PageBoxMarginBox> node);
13041 case NodeType.Property:
13042 return this.visitProperty(<Property> node);
13043 case NodeType.NumericValue:
13044 return this.visitNodelist(<Nodelist> node);
13045 case NodeType.Import:
13046 return this.visitImport(<Import> node);
13047 case NodeType.Namespace:
13048 return this.visitNamespace(<Namespace> node);
13049 case NodeType.Keyframe:
13050 return this.visitKeyframe(<Keyframe> node);
13051 case NodeType.KeyframeSelector:
13052 return this.visitKeyframeSelector(<KeyframeSelector> node);
13053 case NodeType.MixinDeclaration:
13054 return this.visitMixinDeclaration(<MixinDeclaration> node);
13055 case NodeType.MixinReference:
13056 return this.visitMixinReference(<MixinReference> node);
13057 case NodeType.Variable:
13058 return this.visitVariable(<Variable> node);
13059 case NodeType.VariableDeclaration:
13060 return this.visitVariableDeclaration(<VariableDeclaration> node);
13062 return this.visitUnknownNode(node);
13065 public visitFontFace(node:FontFace):boolean {
13069 public visitKeyframe(node:Keyframe):boolean {
13073 public visitKeyframeSelector(node:KeyframeSelector):boolean {
13077 public visitStylesheet(node:Stylesheet):boolean {
13081 public visitProperty(Node:Property):boolean {
13085 public visitRuleSet(node:RuleSet):boolean {
13089 public visitSelector(node:Selector):boolean {
13093 public visitSimpleSelector(node:SimpleSelector):boolean {
13097 public visitDeclaration(node:Declaration):boolean {
13101 public visitFunction(node:Function):boolean {
13105 public visitFunctionDeclaration(node:FunctionDeclaration):boolean {
13109 public visitInvocation(node:Invocation):boolean {
13113 public visitTerm(node:Term):boolean {
13117 public visitImport(node:Import):boolean {
13121 public visitNamespace(node:Namespace):boolean {
13125 public visitExpression(node:Expression):boolean {
13129 public visitNumericValue(node:NumericValue):boolean {
13133 public visitPage(node:Page):boolean {
13137 public visitPageBoxMarginBox(node:PageBoxMarginBox):boolean {
13141 public visitNodelist(node:Nodelist):boolean {
13145 public visitVariableDeclaration(node:VariableDeclaration):boolean {
13149 public visitVariable(node:Variable):boolean {
13153 public visitMixinDeclaration(node:MixinDeclaration):boolean {
13157 public visitMixinReference(node:MixinReference):boolean {
13161 public visitUnknownNode(node:Node):boolean {
13166 var ParseErrorCollector = /** @class */ (function () {
13167 function ParseErrorCollector() {
13170 ParseErrorCollector.entries = function (node) {
13171 var visitor = new ParseErrorCollector();
13172 node.acceptVisitor(visitor);
13173 return visitor.entries;
13175 ParseErrorCollector.prototype.visitNode = function (node) {
13176 if (node.isErroneous()) {
13177 node.collectIssues(this.entries);
13181 return ParseErrorCollector;
13188 /***/ (function(module, __webpack_exports__, __webpack_require__) {
13191 __webpack_require__.r(__webpack_exports__);
13192 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; });
13193 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; });
13194 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return difference; });
13195 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLimitedString", function() { return getLimitedString; });
13196 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trim", function() { return trim; });
13197 /*---------------------------------------------------------------------------------------------
13198 * Copyright (c) Microsoft Corporation. All rights reserved.
13199 * Licensed under the MIT License. See License.txt in the project root for license information.
13200 *--------------------------------------------------------------------------------------------*/
13202 function startsWith(haystack, needle) {
13203 if (haystack.length < needle.length) {
13206 for (var i = 0; i < needle.length; i++) {
13207 if (haystack[i] !== needle[i]) {
13214 * Determines if haystack ends with needle.
13216 function endsWith(haystack, needle) {
13217 var diff = haystack.length - needle.length;
13219 return haystack.lastIndexOf(needle) === diff;
13221 else if (diff === 0) {
13222 return haystack === needle;
13229 * Computes the difference score for two strings. More similar strings have a higher score.
13230 * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
13231 * Strings that have a large length difference will get a bad default score 0.
13232 * Complexity - both time and space O(first.length * second.length)
13233 * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
13235 * @param first a string
13236 * @param second a string
13238 function difference(first, second, maxLenDelta) {
13239 if (maxLenDelta === void 0) { maxLenDelta = 4; }
13240 var lengthDifference = Math.abs(first.length - second.length);
13241 // We only compute score if length of the currentWord and length of entry.name are similar.
13242 if (lengthDifference > maxLenDelta) {
13245 // Initialize LCS (largest common subsequence) matrix.
13247 var zeroArray = [];
13249 for (i = 0; i < second.length + 1; ++i) {
13252 for (i = 0; i < first.length + 1; ++i) {
13253 LCS.push(zeroArray);
13255 for (i = 1; i < first.length + 1; ++i) {
13256 for (j = 1; j < second.length + 1; ++j) {
13257 if (first[i - 1] === second[j - 1]) {
13258 LCS[i][j] = LCS[i - 1][j - 1] + 1;
13261 LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
13265 return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
13268 * Limit of string length.
13270 function getLimitedString(str, ellipsis) {
13271 if (ellipsis === void 0) { ellipsis = true; }
13275 if (str.length < 140) {
13278 return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
13281 * Limit of string length.
13283 function trim(str, regexp) {
13284 var m = regexp.exec(str);
13285 if (m && m[0].length) {
13286 return str.substr(0, str.length - m[0].length);
13294 /***/ (function(module, __webpack_exports__, __webpack_require__) {
13297 __webpack_require__.r(__webpack_exports__);
13298 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSIssueType", function() { return CSSIssueType; });
13299 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseError", function() { return ParseError; });
13300 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
13301 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
13302 /*---------------------------------------------------------------------------------------------
13303 * Copyright (c) Microsoft Corporation. All rights reserved.
13304 * Licensed under the MIT License. See License.txt in the project root for license information.
13305 *--------------------------------------------------------------------------------------------*/
13308 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
13309 var CSSIssueType = /** @class */ (function () {
13310 function CSSIssueType(id, message) {
13312 this.message = message;
13314 return CSSIssueType;
13318 NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
13319 ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
13320 RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
13321 DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
13322 ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
13323 SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
13324 TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
13325 ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
13326 OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
13327 IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
13328 PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
13329 URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
13330 URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
13331 VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
13332 VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
13333 PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
13334 LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
13335 RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
13336 LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
13337 RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
13338 LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
13339 RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
13340 CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
13341 PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
13342 UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
13343 UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
13344 SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
13345 StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
13346 WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
13347 MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
13348 IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
13349 WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
13350 IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
13356 /***/ (function(module, exports, __webpack_require__) {
13359 /* --------------------------------------------------------------------------------------------
\r
13360 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
13361 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
13362 * ------------------------------------------------------------------------------------------ */
\r
13364 Object.defineProperty(exports, "__esModule", { value: true });
\r
13365 var path = __webpack_require__(3);
\r
13366 var fs = __webpack_require__(80);
\r
13367 var toString = Object.prototype.toString;
\r
13368 function isDefined(value) {
\r
13369 return typeof value !== 'undefined';
\r
13371 function isNumber(value) {
\r
13372 return toString.call(value) === '[object Number]';
\r
13374 function isString(value) {
\r
13375 return toString.call(value) === '[object String]';
\r
13377 function isBoolean(value) {
\r
13378 return value === true || value === false;
\r
13380 function readJsonFileSync(filename) {
\r
13381 return JSON.parse(fs.readFileSync(filename, 'utf8'));
\r
13383 var MessageFormat;
\r
13384 (function (MessageFormat) {
\r
13385 MessageFormat["file"] = "file";
\r
13386 MessageFormat["bundle"] = "bundle";
\r
13387 MessageFormat["both"] = "both";
\r
13388 })(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));
\r
13389 var BundleFormat;
\r
13390 (function (BundleFormat) {
\r
13391 // the nls.bundle format
\r
13392 BundleFormat["standalone"] = "standalone";
\r
13393 BundleFormat["languagePack"] = "languagePack";
\r
13394 })(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));
\r
13395 var LocalizeInfo;
\r
13396 (function (LocalizeInfo) {
\r
13397 function is(value) {
\r
13398 var candidate = value;
\r
13399 return candidate && isDefined(candidate.key) && isDefined(candidate.comment);
\r
13401 LocalizeInfo.is = is;
\r
13402 })(LocalizeInfo || (LocalizeInfo = {}));
\r
13403 var resolvedLanguage;
\r
13404 var resolvedBundles;
\r
13407 function initializeSettings() {
\r
13408 options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle };
\r
13409 if (isString(process.env.VSCODE_NLS_CONFIG)) {
\r
13411 var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG);
\r
13412 var language = void 0;
\r
13413 var locale = void 0;
\r
13414 if (vscodeOptions_1.availableLanguages) {
\r
13415 var value = vscodeOptions_1.availableLanguages['*'];
\r
13416 if (isString(value)) {
\r
13417 language = value;
\r
13420 if (isString(vscodeOptions_1.locale)) {
\r
13421 options.locale = vscodeOptions_1.locale.toLowerCase();
\r
13423 if (language === undefined) {
\r
13424 options.language = options.locale;
\r
13426 else if (language !== 'en') {
\r
13427 options.language = language;
\r
13429 if (isBoolean(vscodeOptions_1._languagePackSupport)) {
\r
13430 options.languagePackSupport = vscodeOptions_1._languagePackSupport;
\r
13432 if (isString(vscodeOptions_1._cacheRoot)) {
\r
13433 options.cacheRoot = vscodeOptions_1._cacheRoot;
\r
13435 if (isString(vscodeOptions_1._languagePackId)) {
\r
13436 options.languagePackId = vscodeOptions_1._languagePackId;
\r
13438 if (isString(vscodeOptions_1._translationsConfigFile)) {
\r
13439 options.translationsConfigFile = vscodeOptions_1._translationsConfigFile;
\r
13441 options.translationsConfig = readJsonFileSync(options.translationsConfigFile);
\r
13444 // We can't read the translation config file. Mark the cache as corrupted.
\r
13445 if (vscodeOptions_1._corruptedFile) {
\r
13446 var dirname = path.dirname(vscodeOptions_1._corruptedFile);
\r
13447 fs.exists(dirname, function (exists) {
\r
13449 fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) {
\r
13450 console.error(err);
\r
13462 isPseudo = options.locale === 'pseudo';
\r
13463 resolvedLanguage = undefined;
\r
13464 resolvedBundles = Object.create(null);
\r
13466 initializeSettings();
\r
13467 function supportsLanguagePack() {
\r
13468 return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined
\r
13469 && options.translationsConfig !== undefined;
\r
13471 function format(message, args) {
\r
13474 // FF3B and FF3D is the Unicode zenkaku representation for [ and ]
\r
13475 message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
\r
13477 if (args.length === 0) {
\r
13478 result = message;
\r
13481 result = message.replace(/\{(\d+)\}/g, function (match, rest) {
\r
13482 var index = rest[0];
\r
13483 var arg = args[index];
\r
13484 var replacement = match;
\r
13485 if (typeof arg === 'string') {
\r
13486 replacement = arg;
\r
13488 else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {
\r
13489 replacement = String(arg);
\r
13491 return replacement;
\r
13496 function createScopedLocalizeFunction(messages) {
\r
13497 return function (key, message) {
\r
13499 for (var _i = 2; _i < arguments.length; _i++) {
\r
13500 args[_i - 2] = arguments[_i];
\r
13502 if (isNumber(key)) {
\r
13503 if (key >= messages.length) {
\r
13504 console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);
\r
13507 return format(messages[key], args);
\r
13510 if (isString(message)) {
\r
13511 console.warn("Message " + message + " didn't get externalized correctly.");
\r
13512 return format(message, args);
\r
13515 console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);
\r
13520 function localize(key, message) {
\r
13522 for (var _i = 2; _i < arguments.length; _i++) {
\r
13523 args[_i - 2] = arguments[_i];
\r
13525 return format(message, args);
\r
13527 function resolveLanguage(file) {
\r
13528 var resolvedLanguage;
\r
13529 if (options.cacheLanguageResolution && resolvedLanguage) {
\r
13530 resolvedLanguage = resolvedLanguage;
\r
13533 if (isPseudo || !options.language) {
\r
13534 resolvedLanguage = '.nls.json';
\r
13537 var locale = options.language;
\r
13539 var candidate = '.nls.' + locale + '.json';
\r
13540 if (fs.existsSync(file + candidate)) {
\r
13541 resolvedLanguage = candidate;
\r
13545 var index = locale.lastIndexOf('-');
\r
13547 locale = locale.substring(0, index);
\r
13550 resolvedLanguage = '.nls.json';
\r
13556 if (options.cacheLanguageResolution) {
\r
13557 resolvedLanguage = resolvedLanguage;
\r
13560 return file + resolvedLanguage;
\r
13562 function findInTheBoxBundle(root) {
\r
13563 var language = options.language;
\r
13564 while (language) {
\r
13565 var candidate = path.join(root, "nls.bundle." + language + ".json");
\r
13566 if (fs.existsSync(candidate)) {
\r
13567 return candidate;
\r
13570 var index = language.lastIndexOf('-');
\r
13572 language = language.substring(0, index);
\r
13575 language = undefined;
\r
13579 // Test if we can reslove the default bundle.
\r
13580 if (language === undefined) {
\r
13581 var candidate = path.join(root, 'nls.bundle.json');
\r
13582 if (fs.existsSync(candidate)) {
\r
13583 return candidate;
\r
13586 return undefined;
\r
13588 function mkdir(directory) {
\r
13590 fs.mkdirSync(directory);
\r
13593 if (err.code === 'EEXIST') {
\r
13596 else if (err.code === 'ENOENT') {
\r
13597 var parent = path.dirname(directory);
\r
13598 if (parent !== directory) {
\r
13600 fs.mkdirSync(directory);
\r
13608 function createDefaultNlsBundle(folder) {
\r
13609 var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));
\r
13610 var result = Object.create(null);
\r
13611 for (var module_1 in metaData) {
\r
13612 var entry = metaData[module_1];
\r
13613 result[module_1] = entry.messages;
\r
13617 function createNLSBundle(header, metaDataPath) {
\r
13618 var languagePackLocation = options.translationsConfig[header.id];
\r
13619 if (!languagePackLocation) {
\r
13620 return undefined;
\r
13622 var languagePack = readJsonFileSync(languagePackLocation).contents;
\r
13623 var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));
\r
13624 var result = Object.create(null);
\r
13625 for (var module_2 in metaData) {
\r
13626 var entry = metaData[module_2];
\r
13627 var translations = languagePack[header.outDir + "/" + module_2];
\r
13628 if (translations) {
\r
13629 var resultMessages = [];
\r
13630 for (var i = 0; i < entry.keys.length; i++) {
\r
13631 var messageKey = entry.keys[i];
\r
13632 var key = isString(messageKey) ? messageKey : messageKey.key;
\r
13633 var translatedMessage = translations[key];
\r
13634 if (translatedMessage === undefined) {
\r
13635 translatedMessage = entry.messages[i];
\r
13637 resultMessages.push(translatedMessage);
\r
13639 result[module_2] = resultMessages;
\r
13642 result[module_2] = entry.messages;
\r
13647 function touch(file) {
\r
13648 var d = new Date();
\r
13649 fs.utimes(file, d, d, function () {
\r
13650 // Do nothing. Ignore
\r
13653 function cacheBundle(key, bundle) {
\r
13654 resolvedBundles[key] = bundle;
\r
13657 function loadNlsBundleOrCreateFromI18n(header, bundlePath) {
\r
13659 var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");
\r
13660 var useMemoryOnly = false;
\r
13661 var writeBundle = false;
\r
13663 result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));
\r
13668 if (err.code === 'ENOENT') {
\r
13669 writeBundle = true;
\r
13671 else if (err instanceof SyntaxError) {
\r
13672 // We have a syntax error. So no valid JSON. Use
\r
13673 console.log("Syntax error parsing message bundle: " + err.message + ".");
\r
13674 fs.unlink(bundle, function (err) {
\r
13676 console.error("Deleting corrupted bundle " + bundle + " failed.");
\r
13679 useMemoryOnly = true;
\r
13685 result = createNLSBundle(header, bundlePath);
\r
13686 if (!result || useMemoryOnly) {
\r
13689 if (writeBundle) {
\r
13691 fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });
\r
13694 if (err.code === 'EEXIST') {
\r
13702 function loadDefaultNlsBundle(bundlePath) {
\r
13704 return createDefaultNlsBundle(bundlePath);
\r
13707 console.log("Generating default bundle from meta data failed.", err);
\r
13708 return undefined;
\r
13711 function loadNlsBundle(header, bundlePath) {
\r
13713 // Core decided to use a language pack. Do the same in the extension
\r
13714 if (supportsLanguagePack()) {
\r
13716 result = loadNlsBundleOrCreateFromI18n(header, bundlePath);
\r
13719 console.log("Load or create bundle failed ", err);
\r
13723 // No language pack found, but core is running in language pack mode
\r
13724 // Don't try to use old in the box bundles since the might be stale
\r
13725 // Fall right back to the default bundle.
\r
13726 if (options.languagePackSupport) {
\r
13727 return loadDefaultNlsBundle(bundlePath);
\r
13729 var candidate = findInTheBoxBundle(bundlePath);
\r
13732 return readJsonFileSync(candidate);
\r
13735 console.log("Loading in the box message bundle failed.", err);
\r
13738 result = loadDefaultNlsBundle(bundlePath);
\r
13742 function tryFindMetaDataHeaderFile(file) {
\r
13744 var dirname = path.dirname(file);
\r
13746 result = path.join(dirname, 'nls.metadata.header.json');
\r
13747 if (fs.existsSync(result)) {
\r
13750 var parent = path.dirname(dirname);
\r
13751 if (parent === dirname) {
\r
13752 result = undefined;
\r
13756 dirname = parent;
\r
13761 function loadMessageBundle(file) {
\r
13763 // No file. We are in dev mode. Return the default
\r
13764 // localize function.
\r
13767 // Remove extension since we load json files.
\r
13768 var ext = path.extname(file);
\r
13770 file = file.substr(0, file.length - ext.length);
\r
13772 if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.bundle) {
\r
13773 var headerFile = tryFindMetaDataHeaderFile(file);
\r
13774 if (headerFile) {
\r
13775 var bundlePath = path.dirname(headerFile);
\r
13776 var bundle = resolvedBundles[bundlePath];
\r
13777 if (bundle === undefined) {
\r
13779 var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));
\r
13781 var nlsBundle = loadNlsBundle(header, bundlePath);
\r
13782 bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);
\r
13785 console.error('Failed to load nls bundle', err);
\r
13786 bundle = cacheBundle(bundlePath, null);
\r
13790 console.error('Failed to read header file', err);
\r
13791 bundle = cacheBundle(bundlePath, null);
\r
13795 var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');
\r
13796 var messages = bundle.nlsBundle[module_3];
\r
13797 if (messages === undefined) {
\r
13798 console.error("Messages for file " + file + " not found. See console for details.");
\r
13799 return function () {
\r
13800 return 'Messages not found.';
\r
13803 return createScopedLocalizeFunction(messages);
\r
13807 if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.file) {
\r
13808 // Try to load a single file bundle
\r
13810 var json = readJsonFileSync(resolveLanguage(file));
\r
13811 if (Array.isArray(json)) {
\r
13812 return createScopedLocalizeFunction(json);
\r
13815 if (isDefined(json.messages) && isDefined(json.keys)) {
\r
13816 return createScopedLocalizeFunction(json.messages);
\r
13819 console.error("String bundle '" + file + "' uses an unsupported format.");
\r
13820 return function () {
\r
13821 return 'File bundle has unsupported format. See console for details';
\r
13827 if (err.code !== 'ENOENT') {
\r
13828 console.error('Failed to load single file bundle', err);
\r
13832 console.error("Failed to load message bundle for file " + file);
\r
13833 return function () {
\r
13834 return 'Failed to load message bundle. See console for details.';
\r
13837 exports.loadMessageBundle = loadMessageBundle;
\r
13838 function config(opts) {
\r
13840 if (isString(opts.locale)) {
\r
13841 options.locale = opts.locale.toLowerCase();
\r
13842 options.language = options.locale;
\r
13843 resolvedLanguage = undefined;
\r
13844 resolvedBundles = Object.create(null);
\r
13846 if (opts.messageFormat !== undefined) {
\r
13847 options.messageFormat = opts.messageFormat;
\r
13849 if (opts.bundleFormat === BundleFormat.standalone && options.languagePackSupport === true) {
\r
13850 options.languagePackSupport = false;
\r
13853 isPseudo = options.locale === 'pseudo';
\r
13854 return loadMessageBundle;
\r
13856 exports.config = config;
\r
13857 //# sourceMappingURL=main.js.map
13861 /***/ (function(module, __webpack_exports__, __webpack_require__) {
13864 __webpack_require__.r(__webpack_exports__);
13865 /* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96);
13866 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "browserNames", function() { return _entry__WEBPACK_IMPORTED_MODULE_0__["browserNames"]; });
13868 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getEntryDescription", function() { return _entry__WEBPACK_IMPORTED_MODULE_0__["getEntryDescription"]; });
13870 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textToMarkedString", function() { return _entry__WEBPACK_IMPORTED_MODULE_0__["textToMarkedString"]; });
13872 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBrowserLabel", function() { return _entry__WEBPACK_IMPORTED_MODULE_0__["getBrowserLabel"]; });
13874 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);
13875 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFunctions", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colorFunctions"]; });
13877 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colors"]; });
13879 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorKeywords", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colorKeywords"]; });
13881 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isColorConstructor", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["isColorConstructor"]; });
13883 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isColorValue", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["isColorValue"]; });
13885 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["hexDigit"]; });
13887 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colorFromHex"]; });
13889 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colorFrom256RGB"]; });
13891 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFromHSL", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["colorFromHSL"]; });
13893 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hslFromColor", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["hslFromColor"]; });
13895 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return _colors__WEBPACK_IMPORTED_MODULE_1__["getColorValue"]; });
13897 /* harmony import */ var _builtinData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98);
13898 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "positionKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["positionKeywords"]; });
13900 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatStyleKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["repeatStyleKeywords"]; });
13902 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineStyleKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["lineStyleKeywords"]; });
13904 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineWidthKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["lineWidthKeywords"]; });
13906 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "boxKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["boxKeywords"]; });
13908 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geometryBoxKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["geometryBoxKeywords"]; });
13910 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssWideKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["cssWideKeywords"]; });
13912 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "imageFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["imageFunctions"]; });
13914 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transitionTimingFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["transitionTimingFunctions"]; });
13916 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "basicShapeFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["basicShapeFunctions"]; });
13918 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "units", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["units"]; });
13920 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html5Tags", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["html5Tags"]; });
13922 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svgElements", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["svgElements"]; });
13924 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBoxDirectives", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_2__["pageBoxDirectives"]; });
13926 /*---------------------------------------------------------------------------------------------
13927 * Copyright (c) Microsoft Corporation. All rights reserved.
13928 * Licensed under the MIT License. See License.txt in the project root for license information.
13929 *--------------------------------------------------------------------------------------------*/
13938 /***/ (function(module, __webpack_exports__, __webpack_require__) {
13941 __webpack_require__.r(__webpack_exports__);
13942 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "browserNames", function() { return browserNames; });
13943 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEntryDescription", function() { return getEntryDescription; });
13944 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textToMarkedString", function() { return textToMarkedString; });
13945 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBrowserLabel", function() { return getBrowserLabel; });
13946 /*---------------------------------------------------------------------------------------------
13947 * Copyright (c) Microsoft Corporation. All rights reserved.
13948 * Licensed under the MIT License. See License.txt in the project root for license information.
13949 *--------------------------------------------------------------------------------------------*/
13951 var browserNames = {
13959 function getEntryStatus(status) {
13961 case 'experimental':
13962 return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
13963 case 'nonstandard':
13964 return '🚨️ Property is nonstandard. Avoid using it.\n\n';
13966 return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
13971 function getEntryDescription(entry, doesSupportMarkdown) {
13973 if (doesSupportMarkdown) {
13976 value: getEntryMarkdownDescription(entry)
13982 value: getEntryStringDescription(entry)
13985 if (result.value === '') {
13990 function textToMarkedString(text) {
13991 return text.replace(/[\\`*_{}[\]()#+\-.!<>]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
13993 function getEntryStringDescription(entry) {
13994 if (!entry.description || entry.description === '') {
13997 if (typeof entry.description !== 'string') {
13998 return entry.description.value;
14001 if (entry.status) {
14002 result += getEntryStatus(entry.status);
14004 result += entry.description;
14005 var browserLabel = getBrowserLabel(entry.browsers);
14006 if (browserLabel) {
14007 result += '\n(' + browserLabel + ')';
14009 if ('syntax' in entry) {
14010 result += "\n\nSyntax: " + entry.syntax;
14012 if (entry.references && entry.references.length > 0) {
14014 result += entry.references.map(function (r) {
14015 return r.name + ": " + r.url;
14020 function getEntryMarkdownDescription(entry) {
14021 if (!entry.description || entry.description === '') {
14025 if (entry.status) {
14026 result += getEntryStatus(entry.status);
14028 var description = typeof entry.description === 'string' ? entry.description : entry.description.value;
14029 result += textToMarkedString(description);
14030 var browserLabel = getBrowserLabel(entry.browsers);
14031 if (browserLabel) {
14032 result += '\n\n(' + textToMarkedString(browserLabel) + ')';
14034 if ('syntax' in entry && entry.syntax) {
14035 result += "\n\nSyntax: " + textToMarkedString(entry.syntax);
14037 if (entry.references && entry.references.length > 0) {
14039 result += entry.references.map(function (r) {
14040 return "[" + r.name + "](" + r.url + ")";
14046 * Input is like `["E12","FF49","C47","IE","O"]`
14047 * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
14049 function getBrowserLabel(browsers) {
14050 if (browsers === void 0) { browsers = []; }
14051 if (browsers.length === 0) {
14055 .map(function (b) {
14057 var matches = b.match(/([A-Z]+)(\d+)?/);
14058 var name = matches[1];
14059 var version = matches[2];
14060 if (name in browserNames) {
14061 result += browserNames[name];
14064 result += ' ' + version;
14074 /***/ (function(module, __webpack_exports__, __webpack_require__) {
14077 __webpack_require__.r(__webpack_exports__);
14078 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFunctions", function() { return colorFunctions; });
14079 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return colors; });
14080 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorKeywords", function() { return colorKeywords; });
14081 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isColorConstructor", function() { return isColorConstructor; });
14082 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isColorValue", function() { return isColorValue; });
14083 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return hexDigit; });
14084 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return colorFromHex; });
14085 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return colorFrom256RGB; });
14086 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHSL", function() { return colorFromHSL; });
14087 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslFromColor", function() { return hslFromColor; });
14088 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return getColorValue; });
14089 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
14090 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
14091 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
14092 /*---------------------------------------------------------------------------------------------
14093 * Copyright (c) Microsoft Corporation. All rights reserved.
14094 * Licensed under the MIT License. See License.txt in the project root for license information.
14095 *--------------------------------------------------------------------------------------------*/
14098 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
14099 var colorFunctions = [
14100 { func: 'rgb($red, $green, $blue)', desc: localize('css.builtin.rgb', 'Creates a Color from red, green, and blue values.') },
14101 { func: 'rgba($red, $green, $blue, $alpha)', desc: localize('css.builtin.rgba', 'Creates a Color from red, green, blue, and alpha values.') },
14102 { func: 'hsl($hue, $saturation, $lightness)', desc: localize('css.builtin.hsl', 'Creates a Color from hue, saturation, and lightness values.') },
14103 { func: 'hsla($hue, $saturation, $lightness, $alpha)', desc: localize('css.builtin.hsla', 'Creates a Color from hue, saturation, lightness, and alpha values.') }
14106 aliceblue: '#f0f8ff',
14107 antiquewhite: '#faebd7',
14109 aquamarine: '#7fffd4',
14114 blanchedalmond: '#ffebcd',
14116 blueviolet: '#8a2be2',
14118 burlywood: '#deb887',
14119 cadetblue: '#5f9ea0',
14120 chartreuse: '#7fff00',
14121 chocolate: '#d2691e',
14123 cornflowerblue: '#6495ed',
14124 cornsilk: '#fff8dc',
14125 crimson: '#dc143c',
14127 darkblue: '#00008b',
14128 darkcyan: '#008b8b',
14129 darkgoldenrod: '#b8860b',
14130 darkgray: '#a9a9a9',
14131 darkgrey: '#a9a9a9',
14132 darkgreen: '#006400',
14133 darkkhaki: '#bdb76b',
14134 darkmagenta: '#8b008b',
14135 darkolivegreen: '#556b2f',
14136 darkorange: '#ff8c00',
14137 darkorchid: '#9932cc',
14138 darkred: '#8b0000',
14139 darksalmon: '#e9967a',
14140 darkseagreen: '#8fbc8f',
14141 darkslateblue: '#483d8b',
14142 darkslategray: '#2f4f4f',
14143 darkslategrey: '#2f4f4f',
14144 darkturquoise: '#00ced1',
14145 darkviolet: '#9400d3',
14146 deeppink: '#ff1493',
14147 deepskyblue: '#00bfff',
14148 dimgray: '#696969',
14149 dimgrey: '#696969',
14150 dodgerblue: '#1e90ff',
14151 firebrick: '#b22222',
14152 floralwhite: '#fffaf0',
14153 forestgreen: '#228b22',
14154 fuchsia: '#ff00ff',
14155 gainsboro: '#dcdcdc',
14156 ghostwhite: '#f8f8ff',
14158 goldenrod: '#daa520',
14162 greenyellow: '#adff2f',
14163 honeydew: '#f0fff0',
14164 hotpink: '#ff69b4',
14165 indianred: '#cd5c5c',
14169 lavender: '#e6e6fa',
14170 lavenderblush: '#fff0f5',
14171 lawngreen: '#7cfc00',
14172 lemonchiffon: '#fffacd',
14173 lightblue: '#add8e6',
14174 lightcoral: '#f08080',
14175 lightcyan: '#e0ffff',
14176 lightgoldenrodyellow: '#fafad2',
14177 lightgray: '#d3d3d3',
14178 lightgrey: '#d3d3d3',
14179 lightgreen: '#90ee90',
14180 lightpink: '#ffb6c1',
14181 lightsalmon: '#ffa07a',
14182 lightseagreen: '#20b2aa',
14183 lightskyblue: '#87cefa',
14184 lightslategray: '#778899',
14185 lightslategrey: '#778899',
14186 lightsteelblue: '#b0c4de',
14187 lightyellow: '#ffffe0',
14189 limegreen: '#32cd32',
14191 magenta: '#ff00ff',
14193 mediumaquamarine: '#66cdaa',
14194 mediumblue: '#0000cd',
14195 mediumorchid: '#ba55d3',
14196 mediumpurple: '#9370d8',
14197 mediumseagreen: '#3cb371',
14198 mediumslateblue: '#7b68ee',
14199 mediumspringgreen: '#00fa9a',
14200 mediumturquoise: '#48d1cc',
14201 mediumvioletred: '#c71585',
14202 midnightblue: '#191970',
14203 mintcream: '#f5fffa',
14204 mistyrose: '#ffe4e1',
14205 moccasin: '#ffe4b5',
14206 navajowhite: '#ffdead',
14208 oldlace: '#fdf5e6',
14210 olivedrab: '#6b8e23',
14212 orangered: '#ff4500',
14214 palegoldenrod: '#eee8aa',
14215 palegreen: '#98fb98',
14216 paleturquoise: '#afeeee',
14217 palevioletred: '#d87093',
14218 papayawhip: '#ffefd5',
14219 peachpuff: '#ffdab9',
14223 powderblue: '#b0e0e6',
14226 rebeccapurple: '#663399',
14227 rosybrown: '#bc8f8f',
14228 royalblue: '#4169e1',
14229 saddlebrown: '#8b4513',
14231 sandybrown: '#f4a460',
14232 seagreen: '#2e8b57',
14233 seashell: '#fff5ee',
14236 skyblue: '#87ceeb',
14237 slateblue: '#6a5acd',
14238 slategray: '#708090',
14239 slategrey: '#708090',
14241 springgreen: '#00ff7f',
14242 steelblue: '#4682b4',
14245 thistle: '#d8bfd8',
14247 turquoise: '#40e0d0',
14251 whitesmoke: '#f5f5f5',
14253 yellowgreen: '#9acd32'
14255 var colorKeywords = {
14256 'currentColor': 'The value of the \'color\' property. The computed value of the \'currentColor\' keyword is the computed value of the \'color\' property. If the \'currentColor\' keyword is set on the \'color\' property itself, it is treated as \'color:inherit\' at parse time.',
14257 'transparent': 'Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value.',
14259 function getNumericValue(node, factor) {
14260 var val = node.getText();
14261 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);
14266 var result = parseFloat(m[1]) / factor;
14267 if (result >= 0 && result <= 1) {
14273 function getAngle(node) {
14274 var val = node.getText();
14275 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);
14277 return parseFloat(val) % 360;
14281 function isColorConstructor(node) {
14282 var name = node.getName();
14286 return /^(rgb|rgba|hsl|hsla)$/gi.test(name);
14289 * Returns true if the node is a color value - either
14290 * defined a hex number, as rgb or rgba function, or
14293 function isColorValue(node) {
14294 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue) {
14297 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Function) {
14298 return isColorConstructor(node);
14300 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier) {
14301 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
14304 var candidateColor = node.getText().toLowerCase();
14305 if (candidateColor === 'none') {
14308 if (colors[candidateColor]) {
14320 function hexDigit(charCode) {
14321 if (charCode < Digit0) {
14324 if (charCode <= Digit9) {
14325 return charCode - Digit0;
14327 if (charCode < a) {
14328 charCode += (a - A);
14330 if (charCode >= a && charCode <= f) {
14331 return charCode - a + 10;
14335 function colorFromHex(text) {
14336 if (text[0] !== '#') {
14339 switch (text.length) {
14342 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
14343 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
14344 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
14349 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
14350 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
14351 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
14352 alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
14356 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
14357 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
14358 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
14363 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
14364 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
14365 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
14366 alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
14371 function colorFrom256RGB(red, green, blue, alpha) {
14372 if (alpha === void 0) { alpha = 1.0; }
14375 green: green / 255.0,
14376 blue: blue / 255.0,
14380 function colorFromHSL(hue, sat, light, alpha) {
14381 if (alpha === void 0) { alpha = 1.0; }
14384 return { red: light, green: light, blue: light, alpha: alpha };
14387 var hueToRgb = function (t1, t2, hue) {
14395 return (t2 - t1) * hue + t1;
14401 return (t2 - t1) * (4 - hue) + t1;
14405 var t2 = light <= 0.5 ? (light * (sat + 1)) : (light + sat - (light * sat));
14406 var t1 = light * 2 - t2;
14407 return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha: alpha };
14410 function hslFromColor(rgba) {
14412 var g = rgba.green;
14414 var a = rgba.alpha;
14415 var max = Math.max(r, g, b);
14416 var min = Math.min(r, g, b);
14419 var l = (min + max) / 2;
14420 var chroma = max - min;
14422 s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
14425 h = (g - b) / chroma + (g < b ? 6 : 0);
14428 h = (b - r) / chroma + 2;
14431 h = (r - g) / chroma + 4;
14437 return { h: h, s: s, l: l, a: a };
14439 function getColorValue(node) {
14440 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue) {
14441 var text = node.getText();
14442 return colorFromHex(text);
14444 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Function) {
14445 var functionNode = node;
14446 var name = functionNode.getName();
14447 var colorValues = functionNode.getArguments().getChildren();
14448 if (!name || colorValues.length < 3 || colorValues.length > 4) {
14452 var alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1;
14453 if (name === 'rgb' || name === 'rgba') {
14455 red: getNumericValue(colorValues[0], 255.0),
14456 green: getNumericValue(colorValues[1], 255.0),
14457 blue: getNumericValue(colorValues[2], 255.0),
14461 else if (name === 'hsl' || name === 'hsla') {
14462 var h = getAngle(colorValues[0]);
14463 var s = getNumericValue(colorValues[1], 100.0);
14464 var l = getNumericValue(colorValues[2], 100.0);
14465 return colorFromHSL(h, s, l, alpha);
14469 // parse error on numeric value
14473 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier) {
14474 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
14477 var term = node.parent;
14478 if (term && term.parent && term.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].BinaryExpression) {
14479 var expression = term.parent;
14480 if (expression.parent && expression.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ListEntry && expression.parent.key === expression) {
14484 var candidateColor = node.getText().toLowerCase();
14485 if (candidateColor === 'none') {
14488 var colorHex = colors[candidateColor];
14490 return colorFromHex(colorHex);
14499 /***/ (function(module, __webpack_exports__, __webpack_require__) {
14502 __webpack_require__.r(__webpack_exports__);
14503 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionKeywords", function() { return positionKeywords; });
14504 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatStyleKeywords", function() { return repeatStyleKeywords; });
14505 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineStyleKeywords", function() { return lineStyleKeywords; });
14506 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineWidthKeywords", function() { return lineWidthKeywords; });
14507 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "boxKeywords", function() { return boxKeywords; });
14508 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "geometryBoxKeywords", function() { return geometryBoxKeywords; });
14509 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssWideKeywords", function() { return cssWideKeywords; });
14510 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "imageFunctions", function() { return imageFunctions; });
14511 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionTimingFunctions", function() { return transitionTimingFunctions; });
14512 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basicShapeFunctions", function() { return basicShapeFunctions; });
14513 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "units", function() { return units; });
14514 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html5Tags", function() { return html5Tags; });
14515 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svgElements", function() { return svgElements; });
14516 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageBoxDirectives", function() { return pageBoxDirectives; });
14517 /*---------------------------------------------------------------------------------------------
14518 * Copyright (c) Microsoft Corporation. All rights reserved.
14519 * Licensed under the MIT License. See License.txt in the project root for license information.
14520 *--------------------------------------------------------------------------------------------*/
14522 var positionKeywords = {
14523 'bottom': 'Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.',
14524 'center': 'Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.',
14525 'left': 'Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.',
14526 'right': 'Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.',
14527 'top': 'Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset.'
14529 var repeatStyleKeywords = {
14530 'no-repeat': 'Placed once and not repeated in this direction.',
14531 'repeat': 'Repeated in this direction as often as needed to cover the background painting area.',
14532 'repeat-x': 'Computes to ‘repeat no-repeat’.',
14533 'repeat-y': 'Computes to ‘no-repeat repeat’.',
14534 'round': 'Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.',
14535 'space': 'Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area.'
14537 var lineStyleKeywords = {
14538 'dashed': 'A series of square-ended dashes.',
14539 'dotted': 'A series of round dots.',
14540 'double': 'Two parallel solid lines with some space between them.',
14541 'groove': 'Looks as if it were carved in the canvas.',
14542 'hidden': 'Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.',
14543 'inset': 'Looks as if the content on the inside of the border is sunken into the canvas.',
14544 'none': 'No border. Color and width are ignored.',
14545 'outset': 'Looks as if the content on the inside of the border is coming out of the canvas.',
14546 'ridge': 'Looks as if it were coming out of the canvas.',
14547 'solid': 'A single line segment.'
14549 var lineWidthKeywords = ['medium', 'thick', 'thin'];
14550 var boxKeywords = {
14551 'border-box': 'The background is painted within (clipped to) the border box.',
14552 'content-box': 'The background is painted within (clipped to) the content box.',
14553 'padding-box': 'The background is painted within (clipped to) the padding box.'
14555 var geometryBoxKeywords = {
14556 'margin-box': 'Uses the margin box as reference box.',
14557 'fill-box': 'Uses the object bounding box as reference box.',
14558 'stroke-box': 'Uses the stroke bounding box as reference box.',
14559 'view-box': 'Uses the nearest SVG viewport as reference box.'
14561 var cssWideKeywords = {
14562 'initial': 'Represents the value specified as the property’s initial value.',
14563 'inherit': 'Represents the computed value of the property on the element’s parent.',
14564 'unset': 'Acts as either `inherit` or `initial`, depending on whether the property is inherited or not.'
14566 var imageFunctions = {
14567 'url()': 'Reference an image file by URL',
14568 'image()': 'Provide image fallbacks and annotations.',
14569 '-webkit-image-set()': 'Provide multiple resolutions. Remember to use unprefixed image-set() in addition.',
14570 'image-set()': 'Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.',
14571 '-moz-element()': 'Use an element in the document as an image. Remember to use unprefixed element() in addition.',
14572 'element()': 'Use an element in the document as an image.',
14573 'cross-fade()': 'Indicates the two images to be combined and how far along in the transition the combination is.',
14574 '-webkit-gradient()': 'Deprecated. Use modern linear-gradient() or radial-gradient() instead.',
14575 '-webkit-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14576 '-moz-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14577 '-o-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14578 'linear-gradient()': 'A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.',
14579 '-webkit-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14580 '-moz-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14581 '-o-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14582 'repeating-linear-gradient()': 'Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.',
14583 '-webkit-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
14584 '-moz-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
14585 'radial-gradient()': 'Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.',
14586 '-webkit-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
14587 '-moz-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
14588 'repeating-radial-gradient()': 'Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.'
14590 var transitionTimingFunctions = {
14591 'ease': 'Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).',
14592 'ease-in': 'Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).',
14593 'ease-in-out': 'Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).',
14594 'ease-out': 'Equivalent to cubic-bezier(0, 0, 0.58, 1.0).',
14595 'linear': 'Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).',
14596 'step-end': 'Equivalent to steps(1, end).',
14597 'step-start': 'Equivalent to steps(1, start).',
14598 'steps()': 'The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.',
14599 'cubic-bezier()': 'Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).',
14600 'cubic-bezier(0.6, -0.28, 0.735, 0.045)': 'Ease-in Back. Overshoots.',
14601 'cubic-bezier(0.68, -0.55, 0.265, 1.55)': 'Ease-in-out Back. Overshoots.',
14602 'cubic-bezier(0.175, 0.885, 0.32, 1.275)': 'Ease-out Back. Overshoots.',
14603 'cubic-bezier(0.6, 0.04, 0.98, 0.335)': 'Ease-in Circular. Based on half circle.',
14604 'cubic-bezier(0.785, 0.135, 0.15, 0.86)': 'Ease-in-out Circular. Based on half circle.',
14605 'cubic-bezier(0.075, 0.82, 0.165, 1)': 'Ease-out Circular. Based on half circle.',
14606 'cubic-bezier(0.55, 0.055, 0.675, 0.19)': 'Ease-in Cubic. Based on power of three.',
14607 'cubic-bezier(0.645, 0.045, 0.355, 1)': 'Ease-in-out Cubic. Based on power of three.',
14608 'cubic-bezier(0.215, 0.610, 0.355, 1)': 'Ease-out Cubic. Based on power of three.',
14609 'cubic-bezier(0.95, 0.05, 0.795, 0.035)': 'Ease-in Exponential. Based on two to the power ten.',
14610 'cubic-bezier(1, 0, 0, 1)': 'Ease-in-out Exponential. Based on two to the power ten.',
14611 'cubic-bezier(0.19, 1, 0.22, 1)': 'Ease-out Exponential. Based on two to the power ten.',
14612 'cubic-bezier(0.47, 0, 0.745, 0.715)': 'Ease-in Sine.',
14613 'cubic-bezier(0.445, 0.05, 0.55, 0.95)': 'Ease-in-out Sine.',
14614 'cubic-bezier(0.39, 0.575, 0.565, 1)': 'Ease-out Sine.',
14615 'cubic-bezier(0.55, 0.085, 0.68, 0.53)': 'Ease-in Quadratic. Based on power of two.',
14616 'cubic-bezier(0.455, 0.03, 0.515, 0.955)': 'Ease-in-out Quadratic. Based on power of two.',
14617 'cubic-bezier(0.25, 0.46, 0.45, 0.94)': 'Ease-out Quadratic. Based on power of two.',
14618 'cubic-bezier(0.895, 0.03, 0.685, 0.22)': 'Ease-in Quartic. Based on power of four.',
14619 'cubic-bezier(0.77, 0, 0.175, 1)': 'Ease-in-out Quartic. Based on power of four.',
14620 'cubic-bezier(0.165, 0.84, 0.44, 1)': 'Ease-out Quartic. Based on power of four.',
14621 'cubic-bezier(0.755, 0.05, 0.855, 0.06)': 'Ease-in Quintic. Based on power of five.',
14622 'cubic-bezier(0.86, 0, 0.07, 1)': 'Ease-in-out Quintic. Based on power of five.',
14623 'cubic-bezier(0.23, 1, 0.320, 1)': 'Ease-out Quintic. Based on power of five.'
14625 var basicShapeFunctions = {
14626 'circle()': 'Defines a circle.',
14627 'ellipse()': 'Defines an ellipse.',
14628 'inset()': 'Defines an inset rectangle.',
14629 'polygon()': 'Defines a polygon.'
14632 'length': ['em', 'rem', 'ex', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vw', 'vh', 'vmin', 'vmax'],
14633 'angle': ['deg', 'rad', 'grad', 'turn'],
14634 'time': ['ms', 's'],
14635 'frequency': ['Hz', 'kHz'],
14636 'resolution': ['dpi', 'dpcm', 'dppx'],
14637 'percentage': ['%', 'fr']
14639 var html5Tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption',
14640 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer',
14641 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',
14642 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q',
14643 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td',
14644 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'const', 'video', 'wbr'];
14645 var svgElements = ['circle', 'clipPath', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting',
14646 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology',
14647 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'hatch', 'hatchpath', 'image', 'line', 'linearGradient',
14648 'marker', 'mask', 'mesh', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'solidcolor', 'stop', 'svg', 'switch',
14649 'symbol', 'text', 'textPath', 'tspan', 'use', 'view'];
14650 var pageBoxDirectives = [
14651 '@bottom-center', '@bottom-left', '@bottom-left-corner', '@bottom-right', '@bottom-right-corner',
14652 '@left-bottom', '@left-middle', '@left-top', '@right-bottom', '@right-middle', '@right-top',
14653 '@top-center', '@top-left', '@top-left-corner', '@top-right', '@top-right-corner'
14659 /***/ (function(module, __webpack_exports__, __webpack_require__) {
14662 __webpack_require__.r(__webpack_exports__);
14663 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
14664 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDefined", function() { return isDefined; });
14665 /*---------------------------------------------------------------------------------------------
14666 * Copyright (c) Microsoft Corporation. All rights reserved.
14667 * Licensed under the MIT License. See License.txt in the project root for license information.
14668 *--------------------------------------------------------------------------------------------*/
14670 function values(obj) {
14671 return Object.keys(obj).map(function (key) { return obj[key]; });
14673 function isDefined(obj) {
14674 return typeof obj !== 'undefined';
14680 /***/ (function(module, __webpack_exports__, __webpack_require__) {
14683 __webpack_require__.r(__webpack_exports__);
14684 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSCompletion", function() { return CSSCompletion; });
14685 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
14686 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(101);
14687 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95);
14688 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92);
14689 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(103);
14690 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
14691 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_5__);
14692 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(99);
14693 /* harmony import */ var _pathCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(106);
14694 /*---------------------------------------------------------------------------------------------
14695 * Copyright (c) Microsoft Corporation. All rights reserved.
14696 * Licensed under the MIT License. See License.txt in the project root for license information.
14697 *--------------------------------------------------------------------------------------------*/
14699 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
14700 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14701 return new (P || (P = Promise))(function (resolve, reject) {
14702 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14703 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
14704 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14705 step((generator = generator.apply(thisArg, _arguments || [])).next());
14708 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
14709 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
14710 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14711 function verb(n) { return function (v) { return step([n, v]); }; }
14712 function step(op) {
14713 if (f) throw new TypeError("Generator is already executing.");
14715 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;
14716 if (y = 0, t) op = [op[0] & 2, t.value];
14718 case 0: case 1: t = op; break;
14719 case 4: _.label++; return { value: op[1], done: false };
14720 case 5: _.label++; y = op[1]; op = [0]; continue;
14721 case 7: op = _.ops.pop(); _.trys.pop(); continue;
14723 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
14724 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
14725 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
14726 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
14727 if (t[2]) _.ops.pop();
14728 _.trys.pop(); continue;
14730 op = body.call(thisArg, _);
14731 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
14732 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
14743 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__["loadMessageBundle"]();
14744 var SnippetFormat = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["InsertTextFormat"].Snippet;
14746 (function (SortTexts) {
14747 // char code 32, comes before everything
14748 SortTexts["Enums"] = " ";
14749 SortTexts["Normal"] = "d";
14750 SortTexts["VendorPrefixed"] = "x";
14751 SortTexts["Term"] = "y";
14752 SortTexts["Variable"] = "z";
14753 })(SortTexts || (SortTexts = {}));
14754 var CSSCompletion = /** @class */ (function () {
14755 function CSSCompletion(variablePrefix, lsOptions, cssDataManager) {
14756 if (variablePrefix === void 0) { variablePrefix = null; }
14757 this.variablePrefix = variablePrefix;
14758 this.lsOptions = lsOptions;
14759 this.cssDataManager = cssDataManager;
14760 this.completionParticipants = [];
14761 this.valueTypes = [
14762 _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Value, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].StringLiteral, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].URILiteral, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].NumericValue,
14763 _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].VariableName, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Prio
14766 CSSCompletion.prototype.configure = function (settings) {
14767 this.settings = settings;
14769 CSSCompletion.prototype.getSymbolContext = function () {
14770 if (!this.symbolContext) {
14771 this.symbolContext = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__["Symbols"](this.styleSheet);
14773 return this.symbolContext;
14775 CSSCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
14776 this.completionParticipants = registeredCompletionParticipants || [];
14778 CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext) {
14779 return __awaiter(this, void 0, void 0, function () {
14780 var participant, contributedParticipants, result, pathCompletionResult;
14781 return __generator(this, function (_a) {
14782 switch (_a.label) {
14784 if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
14785 return [2 /*return*/, this.doComplete(document, position, styleSheet)];
14787 participant = new _pathCompletion__WEBPACK_IMPORTED_MODULE_7__["PathCompletionParticipant"](this.lsOptions.fileSystemProvider.readDirectory);
14788 contributedParticipants = this.completionParticipants;
14789 this.completionParticipants = [participant].concat(contributedParticipants);
14790 result = this.doComplete(document, position, styleSheet);
14793 _a.trys.push([1, , 3, 4]);
14794 return [4 /*yield*/, participant.computeCompletions(document, documentContext)];
14796 pathCompletionResult = _a.sent();
14797 return [2 /*return*/, {
14798 isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
14799 items: pathCompletionResult.items.concat(result.items)
14802 this.completionParticipants = contributedParticipants;
14803 return [7 /*endfinally*/];
14804 case 4: return [2 /*return*/];
14809 CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
14810 this.offset = document.offsetAt(position);
14811 this.position = position;
14812 this.currentWord = getCurrentWord(document, this.offset);
14813 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Position"].create(this.position.line, this.position.character - this.currentWord.length), this.position);
14814 this.textDocument = document;
14815 this.styleSheet = styleSheet;
14817 var result = { isIncomplete: false, items: [] };
14818 this.nodePath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](this.styleSheet, this.offset);
14819 for (var i = this.nodePath.length - 1; i >= 0; i--) {
14820 var node = this.nodePath[i];
14821 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Property"]) {
14822 this.getCompletionsForDeclarationProperty(node.getParent(), result);
14824 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Expression"]) {
14825 if (node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Interpolation"]) {
14826 this.getVariableProposals(null, result);
14829 this.getCompletionsForExpression(node, result);
14832 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
14833 var parentRef = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Ruleset);
14835 if (parentRef.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference) {
14836 this.getCompletionsForExtendsReference(parentRef, node, result);
14839 var parentRuleSet = parentRef;
14840 this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result);
14844 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"]) {
14845 this.getCompletionsForFunctionArgument(node, node.getParent(), result);
14847 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declarations"]) {
14848 this.getCompletionsForDeclarations(node, result);
14850 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["VariableDeclaration"]) {
14851 this.getCompletionsForVariableDeclaration(node, result);
14853 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
14854 this.getCompletionsForRuleSet(node, result);
14856 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Interpolation"]) {
14857 this.getCompletionsForInterpolation(node, result);
14859 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionDeclaration"]) {
14860 this.getCompletionsForFunctionDeclaration(node, result);
14862 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["MixinReference"]) {
14863 this.getCompletionsForMixinReference(node, result);
14865 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Function"]) {
14866 this.getCompletionsForFunctionArgument(null, node, result);
14868 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Supports"]) {
14869 this.getCompletionsForSupports(node, result);
14871 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
14872 this.getCompletionsForSupportsCondition(node, result);
14874 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ExtendsReference"]) {
14875 this.getCompletionsForExtendsReference(node, null, result);
14877 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].URILiteral) {
14878 this.getCompletionForUriLiteralValue(node, result);
14880 else if (node.parent === null) {
14881 this.getCompletionForTopLevel(result);
14883 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].StringLiteral && this.isImportPathParent(node.parent.type)) {
14884 this.getCompletionForImportPath(node, result);
14885 // } else if (node instanceof nodes.Variable) {
14886 // this.getCompletionsForVariableDeclaration()
14891 if (result.items.length > 0 || this.offset > node.offset) {
14892 return this.finalize(result);
14895 this.getCompletionsForStylesheet(result);
14896 if (result.items.length === 0) {
14897 if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) {
14898 this.getVariableProposals(null, result);
14901 return this.finalize(result);
14904 // don't hold on any state, clear symbolContext
14905 this.position = null;
14906 this.currentWord = null;
14907 this.textDocument = null;
14908 this.styleSheet = null;
14909 this.symbolContext = null;
14910 this.defaultReplaceRange = null;
14911 this.nodePath = null;
14914 CSSCompletion.prototype.isImportPathParent = function (type) {
14915 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Import;
14917 CSSCompletion.prototype.finalize = function (result) {
14918 var needsSortText = result.items.some(function (i) { return !!i.sortText || i.label[0] === '-'; });
14919 if (needsSortText) {
14920 result.items.forEach(function (item, index) {
14921 if (!item.sortText) {
14922 if (item.label[0] === '-') {
14923 item.sortText = SortTexts.VendorPrefixed + '_' + computeRankNumber(index);
14926 item.sortText = SortTexts.Normal + '_' + computeRankNumber(index);
14930 if (item.label[0] === '-') {
14931 item.sortText += SortTexts.VendorPrefixed + '_' + computeRankNumber(index);
14934 item.sortText += SortTexts.Normal + '_' + computeRankNumber(index);
14941 CSSCompletion.prototype.findInNodePath = function () {
14943 for (var _i = 0; _i < arguments.length; _i++) {
14944 types[_i] = arguments[_i];
14946 for (var i = this.nodePath.length - 1; i >= 0; i--) {
14947 var node = this.nodePath[i];
14948 if (types.indexOf(node.type) !== -1) {
14954 CSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
14955 return this.getPropertyProposals(declaration, result);
14957 CSSCompletion.prototype.getPropertyProposals = function (declaration, result) {
14959 var triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled;
14960 var completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled;
14961 var properties = this.cssDataManager.getProperties();
14962 properties.forEach(function (entry) {
14965 var retrigger = false;
14967 range = _this.getCompletionRange(declaration.getProperty());
14968 insertText = entry.name;
14969 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition)) {
14970 insertText += ': ';
14975 range = _this.getCompletionRange(null);
14976 insertText = entry.name + ': ';
14979 // Empty .selector { | } case
14980 if (!declaration && completePropertyWithSemicolon) {
14981 insertText += '$0;';
14983 // Cases such as .selector { p; } or .selector { p:; }
14984 if (declaration && !declaration.semicolonPosition) {
14985 if (completePropertyWithSemicolon && _this.offset >= _this.textDocument.offsetAt(range.end)) {
14986 insertText += '$0;';
14991 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
14992 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
14993 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(range, insertText),
14994 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["InsertTextFormat"].Snippet,
14995 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Property
14997 if (!entry.restrictions) {
15000 if (triggerPropertyValueCompletion && retrigger) {
15003 command: 'editor.action.triggerSuggest'
15006 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, '-')) {
15007 item.sortText = SortTexts.VendorPrefixed;
15009 result.items.push(item);
15011 this.completionParticipants.forEach(function (participant) {
15012 if (participant.onCssProperty) {
15013 participant.onCssProperty({
15014 propertyName: _this.currentWord,
15015 range: _this.defaultReplaceRange
15021 Object.defineProperty(CSSCompletion.prototype, "isTriggerPropertyValueCompletionEnabled", {
15023 if (!this.settings ||
15024 !this.settings.completion ||
15025 this.settings.completion.triggerPropertyValueCompletion === undefined) {
15028 return this.settings.completion.triggerPropertyValueCompletion;
15033 Object.defineProperty(CSSCompletion.prototype, "isCompletePropertyWithSemicolonEnabled", {
15035 if (!this.settings ||
15036 !this.settings.completion ||
15037 this.settings.completion.completePropertyWithSemicolon === undefined) {
15040 return this.settings.completion.completePropertyWithSemicolon;
15045 CSSCompletion.prototype.getCompletionsForDeclarationValue = function (node, result) {
15047 var propertyName = node.getFullPropertyName();
15048 var entry = this.cssDataManager.getProperty(propertyName);
15049 var existingNode = node.getValue() || null;
15050 while (existingNode && existingNode.hasChildren()) {
15051 existingNode = existingNode.findChildAtOffset(this.offset, false);
15053 this.completionParticipants.forEach(function (participant) {
15054 if (participant.onCssPropertyValue) {
15055 participant.onCssPropertyValue({
15056 propertyName: propertyName,
15057 propertyValue: _this.currentWord,
15058 range: _this.getCompletionRange(existingNode)
15063 if (entry.restrictions) {
15064 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
15065 var restriction = _a[_i];
15066 switch (restriction) {
15068 this.getColorProposals(entry, existingNode, result);
15071 this.getPositionProposals(entry, existingNode, result);
15074 this.getRepeatStyleProposals(entry, existingNode, result);
15077 this.getLineStyleProposals(entry, existingNode, result);
15080 this.getLineWidthProposals(entry, existingNode, result);
15082 case 'geometry-box':
15083 this.getGeometryBoxProposals(entry, existingNode, result);
15086 this.getBoxProposals(entry, existingNode, result);
15089 this.getImageProposals(entry, existingNode, result);
15091 case 'timing-function':
15092 this.getTimingFunctionProposals(entry, existingNode, result);
15095 this.getBasicShapeProposals(entry, existingNode, result);
15100 this.getValueEnumProposals(entry, existingNode, result);
15101 this.getCSSWideKeywordProposals(entry, existingNode, result);
15102 this.getUnitProposals(entry, existingNode, result);
15105 var existingValues = collectValues(this.styleSheet, node);
15106 for (var _b = 0, _c = existingValues.getEntries(); _b < _c.length; _b++) {
15107 var existingValue = _c[_b];
15108 result.items.push({
15109 label: existingValue,
15110 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), existingValue),
15111 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15115 this.getVariableProposals(existingNode, result);
15116 this.getTermProposals(entry, existingNode, result);
15119 CSSCompletion.prototype.getValueEnumProposals = function (entry, existingNode, result) {
15120 if (entry.values) {
15121 for (var _i = 0, _a = entry.values; _i < _a.length; _i++) {
15122 var value = _a[_i];
15123 var insertString = value.name;
15124 var insertTextFormat = void 0;
15125 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["endsWith"](insertString, ')')) {
15126 var from = insertString.lastIndexOf('(');
15128 insertString = insertString.substr(0, from) + '($1)';
15129 insertTextFormat = SnippetFormat;
15134 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](value, this.doesSupportMarkdown()),
15135 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
15136 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertString),
15137 sortText: SortTexts.Enums,
15138 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value,
15139 insertTextFormat: insertTextFormat
15141 result.items.push(item);
15146 CSSCompletion.prototype.getCSSWideKeywordProposals = function (entry, existingNode, result) {
15147 for (var keywords in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssWideKeywords"]) {
15148 result.items.push({
15150 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssWideKeywords"][keywords],
15151 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), keywords),
15152 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15157 CSSCompletion.prototype.getCompletionsForInterpolation = function (node, result) {
15158 if (this.offset >= node.offset + 2) {
15159 this.getVariableProposals(null, result);
15163 CSSCompletion.prototype.getVariableProposals = function (existingNode, result) {
15164 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
15165 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
15166 var symbol = symbols_1[_i];
15167 var insertText = _utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](symbol.name, '--') ? "var(" + symbol.name + ")" : symbol.name;
15168 var completionItem = {
15169 label: symbol.name,
15170 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__["getLimitedString"](symbol.value) : symbol.value,
15171 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15172 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Variable,
15173 sortText: SortTexts.Variable
15175 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15176 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color;
15178 if (symbol.node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionParameter) {
15179 var mixinNode = (symbol.node.getParent());
15180 if (mixinNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration) {
15181 completionItem.detail = localize('completion.argument', 'argument from \'{0}\'', mixinNode.getName());
15184 result.items.push(completionItem);
15188 CSSCompletion.prototype.getVariableProposalsForCSSVarFunction = function (result) {
15189 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
15190 symbols = symbols.filter(function (symbol) {
15191 return _utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](symbol.name, '--');
15193 for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
15194 var symbol = symbols_2[_i];
15195 var completionItem = {
15196 label: symbol.name,
15197 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__["getLimitedString"](symbol.value) : symbol.value,
15198 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(null), symbol.name),
15199 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Variable
15201 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15202 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color;
15204 result.items.push(completionItem);
15208 CSSCompletion.prototype.getUnitProposals = function (entry, existingNode, result) {
15209 var currentWord = '0';
15210 if (this.currentWord.length > 0) {
15211 var numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
15213 currentWord = numMatch[0];
15214 result.isIncomplete = currentWord.length === this.currentWord.length;
15217 else if (this.currentWord.length === 0) {
15218 result.isIncomplete = true;
15220 if (existingNode && existingNode.parent && existingNode.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
15221 existingNode = existingNode.getParent(); // include the unary operator
15223 if (entry.restrictions) {
15224 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
15225 var restriction = _a[_i];
15226 var units = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["units"][restriction];
15228 for (var _b = 0, units_1 = units; _b < units_1.length; _b++) {
15229 var unit = units_1[_b];
15230 var insertText = currentWord + unit;
15231 result.items.push({
15233 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15234 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Unit
15242 CSSCompletion.prototype.getCompletionRange = function (existingNode) {
15243 if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) {
15244 var end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position;
15245 var start = this.textDocument.positionAt(existingNode.offset);
15246 if (start.line === end.line) {
15247 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(start, end); // multi line edits are not allowed
15250 return this.defaultReplaceRange;
15252 CSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
15253 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"]) {
15254 result.items.push({
15256 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"][color],
15257 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
15258 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color
15261 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorKeywords"]) {
15262 result.items.push({
15264 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorKeywords"][color],
15265 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
15266 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15269 var colorValues = new Set();
15270 this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset));
15271 for (var _i = 0, _a = colorValues.getEntries(); _i < _a.length; _i++) {
15272 var color = _a[_i];
15273 result.items.push({
15275 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
15276 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color
15279 var _loop_1 = function (p) {
15281 var replaceFunction = function (_match, p1) { return '${' + tabStop++ + ':' + p1 + '}'; };
15282 var insertText = p.func.replace(/\[?\$(\w+)\]?/g, replaceFunction);
15283 result.items.push({
15284 label: p.func.substr(0, p.func.indexOf('(')),
15286 documentation: p.desc,
15287 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this_1.getCompletionRange(existingNode), insertText),
15288 insertTextFormat: SnippetFormat,
15289 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function
15293 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorFunctions"]; _b < _c.length; _b++) {
15299 CSSCompletion.prototype.getPositionProposals = function (entry, existingNode, result) {
15300 for (var position in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["positionKeywords"]) {
15301 result.items.push({
15303 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["positionKeywords"][position],
15304 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), position),
15305 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15310 CSSCompletion.prototype.getRepeatStyleProposals = function (entry, existingNode, result) {
15311 for (var repeat in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["repeatStyleKeywords"]) {
15312 result.items.push({
15314 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["repeatStyleKeywords"][repeat],
15315 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), repeat),
15316 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15321 CSSCompletion.prototype.getLineStyleProposals = function (entry, existingNode, result) {
15322 for (var lineStyle in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineStyleKeywords"]) {
15323 result.items.push({
15325 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineStyleKeywords"][lineStyle],
15326 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), lineStyle),
15327 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15332 CSSCompletion.prototype.getLineWidthProposals = function (entry, existingNode, result) {
15333 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineWidthKeywords"]; _i < _a.length; _i++) {
15334 var lineWidth = _a[_i];
15335 result.items.push({
15337 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), lineWidth),
15338 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15343 CSSCompletion.prototype.getGeometryBoxProposals = function (entry, existingNode, result) {
15344 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["geometryBoxKeywords"]) {
15345 result.items.push({
15347 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["geometryBoxKeywords"][box],
15348 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), box),
15349 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15354 CSSCompletion.prototype.getBoxProposals = function (entry, existingNode, result) {
15355 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["boxKeywords"]) {
15356 result.items.push({
15358 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["boxKeywords"][box],
15359 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), box),
15360 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
15365 CSSCompletion.prototype.getImageProposals = function (entry, existingNode, result) {
15366 for (var image in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["imageFunctions"]) {
15367 var insertText = moveCursorInsideParenthesis(image);
15368 result.items.push({
15370 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["imageFunctions"][image],
15371 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15372 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15373 insertTextFormat: image !== insertText ? SnippetFormat : void 0
15378 CSSCompletion.prototype.getTimingFunctionProposals = function (entry, existingNode, result) {
15379 for (var timing in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["transitionTimingFunctions"]) {
15380 var insertText = moveCursorInsideParenthesis(timing);
15381 result.items.push({
15383 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["transitionTimingFunctions"][timing],
15384 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15385 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15386 insertTextFormat: timing !== insertText ? SnippetFormat : void 0
15391 CSSCompletion.prototype.getBasicShapeProposals = function (entry, existingNode, result) {
15392 for (var shape in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["basicShapeFunctions"]) {
15393 var insertText = moveCursorInsideParenthesis(shape);
15394 result.items.push({
15396 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["basicShapeFunctions"][shape],
15397 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15398 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15399 insertTextFormat: shape !== insertText ? SnippetFormat : void 0
15404 CSSCompletion.prototype.getCompletionsForStylesheet = function (result) {
15405 var node = this.styleSheet.findFirstChildBeforeOffset(this.offset);
15407 return this.getCompletionForTopLevel(result);
15409 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
15410 return this.getCompletionsForRuleSet(node, result);
15412 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Supports"]) {
15413 return this.getCompletionsForSupports(node, result);
15417 CSSCompletion.prototype.getCompletionForTopLevel = function (result) {
15419 this.cssDataManager.getAtDirectives().forEach(function (entry) {
15420 result.items.push({
15422 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(null), entry.name),
15423 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
15424 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
15425 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
15428 this.getCompletionsForSelector(null, false, result);
15431 CSSCompletion.prototype.getCompletionsForRuleSet = function (ruleSet, result) {
15432 var declarations = ruleSet.getDeclarations();
15433 var isAfter = declarations && declarations.endsWith('}') && this.offset >= declarations.end;
15435 return this.getCompletionForTopLevel(result);
15437 var isInSelectors = !declarations || this.offset <= declarations.offset;
15438 if (isInSelectors) {
15439 return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result);
15441 return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result);
15443 CSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
15445 var existingNode = this.findInNodePath(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].IdentifierSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ClassSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ElementNameSelector);
15446 if (!existingNode && this.offset - this.currentWord.length > 0 && this.textDocument.getText()[this.offset - this.currentWord.length - 1] === ':') {
15447 // after the ':' of a pseudo selector, no node generated for just ':'
15448 this.currentWord = ':' + this.currentWord;
15449 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Position"].create(this.position.line, this.position.character - this.currentWord.length), this.position);
15451 var pseudoClasses = this.cssDataManager.getPseudoClasses();
15452 pseudoClasses.forEach(function (entry) {
15453 var insertText = moveCursorInsideParenthesis(entry.name);
15456 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), insertText),
15457 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
15458 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
15459 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15460 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
15462 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, ':-')) {
15463 item.sortText = SortTexts.VendorPrefixed;
15465 result.items.push(item);
15467 var pseudoElements = this.cssDataManager.getPseudoElements();
15468 pseudoElements.forEach(function (entry) {
15469 var insertText = moveCursorInsideParenthesis(entry.name);
15472 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), insertText),
15473 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
15474 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
15475 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15476 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
15478 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, '::-')) {
15479 item.sortText = SortTexts.VendorPrefixed;
15481 result.items.push(item);
15483 if (!isNested) { // show html tags only for top level
15484 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["html5Tags"]; _i < _a.length; _i++) {
15485 var entry = _a[_i];
15486 result.items.push({
15488 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), entry),
15489 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
15492 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["svgElements"]; _b < _c.length; _b++) {
15493 var entry = _c[_b];
15494 result.items.push({
15496 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), entry),
15497 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
15502 visited[this.currentWord] = true;
15503 var docText = this.textDocument.getText();
15504 this.styleSheet.accept(function (n) {
15505 if (n.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SimpleSelector && n.length > 0) {
15506 var selector = docText.substr(n.offset, n.length);
15507 if (selector.charAt(0) === '.' && !visited[selector]) {
15508 visited[selector] = true;
15509 result.items.push({
15511 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), selector),
15512 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
15519 if (ruleSet && ruleSet.isNested()) {
15520 var selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset);
15521 if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) {
15522 this.getPropertyProposals(null, result);
15527 CSSCompletion.prototype.getCompletionsForDeclarations = function (declarations, result) {
15528 if (!declarations || this.offset === declarations.offset) { // incomplete nodes
15531 var node = declarations.findFirstChildBeforeOffset(this.offset);
15533 return this.getCompletionsForDeclarationProperty(null, result);
15535 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["AbstractDeclaration"]) {
15536 var declaration = node;
15537 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition) || this.offset <= declaration.colonPosition) {
15538 // complete property
15539 return this.getCompletionsForDeclarationProperty(declaration, result);
15541 else if ((Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset)) {
15542 if (this.offset === declaration.semicolonPosition + 1) {
15543 return result; // don't show new properties right after semicolon (see Bug 15421:[intellisense] [css] Be less aggressive when manually typing CSS)
15545 // complete next property
15546 return this.getCompletionsForDeclarationProperty(null, result);
15548 if (declaration instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
15550 return this.getCompletionsForDeclarationValue(declaration, result);
15553 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ExtendsReference"]) {
15554 this.getCompletionsForExtendsReference(node, null, result);
15556 else if (this.currentWord && this.currentWord[0] === '@') {
15557 this.getCompletionsForDeclarationProperty(null, result);
15559 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
15560 this.getCompletionsForDeclarationProperty(null, result);
15564 CSSCompletion.prototype.getCompletionsForVariableDeclaration = function (declaration, result) {
15565 if (this.offset && Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition) && this.offset > declaration.colonPosition) {
15566 this.getVariableProposals(declaration.getValue(), result);
15570 CSSCompletion.prototype.getCompletionsForExpression = function (expression, result) {
15571 var parent = expression.getParent();
15572 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"]) {
15573 this.getCompletionsForFunctionArgument(parent, parent.getParent(), result);
15576 var declaration = expression.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Declaration);
15577 if (!declaration) {
15578 this.getTermProposals(null, null, result);
15581 var node = expression.findChildAtOffset(this.offset, true);
15583 return this.getCompletionsForDeclarationValue(declaration, result);
15585 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NumericValue"] || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Identifier"]) {
15586 return this.getCompletionsForDeclarationValue(declaration, result);
15590 CSSCompletion.prototype.getCompletionsForFunctionArgument = function (arg, func, result) {
15591 var identifier = func.getIdentifier();
15592 if (identifier && identifier.matches('var')) {
15593 if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) {
15594 this.getVariableProposalsForCSSVarFunction(result);
15599 CSSCompletion.prototype.getCompletionsForFunctionDeclaration = function (decl, result) {
15600 var declarations = decl.getDeclarations();
15601 if (declarations && this.offset > declarations.offset && this.offset < declarations.end) {
15602 this.getTermProposals(null, null, result);
15606 CSSCompletion.prototype.getCompletionsForMixinReference = function (ref, result) {
15608 var allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Mixin);
15609 for (var _i = 0, allMixins_1 = allMixins; _i < allMixins_1.length; _i++) {
15610 var mixinSymbol = allMixins_1[_i];
15611 if (mixinSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["MixinDeclaration"]) {
15612 result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null));
15615 var identifierNode = ref.getIdentifier() || null;
15616 this.completionParticipants.forEach(function (participant) {
15617 if (participant.onCssMixinReference) {
15618 participant.onCssMixinReference({
15619 mixinName: _this.currentWord,
15620 range: _this.getCompletionRange(identifierNode)
15626 CSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
15627 var allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function);
15628 for (var _i = 0, allFunctions_1 = allFunctions; _i < allFunctions_1.length; _i++) {
15629 var functionSymbol = allFunctions_1[_i];
15630 if (functionSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionDeclaration"]) {
15631 result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode));
15636 CSSCompletion.prototype.makeTermProposal = function (symbol, parameters, existingNode) {
15637 var decl = symbol.node;
15638 var params = parameters.getChildren().map(function (c) {
15639 return (c instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionParameter"]) ? c.getName() : c.getText();
15641 var insertText = symbol.name + '(' + params.map(function (p, index) { return '${' + (index + 1) + ':' + p + '}'; }).join(', ') + ')';
15643 label: symbol.name,
15644 detail: symbol.name + '(' + params.join(', ') + ')',
15645 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
15646 insertTextFormat: SnippetFormat,
15647 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
15648 sortText: SortTexts.Term
15651 CSSCompletion.prototype.getCompletionsForSupportsCondition = function (supportsCondition, result) {
15652 var child = supportsCondition.findFirstChildBeforeOffset(this.offset);
15654 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
15655 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(child.colonPosition) || this.offset <= child.colonPosition) {
15656 return this.getCompletionsForDeclarationProperty(child, result);
15659 return this.getCompletionsForDeclarationValue(child, result);
15662 else if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
15663 return this.getCompletionsForSupportsCondition(child, result);
15666 if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) {
15667 return this.getCompletionsForDeclarationProperty(null, result);
15671 CSSCompletion.prototype.getCompletionsForSupports = function (supports, result) {
15672 var declarations = supports.getDeclarations();
15673 var inInCondition = !declarations || this.offset <= declarations.offset;
15674 if (inInCondition) {
15675 var child = supports.findFirstChildBeforeOffset(this.offset);
15676 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
15677 return this.getCompletionsForSupportsCondition(child, result);
15681 return this.getCompletionForTopLevel(result);
15683 CSSCompletion.prototype.getCompletionsForExtendsReference = function (extendsRef, existingNode, result) {
15686 CSSCompletion.prototype.getCompletionForUriLiteralValue = function (uriLiteralNode, result) {
15690 // No children, empty value
15691 if (!uriLiteralNode.hasChildren()) {
15693 position = this.position;
15694 var emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + 'url('.length);
15695 range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(emptyURIValuePosition, emptyURIValuePosition);
15698 var uriValueNode = uriLiteralNode.getChild(0);
15699 uriValue = uriValueNode.getText();
15700 position = this.position;
15701 range = this.getCompletionRange(uriValueNode);
15703 this.completionParticipants.forEach(function (participant) {
15704 if (participant.onCssURILiteralValue) {
15705 participant.onCssURILiteralValue({
15706 uriValue: uriValue,
15707 position: position,
15714 CSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
15716 this.completionParticipants.forEach(function (participant) {
15717 if (participant.onCssImportPath) {
15718 participant.onCssImportPath({
15719 pathValue: importPathNode.getText(),
15720 position: _this.position,
15721 range: _this.getCompletionRange(importPathNode)
15727 CSSCompletion.prototype.doesSupportMarkdown = function () {
15729 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(this.supportsMarkdown)) {
15730 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(this.lsOptions.clientCapabilities)) {
15731 this.supportsMarkdown = true;
15732 return this.supportsMarkdown;
15734 var documentationFormat = (_c = (_b = (_a = this.lsOptions.clientCapabilities.textDocument) === null || _a === void 0 ? void 0 : _a.completion) === null || _b === void 0 ? void 0 : _b.completionItem) === null || _c === void 0 ? void 0 : _c.documentationFormat;
15735 this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["MarkupKind"].Markdown) !== -1;
15737 return this.supportsMarkdown;
15739 return CSSCompletion;
15742 function isDeprecated(entry) {
15743 if (entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete')) {
15749 * Rank number should all be same length strings
15751 function computeRankNumber(n) {
15752 var nstr = n.toString();
15753 switch (nstr.length) {
15759 return '00' + nstr;
15761 return '000' + nstr;
15766 var Set = /** @class */ (function () {
15770 Set.prototype.add = function (entry) {
15771 this.entries[entry] = true;
15773 Set.prototype.getEntries = function () {
15774 return Object.keys(this.entries);
15778 function moveCursorInsideParenthesis(text) {
15779 return text.replace(/\(\)$/, "($1)");
15781 function collectValues(styleSheet, declaration) {
15782 var fullPropertyName = declaration.getFullPropertyName();
15783 var entries = new Set();
15784 function visitValue(node) {
15785 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Identifier"] || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NumericValue"] || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["HexColorValue"]) {
15786 entries.add(node.getText());
15790 function matchesProperty(decl) {
15791 var propertyName = decl.getFullPropertyName();
15792 return fullPropertyName === propertyName;
15794 function vistNode(node) {
15795 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"] && node !== declaration) {
15796 if (matchesProperty(node)) {
15797 var value = node.getValue();
15799 value.accept(visitValue);
15805 styleSheet.accept(vistNode);
15808 var ColorValueCollector = /** @class */ (function () {
15809 function ColorValueCollector(entries, currentOffset) {
15810 this.entries = entries;
15811 this.currentOffset = currentOffset;
15814 ColorValueCollector.prototype.visitNode = function (node) {
15815 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["HexColorValue"] || (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Function"] && _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["isColorConstructor"](node))) {
15816 if (this.currentOffset < node.offset || node.end < this.currentOffset) {
15817 this.entries.add(node.getText());
15822 return ColorValueCollector;
15824 function getCurrentWord(document, offset) {
15825 var i = offset - 1;
15826 var text = document.getText();
15827 while (i >= 0 && ' \t\n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) {
15830 return text.substring(i + 1, offset);
15832 function isColorString(s) {
15833 // From https://stackoverflow.com/questions/8027423/how-to-check-if-a-string-is-a-valid-hex-color-representation/8027444
15834 return (s.toLowerCase() in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"]) || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(s);
15840 /***/ (function(module, __webpack_exports__, __webpack_require__) {
15843 __webpack_require__.r(__webpack_exports__);
15844 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return Scope; });
15845 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalScope", function() { return GlobalScope; });
15846 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Symbol", function() { return Symbol; });
15847 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScopeBuilder", function() { return ScopeBuilder; });
15848 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Symbols", function() { return Symbols; });
15849 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
15850 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(102);
15851 /*---------------------------------------------------------------------------------------------
15852 * Copyright (c) Microsoft Corporation. All rights reserved.
15853 * Licensed under the MIT License. See License.txt in the project root for license information.
15854 *--------------------------------------------------------------------------------------------*/
15856 var __extends = (undefined && undefined.__extends) || (function () {
15857 var extendStatics = function (d, b) {
15858 extendStatics = Object.setPrototypeOf ||
15859 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15860 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15861 return extendStatics(d, b);
15863 return function (d, b) {
15864 extendStatics(d, b);
15865 function __() { this.constructor = d; }
15866 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15871 var Scope = /** @class */ (function () {
15872 function Scope(offset, length) {
15873 this.offset = offset;
15874 this.length = length;
15876 this.parent = null;
15877 this.children = [];
15879 Scope.prototype.addChild = function (scope) {
15880 this.children.push(scope);
15881 scope.setParent(this);
15883 Scope.prototype.setParent = function (scope) {
15884 this.parent = scope;
15886 Scope.prototype.findScope = function (offset, length) {
15887 if (length === void 0) { length = 0; }
15888 if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) {
15889 return this.findInScope(offset, length);
15893 Scope.prototype.findInScope = function (offset, length) {
15894 if (length === void 0) { length = 0; }
15895 // find the first scope child that has an offset larger than offset + length
15896 var end = offset + length;
15897 var idx = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_1__["findFirst"])(this.children, function (s) { return s.offset > end; });
15899 // all scopes have offsets larger than our end
15902 var res = this.children[idx - 1];
15903 if (res.offset <= offset && res.offset + res.length >= offset + length) {
15904 return res.findInScope(offset, length);
15908 Scope.prototype.addSymbol = function (symbol) {
15909 this.symbols.push(symbol);
15911 Scope.prototype.getSymbol = function (name, type) {
15912 for (var index = 0; index < this.symbols.length; index++) {
15913 var symbol = this.symbols[index];
15914 if (symbol.name === name && symbol.type === type) {
15920 Scope.prototype.getSymbols = function () {
15921 return this.symbols;
15926 var GlobalScope = /** @class */ (function (_super) {
15927 __extends(GlobalScope, _super);
15928 function GlobalScope() {
15929 return _super.call(this, 0, Number.MAX_VALUE) || this;
15931 return GlobalScope;
15934 var Symbol = /** @class */ (function () {
15935 function Symbol(name, value, node, type) {
15937 this.value = value;
15944 var ScopeBuilder = /** @class */ (function () {
15945 function ScopeBuilder(scope) {
15946 this.scope = scope;
15948 ScopeBuilder.prototype.addSymbol = function (node, name, value, type) {
15949 if (node.offset !== -1) {
15950 var current = this.scope.findScope(node.offset, node.length);
15952 current.addSymbol(new Symbol(name, value, node, type));
15956 ScopeBuilder.prototype.addScope = function (node) {
15957 if (node.offset !== -1) {
15958 var current = this.scope.findScope(node.offset, node.length);
15959 if (current && (current.offset !== node.offset || current.length !== node.length)) { // scope already known?
15960 var newScope = new Scope(node.offset, node.length);
15961 current.addChild(newScope);
15968 ScopeBuilder.prototype.addSymbolToChildScope = function (scopeNode, node, name, value, type) {
15969 if (scopeNode && scopeNode.offset !== -1) {
15970 var current = this.addScope(scopeNode); // create the scope or gets the existing one
15972 current.addSymbol(new Symbol(name, value, node, type));
15976 ScopeBuilder.prototype.visitNode = function (node) {
15977 switch (node.type) {
15978 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Keyframe:
15979 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Keyframe);
15981 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].CustomPropertyDeclaration:
15982 return this.visitCustomPropertyDeclarationNode(node);
15983 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].VariableDeclaration:
15984 return this.visitVariableDeclarationNode(node);
15985 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Ruleset:
15986 return this.visitRuleSet(node);
15987 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
15988 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Mixin);
15990 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionDeclaration:
15991 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function);
15993 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionParameter: {
15994 return this.visitFunctionParameterNode(node);
15996 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Declarations:
15997 this.addScope(node);
15999 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].For:
16000 var forNode = node;
16001 var scopeNode = forNode.getDeclarations();
16002 if (scopeNode && forNode.variable) {
16003 this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
16006 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Each: {
16007 var eachNode = node;
16008 var scopeNode_1 = eachNode.getDeclarations();
16010 var variables = eachNode.getVariables().getChildren();
16011 for (var _i = 0, variables_1 = variables; _i < variables_1.length; _i++) {
16012 var variable = variables_1[_i];
16013 this.addSymbolToChildScope(scopeNode_1, variable, variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
16021 ScopeBuilder.prototype.visitRuleSet = function (node) {
16022 var current = this.scope.findScope(node.offset, node.length);
16024 for (var _i = 0, _a = node.getSelectors().getChildren(); _i < _a.length; _i++) {
16025 var child = _a[_i];
16026 if (child instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Selector"]) {
16027 if (child.getChildren().length === 1) { // only selectors with a single element can be extended
16028 current.addSymbol(new Symbol(child.getChild(0).getText(), void 0, child, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Rule));
16035 ScopeBuilder.prototype.visitVariableDeclarationNode = function (node) {
16036 var value = node.getValue() ? node.getValue().getText() : void 0;
16037 this.addSymbol(node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
16040 ScopeBuilder.prototype.visitFunctionParameterNode = function (node) {
16041 // parameters are part of the body scope
16042 var scopeNode = node.getParent().getDeclarations();
16044 var valueNode = node.getDefaultValue();
16045 var value = valueNode ? valueNode.getText() : void 0;
16046 this.addSymbolToChildScope(scopeNode, node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
16050 ScopeBuilder.prototype.visitCustomPropertyDeclarationNode = function (node) {
16051 var value = node.getValue() ? node.getValue().getText() : '';
16052 this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
16055 ScopeBuilder.prototype.addCSSVariable = function (node, name, value, type) {
16056 if (node.offset !== -1) {
16057 this.scope.addSymbol(new Symbol(name, value, node, type));
16060 return ScopeBuilder;
16063 var Symbols = /** @class */ (function () {
16064 function Symbols(node) {
16065 this.global = new GlobalScope();
16066 node.acceptVisitor(new ScopeBuilder(this.global));
16068 Symbols.prototype.findSymbolsAtOffset = function (offset, referenceType) {
16069 var scope = this.global.findScope(offset, 0);
16073 var symbols = scope.getSymbols();
16074 for (var i = 0; i < symbols.length; i++) {
16075 var symbol = symbols[i];
16076 if (symbol.type === referenceType && !names[symbol.name]) {
16077 result.push(symbol);
16078 names[symbol.name] = true;
16081 scope = scope.parent;
16085 Symbols.prototype.internalFindSymbol = function (node, referenceTypes) {
16086 var scopeNode = node;
16087 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionParameter"] && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["BodyDeclaration"]) {
16088 scopeNode = node.parent.getParent().getDeclarations();
16090 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"] && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Function"]) {
16091 var funcId = node.parent.getParent().getIdentifier();
16093 var functionSymbol = this.internalFindSymbol(funcId, [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function]);
16094 if (functionSymbol) {
16095 scopeNode = functionSymbol.node.getDeclarations();
16102 var name = node.getText();
16103 var scope = this.global.findScope(scopeNode.offset, scopeNode.length);
16105 for (var index = 0; index < referenceTypes.length; index++) {
16106 var type = referenceTypes[index];
16107 var symbol = scope.getSymbol(name, type);
16112 scope = scope.parent;
16116 Symbols.prototype.evaluateReferenceTypes = function (node) {
16117 if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Identifier"]) {
16118 var referenceTypes = node.referenceTypes;
16119 if (referenceTypes) {
16120 return referenceTypes;
16123 if (node.isCustomProperty) {
16124 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable];
16126 // are a reference to a keyframe?
16127 var decl = _cssNodes__WEBPACK_IMPORTED_MODULE_0__["getParentDeclaration"](node);
16129 var propertyName = decl.getNonPrefixedPropertyName();
16130 if ((propertyName === 'animation' || propertyName === 'animation-name')
16131 && decl.getValue() && decl.getValue().offset === node.offset) {
16132 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Keyframe];
16137 else if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Variable"]) {
16138 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable];
16140 var selector = node.findAParent(_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Selector, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference);
16142 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Rule];
16146 Symbols.prototype.findSymbolFromNode = function (node) {
16150 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Interpolation) {
16151 node = node.getParent();
16153 var referenceTypes = this.evaluateReferenceTypes(node);
16154 if (referenceTypes) {
16155 return this.internalFindSymbol(node, referenceTypes);
16159 Symbols.prototype.matchesSymbol = function (node, symbol) {
16163 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Interpolation) {
16164 node = node.getParent();
16166 if (!node.matches(symbol.name)) {
16169 var referenceTypes = this.evaluateReferenceTypes(node);
16170 if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) {
16173 var nodeSymbol = this.internalFindSymbol(node, referenceTypes);
16174 return nodeSymbol === symbol;
16176 Symbols.prototype.findSymbol = function (name, type, offset) {
16177 var scope = this.global.findScope(offset);
16179 var symbol = scope.getSymbol(name, type);
16183 scope = scope.parent;
16194 /***/ (function(module, __webpack_exports__, __webpack_require__) {
16197 __webpack_require__.r(__webpack_exports__);
16198 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findFirst", function() { return findFirst; });
16199 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return includes; });
16200 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "union", function() { return union; });
16201 /*---------------------------------------------------------------------------------------------
16202 * Copyright (c) Microsoft Corporation. All rights reserved.
16203 * Licensed under the MIT License. See License.txt in the project root for license information.
16204 *--------------------------------------------------------------------------------------------*/
16207 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
16208 * are located before all elements where p(x) is true.
16209 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
16211 function findFirst(array, p) {
16212 var low = 0, high = array.length;
16214 return 0; // no children
16216 while (low < high) {
16217 var mid = Math.floor((low + high) / 2);
16218 if (p(array[mid])) {
16227 function includes(array, item) {
16228 return array.indexOf(item) !== -1;
16232 for (var _i = 0; _i < arguments.length; _i++) {
16233 arrays[_i] = arguments[_i];
16236 for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
16237 var array = arrays_1[_a];
16238 for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
16239 var item = array_1[_b];
16240 if (!includes(result, item)) {
16251 /***/ (function(module, __webpack_exports__, __webpack_require__) {
16254 __webpack_require__.r(__webpack_exports__);
16255 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return ClientCapabilities; });
16256 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileType", function() { return FileType; });
16257 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(104);
16258 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105);
16259 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__["TextDocument"]; });
16261 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"]; });
16263 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"]; });
16265 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Location"]; });
16267 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["LocationLink"]; });
16269 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Color"]; });
16271 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorInformation"]; });
16273 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorPresentation"]; });
16275 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"]; });
16277 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRange"]; });
16279 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticRelatedInformation"]; });
16281 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticSeverity"]; });
16283 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticTag"]; });
16285 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticCode", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticCode"]; });
16287 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Diagnostic"]; });
16289 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Command"]; });
16291 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"]; });
16293 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentEdit"]; });
16295 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CreateFile"]; });
16297 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["RenameFile"]; });
16299 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DeleteFile"]; });
16301 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["WorkspaceEdit"]; });
16303 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["WorkspaceChange"]; });
16305 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentIdentifier"]; });
16307 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["VersionedTextDocumentIdentifier"]; });
16309 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentItem"]; });
16311 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"]; });
16313 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupContent"]; });
16315 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"]; });
16317 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"]; });
16319 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemTag"]; });
16321 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertReplaceEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertReplaceEdit"]; });
16323 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItem"]; });
16325 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionList"]; });
16327 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkedString"]; });
16329 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Hover"]; });
16331 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ParameterInformation"]; });
16333 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SignatureInformation"]; });
16335 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"]; });
16337 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlight"]; });
16339 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"]; });
16341 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolTag"]; });
16343 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolInformation"]; });
16345 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentSymbol"]; });
16347 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeActionKind"]; });
16349 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeActionContext"]; });
16351 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeAction"]; });
16353 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeLens"]; });
16355 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FormattingOptions"]; });
16357 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentLink"]; });
16359 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"]; });
16361 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["EOL"]; });
16363 /*---------------------------------------------------------------------------------------------
16364 * Copyright (c) Microsoft Corporation. All rights reserved.
16365 * Licensed under the MIT License. See License.txt in the project root for license information.
16366 *--------------------------------------------------------------------------------------------*/
16371 var ClientCapabilities;
16372 (function (ClientCapabilities) {
16373 ClientCapabilities.LATEST = {
16377 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
16381 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
16385 })(ClientCapabilities || (ClientCapabilities = {}));
16387 (function (FileType) {
16389 * The file type is unknown.
16391 FileType[FileType["Unknown"] = 0] = "Unknown";
16395 FileType[FileType["File"] = 1] = "File";
16399 FileType[FileType["Directory"] = 2] = "Directory";
16401 * A symbolic link to a file.
16403 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
16404 })(FileType || (FileType = {}));
16409 /***/ (function(module, __webpack_exports__, __webpack_require__) {
16412 __webpack_require__.r(__webpack_exports__);
16413 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
16414 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
16415 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
16416 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
16417 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
16418 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
16419 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
16420 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
16421 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
16422 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
16423 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
16424 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
16425 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticCode", function() { return DiagnosticCode; });
16426 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
16427 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
16428 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
16429 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
16430 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
16431 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
16432 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
16433 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
16434 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
16435 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
16436 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
16437 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
16438 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
16439 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
16440 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
16441 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
16442 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
16443 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertReplaceEdit", function() { return InsertReplaceEdit; });
16444 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
16445 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
16446 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
16447 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
16448 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
16449 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
16450 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
16451 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
16452 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
16453 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
16454 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
16455 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
16456 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
16457 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
16458 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
16459 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
16460 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
16461 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
16462 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
16463 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
16464 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
16465 /* --------------------------------------------------------------------------------------------
16466 * Copyright (c) Microsoft Corporation. All rights reserved.
16467 * Licensed under the MIT License. See License.txt in the project root for license information.
16468 * ------------------------------------------------------------------------------------------ */
16471 * The Position namespace provides helper functions to work with
16472 * [Position](#Position) literals.
16475 (function (Position) {
16477 * Creates a new Position literal from the given line and character.
16478 * @param line The position's line.
16479 * @param character The position's character.
16481 function create(line, character) {
16482 return { line: line, character: character };
16484 Position.create = create;
16486 * Checks whether the given liternal conforms to the [Position](#Position) interface.
16488 function is(value) {
16489 var candidate = value;
16490 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
16493 })(Position || (Position = {}));
16495 * The Range namespace provides helper functions to work with
16496 * [Range](#Range) literals.
16499 (function (Range) {
16500 function create(one, two, three, four) {
16501 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
16502 return { start: Position.create(one, two), end: Position.create(three, four) };
16504 else if (Position.is(one) && Position.is(two)) {
16505 return { start: one, end: two };
16508 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
16511 Range.create = create;
16513 * Checks whether the given literal conforms to the [Range](#Range) interface.
16515 function is(value) {
16516 var candidate = value;
16517 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
16520 })(Range || (Range = {}));
16522 * The Location namespace provides helper functions to work with
16523 * [Location](#Location) literals.
16526 (function (Location) {
16528 * Creates a Location literal.
16529 * @param uri The location's uri.
16530 * @param range The location's range.
16532 function create(uri, range) {
16533 return { uri: uri, range: range };
16535 Location.create = create;
16537 * Checks whether the given literal conforms to the [Location](#Location) interface.
16539 function is(value) {
16540 var candidate = value;
16541 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
16544 })(Location || (Location = {}));
16546 * The LocationLink namespace provides helper functions to work with
16547 * [LocationLink](#LocationLink) literals.
16550 (function (LocationLink) {
16552 * Creates a LocationLink literal.
16553 * @param targetUri The definition's uri.
16554 * @param targetRange The full range of the definition.
16555 * @param targetSelectionRange The span of the symbol definition at the target.
16556 * @param originSelectionRange The span of the symbol being defined in the originating source file.
16558 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
16559 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
16561 LocationLink.create = create;
16563 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
16565 function is(value) {
16566 var candidate = value;
16567 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
16568 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
16569 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
16571 LocationLink.is = is;
16572 })(LocationLink || (LocationLink = {}));
16574 * The Color namespace provides helper functions to work with
16575 * [Color](#Color) literals.
16578 (function (Color) {
16580 * Creates a new Color literal.
16582 function create(red, green, blue, alpha) {
16590 Color.create = create;
16592 * Checks whether the given literal conforms to the [Color](#Color) interface.
16594 function is(value) {
16595 var candidate = value;
16596 return Is.number(candidate.red)
16597 && Is.number(candidate.green)
16598 && Is.number(candidate.blue)
16599 && Is.number(candidate.alpha);
16602 })(Color || (Color = {}));
16604 * The ColorInformation namespace provides helper functions to work with
16605 * [ColorInformation](#ColorInformation) literals.
16607 var ColorInformation;
16608 (function (ColorInformation) {
16610 * Creates a new ColorInformation literal.
16612 function create(range, color) {
16618 ColorInformation.create = create;
16620 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
16622 function is(value) {
16623 var candidate = value;
16624 return Range.is(candidate.range) && Color.is(candidate.color);
16626 ColorInformation.is = is;
16627 })(ColorInformation || (ColorInformation = {}));
16629 * The Color namespace provides helper functions to work with
16630 * [ColorPresentation](#ColorPresentation) literals.
16632 var ColorPresentation;
16633 (function (ColorPresentation) {
16635 * Creates a new ColorInformation literal.
16637 function create(label, textEdit, additionalTextEdits) {
16640 textEdit: textEdit,
16641 additionalTextEdits: additionalTextEdits,
16644 ColorPresentation.create = create;
16646 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
16648 function is(value) {
16649 var candidate = value;
16650 return Is.string(candidate.label)
16651 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
16652 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
16654 ColorPresentation.is = is;
16655 })(ColorPresentation || (ColorPresentation = {}));
16657 * Enum of known range kinds
16659 var FoldingRangeKind;
16660 (function (FoldingRangeKind) {
16662 * Folding range for a comment
16664 FoldingRangeKind["Comment"] = "comment";
16666 * Folding range for a imports or includes
16668 FoldingRangeKind["Imports"] = "imports";
16670 * Folding range for a region (e.g. `#region`)
16672 FoldingRangeKind["Region"] = "region";
16673 })(FoldingRangeKind || (FoldingRangeKind = {}));
16675 * The folding range namespace provides helper functions to work with
16676 * [FoldingRange](#FoldingRange) literals.
16679 (function (FoldingRange) {
16681 * Creates a new FoldingRange literal.
16683 function create(startLine, endLine, startCharacter, endCharacter, kind) {
16685 startLine: startLine,
16688 if (Is.defined(startCharacter)) {
16689 result.startCharacter = startCharacter;
16691 if (Is.defined(endCharacter)) {
16692 result.endCharacter = endCharacter;
16694 if (Is.defined(kind)) {
16695 result.kind = kind;
16699 FoldingRange.create = create;
16701 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
16703 function is(value) {
16704 var candidate = value;
16705 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
16706 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
16707 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
16708 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
16710 FoldingRange.is = is;
16711 })(FoldingRange || (FoldingRange = {}));
16713 * The DiagnosticRelatedInformation namespace provides helper functions to work with
16714 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
16716 var DiagnosticRelatedInformation;
16717 (function (DiagnosticRelatedInformation) {
16719 * Creates a new DiagnosticRelatedInformation literal.
16721 function create(location, message) {
16723 location: location,
16727 DiagnosticRelatedInformation.create = create;
16729 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
16731 function is(value) {
16732 var candidate = value;
16733 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
16735 DiagnosticRelatedInformation.is = is;
16736 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
16738 * The diagnostic's severity.
16740 var DiagnosticSeverity;
16741 (function (DiagnosticSeverity) {
16743 * Reports an error.
16745 DiagnosticSeverity.Error = 1;
16747 * Reports a warning.
16749 DiagnosticSeverity.Warning = 2;
16751 * Reports an information.
16753 DiagnosticSeverity.Information = 3;
16757 DiagnosticSeverity.Hint = 4;
16758 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
16760 * The diagnostic tags.
16765 (function (DiagnosticTag) {
16767 * Unused or unnecessary code.
16769 * Clients are allowed to render diagnostics with this tag faded out instead of having
16770 * an error squiggle.
16772 DiagnosticTag.Unnecessary = 1;
16774 * Deprecated or obsolete code.
16776 * Clients are allowed to rendered diagnostics with this tag strike through.
16778 DiagnosticTag.Deprecated = 2;
16779 })(DiagnosticTag || (DiagnosticTag = {}));
16781 * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
16783 * @since 3.16.0 - Proposed state
16785 var DiagnosticCode;
16786 (function (DiagnosticCode) {
16788 * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
16790 function is(value) {
16791 var candidate = value;
16792 return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
16794 DiagnosticCode.is = is;
16795 })(DiagnosticCode || (DiagnosticCode = {}));
16797 * The Diagnostic namespace provides helper functions to work with
16798 * [Diagnostic](#Diagnostic) literals.
16801 (function (Diagnostic) {
16803 * Creates a new Diagnostic literal.
16805 function create(range, message, severity, code, source, relatedInformation) {
16806 var result = { range: range, message: message };
16807 if (Is.defined(severity)) {
16808 result.severity = severity;
16810 if (Is.defined(code)) {
16811 result.code = code;
16813 if (Is.defined(source)) {
16814 result.source = source;
16816 if (Is.defined(relatedInformation)) {
16817 result.relatedInformation = relatedInformation;
16821 Diagnostic.create = create;
16823 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
16825 function is(value) {
16826 var candidate = value;
16827 return Is.defined(candidate)
16828 && Range.is(candidate.range)
16829 && Is.string(candidate.message)
16830 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
16831 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
16832 && (Is.string(candidate.source) || Is.undefined(candidate.source))
16833 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
16835 Diagnostic.is = is;
16836 })(Diagnostic || (Diagnostic = {}));
16838 * The Command namespace provides helper functions to work with
16839 * [Command](#Command) literals.
16842 (function (Command) {
16844 * Creates a new Command literal.
16846 function create(title, command) {
16848 for (var _i = 2; _i < arguments.length; _i++) {
16849 args[_i - 2] = arguments[_i];
16851 var result = { title: title, command: command };
16852 if (Is.defined(args) && args.length > 0) {
16853 result.arguments = args;
16857 Command.create = create;
16859 * Checks whether the given literal conforms to the [Command](#Command) interface.
16861 function is(value) {
16862 var candidate = value;
16863 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
16866 })(Command || (Command = {}));
16868 * The TextEdit namespace provides helper function to create replace,
16869 * insert and delete edits more easily.
16872 (function (TextEdit) {
16874 * Creates a replace text edit.
16875 * @param range The range of text to be replaced.
16876 * @param newText The new text.
16878 function replace(range, newText) {
16879 return { range: range, newText: newText };
16881 TextEdit.replace = replace;
16883 * Creates a insert text edit.
16884 * @param position The position to insert the text at.
16885 * @param newText The text to be inserted.
16887 function insert(position, newText) {
16888 return { range: { start: position, end: position }, newText: newText };
16890 TextEdit.insert = insert;
16892 * Creates a delete text edit.
16893 * @param range The range of text to be deleted.
16895 function del(range) {
16896 return { range: range, newText: '' };
16898 TextEdit.del = del;
16899 function is(value) {
16900 var candidate = value;
16901 return Is.objectLiteral(candidate)
16902 && Is.string(candidate.newText)
16903 && Range.is(candidate.range);
16906 })(TextEdit || (TextEdit = {}));
16908 * The TextDocumentEdit namespace provides helper function to create
16909 * an edit that manipulates a text document.
16911 var TextDocumentEdit;
16912 (function (TextDocumentEdit) {
16914 * Creates a new `TextDocumentEdit`
16916 function create(textDocument, edits) {
16917 return { textDocument: textDocument, edits: edits };
16919 TextDocumentEdit.create = create;
16920 function is(value) {
16921 var candidate = value;
16922 return Is.defined(candidate)
16923 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
16924 && Array.isArray(candidate.edits);
16926 TextDocumentEdit.is = is;
16927 })(TextDocumentEdit || (TextDocumentEdit = {}));
16929 (function (CreateFile) {
16930 function create(uri, options) {
16935 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
16936 result.options = options;
16940 CreateFile.create = create;
16941 function is(value) {
16942 var candidate = value;
16943 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
16944 (candidate.options === void 0 ||
16945 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
16947 CreateFile.is = is;
16948 })(CreateFile || (CreateFile = {}));
16950 (function (RenameFile) {
16951 function create(oldUri, newUri, options) {
16957 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
16958 result.options = options;
16962 RenameFile.create = create;
16963 function is(value) {
16964 var candidate = value;
16965 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
16966 (candidate.options === void 0 ||
16967 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
16969 RenameFile.is = is;
16970 })(RenameFile || (RenameFile = {}));
16972 (function (DeleteFile) {
16973 function create(uri, options) {
16978 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
16979 result.options = options;
16983 DeleteFile.create = create;
16984 function is(value) {
16985 var candidate = value;
16986 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
16987 (candidate.options === void 0 ||
16988 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
16990 DeleteFile.is = is;
16991 })(DeleteFile || (DeleteFile = {}));
16993 (function (WorkspaceEdit) {
16994 function is(value) {
16995 var candidate = value;
16996 return candidate &&
16997 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
16998 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
16999 if (Is.string(change.kind)) {
17000 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
17003 return TextDocumentEdit.is(change);
17007 WorkspaceEdit.is = is;
17008 })(WorkspaceEdit || (WorkspaceEdit = {}));
17009 var TextEditChangeImpl = /** @class */ (function () {
17010 function TextEditChangeImpl(edits) {
17011 this.edits = edits;
17013 TextEditChangeImpl.prototype.insert = function (position, newText) {
17014 this.edits.push(TextEdit.insert(position, newText));
17016 TextEditChangeImpl.prototype.replace = function (range, newText) {
17017 this.edits.push(TextEdit.replace(range, newText));
17019 TextEditChangeImpl.prototype.delete = function (range) {
17020 this.edits.push(TextEdit.del(range));
17022 TextEditChangeImpl.prototype.add = function (edit) {
17023 this.edits.push(edit);
17025 TextEditChangeImpl.prototype.all = function () {
17028 TextEditChangeImpl.prototype.clear = function () {
17029 this.edits.splice(0, this.edits.length);
17031 return TextEditChangeImpl;
17034 * A workspace change helps constructing changes to a workspace.
17036 var WorkspaceChange = /** @class */ (function () {
17037 function WorkspaceChange(workspaceEdit) {
17039 this._textEditChanges = Object.create(null);
17040 if (workspaceEdit) {
17041 this._workspaceEdit = workspaceEdit;
17042 if (workspaceEdit.documentChanges) {
17043 workspaceEdit.documentChanges.forEach(function (change) {
17044 if (TextDocumentEdit.is(change)) {
17045 var textEditChange = new TextEditChangeImpl(change.edits);
17046 _this._textEditChanges[change.textDocument.uri] = textEditChange;
17050 else if (workspaceEdit.changes) {
17051 Object.keys(workspaceEdit.changes).forEach(function (key) {
17052 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
17053 _this._textEditChanges[key] = textEditChange;
17058 Object.defineProperty(WorkspaceChange.prototype, "edit", {
17060 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
17061 * use to be returned from a workspace edit operation like rename.
17064 if (this._workspaceEdit === undefined) {
17065 return { documentChanges: [] };
17067 return this._workspaceEdit;
17072 WorkspaceChange.prototype.getTextEditChange = function (key) {
17073 if (VersionedTextDocumentIdentifier.is(key)) {
17074 if (!this._workspaceEdit) {
17075 this._workspaceEdit = {
17076 documentChanges: []
17079 if (!this._workspaceEdit.documentChanges) {
17080 throw new Error('Workspace edit is not configured for document changes.');
17082 var textDocument = key;
17083 var result = this._textEditChanges[textDocument.uri];
17086 var textDocumentEdit = {
17087 textDocument: textDocument,
17090 this._workspaceEdit.documentChanges.push(textDocumentEdit);
17091 result = new TextEditChangeImpl(edits);
17092 this._textEditChanges[textDocument.uri] = result;
17097 if (!this._workspaceEdit) {
17098 this._workspaceEdit = {
17099 changes: Object.create(null)
17102 if (!this._workspaceEdit.changes) {
17103 throw new Error('Workspace edit is not configured for normal text edit changes.');
17105 var result = this._textEditChanges[key];
17108 this._workspaceEdit.changes[key] = edits;
17109 result = new TextEditChangeImpl(edits);
17110 this._textEditChanges[key] = result;
17115 WorkspaceChange.prototype.createFile = function (uri, options) {
17116 this.checkDocumentChanges();
17117 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
17119 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
17120 this.checkDocumentChanges();
17121 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
17123 WorkspaceChange.prototype.deleteFile = function (uri, options) {
17124 this.checkDocumentChanges();
17125 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
17127 WorkspaceChange.prototype.checkDocumentChanges = function () {
17128 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
17129 throw new Error('Workspace edit is not configured for document changes.');
17132 return WorkspaceChange;
17136 * The TextDocumentIdentifier namespace provides helper functions to work with
17137 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
17139 var TextDocumentIdentifier;
17140 (function (TextDocumentIdentifier) {
17142 * Creates a new TextDocumentIdentifier literal.
17143 * @param uri The document's uri.
17145 function create(uri) {
17146 return { uri: uri };
17148 TextDocumentIdentifier.create = create;
17150 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
17152 function is(value) {
17153 var candidate = value;
17154 return Is.defined(candidate) && Is.string(candidate.uri);
17156 TextDocumentIdentifier.is = is;
17157 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
17159 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
17160 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
17162 var VersionedTextDocumentIdentifier;
17163 (function (VersionedTextDocumentIdentifier) {
17165 * Creates a new VersionedTextDocumentIdentifier literal.
17166 * @param uri The document's uri.
17167 * @param uri The document's text.
17169 function create(uri, version) {
17170 return { uri: uri, version: version };
17172 VersionedTextDocumentIdentifier.create = create;
17174 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
17176 function is(value) {
17177 var candidate = value;
17178 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
17180 VersionedTextDocumentIdentifier.is = is;
17181 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
17183 * The TextDocumentItem namespace provides helper functions to work with
17184 * [TextDocumentItem](#TextDocumentItem) literals.
17186 var TextDocumentItem;
17187 (function (TextDocumentItem) {
17189 * Creates a new TextDocumentItem literal.
17190 * @param uri The document's uri.
17191 * @param languageId The document's language identifier.
17192 * @param version The document's version number.
17193 * @param text The document's text.
17195 function create(uri, languageId, version, text) {
17196 return { uri: uri, languageId: languageId, version: version, text: text };
17198 TextDocumentItem.create = create;
17200 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
17202 function is(value) {
17203 var candidate = value;
17204 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
17206 TextDocumentItem.is = is;
17207 })(TextDocumentItem || (TextDocumentItem = {}));
17209 * Describes the content type that a client supports in various
17210 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
17212 * Please note that `MarkupKinds` must not start with a `$`. This kinds
17213 * are reserved for internal usage.
17216 (function (MarkupKind) {
17218 * Plain text is supported as a content format
17220 MarkupKind.PlainText = 'plaintext';
17222 * Markdown is supported as a content format
17224 MarkupKind.Markdown = 'markdown';
17225 })(MarkupKind || (MarkupKind = {}));
17226 (function (MarkupKind) {
17228 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
17230 function is(value) {
17231 var candidate = value;
17232 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
17234 MarkupKind.is = is;
17235 })(MarkupKind || (MarkupKind = {}));
17237 (function (MarkupContent) {
17239 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
17241 function is(value) {
17242 var candidate = value;
17243 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
17245 MarkupContent.is = is;
17246 })(MarkupContent || (MarkupContent = {}));
17248 * The kind of a completion entry.
17250 var CompletionItemKind;
17251 (function (CompletionItemKind) {
17252 CompletionItemKind.Text = 1;
17253 CompletionItemKind.Method = 2;
17254 CompletionItemKind.Function = 3;
17255 CompletionItemKind.Constructor = 4;
17256 CompletionItemKind.Field = 5;
17257 CompletionItemKind.Variable = 6;
17258 CompletionItemKind.Class = 7;
17259 CompletionItemKind.Interface = 8;
17260 CompletionItemKind.Module = 9;
17261 CompletionItemKind.Property = 10;
17262 CompletionItemKind.Unit = 11;
17263 CompletionItemKind.Value = 12;
17264 CompletionItemKind.Enum = 13;
17265 CompletionItemKind.Keyword = 14;
17266 CompletionItemKind.Snippet = 15;
17267 CompletionItemKind.Color = 16;
17268 CompletionItemKind.File = 17;
17269 CompletionItemKind.Reference = 18;
17270 CompletionItemKind.Folder = 19;
17271 CompletionItemKind.EnumMember = 20;
17272 CompletionItemKind.Constant = 21;
17273 CompletionItemKind.Struct = 22;
17274 CompletionItemKind.Event = 23;
17275 CompletionItemKind.Operator = 24;
17276 CompletionItemKind.TypeParameter = 25;
17277 })(CompletionItemKind || (CompletionItemKind = {}));
17279 * Defines whether the insert text in a completion item should be interpreted as
17280 * plain text or a snippet.
17282 var InsertTextFormat;
17283 (function (InsertTextFormat) {
17285 * The primary text to be inserted is treated as a plain string.
17287 InsertTextFormat.PlainText = 1;
17289 * The primary text to be inserted is treated as a snippet.
17291 * A snippet can define tab stops and placeholders with `$1`, `$2`
17292 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
17293 * the end of the snippet. Placeholders with equal identifiers are linked,
17294 * that is typing in one will update others too.
17296 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
17298 InsertTextFormat.Snippet = 2;
17299 })(InsertTextFormat || (InsertTextFormat = {}));
17301 * Completion item tags are extra annotations that tweak the rendering of a completion
17306 var CompletionItemTag;
17307 (function (CompletionItemTag) {
17309 * Render a completion as obsolete, usually using a strike-out.
17311 CompletionItemTag.Deprecated = 1;
17312 })(CompletionItemTag || (CompletionItemTag = {}));
17314 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
17316 * @since 3.16.0 - Proposed state
17318 var InsertReplaceEdit;
17319 (function (InsertReplaceEdit) {
17321 * Creates a new insert / replace edit
17323 function create(newText, insert, replace) {
17324 return { newText: newText, insert: insert, replace: replace };
17326 InsertReplaceEdit.create = create;
17328 * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
17330 function is(value) {
17331 var candidate = value;
17332 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
17334 InsertReplaceEdit.is = is;
17335 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
17337 * The CompletionItem namespace provides functions to deal with
17338 * completion items.
17340 var CompletionItem;
17341 (function (CompletionItem) {
17343 * Create a completion item and seed it with a label.
17344 * @param label The completion item's label
17346 function create(label) {
17347 return { label: label };
17349 CompletionItem.create = create;
17350 })(CompletionItem || (CompletionItem = {}));
17352 * The CompletionList namespace provides functions to deal with
17353 * completion lists.
17355 var CompletionList;
17356 (function (CompletionList) {
17358 * Creates a new completion list.
17360 * @param items The completion items.
17361 * @param isIncomplete The list is not complete.
17363 function create(items, isIncomplete) {
17364 return { items: items ? items : [], isIncomplete: !!isIncomplete };
17366 CompletionList.create = create;
17367 })(CompletionList || (CompletionList = {}));
17369 (function (MarkedString) {
17371 * Creates a marked string from plain text.
17373 * @param plainText The plain text.
17375 function fromPlainText(plainText) {
17376 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
17378 MarkedString.fromPlainText = fromPlainText;
17380 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
17382 function is(value) {
17383 var candidate = value;
17384 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
17386 MarkedString.is = is;
17387 })(MarkedString || (MarkedString = {}));
17389 (function (Hover) {
17391 * Checks whether the given value conforms to the [Hover](#Hover) interface.
17393 function is(value) {
17394 var candidate = value;
17395 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
17396 MarkedString.is(candidate.contents) ||
17397 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
17400 })(Hover || (Hover = {}));
17402 * The ParameterInformation namespace provides helper functions to work with
17403 * [ParameterInformation](#ParameterInformation) literals.
17405 var ParameterInformation;
17406 (function (ParameterInformation) {
17408 * Creates a new parameter information literal.
17410 * @param label A label string.
17411 * @param documentation A doc string.
17413 function create(label, documentation) {
17414 return documentation ? { label: label, documentation: documentation } : { label: label };
17416 ParameterInformation.create = create;
17417 })(ParameterInformation || (ParameterInformation = {}));
17419 * The SignatureInformation namespace provides helper functions to work with
17420 * [SignatureInformation](#SignatureInformation) literals.
17422 var SignatureInformation;
17423 (function (SignatureInformation) {
17424 function create(label, documentation) {
17425 var parameters = [];
17426 for (var _i = 2; _i < arguments.length; _i++) {
17427 parameters[_i - 2] = arguments[_i];
17429 var result = { label: label };
17430 if (Is.defined(documentation)) {
17431 result.documentation = documentation;
17433 if (Is.defined(parameters)) {
17434 result.parameters = parameters;
17437 result.parameters = [];
17441 SignatureInformation.create = create;
17442 })(SignatureInformation || (SignatureInformation = {}));
17444 * A document highlight kind.
17446 var DocumentHighlightKind;
17447 (function (DocumentHighlightKind) {
17449 * A textual occurrence.
17451 DocumentHighlightKind.Text = 1;
17453 * Read-access of a symbol, like reading a variable.
17455 DocumentHighlightKind.Read = 2;
17457 * Write-access of a symbol, like writing to a variable.
17459 DocumentHighlightKind.Write = 3;
17460 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
17462 * DocumentHighlight namespace to provide helper functions to work with
17463 * [DocumentHighlight](#DocumentHighlight) literals.
17465 var DocumentHighlight;
17466 (function (DocumentHighlight) {
17468 * Create a DocumentHighlight object.
17469 * @param range The range the highlight applies to.
17471 function create(range, kind) {
17472 var result = { range: range };
17473 if (Is.number(kind)) {
17474 result.kind = kind;
17478 DocumentHighlight.create = create;
17479 })(DocumentHighlight || (DocumentHighlight = {}));
17484 (function (SymbolKind) {
17485 SymbolKind.File = 1;
17486 SymbolKind.Module = 2;
17487 SymbolKind.Namespace = 3;
17488 SymbolKind.Package = 4;
17489 SymbolKind.Class = 5;
17490 SymbolKind.Method = 6;
17491 SymbolKind.Property = 7;
17492 SymbolKind.Field = 8;
17493 SymbolKind.Constructor = 9;
17494 SymbolKind.Enum = 10;
17495 SymbolKind.Interface = 11;
17496 SymbolKind.Function = 12;
17497 SymbolKind.Variable = 13;
17498 SymbolKind.Constant = 14;
17499 SymbolKind.String = 15;
17500 SymbolKind.Number = 16;
17501 SymbolKind.Boolean = 17;
17502 SymbolKind.Array = 18;
17503 SymbolKind.Object = 19;
17504 SymbolKind.Key = 20;
17505 SymbolKind.Null = 21;
17506 SymbolKind.EnumMember = 22;
17507 SymbolKind.Struct = 23;
17508 SymbolKind.Event = 24;
17509 SymbolKind.Operator = 25;
17510 SymbolKind.TypeParameter = 26;
17511 })(SymbolKind || (SymbolKind = {}));
17513 * Symbol tags are extra annotations that tweak the rendering of a symbol.
17517 (function (SymbolTag) {
17519 * Render a symbol as obsolete, usually using a strike-out.
17521 SymbolTag.Deprecated = 1;
17522 })(SymbolTag || (SymbolTag = {}));
17523 var SymbolInformation;
17524 (function (SymbolInformation) {
17526 * Creates a new symbol information literal.
17528 * @param name The name of the symbol.
17529 * @param kind The kind of the symbol.
17530 * @param range The range of the location of the symbol.
17531 * @param uri The resource of the location of symbol, defaults to the current document.
17532 * @param containerName The name of the symbol containing the symbol.
17534 function create(name, kind, range, uri, containerName) {
17538 location: { uri: uri, range: range }
17540 if (containerName) {
17541 result.containerName = containerName;
17545 SymbolInformation.create = create;
17546 })(SymbolInformation || (SymbolInformation = {}));
17547 var DocumentSymbol;
17548 (function (DocumentSymbol) {
17550 * Creates a new symbol information literal.
17552 * @param name The name of the symbol.
17553 * @param detail The detail of the symbol.
17554 * @param kind The kind of the symbol.
17555 * @param range The range of the symbol.
17556 * @param selectionRange The selectionRange of the symbol.
17557 * @param children Children of the symbol.
17559 function create(name, detail, kind, range, selectionRange, children) {
17565 selectionRange: selectionRange
17567 if (children !== void 0) {
17568 result.children = children;
17572 DocumentSymbol.create = create;
17574 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
17576 function is(value) {
17577 var candidate = value;
17578 return candidate &&
17579 Is.string(candidate.name) && Is.number(candidate.kind) &&
17580 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
17581 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
17582 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
17583 (candidate.children === void 0 || Array.isArray(candidate.children)) &&
17584 (candidate.tags === void 0 || Array.isArray(candidate.tags));
17586 DocumentSymbol.is = is;
17587 })(DocumentSymbol || (DocumentSymbol = {}));
17589 * A set of predefined code action kinds
17591 var CodeActionKind;
17592 (function (CodeActionKind) {
17596 CodeActionKind.Empty = '';
17598 * Base kind for quickfix actions: 'quickfix'
17600 CodeActionKind.QuickFix = 'quickfix';
17602 * Base kind for refactoring actions: 'refactor'
17604 CodeActionKind.Refactor = 'refactor';
17606 * Base kind for refactoring extraction actions: 'refactor.extract'
17608 * Example extract actions:
17611 * - Extract function
17612 * - Extract variable
17613 * - Extract interface from class
17616 CodeActionKind.RefactorExtract = 'refactor.extract';
17618 * Base kind for refactoring inline actions: 'refactor.inline'
17620 * Example inline actions:
17622 * - Inline function
17623 * - Inline variable
17624 * - Inline constant
17627 CodeActionKind.RefactorInline = 'refactor.inline';
17629 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
17631 * Example rewrite actions:
17633 * - Convert JavaScript function to class
17634 * - Add or remove parameter
17635 * - Encapsulate field
17636 * - Make method static
17637 * - Move method to base class
17640 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
17642 * Base kind for source actions: `source`
17644 * Source code actions apply to the entire file.
17646 CodeActionKind.Source = 'source';
17648 * Base kind for an organize imports source action: `source.organizeImports`
17650 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
17652 * Base kind for auto-fix source actions: `source.fixAll`.
17654 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
17655 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
17659 CodeActionKind.SourceFixAll = 'source.fixAll';
17660 })(CodeActionKind || (CodeActionKind = {}));
17662 * The CodeActionContext namespace provides helper functions to work with
17663 * [CodeActionContext](#CodeActionContext) literals.
17665 var CodeActionContext;
17666 (function (CodeActionContext) {
17668 * Creates a new CodeActionContext literal.
17670 function create(diagnostics, only) {
17671 var result = { diagnostics: diagnostics };
17672 if (only !== void 0 && only !== null) {
17673 result.only = only;
17677 CodeActionContext.create = create;
17679 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
17681 function is(value) {
17682 var candidate = value;
17683 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
17685 CodeActionContext.is = is;
17686 })(CodeActionContext || (CodeActionContext = {}));
17688 (function (CodeAction) {
17689 function create(title, commandOrEdit, kind) {
17690 var result = { title: title };
17691 if (Command.is(commandOrEdit)) {
17692 result.command = commandOrEdit;
17695 result.edit = commandOrEdit;
17697 if (kind !== void 0) {
17698 result.kind = kind;
17702 CodeAction.create = create;
17703 function is(value) {
17704 var candidate = value;
17705 return candidate && Is.string(candidate.title) &&
17706 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
17707 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
17708 (candidate.edit !== void 0 || candidate.command !== void 0) &&
17709 (candidate.command === void 0 || Command.is(candidate.command)) &&
17710 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
17711 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
17713 CodeAction.is = is;
17714 })(CodeAction || (CodeAction = {}));
17716 * The CodeLens namespace provides helper functions to work with
17717 * [CodeLens](#CodeLens) literals.
17720 (function (CodeLens) {
17722 * Creates a new CodeLens literal.
17724 function create(range, data) {
17725 var result = { range: range };
17726 if (Is.defined(data)) {
17727 result.data = data;
17731 CodeLens.create = create;
17733 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
17735 function is(value) {
17736 var candidate = value;
17737 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
17740 })(CodeLens || (CodeLens = {}));
17742 * The FormattingOptions namespace provides helper functions to work with
17743 * [FormattingOptions](#FormattingOptions) literals.
17745 var FormattingOptions;
17746 (function (FormattingOptions) {
17748 * Creates a new FormattingOptions literal.
17750 function create(tabSize, insertSpaces) {
17751 return { tabSize: tabSize, insertSpaces: insertSpaces };
17753 FormattingOptions.create = create;
17755 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
17757 function is(value) {
17758 var candidate = value;
17759 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
17761 FormattingOptions.is = is;
17762 })(FormattingOptions || (FormattingOptions = {}));
17764 * The DocumentLink namespace provides helper functions to work with
17765 * [DocumentLink](#DocumentLink) literals.
17768 (function (DocumentLink) {
17770 * Creates a new DocumentLink literal.
17772 function create(range, target, data) {
17773 return { range: range, target: target, data: data };
17775 DocumentLink.create = create;
17777 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
17779 function is(value) {
17780 var candidate = value;
17781 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
17783 DocumentLink.is = is;
17784 })(DocumentLink || (DocumentLink = {}));
17786 * The SelectionRange namespace provides helper function to work with
17787 * SelectionRange literals.
17789 var SelectionRange;
17790 (function (SelectionRange) {
17792 * Creates a new SelectionRange
17793 * @param range the range.
17794 * @param parent an optional parent.
17796 function create(range, parent) {
17797 return { range: range, parent: parent };
17799 SelectionRange.create = create;
17800 function is(value) {
17801 var candidate = value;
17802 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
17804 SelectionRange.is = is;
17805 })(SelectionRange || (SelectionRange = {}));
17806 var EOL = ['\n', '\r\n', '\r'];
17808 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
17811 (function (TextDocument) {
17813 * Creates a new ITextDocument literal from the given uri and content.
17814 * @param uri The document's uri.
17815 * @param languageId The document's language Id.
17816 * @param content The document's content.
17818 function create(uri, languageId, version, content) {
17819 return new FullTextDocument(uri, languageId, version, content);
17821 TextDocument.create = create;
17823 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
17825 function is(value) {
17826 var candidate = value;
17827 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
17828 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
17830 TextDocument.is = is;
17831 function applyEdits(document, edits) {
17832 var text = document.getText();
17833 var sortedEdits = mergeSort(edits, function (a, b) {
17834 var diff = a.range.start.line - b.range.start.line;
17836 return a.range.start.character - b.range.start.character;
17840 var lastModifiedOffset = text.length;
17841 for (var i = sortedEdits.length - 1; i >= 0; i--) {
17842 var e = sortedEdits[i];
17843 var startOffset = document.offsetAt(e.range.start);
17844 var endOffset = document.offsetAt(e.range.end);
17845 if (endOffset <= lastModifiedOffset) {
17846 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
17849 throw new Error('Overlapping edit');
17851 lastModifiedOffset = startOffset;
17855 TextDocument.applyEdits = applyEdits;
17856 function mergeSort(data, compare) {
17857 if (data.length <= 1) {
17861 var p = (data.length / 2) | 0;
17862 var left = data.slice(0, p);
17863 var right = data.slice(p);
17864 mergeSort(left, compare);
17865 mergeSort(right, compare);
17869 while (leftIdx < left.length && rightIdx < right.length) {
17870 var ret = compare(left[leftIdx], right[rightIdx]);
17872 // smaller_equal -> take left to preserve order
17873 data[i++] = left[leftIdx++];
17876 // greater -> take right
17877 data[i++] = right[rightIdx++];
17880 while (leftIdx < left.length) {
17881 data[i++] = left[leftIdx++];
17883 while (rightIdx < right.length) {
17884 data[i++] = right[rightIdx++];
17888 })(TextDocument || (TextDocument = {}));
17889 var FullTextDocument = /** @class */ (function () {
17890 function FullTextDocument(uri, languageId, version, content) {
17892 this._languageId = languageId;
17893 this._version = version;
17894 this._content = content;
17895 this._lineOffsets = undefined;
17897 Object.defineProperty(FullTextDocument.prototype, "uri", {
17904 Object.defineProperty(FullTextDocument.prototype, "languageId", {
17906 return this._languageId;
17911 Object.defineProperty(FullTextDocument.prototype, "version", {
17913 return this._version;
17918 FullTextDocument.prototype.getText = function (range) {
17920 var start = this.offsetAt(range.start);
17921 var end = this.offsetAt(range.end);
17922 return this._content.substring(start, end);
17924 return this._content;
17926 FullTextDocument.prototype.update = function (event, version) {
17927 this._content = event.text;
17928 this._version = version;
17929 this._lineOffsets = undefined;
17931 FullTextDocument.prototype.getLineOffsets = function () {
17932 if (this._lineOffsets === undefined) {
17933 var lineOffsets = [];
17934 var text = this._content;
17935 var isLineStart = true;
17936 for (var i = 0; i < text.length; i++) {
17938 lineOffsets.push(i);
17939 isLineStart = false;
17941 var ch = text.charAt(i);
17942 isLineStart = (ch === '\r' || ch === '\n');
17943 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
17947 if (isLineStart && text.length > 0) {
17948 lineOffsets.push(text.length);
17950 this._lineOffsets = lineOffsets;
17952 return this._lineOffsets;
17954 FullTextDocument.prototype.positionAt = function (offset) {
17955 offset = Math.max(Math.min(offset, this._content.length), 0);
17956 var lineOffsets = this.getLineOffsets();
17957 var low = 0, high = lineOffsets.length;
17959 return Position.create(0, offset);
17961 while (low < high) {
17962 var mid = Math.floor((low + high) / 2);
17963 if (lineOffsets[mid] > offset) {
17970 // low is the least x for which the line offset is larger than the current offset
17971 // or array.length if no line offset is larger than the current offset
17972 var line = low - 1;
17973 return Position.create(line, offset - lineOffsets[line]);
17975 FullTextDocument.prototype.offsetAt = function (position) {
17976 var lineOffsets = this.getLineOffsets();
17977 if (position.line >= lineOffsets.length) {
17978 return this._content.length;
17980 else if (position.line < 0) {
17983 var lineOffset = lineOffsets[position.line];
17984 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
17985 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
17987 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
17989 return this.getLineOffsets().length;
17994 return FullTextDocument;
17998 var toString = Object.prototype.toString;
17999 function defined(value) {
18000 return typeof value !== 'undefined';
18002 Is.defined = defined;
18003 function undefined(value) {
18004 return typeof value === 'undefined';
18006 Is.undefined = undefined;
18007 function boolean(value) {
18008 return value === true || value === false;
18010 Is.boolean = boolean;
18011 function string(value) {
18012 return toString.call(value) === '[object String]';
18014 Is.string = string;
18015 function number(value) {
18016 return toString.call(value) === '[object Number]';
18018 Is.number = number;
18019 function func(value) {
18020 return toString.call(value) === '[object Function]';
18023 function objectLiteral(value) {
18024 // Strictly speaking class instances pass this check as well. Since the LSP
18025 // doesn't use classes we ignore this for now. If we do we need to add something
18026 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
18027 return value !== null && typeof value === 'object';
18029 Is.objectLiteral = objectLiteral;
18030 function typedArray(value, check) {
18031 return Array.isArray(value) && value.every(check);
18033 Is.typedArray = typedArray;
18034 })(Is || (Is = {}));
18039 /***/ (function(module, __webpack_exports__, __webpack_require__) {
18042 __webpack_require__.r(__webpack_exports__);
18043 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
18044 /* --------------------------------------------------------------------------------------------
18045 * Copyright (c) Microsoft Corporation. All rights reserved.
18046 * Licensed under the MIT License. See License.txt in the project root for license information.
18047 * ------------------------------------------------------------------------------------------ */
18049 var FullTextDocument = /** @class */ (function () {
18050 function FullTextDocument(uri, languageId, version, content) {
18052 this._languageId = languageId;
18053 this._version = version;
18054 this._content = content;
18055 this._lineOffsets = undefined;
18057 Object.defineProperty(FullTextDocument.prototype, "uri", {
18064 Object.defineProperty(FullTextDocument.prototype, "languageId", {
18066 return this._languageId;
18071 Object.defineProperty(FullTextDocument.prototype, "version", {
18073 return this._version;
18078 FullTextDocument.prototype.getText = function (range) {
18080 var start = this.offsetAt(range.start);
18081 var end = this.offsetAt(range.end);
18082 return this._content.substring(start, end);
18084 return this._content;
18086 FullTextDocument.prototype.update = function (changes, version) {
18087 for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {
18088 var change = changes_1[_i];
18089 if (FullTextDocument.isIncremental(change)) {
18090 // makes sure start is before end
18091 var range = getWellformedRange(change.range);
18093 var startOffset = this.offsetAt(range.start);
18094 var endOffset = this.offsetAt(range.end);
18095 this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
18096 // update the offsets
18097 var startLine = Math.max(range.start.line, 0);
18098 var endLine = Math.max(range.end.line, 0);
18099 var lineOffsets = this._lineOffsets;
18100 var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
18101 if (endLine - startLine === addedLineOffsets.length) {
18102 for (var i = 0, len = addedLineOffsets.length; i < len; i++) {
18103 lineOffsets[i + startLine + 1] = addedLineOffsets[i];
18107 if (addedLineOffsets.length < 10000) {
18108 lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));
18110 else { // avoid too many arguments for splice
18111 this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
18114 var diff = change.text.length - (endOffset - startOffset);
18116 for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
18117 lineOffsets[i] = lineOffsets[i] + diff;
18121 else if (FullTextDocument.isFull(change)) {
18122 this._content = change.text;
18123 this._lineOffsets = undefined;
18126 throw new Error('Unknown change event received');
18129 this._version = version;
18131 FullTextDocument.prototype.getLineOffsets = function () {
18132 if (this._lineOffsets === undefined) {
18133 this._lineOffsets = computeLineOffsets(this._content, true);
18135 return this._lineOffsets;
18137 FullTextDocument.prototype.positionAt = function (offset) {
18138 offset = Math.max(Math.min(offset, this._content.length), 0);
18139 var lineOffsets = this.getLineOffsets();
18140 var low = 0, high = lineOffsets.length;
18142 return { line: 0, character: offset };
18144 while (low < high) {
18145 var mid = Math.floor((low + high) / 2);
18146 if (lineOffsets[mid] > offset) {
18153 // low is the least x for which the line offset is larger than the current offset
18154 // or array.length if no line offset is larger than the current offset
18155 var line = low - 1;
18156 return { line: line, character: offset - lineOffsets[line] };
18158 FullTextDocument.prototype.offsetAt = function (position) {
18159 var lineOffsets = this.getLineOffsets();
18160 if (position.line >= lineOffsets.length) {
18161 return this._content.length;
18163 else if (position.line < 0) {
18166 var lineOffset = lineOffsets[position.line];
18167 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
18168 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
18170 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
18172 return this.getLineOffsets().length;
18177 FullTextDocument.isIncremental = function (event) {
18178 var candidate = event;
18179 return candidate !== undefined && candidate !== null &&
18180 typeof candidate.text === 'string' && candidate.range !== undefined &&
18181 (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
18183 FullTextDocument.isFull = function (event) {
18184 var candidate = event;
18185 return candidate !== undefined && candidate !== null &&
18186 typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
18188 return FullTextDocument;
18191 (function (TextDocument) {
18193 * Creates a new text document.
18195 * @param uri The document's uri.
18196 * @param languageId The document's language Id.
18197 * @param version The document's initial version number.
18198 * @param content The document's content.
18200 function create(uri, languageId, version, content) {
18201 return new FullTextDocument(uri, languageId, version, content);
18203 TextDocument.create = create;
18205 * Updates a TextDocument by modifing its content.
18207 * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
18208 * @param changes the changes to apply to the document.
18209 * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
18212 function update(document, changes, version) {
18213 if (document instanceof FullTextDocument) {
18214 document.update(changes, version);
18218 throw new Error('TextDocument.update: document must be created by TextDocument.create');
18221 TextDocument.update = update;
18222 function applyEdits(document, edits) {
18223 var text = document.getText();
18224 var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {
18225 var diff = a.range.start.line - b.range.start.line;
18227 return a.range.start.character - b.range.start.character;
18231 var lastModifiedOffset = 0;
18233 for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {
18234 var e = sortedEdits_1[_i];
18235 var startOffset = document.offsetAt(e.range.start);
18236 if (startOffset < lastModifiedOffset) {
18237 throw new Error('Overlapping edit');
18239 else if (startOffset > lastModifiedOffset) {
18240 spans.push(text.substring(lastModifiedOffset, startOffset));
18242 if (e.newText.length) {
18243 spans.push(e.newText);
18245 lastModifiedOffset = document.offsetAt(e.range.end);
18247 spans.push(text.substr(lastModifiedOffset));
18248 return spans.join('');
18250 TextDocument.applyEdits = applyEdits;
18251 })(TextDocument || (TextDocument = {}));
18252 function mergeSort(data, compare) {
18253 if (data.length <= 1) {
18257 var p = (data.length / 2) | 0;
18258 var left = data.slice(0, p);
18259 var right = data.slice(p);
18260 mergeSort(left, compare);
18261 mergeSort(right, compare);
18265 while (leftIdx < left.length && rightIdx < right.length) {
18266 var ret = compare(left[leftIdx], right[rightIdx]);
18268 // smaller_equal -> take left to preserve order
18269 data[i++] = left[leftIdx++];
18272 // greater -> take right
18273 data[i++] = right[rightIdx++];
18276 while (leftIdx < left.length) {
18277 data[i++] = left[leftIdx++];
18279 while (rightIdx < right.length) {
18280 data[i++] = right[rightIdx++];
18284 function computeLineOffsets(text, isAtLineStart, textOffset) {
18285 if (textOffset === void 0) { textOffset = 0; }
18286 var result = isAtLineStart ? [textOffset] : [];
18287 for (var i = 0; i < text.length; i++) {
18288 var ch = text.charCodeAt(i);
18289 if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
18290 if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
18293 result.push(textOffset + i + 1);
18298 function getWellformedRange(range) {
18299 var start = range.start;
18300 var end = range.end;
18301 if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
18302 return { start: end, end: start };
18306 function getWellformedEdit(textEdit) {
18307 var range = getWellformedRange(textEdit.range);
18308 if (range !== textEdit.range) {
18309 return { newText: textEdit.newText, range: range };
18317 /***/ (function(module, __webpack_exports__, __webpack_require__) {
18320 __webpack_require__.r(__webpack_exports__);
18321 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathCompletionParticipant", function() { return PathCompletionParticipant; });
18322 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103);
18323 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92);
18324 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(107);
18325 /*---------------------------------------------------------------------------------------------
18326 * Copyright (c) Microsoft Corporation. All rights reserved.
18327 * Licensed under the MIT License. See License.txt in the project root for license information.
18328 *--------------------------------------------------------------------------------------------*/
18329 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
18330 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18331 return new (P || (P = Promise))(function (resolve, reject) {
18332 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18333 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18334 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18335 step((generator = generator.apply(thisArg, _arguments || [])).next());
18338 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
18339 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
18340 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
18341 function verb(n) { return function (v) { return step([n, v]); }; }
18342 function step(op) {
18343 if (f) throw new TypeError("Generator is already executing.");
18345 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;
18346 if (y = 0, t) op = [op[0] & 2, t.value];
18348 case 0: case 1: t = op; break;
18349 case 4: _.label++; return { value: op[1], done: false };
18350 case 5: _.label++; y = op[1]; op = [0]; continue;
18351 case 7: op = _.ops.pop(); _.trys.pop(); continue;
18353 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
18354 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
18355 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
18356 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
18357 if (t[2]) _.ops.pop();
18358 _.trys.pop(); continue;
18360 op = body.call(thisArg, _);
18361 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
18362 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
18368 var PathCompletionParticipant = /** @class */ (function () {
18369 function PathCompletionParticipant(readDirectory) {
18370 this.readDirectory = readDirectory;
18371 this.literalCompletions = [];
18372 this.importCompletions = [];
18374 PathCompletionParticipant.prototype.onCssURILiteralValue = function (context) {
18375 this.literalCompletions.push(context);
18377 PathCompletionParticipant.prototype.onCssImportPath = function (context) {
18378 this.importCompletions.push(context);
18380 PathCompletionParticipant.prototype.computeCompletions = function (document, documentContext) {
18381 return __awaiter(this, void 0, void 0, function () {
18382 var result, _i, _a, literalCompletion, uriValue, fullValue, items, _b, items_1, item, _c, _d, importCompletion, pathValue, fullValue, suggestions, _e, suggestions_1, item;
18383 return __generator(this, function (_f) {
18384 switch (_f.label) {
18386 result = { items: [], isIncomplete: false };
18387 _i = 0, _a = this.literalCompletions;
18390 if (!(_i < _a.length)) return [3 /*break*/, 5];
18391 literalCompletion = _a[_i];
18392 uriValue = literalCompletion.uriValue;
18393 fullValue = stripQuotes(uriValue);
18394 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 2];
18395 result.isIncomplete = true;
18396 return [3 /*break*/, 4];
18397 case 2: return [4 /*yield*/, this.providePathSuggestions(uriValue, literalCompletion.position, literalCompletion.range, document, documentContext)];
18400 for (_b = 0, items_1 = items; _b < items_1.length; _b++) {
18401 item = items_1[_b];
18402 result.items.push(item);
18407 return [3 /*break*/, 1];
18409 _c = 0, _d = this.importCompletions;
18412 if (!(_c < _d.length)) return [3 /*break*/, 10];
18413 importCompletion = _d[_c];
18414 pathValue = importCompletion.pathValue;
18415 fullValue = stripQuotes(pathValue);
18416 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 7];
18417 result.isIncomplete = true;
18418 return [3 /*break*/, 9];
18419 case 7: return [4 /*yield*/, this.providePathSuggestions(pathValue, importCompletion.position, importCompletion.range, document, documentContext)];
18421 suggestions = _f.sent();
18422 if (document.languageId === 'scss') {
18423 suggestions.forEach(function (s) {
18424 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["startsWith"])(s.label, '_') && Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["endsWith"])(s.label, '.scss')) {
18426 s.textEdit.newText = s.label.slice(1, -5);
18429 s.label = s.label.slice(1, -5);
18434 for (_e = 0, suggestions_1 = suggestions; _e < suggestions_1.length; _e++) {
18435 item = suggestions_1[_e];
18436 result.items.push(item);
18441 return [3 /*break*/, 6];
18442 case 10: return [2 /*return*/, result];
18447 PathCompletionParticipant.prototype.providePathSuggestions = function (pathValue, position, range, document, documentContext) {
18448 return __awaiter(this, void 0, void 0, function () {
18449 var fullValue, isValueQuoted, valueBeforeCursor, currentDocUri, fullValueRange, replaceRange, valueBeforeLastSlash, parentDir, result, infos, _i, infos_1, _a, name, type, e_1;
18450 return __generator(this, function (_b) {
18451 switch (_b.label) {
18453 fullValue = stripQuotes(pathValue);
18454 isValueQuoted = Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["startsWith"])(pathValue, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["startsWith"])(pathValue, "\"");
18455 valueBeforeCursor = isValueQuoted
18456 ? fullValue.slice(0, position.character - (range.start.character + 1))
18457 : fullValue.slice(0, position.character - range.start.character);
18458 currentDocUri = document.uri;
18459 fullValueRange = isValueQuoted ? shiftRange(range, 1, -1) : range;
18460 replaceRange = pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange);
18461 valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
18462 parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', currentDocUri);
18463 if (!parentDir) return [3 /*break*/, 4];
18466 _b.trys.push([1, 3, , 4]);
18468 return [4 /*yield*/, this.readDirectory(parentDir)];
18471 for (_i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
18472 _a = infos_1[_i], name = _a[0], type = _a[1];
18473 // Exclude paths that start with `.`
18474 if (name.charCodeAt(0) !== CharCode_dot && (type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["FileType"].Directory || Object(_utils_resources__WEBPACK_IMPORTED_MODULE_2__["joinPath"])(parentDir, name) !== currentDocUri)) {
18475 result.push(createCompletionItem(name, type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["FileType"].Directory, replaceRange));
18478 return [2 /*return*/, result];
18481 return [3 /*break*/, 4];
18482 case 4: return [2 /*return*/, []];
18487 return PathCompletionParticipant;
18490 var CharCode_dot = '.'.charCodeAt(0);
18491 function stripQuotes(fullValue) {
18492 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["startsWith"])(fullValue, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["startsWith"])(fullValue, "\"")) {
18493 return fullValue.slice(1, -1);
18499 function pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange) {
18501 var lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
18502 if (lastIndexOfSlash === -1) {
18503 replaceRange = fullValueRange;
18506 // For cases where cursor is in the middle of attribute value, like <script src="./s|rc/test.js">
18507 // Find the last slash before cursor, and calculate the start of replace range from there
18508 var valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
18509 var startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length);
18510 // If whitespace exists, replace until it
18511 var whitespaceIndex = valueAfterLastSlash.indexOf(' ');
18512 var endPos = void 0;
18513 if (whitespaceIndex !== -1) {
18514 endPos = shiftPosition(startPos, whitespaceIndex);
18517 endPos = fullValueRange.end;
18519 replaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(startPos, endPos);
18521 return replaceRange;
18523 function createCompletionItem(name, isDir, replaceRange) {
18527 label: escapePath(name),
18528 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Folder,
18529 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(replaceRange, escapePath(name)),
18532 command: 'editor.action.triggerSuggest'
18538 label: escapePath(name),
18539 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].File,
18540 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(replaceRange, escapePath(name))
18544 // Escape https://www.w3.org/TR/CSS1/#url
18545 function escapePath(p) {
18546 return p.replace(/(\s|\(|\)|,|"|')/g, '\\$1');
18548 function shiftPosition(pos, offset) {
18549 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Position"].create(pos.line, pos.character + offset);
18551 function shiftRange(range, startOffset, endOffset) {
18552 var start = shiftPosition(range.start, startOffset);
18553 var end = shiftPosition(range.end, endOffset);
18554 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(start, end);
18560 /***/ (function(module, __webpack_exports__, __webpack_require__) {
18563 __webpack_require__.r(__webpack_exports__);
18564 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAbsolutePath", function() { return isAbsolutePath; });
18565 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dirname", function() { return dirname; });
18566 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basename", function() { return basename; });
18567 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extname", function() { return extname; });
18568 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolvePath", function() { return resolvePath; });
18569 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizePath", function() { return normalizePath; });
18570 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "joinPath", function() { return joinPath; });
18571 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
18572 /*---------------------------------------------------------------------------------------------
18573 * Copyright (c) Microsoft Corporation. All rights reserved.
18574 * Licensed under the MIT License. See License.txt in the project root for license information.
18575 *--------------------------------------------------------------------------------------------*/
18577 var Slash = '/'.charCodeAt(0);
18578 var Dot = '.'.charCodeAt(0);
18579 function isAbsolutePath(path) {
18580 return path.charCodeAt(0) === Slash;
18582 function dirname(uri) {
18583 var lastIndexOfSlash = uri.lastIndexOf('/');
18584 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
18586 function basename(uri) {
18587 var lastIndexOfSlash = uri.lastIndexOf('/');
18588 return uri.substr(lastIndexOfSlash + 1);
18590 function extname(uri) {
18591 for (var i = uri.length - 1; i >= 0; i--) {
18592 var ch = uri.charCodeAt(i);
18594 if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
18595 return uri.substr(i);
18601 else if (ch === Slash) {
18607 function resolvePath(uriString, path) {
18608 if (isAbsolutePath(path)) {
18609 var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(uriString);
18610 var parts = path.split('/');
18611 return uri.with({ path: normalizePath(parts) }).toString();
18613 return joinPath(uriString, path);
18615 function normalizePath(parts) {
18617 for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
18618 var part = parts_1[_i];
18619 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
18622 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
18626 newParts.push(part);
18629 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
18632 var res = newParts.join('/');
18633 if (parts[0].length === 0) {
18638 function joinPath(uriString) {
18640 for (var _i = 1; _i < arguments.length; _i++) {
18641 paths[_i - 1] = arguments[_i];
18643 var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(uriString);
18644 var parts = uri.path.split('/');
18645 for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) {
18646 var path = paths_1[_a];
18647 parts.push.apply(parts, path.split('/'));
18649 return uri.with({ path: normalizePath(parts) }).toString();
18655 /***/ (function(module, __webpack_exports__, __webpack_require__) {
18658 __webpack_require__.r(__webpack_exports__);
18659 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSHover", function() { return CSSHover; });
18660 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
18661 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95);
18662 /* harmony import */ var _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109);
18663 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92);
18664 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(103);
18665 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99);
18666 /*---------------------------------------------------------------------------------------------
18667 * Copyright (c) Microsoft Corporation. All rights reserved.
18668 * Licensed under the MIT License. See License.txt in the project root for license information.
18669 *--------------------------------------------------------------------------------------------*/
18677 var CSSHover = /** @class */ (function () {
18678 function CSSHover(clientCapabilities, cssDataManager) {
18679 this.clientCapabilities = clientCapabilities;
18680 this.cssDataManager = cssDataManager;
18681 this.selectorPrinting = new _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__["SelectorPrinting"](cssDataManager);
18683 CSSHover.prototype.doHover = function (document, position, stylesheet) {
18684 function getRange(node) {
18685 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(document.positionAt(node.offset), document.positionAt(node.end));
18687 var offset = document.offsetAt(position);
18688 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](stylesheet, offset);
18690 * nodepath is top-down
18691 * Build up the hover by appending inner node's information
18694 for (var i = 0; i < nodepath.length; i++) {
18695 var node = nodepath[i];
18696 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Selector"]) {
18698 contents: this.selectorPrinting.selectorToMarkedString(node),
18699 range: getRange(node)
18703 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
18705 * Some sass specific at rules such as `@at-root` are parsed as `SimpleSelector`
18707 if (!Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"])(node.getText(), '@')) {
18709 contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
18710 range: getRange(node)
18715 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
18716 var propertyName = node.getFullPropertyName();
18717 var entry = this.cssDataManager.getProperty(propertyName);
18719 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
18722 contents: contents,
18723 range: getRange(node)
18732 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["UnknownAtRule"]) {
18733 var atRuleName = node.getText();
18734 var entry = this.cssDataManager.getAtDirective(atRuleName);
18736 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
18739 contents: contents,
18740 range: getRange(node)
18749 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Node"] && node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector) {
18750 var selectorName = node.getText();
18751 var entry = selectorName.slice(0, 2) === '::'
18752 ? this.cssDataManager.getPseudoElement(selectorName)
18753 : this.cssDataManager.getPseudoClass(selectorName);
18755 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
18758 contents: contents,
18759 range: getRange(node)
18770 hover.contents = this.convertContents(hover.contents);
18774 CSSHover.prototype.convertContents = function (contents) {
18775 if (!this.doesSupportMarkdown()) {
18776 if (typeof contents === 'string') {
18780 else if ('kind' in contents) {
18783 value: contents.value
18787 else if (Array.isArray(contents)) {
18788 return contents.map(function (c) {
18789 return typeof c === 'string' ? c : c.value;
18794 return contents.value;
18799 CSSHover.prototype.doesSupportMarkdown = function () {
18800 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(this.supportsMarkdown)) {
18801 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(this.clientCapabilities)) {
18802 this.supportsMarkdown = true;
18803 return this.supportsMarkdown;
18805 var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
18806 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["MarkupKind"].Markdown) !== -1;
18808 return this.supportsMarkdown;
18817 /***/ (function(module, __webpack_exports__, __webpack_require__) {
18820 __webpack_require__.r(__webpack_exports__);
18821 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
18822 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RootElement", function() { return RootElement; });
18823 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelElement", function() { return LabelElement; });
18824 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toElement", function() { return toElement; });
18825 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectorPrinting", function() { return SelectorPrinting; });
18826 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectorToElement", function() { return selectorToElement; });
18827 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
18828 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
18829 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
18830 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_2__);
18831 /*---------------------------------------------------------------------------------------------
18832 * Copyright (c) Microsoft Corporation. All rights reserved.
18833 * Licensed under the MIT License. See License.txt in the project root for license information.
18834 *--------------------------------------------------------------------------------------------*/
18836 var __extends = (undefined && undefined.__extends) || (function () {
18837 var extendStatics = function (d, b) {
18838 extendStatics = Object.setPrototypeOf ||
18839 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18840 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
18841 return extendStatics(d, b);
18843 return function (d, b) {
18844 extendStatics(d, b);
18845 function __() { this.constructor = d; }
18846 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18852 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__["loadMessageBundle"]();
18853 var Element = /** @class */ (function () {
18854 function Element() {
18855 this.parent = null;
18856 this.children = null;
18857 this.attributes = null;
18859 Element.prototype.findAttribute = function (name) {
18860 if (this.attributes) {
18861 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18862 var attribute = _a[_i];
18863 if (attribute.name === name) {
18864 return attribute.value;
18870 Element.prototype.addChild = function (child) {
18871 if (child instanceof Element) {
18872 child.parent = this;
18874 if (!this.children) {
18875 this.children = [];
18877 this.children.push(child);
18879 Element.prototype.append = function (text) {
18880 if (this.attributes) {
18881 var last = this.attributes[this.attributes.length - 1];
18882 last.value = last.value + text;
18885 Element.prototype.prepend = function (text) {
18886 if (this.attributes) {
18887 var first = this.attributes[0];
18888 first.value = text + first.value;
18891 Element.prototype.findRoot = function () {
18893 while (curr.parent && !(curr.parent instanceof RootElement)) {
18894 curr = curr.parent;
18898 Element.prototype.removeChild = function (child) {
18899 if (this.children) {
18900 var index = this.children.indexOf(child);
18901 if (index !== -1) {
18902 this.children.splice(index, 1);
18908 Element.prototype.addAttr = function (name, value) {
18909 if (!this.attributes) {
18910 this.attributes = [];
18912 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18913 var attribute = _a[_i];
18914 if (attribute.name === name) {
18915 attribute.value += ' ' + value;
18919 this.attributes.push({ name: name, value: value });
18921 Element.prototype.clone = function (cloneChildren) {
18922 if (cloneChildren === void 0) { cloneChildren = true; }
18923 var elem = new Element();
18924 if (this.attributes) {
18925 elem.attributes = [];
18926 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18927 var attribute = _a[_i];
18928 elem.addAttr(attribute.name, attribute.value);
18931 if (cloneChildren && this.children) {
18932 elem.children = [];
18933 for (var index = 0; index < this.children.length; index++) {
18934 elem.addChild(this.children[index].clone());
18939 Element.prototype.cloneWithParent = function () {
18940 var clone = this.clone(false);
18941 if (this.parent && !(this.parent instanceof RootElement)) {
18942 var parentClone = this.parent.cloneWithParent();
18943 parentClone.addChild(clone);
18950 var RootElement = /** @class */ (function (_super) {
18951 __extends(RootElement, _super);
18952 function RootElement() {
18953 return _super !== null && _super.apply(this, arguments) || this;
18955 return RootElement;
18958 var LabelElement = /** @class */ (function (_super) {
18959 __extends(LabelElement, _super);
18960 function LabelElement(label) {
18961 var _this = _super.call(this) || this;
18962 _this.addAttr('name', label);
18965 return LabelElement;
18968 var MarkedStringPrinter = /** @class */ (function () {
18969 function MarkedStringPrinter(quote) {
18970 this.quote = quote;
18974 MarkedStringPrinter.prototype.print = function (element) {
18976 if (element instanceof RootElement) {
18977 if (element.children) {
18978 this.doPrint(element.children, 0);
18982 this.doPrint([element], 0);
18984 var value = this.result.join('\n');
18985 return [{ language: 'html', value: value }];
18987 MarkedStringPrinter.prototype.doPrint = function (elements, indent) {
18988 for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
18989 var element = elements_1[_i];
18990 this.doPrintElement(element, indent);
18991 if (element.children) {
18992 this.doPrint(element.children, indent + 1);
18996 MarkedStringPrinter.prototype.writeLine = function (level, content) {
18997 var indent = new Array(level + 1).join(' ');
18998 this.result.push(indent + content);
19000 MarkedStringPrinter.prototype.doPrintElement = function (element, indent) {
19001 var name = element.findAttribute('name');
19002 // special case: a simple label
19003 if (element instanceof LabelElement || name === '\u2026') {
19004 this.writeLine(indent, name);
19008 var content = ['<'];
19011 content.push(name);
19014 content.push('element');
19017 if (element.attributes) {
19018 for (var _i = 0, _a = element.attributes; _i < _a.length; _i++) {
19020 if (attr.name !== 'name') {
19022 content.push(attr.name);
19023 var value = attr.value;
19026 content.push(quotes.ensure(value, this.quote));
19032 this.writeLine(indent, content.join(''));
19034 return MarkedStringPrinter;
19037 (function (quotes) {
19038 function ensure(value, which) {
19039 return which + remove(value) + which;
19041 quotes.ensure = ensure;
19042 function remove(value) {
19043 var match = value.match(/^['"](.*)["']$/);
19049 quotes.remove = remove;
19050 })(quotes || (quotes = {}));
19051 var Specificity = /** @class */ (function () {
19052 function Specificity() {
19053 /** Count of identifiers (e.g., `#app`) */
19055 /** Count of attributes (`[type="number"]`), classes (`.container-fluid`), and pseudo-classes (`:hover`) */
19057 /** Count of tag names (`div`), and pseudo-elements (`::before`) */
19060 return Specificity;
19062 function toElement(node, parentElement) {
19063 var result = new Element();
19064 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
19065 var child = _a[_i];
19066 switch (child.type) {
19067 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinator:
19068 if (parentElement) {
19069 var segments = child.getText().split('&');
19070 if (segments.length === 1) {
19071 // should not happen
19072 result.addAttr('name', segments[0]);
19075 result = parentElement.cloneWithParent();
19077 var root = result.findRoot();
19078 root.prepend(segments[0]);
19080 for (var i = 1; i < segments.length; i++) {
19082 var clone = parentElement.cloneWithParent();
19083 result.addChild(clone.findRoot());
19086 result.append(segments[i]);
19090 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorPlaceholder:
19091 if (child.matches('@at-root')) {
19095 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ElementNameSelector:
19096 var text = child.getText();
19097 result.addAttr('name', text === '*' ? 'element' : unescape(text));
19099 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ClassSelector:
19100 result.addAttr('class', unescape(child.getText().substring(1)));
19102 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].IdentifierSelector:
19103 result.addAttr('id', unescape(child.getText().substring(1)));
19105 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
19106 result.addAttr('class', child.getName());
19108 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector:
19109 result.addAttr(unescape(child.getText()), '');
19111 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].AttributeSelector:
19112 var selector = child;
19113 var identifier = selector.getIdentifier();
19115 var expression = selector.getValue();
19116 var operator = selector.getOperator();
19117 var value = void 0;
19118 if (expression && operator) {
19119 switch (unescape(operator.getText())) {
19121 // excatly or followed by -words
19122 value = quotes.remove(unescape(expression.getText())) + "-\u2026";
19126 value = quotes.remove(unescape(expression.getText())) + "\u2026";
19130 value = "\u2026" + quotes.remove(unescape(expression.getText()));
19133 // one of a list of words
19134 value = " \u2026 " + quotes.remove(unescape(expression.getText())) + " \u2026 ";
19138 value = "\u2026" + quotes.remove(unescape(expression.getText())) + "\u2026";
19141 value = quotes.remove(unescape(expression.getText()));
19145 result.addAttr(unescape(identifier.getText()), value);
19152 function unescape(content) {
19153 var scanner = new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__["Scanner"]();
19154 scanner.setSource(content);
19155 var token = scanner.scanUnquotedString();
19161 var SelectorPrinting = /** @class */ (function () {
19162 function SelectorPrinting(cssDataManager) {
19163 this.cssDataManager = cssDataManager;
19165 SelectorPrinting.prototype.selectorToMarkedString = function (node) {
19166 var root = selectorToElement(node);
19168 var markedStrings = new MarkedStringPrinter('"').print(root);
19169 markedStrings.push(this.selectorToSpecificityMarkedString(node));
19170 return markedStrings;
19176 SelectorPrinting.prototype.simpleSelectorToMarkedString = function (node) {
19177 var element = toElement(node);
19178 var markedStrings = new MarkedStringPrinter('"').print(element);
19179 markedStrings.push(this.selectorToSpecificityMarkedString(node));
19180 return markedStrings;
19182 SelectorPrinting.prototype.isPseudoElementIdentifier = function (text) {
19183 var match = text.match(/^::?([\w-]+)/);
19187 return !!this.cssDataManager.getPseudoElement("::" + match[1]);
19189 SelectorPrinting.prototype.selectorToSpecificityMarkedString = function (node) {
19191 //https://www.w3.org/TR/selectors-3/#specificity
19192 var calculateScore = function (node) {
19193 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
19194 var element = _a[_i];
19195 switch (element.type) {
19196 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].IdentifierSelector:
19199 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ClassSelector:
19200 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].AttributeSelector:
19201 specificity.attr++;
19203 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ElementNameSelector:
19204 //ignore universal selector
19205 if (element.matches("*")) {
19210 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector:
19211 var text = element.getText();
19212 if (_this.isPseudoElementIdentifier(text)) {
19213 specificity.tag++; // pseudo element
19216 //ignore psuedo class NOT
19217 if (text.match(/^:not/i)) {
19220 specificity.attr++; //pseudo class
19224 if (element.getChildren().length > 0) {
19225 calculateScore(element);
19229 var specificity = new Specificity();
19230 calculateScore(node);
19231 return localize('specificity', "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
19233 return SelectorPrinting;
19236 var SelectorElementBuilder = /** @class */ (function () {
19237 function SelectorElementBuilder(element) {
19239 this.element = element;
19241 SelectorElementBuilder.prototype.processSelector = function (selector) {
19242 var parentElement = null;
19243 if (!(this.element instanceof RootElement)) {
19244 if (selector.getChildren().some(function (c) { return c.hasChildren() && c.getChild(0).type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinator; })) {
19245 var curr = this.element.findRoot();
19246 if (curr.parent instanceof RootElement) {
19247 parentElement = this.element;
19248 this.element = curr.parent;
19249 this.element.removeChild(curr);
19254 for (var _i = 0, _a = selector.getChildren(); _i < _a.length; _i++) {
19255 var selectorChild = _a[_i];
19256 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
19257 if (this.prev instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
19258 var labelElement = new LabelElement('\u2026');
19259 this.element.addChild(labelElement);
19260 this.element = labelElement;
19262 else if (this.prev && (this.prev.matches('+') || this.prev.matches('~')) && this.element.parent) {
19263 this.element = this.element.parent;
19265 if (this.prev && this.prev.matches('~')) {
19266 this.element.addChild(toElement(selectorChild));
19267 this.element.addChild(new LabelElement('\u22EE'));
19269 var thisElement = toElement(selectorChild, parentElement);
19270 var root = thisElement.findRoot();
19271 this.element.addChild(root);
19272 this.element = thisElement;
19274 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"] ||
19275 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorParent ||
19276 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorShadowPiercingDescendant ||
19277 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorSibling ||
19278 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorAllSiblings) {
19279 this.prev = selectorChild;
19283 return SelectorElementBuilder;
19285 function isNewSelectorContext(node) {
19286 switch (node.type) {
19287 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
19288 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Stylesheet:
19293 function selectorToElement(node) {
19294 if (node.matches('@at-root')) {
19297 var root = new RootElement();
19298 var parentRuleSets = [];
19299 var ruleSet = node.getParent();
19300 if (ruleSet instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
19301 var parent = ruleSet.getParent(); // parent of the selector's ruleset
19302 while (parent && !isNewSelectorContext(parent)) {
19303 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
19304 if (parent.getSelectors().matches('@at-root')) {
19307 parentRuleSets.push(parent);
19309 parent = parent.getParent();
19312 var builder = new SelectorElementBuilder(root);
19313 for (var i = parentRuleSets.length - 1; i >= 0; i--) {
19314 var selector = parentRuleSets[i].getSelectors().getChild(0);
19316 builder.processSelector(selector);
19319 builder.processSelector(node);
19326 /***/ (function(module, __webpack_exports__, __webpack_require__) {
19329 __webpack_require__.r(__webpack_exports__);
19330 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSNavigation", function() { return CSSNavigation; });
19331 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103);
19332 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
19333 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
19334 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91);
19335 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(101);
19336 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95);
19337 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(92);
19338 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(107);
19339 /*---------------------------------------------------------------------------------------------
19340 * Copyright (c) Microsoft Corporation. All rights reserved.
19341 * Licensed under the MIT License. See License.txt in the project root for license information.
19342 *--------------------------------------------------------------------------------------------*/
19344 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
19345 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19346 return new (P || (P = Promise))(function (resolve, reject) {
19347 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19348 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19349 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19350 step((generator = generator.apply(thisArg, _arguments || [])).next());
19353 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
19354 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
19355 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
19356 function verb(n) { return function (v) { return step([n, v]); }; }
19357 function step(op) {
19358 if (f) throw new TypeError("Generator is already executing.");
19360 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;
19361 if (y = 0, t) op = [op[0] & 2, t.value];
19363 case 0: case 1: t = op; break;
19364 case 4: _.label++; return { value: op[1], done: false };
19365 case 5: _.label++; y = op[1]; op = [0]; continue;
19366 case 7: op = _.ops.pop(); _.trys.pop(); continue;
19368 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
19369 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19370 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
19371 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
19372 if (t[2]) _.ops.pop();
19373 _.trys.pop(); continue;
19375 op = body.call(thisArg, _);
19376 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
19377 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
19387 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
19388 var CSSNavigation = /** @class */ (function () {
19389 function CSSNavigation(fileSystemProvider) {
19390 this.fileSystemProvider = fileSystemProvider;
19392 CSSNavigation.prototype.findDefinition = function (document, position, stylesheet) {
19393 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__["Symbols"](stylesheet);
19394 var offset = document.offsetAt(position);
19395 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["getNodeAtOffset"](stylesheet, offset);
19399 var symbol = symbols.findSymbolFromNode(node);
19405 range: getRange(symbol.node, document)
19408 CSSNavigation.prototype.findReferences = function (document, position, stylesheet) {
19409 var highlights = this.findDocumentHighlights(document, position, stylesheet);
19410 return highlights.map(function (h) {
19417 CSSNavigation.prototype.findDocumentHighlights = function (document, position, stylesheet) {
19419 var offset = document.offsetAt(position);
19420 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["getNodeAtOffset"](stylesheet, offset);
19421 if (!node || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Stylesheet || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Declarations) {
19424 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Identifier && node.parent && node.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].ClassSelector) {
19425 node = node.parent;
19427 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__["Symbols"](stylesheet);
19428 var symbol = symbols.findSymbolFromNode(node);
19429 var name = node.getText();
19430 stylesheet.accept(function (candidate) {
19432 if (symbols.matchesSymbol(candidate, symbol)) {
19434 kind: getHighlightKind(candidate),
19435 range: getRange(candidate, document)
19440 else if (node && node.type === candidate.type && candidate.matches(name)) {
19441 // Same node type and data
19443 kind: getHighlightKind(candidate),
19444 range: getRange(candidate, document)
19451 CSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
19452 return node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Import;
19454 CSSNavigation.prototype.findDocumentLinks = function (document, stylesheet, documentContext) {
19455 var links = this.findUnresolvedLinks(document, stylesheet);
19456 for (var i = 0; i < links.length; i++) {
19457 var target = links[i].target;
19458 if (target && !(/^\w+:\/\//g.test(target))) {
19459 var resolved = documentContext.resolveReference(target, document.uri);
19461 links[i].target = resolved;
19467 CSSNavigation.prototype.findDocumentLinks2 = function (document, stylesheet, documentContext) {
19468 return __awaiter(this, void 0, void 0, function () {
19469 var links, resolvedLinks, _i, links_1, link, target, resolvedTarget;
19470 return __generator(this, function (_a) {
19471 switch (_a.label) {
19473 links = this.findUnresolvedLinks(document, stylesheet);
19474 resolvedLinks = [];
19475 _i = 0, links_1 = links;
19478 if (!(_i < links_1.length)) return [3 /*break*/, 5];
19479 link = links_1[_i];
19480 target = link.target;
19481 if (!(target && !(/^\w+:\/\//g.test(target)))) return [3 /*break*/, 3];
19482 return [4 /*yield*/, this.resolveRelativeReference(target, document.uri, documentContext)];
19484 resolvedTarget = _a.sent();
19485 if (resolvedTarget !== undefined) {
19486 link.target = resolvedTarget;
19487 resolvedLinks.push(link);
19489 return [3 /*break*/, 4];
19491 resolvedLinks.push(link);
19495 return [3 /*break*/, 1];
19496 case 5: return [2 /*return*/, resolvedLinks];
19501 CSSNavigation.prototype.findUnresolvedLinks = function (document, stylesheet) {
19504 var collect = function (uriStringNode) {
19505 var rawUri = uriStringNode.getText();
19506 var range = getRange(uriStringNode, document);
19507 // Make sure the range is not empty
19508 if (range.start.line === range.end.line && range.start.character === range.end.character) {
19511 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, "\"")) {
19512 rawUri = rawUri.slice(1, -1);
19514 result.push({ target: rawUri, range: range });
19516 stylesheet.accept(function (candidate) {
19517 if (candidate.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].URILiteral) {
19518 var first = candidate.getChild(0);
19525 * In @import, it is possible to include links that do not use `url()`
19526 * For example, `@import 'foo.css';`
19528 if (candidate.parent && _this.isRawStringDocumentLinkNode(candidate.parent)) {
19529 var rawText = candidate.getText();
19530 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawText, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawText, "\"")) {
19531 collect(candidate);
19539 CSSNavigation.prototype.findDocumentSymbols = function (document, stylesheet) {
19541 stylesheet.accept(function (node) {
19544 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Class,
19547 var locationNode = node;
19548 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Selector"]) {
19549 entry.name = node.getText();
19550 locationNode = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Ruleset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].ExtendsReference);
19551 if (locationNode) {
19552 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Location"].create(document.uri, getRange(locationNode, document));
19553 result.push(entry);
19557 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["VariableDeclaration"]) {
19558 entry.name = node.getName();
19559 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Variable;
19561 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["MixinDeclaration"]) {
19562 entry.name = node.getName();
19563 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Method;
19565 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["FunctionDeclaration"]) {
19566 entry.name = node.getName();
19567 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Function;
19569 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Keyframe"]) {
19570 entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
19572 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["FontFace"]) {
19573 entry.name = localize('literal.fontface', "@font-face");
19575 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Media"]) {
19576 var mediaList = node.getChild(0);
19577 if (mediaList instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Medialist"]) {
19578 entry.name = '@media ' + mediaList.getText();
19579 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Module;
19583 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Location"].create(document.uri, getRange(locationNode, document));
19584 result.push(entry);
19590 CSSNavigation.prototype.findDocumentColors = function (document, stylesheet) {
19592 stylesheet.accept(function (node) {
19593 var colorInfo = getColorInformation(node, document);
19595 result.push(colorInfo);
19601 CSSNavigation.prototype.getColorPresentations = function (document, stylesheet, color, range) {
19603 var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
19605 if (color.alpha === 1) {
19606 label = "rgb(" + red256 + ", " + green256 + ", " + blue256 + ")";
19609 label = "rgba(" + red256 + ", " + green256 + ", " + blue256 + ", " + color.alpha + ")";
19611 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
19612 if (color.alpha === 1) {
19613 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
19616 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
19618 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
19619 var hsl = Object(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__["hslFromColor"])(color);
19621 label = "hsl(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%)";
19624 label = "hsla(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%, " + hsl.a + ")";
19626 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
19629 CSSNavigation.prototype.doRename = function (document, position, newName, stylesheet) {
19631 var highlights = this.findDocumentHighlights(document, position, stylesheet);
19632 var edits = highlights.map(function (h) { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(h.range, newName); });
19634 changes: (_a = {}, _a[document.uri] = edits, _a)
19637 CSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
19638 return __awaiter(this, void 0, void 0, function () {
19639 var moduleName, rootFolderUri, documentFolderUri, modulePath, pathWithinModule;
19640 return __generator(this, function (_a) {
19641 switch (_a.label) {
19643 if (!(ref[0] === '~' && ref[1] !== '/' && this.fileSystemProvider)) return [3 /*break*/, 3];
19644 ref = ref.substring(1);
19645 if (!Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(documentUri, 'file://')) return [3 /*break*/, 2];
19646 moduleName = getModuleNameFromPath(ref);
19647 rootFolderUri = documentContext.resolveReference('/', documentUri);
19648 documentFolderUri = Object(_utils_resources__WEBPACK_IMPORTED_MODULE_6__["dirname"])(documentUri);
19649 return [4 /*yield*/, this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri)];
19651 modulePath = _a.sent();
19653 pathWithinModule = ref.substring(moduleName.length + 1);
19654 return [2 /*return*/, Object(_utils_resources__WEBPACK_IMPORTED_MODULE_6__["joinPath"])(modulePath, pathWithinModule)];
19657 case 2: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
19658 case 3: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
19663 CSSNavigation.prototype.resolvePathToModule = function (_moduleName, documentFolderUri, rootFolderUri) {
19664 return __awaiter(this, void 0, void 0, function () {
19666 return __generator(this, function (_a) {
19667 switch (_a.label) {
19669 packPath = Object(_utils_resources__WEBPACK_IMPORTED_MODULE_6__["joinPath"])(documentFolderUri, 'node_modules', _moduleName, 'package.json');
19670 return [4 /*yield*/, this.fileExists(packPath)];
19673 return [2 /*return*/, Object(_utils_resources__WEBPACK_IMPORTED_MODULE_6__["dirname"])(packPath)];
19675 else if (rootFolderUri && documentFolderUri.startsWith(rootFolderUri) && (documentFolderUri.length !== rootFolderUri.length)) {
19676 return [2 /*return*/, this.resolvePathToModule(_moduleName, Object(_utils_resources__WEBPACK_IMPORTED_MODULE_6__["dirname"])(documentFolderUri), rootFolderUri)];
19678 return [2 /*return*/, undefined];
19683 CSSNavigation.prototype.fileExists = function (uri) {
19684 return __awaiter(this, void 0, void 0, function () {
19686 return __generator(this, function (_a) {
19687 switch (_a.label) {
19689 if (!this.fileSystemProvider) {
19690 return [2 /*return*/, false];
19694 _a.trys.push([1, 3, , 4]);
19695 return [4 /*yield*/, this.fileSystemProvider.stat(uri)];
19698 if (stat.type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["FileType"].Unknown && stat.size === -1) {
19699 return [2 /*return*/, false];
19701 return [2 /*return*/, true];
19704 return [2 /*return*/, false];
19705 case 4: return [2 /*return*/];
19710 return CSSNavigation;
19713 function getColorInformation(node, document) {
19714 var color = Object(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__["getColorValue"])(node);
19716 var range = getRange(node, document);
19717 return { color: color, range: range };
19721 function getRange(node, document) {
19722 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(node.offset), document.positionAt(node.end));
19724 function getHighlightKind(node) {
19725 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Selector) {
19726 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
19728 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Identifier"]) {
19729 if (node.parent && node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Property"]) {
19730 if (node.isCustomProperty) {
19731 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
19736 switch (node.parent.type) {
19737 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FunctionDeclaration:
19738 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].MixinDeclaration:
19739 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Keyframe:
19740 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].VariableDeclaration:
19741 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FunctionParameter:
19742 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
19745 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Read;
19747 function toTwoDigitHex(n) {
19748 var r = n.toString(16);
19749 return r.length !== 2 ? '0' + r : r;
19751 function getModuleNameFromPath(path) {
19752 // If a scoped module (starts with @) then get up until second instance of '/', otherwise get until first instance of '/'
19753 if (path[0] === '@') {
19754 return path.substring(0, path.indexOf('/', path.indexOf('/') + 1));
19756 return path.substring(0, path.indexOf('/'));
19762 /***/ (function(module, __webpack_exports__, __webpack_require__) {
19765 __webpack_require__.r(__webpack_exports__);
19766 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSCodeActions", function() { return CSSCodeActions; });
19767 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19768 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92);
19769 /* harmony import */ var _services_lintRules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
19770 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(103);
19771 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94);
19772 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_4__);
19773 /*---------------------------------------------------------------------------------------------
19774 * Copyright (c) Microsoft Corporation. All rights reserved.
19775 * Licensed under the MIT License. See License.txt in the project root for license information.
19776 *--------------------------------------------------------------------------------------------*/
19783 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__["loadMessageBundle"]();
19784 var CSSCodeActions = /** @class */ (function () {
19785 function CSSCodeActions(cssDataManager) {
19786 this.cssDataManager = cssDataManager;
19788 CSSCodeActions.prototype.doCodeActions = function (document, range, context, stylesheet) {
19789 return this.doCodeActions2(document, range, context, stylesheet).map(function (ca) {
19790 var textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0];
19791 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Command"].create(ca.title, '_css.applyCodeAction', document.uri, document.version, textDocumentEdit && textDocumentEdit.edits);
19794 CSSCodeActions.prototype.doCodeActions2 = function (document, range, context, stylesheet) {
19796 if (context.diagnostics) {
19797 for (var _i = 0, _a = context.diagnostics; _i < _a.length; _i++) {
19798 var diagnostic = _a[_i];
19799 this.appendFixesForMarker(document, stylesheet, diagnostic, result);
19804 CSSCodeActions.prototype.getFixesForUnknownProperty = function (document, property, marker, result) {
19805 var propertyName = property.getName();
19806 var candidates = [];
19807 this.cssDataManager.getProperties().forEach(function (p) {
19808 var score = Object(_utils_strings__WEBPACK_IMPORTED_MODULE_1__["difference"])(propertyName, p.name);
19809 if (score >= propertyName.length / 2 /*score_lim*/) {
19810 candidates.push({ property: p.name, score: score });
19813 // Sort in descending order.
19814 candidates.sort(function (a, b) {
19815 return b.score - a.score || a.property.localeCompare(b.property);
19817 var maxActions = 3;
19818 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
19819 var candidate = candidates_1[_i];
19820 var propertyName_1 = candidate.property;
19821 var title = localize('css.codeaction.rename', "Rename to '{0}'", propertyName_1);
19822 var edit = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TextEdit"].replace(marker.range, propertyName_1);
19823 var documentIdentifier = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["VersionedTextDocumentIdentifier"].create(document.uri, document.version);
19824 var workspaceEdit = { documentChanges: [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TextDocumentEdit"].create(documentIdentifier, [edit])] };
19825 var codeAction = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["CodeAction"].create(title, workspaceEdit, _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["CodeActionKind"].QuickFix);
19826 codeAction.diagnostics = [marker];
19827 result.push(codeAction);
19828 if (--maxActions <= 0) {
19833 CSSCodeActions.prototype.appendFixesForMarker = function (document, stylesheet, marker, result) {
19834 if (marker.code !== _services_lintRules__WEBPACK_IMPORTED_MODULE_2__["Rules"].UnknownProperty.id) {
19837 var offset = document.offsetAt(marker.range.start);
19838 var end = document.offsetAt(marker.range.end);
19839 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](stylesheet, offset);
19840 for (var i = nodepath.length - 1; i >= 0; i--) {
19841 var node = nodepath[i];
19842 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
19843 var property = node.getProperty();
19844 if (property && property.offset === offset && property.end === end) {
19845 this.getFixesForUnknownProperty(document, property, marker, result);
19851 return CSSCodeActions;
19858 /***/ (function(module, __webpack_exports__, __webpack_require__) {
19861 __webpack_require__.r(__webpack_exports__);
19862 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rule", function() { return Rule; });
19863 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Setting", function() { return Setting; });
19864 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rules", function() { return Rules; });
19865 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Settings", function() { return Settings; });
19866 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LintConfigurationSettings", function() { return LintConfigurationSettings; });
19867 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19868 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
19869 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
19870 /*---------------------------------------------------------------------------------------------
19871 * Copyright (c) Microsoft Corporation. All rights reserved.
19872 * Licensed under the MIT License. See License.txt in the project root for license information.
19873 *--------------------------------------------------------------------------------------------*/
19877 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
19878 var Warning = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Warning;
19879 var Error = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Error;
19880 var Ignore = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore;
19881 var Rule = /** @class */ (function () {
19882 function Rule(id, message, defaultValue) {
19884 this.message = message;
19885 this.defaultValue = defaultValue;
19891 var Setting = /** @class */ (function () {
19892 function Setting(id, message, defaultValue) {
19894 this.message = message;
19895 this.defaultValue = defaultValue;
19902 AllVendorPrefixes: new Rule('compatibleVendorPrefixes', localize('rule.vendorprefixes.all', "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Ignore),
19903 IncludeStandardPropertyWhenUsingVendorPrefix: new Rule('vendorPrefix', localize('rule.standardvendorprefix.all', "When using a vendor-specific prefix also include the standard property"), Warning),
19904 DuplicateDeclarations: new Rule('duplicateProperties', localize('rule.duplicateDeclarations', "Do not use duplicate style definitions"), Ignore),
19905 EmptyRuleSet: new Rule('emptyRules', localize('rule.emptyRuleSets', "Do not use empty rulesets"), Warning),
19906 ImportStatemement: new Rule('importStatement', localize('rule.importDirective', "Import statements do not load in parallel"), Ignore),
19907 BewareOfBoxModelSize: new Rule('boxModel', localize('rule.bewareOfBoxModelSize', "Do not use width or height when using padding or border"), Ignore),
19908 UniversalSelector: new Rule('universalSelector', localize('rule.universalSelector', "The universal selector (*) is known to be slow"), Ignore),
19909 ZeroWithUnit: new Rule('zeroUnits', localize('rule.zeroWidthUnit', "No unit for zero needed"), Ignore),
19910 RequiredPropertiesForFontFace: new Rule('fontFaceProperties', localize('rule.fontFaceProperties', "@font-face rule must define 'src' and 'font-family' properties"), Warning),
19911 HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three, four, six or eight hex numbers"), Error),
19912 ArgsInColorFunction: new Rule('argumentsInColorFunction', localize('rule.colorFunction', "Invalid number of parameters"), Error),
19913 UnknownProperty: new Rule('unknownProperties', localize('rule.unknownProperty', "Unknown property."), Warning),
19914 UnknownAtRules: new Rule('unknownAtRules', localize('rule.unknownAtRules', "Unknown at-rule."), Warning),
19915 IEStarHack: new Rule('ieHack', localize('rule.ieHack', "IE hacks are only necessary when supporting IE7 and older"), Ignore),
19916 UnknownVendorSpecificProperty: new Rule('unknownVendorSpecificProperties', localize('rule.unknownVendorSpecificProperty', "Unknown vendor specific property."), Ignore),
19917 PropertyIgnoredDueToDisplay: new Rule('propertyIgnoredDueToDisplay', localize('rule.propertyIgnoredDueToDisplay', "Property is ignored due to the display."), Warning),
19918 AvoidImportant: new Rule('important', localize('rule.avoidImportant', "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Ignore),
19919 AvoidFloat: new Rule('float', localize('rule.avoidFloat', "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Ignore),
19920 AvoidIdSelector: new Rule('idSelector', localize('rule.avoidIdSelector', "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore),
19923 ValidProperties: new Setting('validProperties', localize('rule.validProperties', "A list of properties that are not validated against the `unknownProperties` rule."), [])
19925 var LintConfigurationSettings = /** @class */ (function () {
19926 function LintConfigurationSettings(conf) {
19927 if (conf === void 0) { conf = {}; }
19930 LintConfigurationSettings.prototype.getRule = function (rule) {
19931 if (this.conf.hasOwnProperty(rule.id)) {
19932 var level = toLevel(this.conf[rule.id]);
19937 return rule.defaultValue;
19939 LintConfigurationSettings.prototype.getSetting = function (setting) {
19940 return this.conf[setting.id];
19942 return LintConfigurationSettings;
19945 function toLevel(level) {
19947 case 'ignore': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore;
19948 case 'warning': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Warning;
19949 case 'error': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Error;
19957 /***/ (function(module, __webpack_exports__, __webpack_require__) {
19960 __webpack_require__.r(__webpack_exports__);
19961 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSValidation", function() { return CSSValidation; });
19962 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19963 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(112);
19964 /* harmony import */ var _lint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(114);
19965 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(103);
19966 /*---------------------------------------------------------------------------------------------
19967 * Copyright (c) Microsoft Corporation. All rights reserved.
19968 * Licensed under the MIT License. See License.txt in the project root for license information.
19969 *--------------------------------------------------------------------------------------------*/
19975 var CSSValidation = /** @class */ (function () {
19976 function CSSValidation(cssDataManager) {
19977 this.cssDataManager = cssDataManager;
19979 CSSValidation.prototype.configure = function (settings) {
19980 this.settings = settings;
19982 CSSValidation.prototype.doValidation = function (document, stylesheet, settings) {
19983 if (settings === void 0) { settings = this.settings; }
19984 if (settings && settings.validate === false) {
19988 entries.push.apply(entries, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ParseErrorCollector"].entries(stylesheet));
19989 entries.push.apply(entries, _lint__WEBPACK_IMPORTED_MODULE_2__["LintVisitor"].entries(stylesheet, document, new _lintRules__WEBPACK_IMPORTED_MODULE_1__["LintConfigurationSettings"](settings && settings.lint), this.cssDataManager));
19991 for (var r in _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"]) {
19992 ruleIds.push(_lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"][r].id);
19994 function toDiagnostic(marker) {
19995 var range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Range"].create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength()));
19996 var source = document.languageId;
19998 code: marker.getRule().id,
20000 message: marker.getMessage(),
20001 severity: marker.getLevel() === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Warning ? _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["DiagnosticSeverity"].Warning : _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["DiagnosticSeverity"].Error,
20005 return entries.filter(function (entry) { return entry.getLevel() !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore; }).map(toDiagnostic);
20007 return CSSValidation;
20014 /***/ (function(module, __webpack_exports__, __webpack_require__) {
20017 __webpack_require__.r(__webpack_exports__);
20018 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LintVisitor", function() { return LintVisitor; });
20019 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95);
20020 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(112);
20021 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91);
20022 /* harmony import */ var _lintUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(115);
20023 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(102);
20024 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94);
20025 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_5__);
20026 /*---------------------------------------------------------------------------------------------
20027 * Copyright (c) Microsoft Corporation. All rights reserved.
20028 * Licensed under the MIT License. See License.txt in the project root for license information.
20029 *--------------------------------------------------------------------------------------------*/
20037 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__["loadMessageBundle"]();
20038 var NodesByRootMap = /** @class */ (function () {
20039 function NodesByRootMap() {
20042 NodesByRootMap.prototype.add = function (root, name, node) {
20043 var entry = this.data[root];
20045 entry = { nodes: [], names: [] };
20046 this.data[root] = entry;
20048 entry.names.push(name);
20050 entry.nodes.push(node);
20053 return NodesByRootMap;
20055 var LintVisitor = /** @class */ (function () {
20056 function LintVisitor(document, settings, cssDataManager) {
20058 this.cssDataManager = cssDataManager;
20059 this.warnings = [];
20060 this.settings = settings;
20061 this.documentText = document.getText();
20062 this.keyframes = new NodesByRootMap();
20063 this.validProperties = {};
20064 var properties = settings.getSetting(_lintRules__WEBPACK_IMPORTED_MODULE_1__["Settings"].ValidProperties);
20065 if (Array.isArray(properties)) {
20066 properties.forEach(function (p) {
20067 if (typeof p === 'string') {
20068 var name = p.trim().toLowerCase();
20070 _this.validProperties[name] = true;
20076 LintVisitor.entries = function (node, document, settings, cssDataManager, entryFilter) {
20077 var visitor = new LintVisitor(document, settings, cssDataManager);
20078 node.acceptVisitor(visitor);
20079 visitor.completeValidations();
20080 return visitor.getEntries(entryFilter);
20082 LintVisitor.prototype.isValidPropertyDeclaration = function (element) {
20083 var propertyName = element.fullPropertyName;
20084 return this.validProperties[propertyName];
20086 LintVisitor.prototype.fetch = function (input, s) {
20088 for (var _i = 0, input_1 = input; _i < input_1.length; _i++) {
20089 var curr = input_1[_i];
20090 if (curr.fullPropertyName === s) {
20091 elements.push(curr);
20096 LintVisitor.prototype.fetchWithValue = function (input, s, v) {
20098 for (var _i = 0, input_2 = input; _i < input_2.length; _i++) {
20099 var inputElement = input_2[_i];
20100 if (inputElement.fullPropertyName === s) {
20101 var expression = inputElement.node.getValue();
20102 if (expression && this.findValueInExpression(expression, v)) {
20103 elements.push(inputElement);
20109 LintVisitor.prototype.findValueInExpression = function (expression, v) {
20111 expression.accept(function (node) {
20112 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Identifier && node.matches(v)) {
20119 LintVisitor.prototype.getEntries = function (filter) {
20120 if (filter === void 0) { filter = (_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Level"].Warning | _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Level"].Error); }
20121 return this.warnings.filter(function (entry) {
20122 return (entry.getLevel() & filter) !== 0;
20125 LintVisitor.prototype.addEntry = function (node, rule, details) {
20126 var entry = new _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Marker"](node, rule, this.settings.getRule(rule), details);
20127 this.warnings.push(entry);
20129 LintVisitor.prototype.getMissingNames = function (expected, actual) {
20130 var expectedClone = expected.slice(0); // clone
20131 for (var i = 0; i < actual.length; i++) {
20132 var k = expectedClone.indexOf(actual[i]);
20134 expectedClone[k] = null;
20138 for (var i = 0; i < expectedClone.length; i++) {
20139 var curr = expectedClone[i];
20141 if (result === null) {
20142 result = localize('namelist.single', "'{0}'", curr);
20145 result = localize('namelist.concatenated', "{0}, '{1}'", result, curr);
20151 LintVisitor.prototype.visitNode = function (node) {
20152 switch (node.type) {
20153 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].UnknownAtRule:
20154 return this.visitUnknownAtRule(node);
20155 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Keyframe:
20156 return this.visitKeyframe(node);
20157 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FontFace:
20158 return this.visitFontFace(node);
20159 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Ruleset:
20160 return this.visitRuleSet(node);
20161 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].SimpleSelector:
20162 return this.visitSimpleSelector(node);
20163 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Function:
20164 return this.visitFunction(node);
20165 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].NumericValue:
20166 return this.visitNumericValue(node);
20167 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Import:
20168 return this.visitImport(node);
20169 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].HexColorValue:
20170 return this.visitHexColorValue(node);
20171 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Prio:
20172 return this.visitPrio(node);
20176 LintVisitor.prototype.completeValidations = function () {
20177 this.validateKeyframes();
20179 LintVisitor.prototype.visitUnknownAtRule = function (node) {
20180 var atRuleName = node.getChild(0);
20184 var atDirective = this.cssDataManager.getAtDirective(atRuleName.getText());
20188 this.addEntry(atRuleName, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownAtRules, "Unknown at rule " + atRuleName.getText());
20191 LintVisitor.prototype.visitKeyframe = function (node) {
20192 var keyword = node.getKeyword();
20196 var text = keyword.getText();
20197 this.keyframes.add(node.getName(), text, (text !== '@keyframes') ? keyword : null);
20200 LintVisitor.prototype.validateKeyframes = function () {
20201 // @keyframe and it's vendor specific alternatives
20202 // @keyframe should be included
20203 var expected = ['@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes'];
20204 for (var name in this.keyframes.data) {
20205 var actual = this.keyframes.data[name].names;
20206 var needsStandard = (actual.indexOf('@keyframes') === -1);
20207 if (!needsStandard && actual.length === 1) {
20208 continue; // only the non-vendor specific keyword is used, that's fine, no warning
20210 var missingVendorSpecific = this.getMissingNames(expected, actual);
20211 if (missingVendorSpecific || needsStandard) {
20212 for (var _i = 0, _a = this.keyframes.data[name].nodes; _i < _a.length; _i++) {
20214 if (needsStandard) {
20215 var message = localize('keyframes.standardrule.missing', "Always define standard rule '@keyframes' when defining keyframes.");
20216 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IncludeStandardPropertyWhenUsingVendorPrefix, message);
20218 if (missingVendorSpecific) {
20219 var message = localize('keyframes.vendorspecific.missing', "Always include all vendor specific rules: Missing: {0}", missingVendorSpecific);
20220 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AllVendorPrefixes, message);
20227 LintVisitor.prototype.visitSimpleSelector = function (node) {
20228 var firstChar = this.documentText.charAt(node.offset);
20229 /////////////////////////////////////////////////////////////
20230 // Lint - The universal selector (*) is known to be slow.
20231 /////////////////////////////////////////////////////////////
20232 if (node.length === 1 && firstChar === '*') {
20233 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UniversalSelector);
20235 /////////////////////////////////////////////////////////////
20236 // Lint - Avoid id selectors
20237 /////////////////////////////////////////////////////////////
20238 if (firstChar === '#') {
20239 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidIdSelector);
20243 LintVisitor.prototype.visitImport = function (node) {
20244 /////////////////////////////////////////////////////////////
20245 // Lint - Import statements shouldn't be used, because they aren't offering parallel downloads.
20246 /////////////////////////////////////////////////////////////
20247 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ImportStatemement);
20250 LintVisitor.prototype.visitRuleSet = function (node) {
20251 /////////////////////////////////////////////////////////////
20252 // Lint - Don't use empty rulesets.
20253 /////////////////////////////////////////////////////////////
20254 var declarations = node.getDeclarations();
20255 if (!declarations) {
20259 if (!declarations.hasChildren()) {
20260 this.addEntry(node.getSelectors(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].EmptyRuleSet);
20262 var propertyTable = [];
20263 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
20264 var element = _a[_i];
20265 if (element instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Declaration"]) {
20266 propertyTable.push(new _lintUtil__WEBPACK_IMPORTED_MODULE_3__["Element"](element));
20269 /////////////////////////////////////////////////////////////
20270 // the rule warns when it finds:
20271 // width being used with border, border-left, border-right, padding, padding-left, or padding-right
20272 // height being used with border, border-top, border-bottom, padding, padding-top, or padding-bottom
20273 // No error when box-sizing property is specified, as it assumes the user knows what he's doing.
20274 // see https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size
20275 /////////////////////////////////////////////////////////////
20276 var boxModel = Object(_lintUtil__WEBPACK_IMPORTED_MODULE_3__["default"])(propertyTable);
20277 if (boxModel.width) {
20278 var properties = [];
20279 if (boxModel.right.value) {
20280 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.right.properties);
20282 if (boxModel.left.value) {
20283 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.left.properties);
20285 if (properties.length !== 0) {
20286 for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
20287 var item = properties_1[_b];
20288 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
20290 this.addEntry(boxModel.width.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
20293 if (boxModel.height) {
20294 var properties = [];
20295 if (boxModel.top.value) {
20296 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.top.properties);
20298 if (boxModel.bottom.value) {
20299 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.bottom.properties);
20301 if (properties.length !== 0) {
20302 for (var _c = 0, properties_2 = properties; _c < properties_2.length; _c++) {
20303 var item = properties_2[_c];
20304 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
20306 this.addEntry(boxModel.height.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
20309 /////////////////////////////////////////////////////////////
20310 // Properties ignored due to display
20311 /////////////////////////////////////////////////////////////
20312 // With 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect
20313 var displayElems = this.fetchWithValue(propertyTable, 'display', 'inline');
20314 if (displayElems.length > 0) {
20315 for (var _d = 0, _e = ['width', 'height', 'margin-top', 'margin-bottom', 'float']; _d < _e.length; _d++) {
20317 var elem = this.fetch(propertyTable, prop);
20318 for (var index = 0; index < elem.length; index++) {
20319 var node_1 = elem[index].node;
20320 var value = node_1.getValue();
20321 if (prop === 'float' && (!value || value.matches('none'))) {
20324 this.addEntry(node_1, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayInline', "Property is ignored due to the display. With 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect."));
20328 // With 'display: inline-block', 'float' has no effect
20329 displayElems = this.fetchWithValue(propertyTable, 'display', 'inline-block');
20330 if (displayElems.length > 0) {
20331 var elem = this.fetch(propertyTable, 'float');
20332 for (var index = 0; index < elem.length; index++) {
20333 var node_2 = elem[index].node;
20334 var value = node_2.getValue();
20335 if (value && !value.matches('none')) {
20336 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayInlineBlock', "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"));
20340 // With 'display: block', 'vertical-align' has no effect
20341 displayElems = this.fetchWithValue(propertyTable, 'display', 'block');
20342 if (displayElems.length > 0) {
20343 var elem = this.fetch(propertyTable, 'vertical-align');
20344 for (var index = 0; index < elem.length; index++) {
20345 this.addEntry(elem[index].node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayBlock', "Property is ignored due to the display. With 'display: block', vertical-align should not be used."));
20348 /////////////////////////////////////////////////////////////
20350 /////////////////////////////////////////////////////////////
20351 var elements = this.fetch(propertyTable, 'float');
20352 for (var index = 0; index < elements.length; index++) {
20353 var element = elements[index];
20354 if (!this.isValidPropertyDeclaration(element)) {
20355 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidFloat);
20358 /////////////////////////////////////////////////////////////
20359 // Don't use duplicate declarations.
20360 /////////////////////////////////////////////////////////////
20361 for (var i = 0; i < propertyTable.length; i++) {
20362 var element = propertyTable[i];
20363 if (element.fullPropertyName !== 'background' && !this.validProperties[element.fullPropertyName]) {
20364 var value = element.node.getValue();
20365 if (value && this.documentText.charAt(value.offset) !== '-') {
20366 var elements_1 = this.fetch(propertyTable, element.fullPropertyName);
20367 if (elements_1.length > 1) {
20368 for (var k = 0; k < elements_1.length; k++) {
20369 var value_1 = elements_1[k].node.getValue();
20370 if (value_1 && this.documentText.charAt(value_1.offset) !== '-' && elements_1[k] !== element) {
20371 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].DuplicateDeclarations);
20378 /////////////////////////////////////////////////////////////
20379 // Unknown propery & When using a vendor-prefixed gradient, make sure to use them all.
20380 /////////////////////////////////////////////////////////////
20381 var isExportBlock = node.getSelectors().matches(":export");
20382 if (!isExportBlock) {
20383 var propertiesBySuffix = new NodesByRootMap();
20384 var containsUnknowns = false;
20385 for (var _f = 0, propertyTable_1 = propertyTable; _f < propertyTable_1.length; _f++) {
20386 var element = propertyTable_1[_f];
20387 var decl = element.node;
20388 if (this.isCSSDeclaration(decl)) {
20389 var name = element.fullPropertyName;
20390 var firstChar = name.charAt(0);
20391 if (firstChar === '-') {
20392 if (name.charAt(1) !== '-') { // avoid css variables
20393 if (!this.cssDataManager.isKnownProperty(name) && !this.validProperties[name]) {
20394 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownVendorSpecificProperty);
20396 var nonPrefixedName = decl.getNonPrefixedPropertyName();
20397 propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty());
20401 var fullName = name;
20402 if (firstChar === '*' || firstChar === '_') {
20403 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IEStarHack);
20404 name = name.substr(1);
20406 // _property and *property might be contributed via custom data
20407 if (!this.cssDataManager.isKnownProperty(fullName) && !this.cssDataManager.isKnownProperty(name)) {
20408 if (!this.validProperties[name]) {
20409 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownProperty, localize('property.unknownproperty.detailed', "Unknown property: '{0}'", decl.getFullPropertyName()));
20412 propertiesBySuffix.add(name, name, null); // don't pass the node as we don't show errors on the standard
20416 containsUnknowns = true;
20419 if (!containsUnknowns) { // don't perform this test if there are
20420 for (var suffix in propertiesBySuffix.data) {
20421 var entry = propertiesBySuffix.data[suffix];
20422 var actual = entry.names;
20423 var needsStandard = this.cssDataManager.isStandardProperty(suffix) && (actual.indexOf(suffix) === -1);
20424 if (!needsStandard && actual.length === 1) {
20425 continue; // only the non-vendor specific rule is used, that's fine, no warning
20428 for (var i = 0, len = LintVisitor.prefixes.length; i < len; i++) {
20429 var prefix = LintVisitor.prefixes[i];
20430 if (this.cssDataManager.isStandardProperty(prefix + suffix)) {
20431 expected.push(prefix + suffix);
20434 var missingVendorSpecific = this.getMissingNames(expected, actual);
20435 if (missingVendorSpecific || needsStandard) {
20436 for (var _g = 0, _h = entry.nodes; _g < _h.length; _g++) {
20437 var node_3 = _h[_g];
20438 if (needsStandard) {
20439 var message = localize('property.standard.missing', "Also define the standard property '{0}' for compatibility", suffix);
20440 this.addEntry(node_3, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IncludeStandardPropertyWhenUsingVendorPrefix, message);
20442 if (missingVendorSpecific) {
20443 var message = localize('property.vendorspecific.missing', "Always include all vendor specific properties: Missing: {0}", missingVendorSpecific);
20444 this.addEntry(node_3, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AllVendorPrefixes, message);
20453 LintVisitor.prototype.visitPrio = function (node) {
20454 /////////////////////////////////////////////////////////////
20455 // Don't use !important
20456 /////////////////////////////////////////////////////////////
20457 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidImportant);
20460 LintVisitor.prototype.visitNumericValue = function (node) {
20461 /////////////////////////////////////////////////////////////
20462 // 0 has no following unit
20463 /////////////////////////////////////////////////////////////
20464 var funcDecl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Function);
20465 if (funcDecl && funcDecl.getName() === 'calc') {
20468 var decl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Declaration);
20470 var declValue = decl.getValue();
20472 var value = node.getValue();
20473 if (!value.unit || _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["units"].length.indexOf(value.unit.toLowerCase()) === -1) {
20476 if (parseFloat(value.value) === 0.0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) {
20477 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ZeroWithUnit);
20483 LintVisitor.prototype.visitFontFace = function (node) {
20484 var declarations = node.getDeclarations();
20485 if (!declarations) {
20489 var definesSrc = false, definesFontFamily = false;
20490 var containsUnknowns = false;
20491 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
20492 var node_4 = _a[_i];
20493 if (this.isCSSDeclaration(node_4)) {
20494 var name = node_4.getProperty().getName().toLowerCase();
20495 if (name === 'src') {
20498 if (name === 'font-family') {
20499 definesFontFamily = true;
20503 containsUnknowns = true;
20506 if (!containsUnknowns && (!definesSrc || !definesFontFamily)) {
20507 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].RequiredPropertiesForFontFace);
20511 LintVisitor.prototype.isCSSDeclaration = function (node) {
20512 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Declaration"]) {
20513 if (!node.getValue()) {
20516 var property = node.getProperty();
20520 var identifier = property.getIdentifier();
20521 if (!identifier || identifier.containsInterpolation()) {
20528 LintVisitor.prototype.visitHexColorValue = function (node) {
20529 // Rule: #eeff0011 or #eeff00 or #ef01 or #ef0
20530 var length = node.length;
20531 if (length !== 9 && length !== 7 && length !== 5 && length !== 4) {
20532 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].HexColorLength);
20536 LintVisitor.prototype.visitFunction = function (node) {
20537 var fnName = node.getName().toLowerCase();
20538 var expectedAttrCount = -1;
20539 var actualAttrCount = 0;
20543 expectedAttrCount = 3;
20547 expectedAttrCount = 4;
20550 if (expectedAttrCount !== -1) {
20551 node.getArguments().accept(function (n) {
20552 if (n instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["BinaryExpression"]) {
20553 actualAttrCount += 1;
20558 if (actualAttrCount !== expectedAttrCount) {
20559 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ArgsInColorFunction);
20564 LintVisitor.prefixes = [
20565 '-ms-', '-moz-', '-o-', '-webkit-',
20567 return LintVisitor;
20574 /***/ (function(module, __webpack_exports__, __webpack_require__) {
20577 __webpack_require__.r(__webpack_exports__);
20578 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
20579 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateBoxModel; });
20580 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(102);
20581 /*---------------------------------------------------------------------------------------------
20582 * Copyright (c) Microsoft Corporation. All rights reserved.
20583 * Licensed under the MIT License. See License.txt in the project root for license information.
20584 *--------------------------------------------------------------------------------------------*/
20587 var Element = /** @class */ (function () {
20588 function Element(decl) {
20589 this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
20595 function setSide(model, side, value, property) {
20596 var state = model[side];
20597 state.value = value;
20599 if (!Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_0__["includes"])(state.properties, property)) {
20600 state.properties.push(property);
20604 function setAllSides(model, value, property) {
20605 setSide(model, 'top', value, property);
20606 setSide(model, 'right', value, property);
20607 setSide(model, 'bottom', value, property);
20608 setSide(model, 'left', value, property);
20610 function updateModelWithValue(model, side, value, property) {
20611 if (side === 'top' || side === 'right' ||
20612 side === 'bottom' || side === 'left') {
20613 setSide(model, side, value, property);
20616 setAllSides(model, value, property);
20619 function updateModelWithList(model, values, property) {
20620 switch (values.length) {
20622 updateModelWithValue(model, undefined, values[0], property);
20625 updateModelWithValue(model, 'top', values[0], property);
20626 updateModelWithValue(model, 'bottom', values[0], property);
20627 updateModelWithValue(model, 'right', values[1], property);
20628 updateModelWithValue(model, 'left', values[1], property);
20631 updateModelWithValue(model, 'top', values[0], property);
20632 updateModelWithValue(model, 'right', values[1], property);
20633 updateModelWithValue(model, 'left', values[1], property);
20634 updateModelWithValue(model, 'bottom', values[2], property);
20637 updateModelWithValue(model, 'top', values[0], property);
20638 updateModelWithValue(model, 'right', values[1], property);
20639 updateModelWithValue(model, 'bottom', values[2], property);
20640 updateModelWithValue(model, 'left', values[3], property);
20644 function matches(value, candidates) {
20645 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
20646 var candidate = candidates_1[_i];
20647 if (value.matches(candidate)) {
20654 * @param allowsKeywords whether the initial value of property is zero, so keywords `initial` and `unset` count as zero
20655 * @return `true` if this node represents a non-zero border; otherwise, `false`
20657 function checkLineWidth(value, allowsKeywords) {
20658 if (allowsKeywords === void 0) { allowsKeywords = true; }
20659 if (allowsKeywords && matches(value, ['initial', 'unset'])) {
20662 // a <length> is a value and a unit
20663 // so use `parseFloat` to strip the unit
20664 return parseFloat(value.getText()) !== 0;
20666 function checkLineWidthList(nodes, allowsKeywords) {
20667 if (allowsKeywords === void 0) { allowsKeywords = true; }
20668 return nodes.map(function (node) { return checkLineWidth(node, allowsKeywords); });
20671 * @param allowsKeywords whether keywords `initial` and `unset` count as zero
20672 * @return `true` if this node represents a non-zero border; otherwise, `false`
20674 function checkLineStyle(valueNode, allowsKeywords) {
20675 if (allowsKeywords === void 0) { allowsKeywords = true; }
20676 if (matches(valueNode, ['none', 'hidden'])) {
20679 if (allowsKeywords && matches(valueNode, ['initial', 'unset'])) {
20684 function checkLineStyleList(nodes, allowsKeywords) {
20685 if (allowsKeywords === void 0) { allowsKeywords = true; }
20686 return nodes.map(function (node) { return checkLineStyle(node, allowsKeywords); });
20688 function checkBorderShorthand(node) {
20689 var children = node.getChildren();
20690 // the only child can be a keyword, a <line-width>, or a <line-style>
20691 // if either check returns false, the result is no border
20692 if (children.length === 1) {
20693 var value = children[0];
20694 return checkLineWidth(value) && checkLineStyle(value);
20696 // multiple children can't contain keywords
20697 // if any child means no border, the result is no border
20698 for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
20699 var child = children_1[_i];
20701 if (!checkLineWidth(value, /* allowsKeywords: */ false) ||
20702 !checkLineStyle(value, /* allowsKeywords: */ false)) {
20708 function calculateBoxModel(propertyTable) {
20710 top: { value: false, properties: [] },
20711 right: { value: false, properties: [] },
20712 bottom: { value: false, properties: [] },
20713 left: { value: false, properties: [] },
20715 for (var _i = 0, propertyTable_1 = propertyTable; _i < propertyTable_1.length; _i++) {
20716 var property = propertyTable_1[_i];
20717 var value = property.node.value;
20718 if (typeof value === 'undefined') {
20721 switch (property.fullPropertyName) {
20723 // has `box-sizing`, bail out
20725 top: { value: false, properties: [] },
20726 right: { value: false, properties: [] },
20727 bottom: { value: false, properties: [] },
20728 left: { value: false, properties: [] },
20731 model.width = property;
20734 model.height = property;
20737 var segments = property.fullPropertyName.split('-');
20738 switch (segments[0]) {
20740 switch (segments[1]) {
20746 switch (segments[2]) {
20748 updateModelWithValue(model, segments[1], checkBorderShorthand(value), property);
20751 // the initial value of `border-width` is `medium`, not zero
20752 updateModelWithValue(model, segments[1], checkLineWidth(value, false), property);
20755 // the initial value of `border-style` is `none`
20756 updateModelWithValue(model, segments[1], checkLineStyle(value, true), property);
20761 // the initial value of `border-width` is `medium`, not zero
20762 updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property);
20765 // the initial value of `border-style` is `none`
20766 updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property);
20771 if (segments.length === 1) {
20772 // the initial value of `padding` is zero
20773 updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property);
20776 // the initial value of `padding` is zero
20777 updateModelWithValue(model, segments[1], checkLineWidth(value, true), property);
20790 /***/ (function(module, __webpack_exports__, __webpack_require__) {
20793 __webpack_require__.r(__webpack_exports__);
20794 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSParser", function() { return SCSSParser; });
20795 /* harmony import */ var _scssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
20796 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
20797 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
20798 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91);
20799 /* harmony import */ var _scssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(118);
20800 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(93);
20801 /*---------------------------------------------------------------------------------------------
20802 * Copyright (c) Microsoft Corporation. All rights reserved.
20803 * Licensed under the MIT License. See License.txt in the project root for license information.
20804 *--------------------------------------------------------------------------------------------*/
20806 var __extends = (undefined && undefined.__extends) || (function () {
20807 var extendStatics = function (d, b) {
20808 extendStatics = Object.setPrototypeOf ||
20809 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20810 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20811 return extendStatics(d, b);
20813 return function (d, b) {
20814 extendStatics(d, b);
20815 function __() { this.constructor = d; }
20816 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20826 /// A parser for scss
20827 /// http://sass-lang.com/documentation/file.SASS_REFERENCE.html
20829 var SCSSParser = /** @class */ (function (_super) {
20830 __extends(SCSSParser, _super);
20831 function SCSSParser() {
20832 return _super.call(this, new _scssScanner__WEBPACK_IMPORTED_MODULE_0__["SCSSScanner"]()) || this;
20834 SCSSParser.prototype._parseStylesheetStatement = function (isNested) {
20835 if (isNested === void 0) { isNested = false; }
20836 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
20837 return this._parseWarnAndDebug() // @warn, @debug and @error statements
20838 || this._parseControlStatement() // @if, @while, @for, @each
20839 || this._parseMixinDeclaration() // @mixin
20840 || this._parseMixinContent() // @content
20841 || this._parseMixinReference() // @include
20842 || this._parseFunctionDeclaration() // @function
20843 || this._parseForward() // @forward
20844 || this._parseUse() // @use
20845 || this._parseRuleset(isNested) // @at-rule
20846 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
20848 return this._parseRuleset(true) || this._parseVariableDeclaration();
20850 SCSSParser.prototype._parseImport = function () {
20851 if (!this.peekKeyword('@import')) {
20854 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Import"]);
20855 this.consumeToken();
20856 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
20857 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].URIOrStringExpected);
20859 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
20860 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
20861 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].URIOrStringExpected);
20864 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
20865 node.setMedialist(this._parseMediaQueryList());
20867 return this.finish(node);
20869 // scss variables: $font-size: 12px;
20870 SCSSParser.prototype._parseVariableDeclaration = function (panic) {
20871 if (panic === void 0) { panic = []; }
20872 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["VariableName"])) {
20875 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["VariableDeclaration"]);
20876 if (!node.setVariable(this._parseVariable())) {
20879 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
20880 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ColonExpected);
20882 if (this.prevToken) {
20883 node.colonPosition = this.prevToken.offset;
20885 if (!node.setValue(this._parseExpr())) {
20886 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableValueExpected, [], panic);
20888 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Exclamation)) {
20889 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /^(default|global)$/)) {
20890 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
20892 this.consumeToken();
20894 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
20895 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
20897 return this.finish(node);
20899 SCSSParser.prototype._parseMediaContentStart = function () {
20900 return this._parseInterpolation();
20902 SCSSParser.prototype._parseMediaFeatureName = function () {
20903 return this._parseModuleMember()
20904 || this._parseFunction() // function before ident
20905 || this._parseIdent()
20906 || this._parseVariable();
20908 SCSSParser.prototype._parseKeyframeSelector = function () {
20909 return this._tryParseKeyframeSelector()
20910 || this._parseControlStatement(this._parseKeyframeSelector.bind(this))
20911 || this._parseVariableDeclaration()
20912 || this._parseMixinContent();
20914 SCSSParser.prototype._parseVariable = function () {
20915 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["VariableName"])) {
20918 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Variable"]);
20919 this.consumeToken();
20922 SCSSParser.prototype._parseModuleMember = function () {
20923 var pos = this.mark();
20924 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Module"]);
20925 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module]))) {
20928 if (this.hasWhitespace()
20929 || !this.acceptDelim('.')
20930 || this.hasWhitespace()) {
20931 this.restoreAtMark(pos);
20934 if (!node.addChild(this._parseVariable() || this._parseFunction())) {
20935 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrVariableExpected);
20939 SCSSParser.prototype._parseIdent = function (referenceTypes) {
20941 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) && !this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["InterpolationFunction"]) && !this.peekDelim('-')) {
20944 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
20945 node.referenceTypes = referenceTypes;
20946 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /^--/);
20947 var hasContent = false;
20948 var indentInterpolation = function () {
20949 var pos = _this.mark();
20950 if (_this.acceptDelim('-')) {
20951 if (!_this.hasWhitespace()) {
20952 _this.acceptDelim('-');
20954 if (_this.hasWhitespace()) {
20955 _this.restoreAtMark(pos);
20959 return _this._parseInterpolation();
20961 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) || node.addChild(indentInterpolation()) || (hasContent && this.acceptRegexp(/[\w-]/))) {
20963 if (this.hasWhitespace()) {
20967 return hasContent ? this.finish(node) : null;
20969 SCSSParser.prototype._parseTermExpression = function () {
20970 return this._parseModuleMember() ||
20971 this._parseVariable() ||
20972 this._parseSelectorCombinator() ||
20973 this._tryParsePrio() ||
20974 _super.prototype._parseTermExpression.call(this);
20976 SCSSParser.prototype._parseInterpolation = function () {
20977 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["InterpolationFunction"])) {
20978 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Interpolation"]);
20979 this.consumeToken();
20980 if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
20981 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
20982 return this.finish(node);
20984 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
20986 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
20987 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightCurlyExpected);
20989 return this.finish(node);
20993 SCSSParser.prototype._parseOperator = function () {
20994 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["EqualsOperator"]) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["NotEqualsOperator"])
20995 || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["GreaterEqualsOperator"]) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["SmallerEqualsOperator"])
20996 || this.peekDelim('>') || this.peekDelim('<')
20997 || this.peekIdent('and') || this.peekIdent('or')
20998 || this.peekDelim('%')) {
20999 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
21000 this.consumeToken();
21001 return this.finish(node);
21003 return _super.prototype._parseOperator.call(this);
21005 SCSSParser.prototype._parseUnaryOperator = function () {
21006 if (this.peekIdent('not')) {
21007 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
21008 this.consumeToken();
21009 return this.finish(node);
21011 return _super.prototype._parseUnaryOperator.call(this);
21013 SCSSParser.prototype._parseRuleSetDeclaration = function () {
21014 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
21015 return this._parseKeyframe() // nested @keyframe
21016 || this._parseImport() // nested @import
21017 || this._parseMedia(true) // nested @media
21018 || this._parseFontFace() // nested @font-face
21019 || this._parseWarnAndDebug() // @warn, @debug and @error statements
21020 || this._parseControlStatement() // @if, @while, @for, @each
21021 || this._parseFunctionDeclaration() // @function
21022 || this._parseExtends() // @extends
21023 || this._parseMixinReference() // @include
21024 || this._parseMixinContent() // @content
21025 || this._parseMixinDeclaration() // nested @mixin
21026 || this._parseRuleset(true) // @at-rule
21027 || this._parseSupports(true) // @supports
21028 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
21030 return this._parseVariableDeclaration() // variable declaration
21031 || this._tryParseRuleset(true) // nested ruleset
21032 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
21034 SCSSParser.prototype._parseDeclaration = function (resyncStopTokens) {
21035 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Declaration"]);
21036 if (!node.setProperty(this._parseProperty())) {
21039 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
21040 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon], resyncStopTokens);
21042 if (this.prevToken) {
21043 node.colonPosition = this.prevToken.offset;
21045 var hasContent = false;
21046 if (node.setValue(this._parseExpr())) {
21048 node.addChild(this._parsePrio());
21050 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
21051 node.setNestedProperties(this._parseNestedProperties());
21055 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].PropertyValueExpected);
21058 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
21059 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
21061 return this.finish(node);
21063 SCSSParser.prototype._parseNestedProperties = function () {
21064 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NestedProperties"]);
21065 return this._parseBody(node, this._parseDeclaration.bind(this));
21067 SCSSParser.prototype._parseExtends = function () {
21068 if (this.peekKeyword('@extend')) {
21069 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
21070 this.consumeToken();
21071 if (!node.getSelectors().addChild(this._parseSimpleSelector())) {
21072 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SelectorExpected);
21074 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21075 node.getSelectors().addChild(this._parseSimpleSelector());
21077 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Exclamation)) {
21078 if (!this.acceptIdent('optional')) {
21079 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
21082 return this.finish(node);
21086 SCSSParser.prototype._parseSimpleSelectorBody = function () {
21087 return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || _super.prototype._parseSimpleSelectorBody.call(this);
21089 SCSSParser.prototype._parseSelectorCombinator = function () {
21090 if (this.peekDelim('&')) {
21091 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorCombinator);
21092 this.consumeToken();
21093 while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Num) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
21096 return this.finish(node);
21100 SCSSParser.prototype._parseSelectorPlaceholder = function () {
21101 if (this.peekDelim('%')) {
21102 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorPlaceholder);
21103 this.consumeToken();
21104 this._parseIdent();
21105 return this.finish(node);
21107 else if (this.peekKeyword('@at-root')) {
21108 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorPlaceholder);
21109 this.consumeToken();
21110 return this.finish(node);
21114 SCSSParser.prototype._parseElementName = function () {
21115 var pos = this.mark();
21116 var node = _super.prototype._parseElementName.call(this);
21117 if (node && !this.hasWhitespace() && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) { // for #49589
21118 this.restoreAtMark(pos);
21123 SCSSParser.prototype._tryParsePseudoIdentifier = function () {
21124 return this._parseInterpolation() || _super.prototype._tryParsePseudoIdentifier.call(this); // for #49589
21126 SCSSParser.prototype._parseWarnAndDebug = function () {
21127 if (!this.peekKeyword('@debug')
21128 && !this.peekKeyword('@warn')
21129 && !this.peekKeyword('@error')) {
21132 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Debug);
21133 this.consumeToken(); // @debug, @warn or @error
21134 node.addChild(this._parseExpr()); // optional
21135 return this.finish(node);
21137 SCSSParser.prototype._parseControlStatement = function (parseStatement) {
21138 if (parseStatement === void 0) { parseStatement = this._parseRuleSetDeclaration.bind(this); }
21139 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
21142 return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement)
21143 || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement);
21145 SCSSParser.prototype._parseIfStatement = function (parseStatement) {
21146 if (!this.peekKeyword('@if')) {
21149 return this._internalParseIfStatement(parseStatement);
21151 SCSSParser.prototype._internalParseIfStatement = function (parseStatement) {
21152 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["IfStatement"]);
21153 this.consumeToken(); // @if or if
21154 if (!node.setExpression(this._parseExpr(true))) {
21155 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
21157 this._parseBody(node, parseStatement);
21158 if (this.acceptKeyword('@else')) {
21159 if (this.peekIdent('if')) {
21160 node.setElseClause(this._internalParseIfStatement(parseStatement));
21162 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
21163 var elseNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ElseStatement"]);
21164 this._parseBody(elseNode, parseStatement);
21165 node.setElseClause(elseNode);
21168 return this.finish(node);
21170 SCSSParser.prototype._parseForStatement = function (parseStatement) {
21171 if (!this.peekKeyword('@for')) {
21174 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ForStatement"]);
21175 this.consumeToken(); // @for
21176 if (!node.setVariable(this._parseVariable())) {
21177 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21179 if (!this.acceptIdent('from')) {
21180 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].FromExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21182 if (!node.addChild(this._parseBinaryExpr())) {
21183 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21185 if (!this.acceptIdent('to') && !this.acceptIdent('through')) {
21186 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].ThroughOrToExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21188 if (!node.addChild(this._parseBinaryExpr())) {
21189 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21191 return this._parseBody(node, parseStatement);
21193 SCSSParser.prototype._parseEachStatement = function (parseStatement) {
21194 if (!this.peekKeyword('@each')) {
21197 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["EachStatement"]);
21198 this.consumeToken(); // @each
21199 var variables = node.getVariables();
21200 if (!variables.addChild(this._parseVariable())) {
21201 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21203 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21204 if (!variables.addChild(this._parseVariable())) {
21205 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21208 this.finish(variables);
21209 if (!this.acceptIdent('in')) {
21210 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].InExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21212 if (!node.addChild(this._parseExpr())) {
21213 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21215 return this._parseBody(node, parseStatement);
21217 SCSSParser.prototype._parseWhileStatement = function (parseStatement) {
21218 if (!this.peekKeyword('@while')) {
21221 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["WhileStatement"]);
21222 this.consumeToken(); // @while
21223 if (!node.addChild(this._parseBinaryExpr())) {
21224 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21226 return this._parseBody(node, parseStatement);
21228 SCSSParser.prototype._parseFunctionBodyDeclaration = function () {
21229 return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug()
21230 || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this));
21232 SCSSParser.prototype._parseFunctionDeclaration = function () {
21233 if (!this.peekKeyword('@function')) {
21236 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionDeclaration"]);
21237 this.consumeToken(); // @function
21238 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Function]))) {
21239 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21241 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21242 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21244 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21245 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21246 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21249 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21250 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
21254 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21255 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21257 return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this));
21259 SCSSParser.prototype._parseReturnStatement = function () {
21260 if (!this.peekKeyword('@return')) {
21263 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].ReturnStatement);
21264 this.consumeToken(); // @function
21265 if (!node.addChild(this._parseExpr())) {
21266 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
21268 return this.finish(node);
21270 SCSSParser.prototype._parseMixinDeclaration = function () {
21271 if (!this.peekKeyword('@mixin')) {
21274 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
21275 this.consumeToken();
21276 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]))) {
21277 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21279 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21280 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21281 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21282 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21285 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21286 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
21290 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21291 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21294 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
21296 SCSSParser.prototype._parseParameterDeclaration = function () {
21297 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionParameter"]);
21298 if (!node.setIdentifier(this._parseVariable())) {
21301 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
21304 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
21305 if (!node.setDefaultValue(this._parseExpr(true))) {
21306 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableValueExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
21309 return this.finish(node);
21311 SCSSParser.prototype._parseMixinContent = function () {
21312 if (!this.peekKeyword('@content')) {
21315 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinContentReference"]);
21316 this.consumeToken();
21317 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21318 if (node.getArguments().addChild(this._parseFunctionArgument())) {
21319 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21320 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21323 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
21324 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
21328 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21329 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
21332 return this.finish(node);
21334 SCSSParser.prototype._parseMixinReference = function () {
21335 if (!this.peekKeyword('@include')) {
21338 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
21339 this.consumeToken();
21340 // Could be module or mixin identifier, set as mixin as default.
21341 var firstIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]);
21342 if (!node.setIdentifier(firstIdent)) {
21343 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21345 // Is a module accessor.
21346 if (!this.hasWhitespace() && this.acceptDelim('.') && !this.hasWhitespace()) {
21347 var secondIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]);
21348 if (!secondIdent) {
21349 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
21351 var moduleToken = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Module"]);
21352 // Re-purpose first matched ident as identifier for module token.
21353 firstIdent.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module];
21354 moduleToken.setIdentifier(firstIdent);
21355 // Override identifier with second ident.
21356 node.setIdentifier(secondIdent);
21357 node.addChild(moduleToken);
21359 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21360 if (node.getArguments().addChild(this._parseFunctionArgument())) {
21361 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21362 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21365 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
21366 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
21370 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21371 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
21374 if (this.peekIdent('using') || this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
21375 node.setContent(this._parseMixinContentDeclaration());
21377 return this.finish(node);
21379 SCSSParser.prototype._parseMixinContentDeclaration = function () {
21380 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinContentDeclaration"]);
21381 if (this.acceptIdent('using')) {
21382 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21383 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL]);
21385 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21386 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21387 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21390 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21391 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
21395 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21396 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL]);
21399 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
21400 this._parseBody(node, this._parseMixinReferenceBodyStatement.bind(this));
21402 return this.finish(node);
21404 SCSSParser.prototype._parseMixinReferenceBodyStatement = function () {
21405 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
21407 SCSSParser.prototype._parseFunctionArgument = function () {
21408 // [variableName ':'] expression | variableName '...'
21409 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionArgument"]);
21410 var pos = this.mark();
21411 var argument = this._parseVariable();
21413 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
21414 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) { // optional
21415 node.setValue(argument);
21416 return this.finish(node);
21419 this.restoreAtMark(pos);
21423 node.setIdentifier(argument);
21426 if (node.setValue(this._parseExpr(true))) {
21427 this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"]); // #43746
21428 node.addChild(this._parsePrio()); // #9859
21429 return this.finish(node);
21433 SCSSParser.prototype._parseURLArgument = function () {
21434 var pos = this.mark();
21435 var node = _super.prototype._parseURLArgument.call(this);
21436 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21437 this.restoreAtMark(pos);
21438 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
21439 node_1.addChild(this._parseBinaryExpr());
21440 return this.finish(node_1);
21444 SCSSParser.prototype._parseOperation = function () {
21445 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21448 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
21449 this.consumeToken();
21450 while (node.addChild(this._parseListElement())) {
21451 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma); // optional
21453 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21454 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
21456 return this.finish(node);
21458 SCSSParser.prototype._parseListElement = function () {
21459 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ListEntry"]);
21460 var child = this._parseBinaryExpr();
21464 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
21465 node.setKey(child);
21466 if (!node.setValue(this._parseBinaryExpr())) {
21467 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
21471 node.setValue(child);
21473 return this.finish(node);
21475 SCSSParser.prototype._parseUse = function () {
21476 if (!this.peekKeyword('@use')) {
21479 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Use"]);
21480 this.consumeToken(); // @use
21481 if (!node.addChild(this._parseStringLiteral())) {
21482 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].StringLiteralExpected);
21484 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
21485 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /as|with/)) {
21486 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
21488 if (this.acceptIdent('as') &&
21489 (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module])) && !this.acceptDelim('*'))) {
21490 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrWildcardExpected);
21492 if (this.acceptIdent('with')) {
21493 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
21494 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
21496 // First variable statement, no comma.
21497 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
21498 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
21500 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
21501 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21504 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
21505 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
21508 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
21509 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
21513 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
21514 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SemiColonExpected);
21516 return this.finish(node);
21518 SCSSParser.prototype._parseModuleConfigDeclaration = function () {
21519 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ModuleConfiguration"]);
21520 if (!node.setIdentifier(this._parseVariable())) {
21523 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon) || !node.setValue(this._parseExpr(true))) {
21524 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableValueExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
21526 return this.finish(node);
21528 SCSSParser.prototype._parseForward = function () {
21529 if (!this.peekKeyword('@forward')) {
21532 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Forward"]);
21533 this.consumeToken();
21534 if (!node.addChild(this._parseStringLiteral())) {
21535 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].StringLiteralExpected);
21537 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
21538 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /as|hide|show/)) {
21539 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
21541 if (this.acceptIdent('as')) {
21542 var identifier = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Forward]);
21543 if (!node.setIdentifier(identifier)) {
21544 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected);
21546 // Wildcard must be the next character after the identifier string.
21547 if (this.hasWhitespace() || !this.acceptDelim('*')) {
21548 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].WildcardExpected);
21551 if (this.peekIdent('hide') || this.peekIdent('show')) {
21552 if (!node.addChild(this._parseForwardVisibility())) {
21553 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrVariableExpected);
21557 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
21558 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SemiColonExpected);
21560 return this.finish(node);
21562 SCSSParser.prototype._parseForwardVisibility = function () {
21563 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ForwardVisibility"]);
21564 // Assume to be "hide" or "show".
21565 node.setIdentifier(this._parseIdent());
21566 while (node.addChild(this._parseVariable() || this._parseIdent())) {
21567 // Consume all variables and idents ahead.
21569 // More than just identifier
21570 return node.getChildren().length > 1 ? node : null;
21572 SCSSParser.prototype._parseSupportsCondition = function () {
21573 return this._parseInterpolation() || _super.prototype._parseSupportsCondition.call(this);
21576 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__["Parser"]));
21582 /***/ (function(module, __webpack_exports__, __webpack_require__) {
21585 __webpack_require__.r(__webpack_exports__);
21586 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableName", function() { return VariableName; });
21587 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterpolationFunction", function() { return InterpolationFunction; });
21588 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Default", function() { return Default; });
21589 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EqualsOperator", function() { return EqualsOperator; });
21590 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotEqualsOperator", function() { return NotEqualsOperator; });
21591 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GreaterEqualsOperator", function() { return GreaterEqualsOperator; });
21592 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmallerEqualsOperator", function() { return SmallerEqualsOperator; });
21593 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ellipsis", function() { return Ellipsis; });
21594 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Module", function() { return Module; });
21595 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSScanner", function() { return SCSSScanner; });
21596 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
21597 /*---------------------------------------------------------------------------------------------
21598 * Copyright (c) Microsoft Corporation. All rights reserved.
21599 * Licensed under the MIT License. See License.txt in the project root for license information.
21600 *--------------------------------------------------------------------------------------------*/
21602 var __extends = (undefined && undefined.__extends) || (function () {
21603 var extendStatics = function (d, b) {
21604 extendStatics = Object.setPrototypeOf ||
21605 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21606 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21607 return extendStatics(d, b);
21609 return function (d, b) {
21610 extendStatics(d, b);
21611 function __() { this.constructor = d; }
21612 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21616 var _FSL = '/'.charCodeAt(0);
21617 var _NWL = '\n'.charCodeAt(0);
21618 var _CAR = '\r'.charCodeAt(0);
21619 var _LFD = '\f'.charCodeAt(0);
21620 var _DLR = '$'.charCodeAt(0);
21621 var _HSH = '#'.charCodeAt(0);
21622 var _CUL = '{'.charCodeAt(0);
21623 var _EQS = '='.charCodeAt(0);
21624 var _BNG = '!'.charCodeAt(0);
21625 var _LAN = '<'.charCodeAt(0);
21626 var _RAN = '>'.charCodeAt(0);
21627 var _DOT = '.'.charCodeAt(0);
21628 var _ATS = '@'.charCodeAt(0);
21629 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CustomToken;
21630 var VariableName = customTokenValue++;
21631 var InterpolationFunction = customTokenValue++;
21632 var Default = customTokenValue++;
21633 var EqualsOperator = customTokenValue++;
21634 var NotEqualsOperator = customTokenValue++;
21635 var GreaterEqualsOperator = customTokenValue++;
21636 var SmallerEqualsOperator = customTokenValue++;
21637 var Ellipsis = customTokenValue++;
21638 var Module = customTokenValue++;
21639 var SCSSScanner = /** @class */ (function (_super) {
21640 __extends(SCSSScanner, _super);
21641 function SCSSScanner() {
21642 return _super !== null && _super.apply(this, arguments) || this;
21644 SCSSScanner.prototype.scanNext = function (offset) {
21646 if (this.stream.advanceIfChar(_DLR)) {
21647 var content = ['$'];
21648 if (this.ident(content)) {
21649 return this.finishToken(offset, VariableName, content.join(''));
21652 this.stream.goBackTo(offset);
21655 // scss: interpolation function #{..})
21656 if (this.stream.advanceIfChars([_HSH, _CUL])) {
21657 return this.finishToken(offset, InterpolationFunction);
21660 if (this.stream.advanceIfChars([_EQS, _EQS])) {
21661 return this.finishToken(offset, EqualsOperator);
21664 if (this.stream.advanceIfChars([_BNG, _EQS])) {
21665 return this.finishToken(offset, NotEqualsOperator);
21668 if (this.stream.advanceIfChar(_LAN)) {
21669 if (this.stream.advanceIfChar(_EQS)) {
21670 return this.finishToken(offset, SmallerEqualsOperator);
21672 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim);
21674 // ooperators >, >=
21675 if (this.stream.advanceIfChar(_RAN)) {
21676 if (this.stream.advanceIfChar(_EQS)) {
21677 return this.finishToken(offset, GreaterEqualsOperator);
21679 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim);
21682 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
21683 return this.finishToken(offset, Ellipsis);
21685 return _super.prototype.scanNext.call(this, offset);
21687 SCSSScanner.prototype.comment = function () {
21688 if (_super.prototype.comment.call(this)) {
21691 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
21692 this.stream.advanceWhileChar(function (ch) {
21708 return SCSSScanner;
21709 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]));
21715 /***/ (function(module, __webpack_exports__, __webpack_require__) {
21718 __webpack_require__.r(__webpack_exports__);
21719 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSIssueType", function() { return SCSSIssueType; });
21720 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSParseError", function() { return SCSSParseError; });
21721 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
21722 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
21723 /*---------------------------------------------------------------------------------------------
21724 * Copyright (c) Microsoft Corporation. All rights reserved.
21725 * Licensed under the MIT License. See License.txt in the project root for license information.
21726 *--------------------------------------------------------------------------------------------*/
21729 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
21730 var SCSSIssueType = /** @class */ (function () {
21731 function SCSSIssueType(id, message) {
21733 this.message = message;
21735 return SCSSIssueType;
21738 var SCSSParseError = {
21739 FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
21740 ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
21741 InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
21747 /***/ (function(module, __webpack_exports__, __webpack_require__) {
21750 __webpack_require__.r(__webpack_exports__);
21751 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSCompletion", function() { return SCSSCompletion; });
21752 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100);
21753 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
21754 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(103);
21755 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
21756 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_3__);
21757 /*---------------------------------------------------------------------------------------------
21758 * Copyright (c) Microsoft Corporation. All rights reserved.
21759 * Licensed under the MIT License. See License.txt in the project root for license information.
21760 *--------------------------------------------------------------------------------------------*/
21762 var __extends = (undefined && undefined.__extends) || (function () {
21763 var extendStatics = function (d, b) {
21764 extendStatics = Object.setPrototypeOf ||
21765 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21766 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21767 return extendStatics(d, b);
21769 return function (d, b) {
21770 extendStatics(d, b);
21771 function __() { this.constructor = d; }
21772 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21779 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__["loadMessageBundle"]();
21780 var SCSSCompletion = /** @class */ (function (_super) {
21781 __extends(SCSSCompletion, _super);
21782 function SCSSCompletion(lsServiceOptions, cssDataManager) {
21783 var _this = _super.call(this, '$', lsServiceOptions, cssDataManager) || this;
21784 addReferencesToDocumentation(SCSSCompletion.scssModuleLoaders);
21785 addReferencesToDocumentation(SCSSCompletion.scssModuleBuiltIns);
21788 SCSSCompletion.prototype.isImportPathParent = function (type) {
21789 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Forward
21790 || type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Use
21791 || _super.prototype.isImportPathParent.call(this, type);
21793 SCSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
21794 var parentType = importPathNode.getParent().type;
21795 if (parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Forward || parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Use) {
21796 for (var _i = 0, _a = SCSSCompletion.scssModuleBuiltIns; _i < _a.length; _i++) {
21800 documentation: p.documentation,
21801 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TextEdit"].replace(this.getCompletionRange(importPathNode), "'" + p.label + "'"),
21802 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module
21804 result.items.push(item);
21807 return _super.prototype.getCompletionForImportPath.call(this, importPathNode, result);
21809 SCSSCompletion.prototype.createReplaceFunction = function () {
21810 var tabStopCounter = 1;
21811 return function (_match, p1) {
21812 return '\\' + p1 + ': ${' + tabStopCounter++ + ':' + (SCSSCompletion.variableDefaults[p1] || '') + '}';
21815 SCSSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
21816 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
21817 var p = proposals_1[_i];
21818 var insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction());
21819 var label = p.func.substr(0, p.func.indexOf('('));
21823 documentation: p.desc,
21824 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
21825 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
21826 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Function
21829 item.sortText = 'z';
21831 result.items.push(item);
21835 SCSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
21836 this.createFunctionProposals(SCSSCompletion.selectorFuncs, null, true, result);
21837 return _super.prototype.getCompletionsForSelector.call(this, ruleSet, isNested, result);
21839 SCSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
21840 var functions = SCSSCompletion.builtInFuncs;
21842 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
21844 this.createFunctionProposals(functions, existingNode, true, result);
21845 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
21847 SCSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
21848 this.createFunctionProposals(SCSSCompletion.colorProposals, existingNode, false, result);
21849 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
21851 SCSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
21852 this.getCompletionForAtDirectives(result);
21853 this.getCompletionsForSelector(null, true, result);
21854 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
21856 SCSSCompletion.prototype.getCompletionsForExtendsReference = function (_extendsRef, existingNode, result) {
21857 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Rule);
21858 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
21859 var symbol = symbols_1[_i];
21861 label: symbol.name,
21862 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TextEdit"].replace(this.getCompletionRange(existingNode), symbol.name),
21863 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Function,
21865 result.items.push(suggest);
21869 SCSSCompletion.prototype.getCompletionForAtDirectives = function (result) {
21871 (_a = result.items).push.apply(_a, SCSSCompletion.scssAtDirectives);
21874 SCSSCompletion.prototype.getCompletionForTopLevel = function (result) {
21875 this.getCompletionForAtDirectives(result);
21876 this.getCompletionForModuleLoaders(result);
21877 _super.prototype.getCompletionForTopLevel.call(this, result);
21880 SCSSCompletion.prototype.getCompletionForModuleLoaders = function (result) {
21882 (_a = result.items).push.apply(_a, SCSSCompletion.scssModuleLoaders);
21885 SCSSCompletion.variableDefaults = {
21890 '$color': '#000000',
21893 '$saturation': '0%',
21894 '$lightness': '0%',
21898 '$substring': '"s"',
21902 SCSSCompletion.colorProposals = [
21903 { func: 'red($color)', desc: localize('scss.builtin.red', 'Gets the red component of a color.') },
21904 { func: 'green($color)', desc: localize('scss.builtin.green', 'Gets the green component of a color.') },
21905 { func: 'blue($color)', desc: localize('scss.builtin.blue', 'Gets the blue component of a color.') },
21906 { func: 'mix($color, $color, [$weight])', desc: localize('scss.builtin.mix', 'Mixes two colors together.') },
21907 { func: 'hue($color)', desc: localize('scss.builtin.hue', 'Gets the hue component of a color.') },
21908 { func: 'saturation($color)', desc: localize('scss.builtin.saturation', 'Gets the saturation component of a color.') },
21909 { func: 'lightness($color)', desc: localize('scss.builtin.lightness', 'Gets the lightness component of a color.') },
21910 { func: 'adjust-hue($color, $degrees)', desc: localize('scss.builtin.adjust-hue', 'Changes the hue of a color.') },
21911 { func: 'lighten($color, $amount)', desc: localize('scss.builtin.lighten', 'Makes a color lighter.') },
21912 { func: 'darken($color, $amount)', desc: localize('scss.builtin.darken', 'Makes a color darker.') },
21913 { func: 'saturate($color, $amount)', desc: localize('scss.builtin.saturate', 'Makes a color more saturated.') },
21914 { func: 'desaturate($color, $amount)', desc: localize('scss.builtin.desaturate', 'Makes a color less saturated.') },
21915 { func: 'grayscale($color)', desc: localize('scss.builtin.grayscale', 'Converts a color to grayscale.') },
21916 { func: 'complement($color)', desc: localize('scss.builtin.complement', 'Returns the complement of a color.') },
21917 { func: 'invert($color)', desc: localize('scss.builtin.invert', 'Returns the inverse of a color.') },
21918 { func: 'alpha($color)', desc: localize('scss.builtin.alpha', 'Gets the opacity component of a color.') },
21919 { func: 'opacity($color)', desc: 'Gets the alpha component (opacity) of a color.' },
21920 { func: 'rgba($color, $alpha)', desc: localize('scss.builtin.rgba', 'Changes the alpha component for a color.') },
21921 { func: 'opacify($color, $amount)', desc: localize('scss.builtin.opacify', 'Makes a color more opaque.') },
21922 { func: 'fade-in($color, $amount)', desc: localize('scss.builtin.fade-in', 'Makes a color more opaque.') },
21923 { func: 'transparentize($color, $amount)', desc: localize('scss.builtin.transparentize', 'Makes a color more transparent.') },
21924 { func: 'fade-out($color, $amount)', desc: localize('scss.builtin.fade-out', 'Makes a color more transparent.') },
21925 { func: 'adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.adjust-color', 'Increases or decreases one or more components of a color.') },
21926 { func: 'scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.scale-color', 'Fluidly scales one or more properties of a color.') },
21927 { func: 'change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.change-color', 'Changes one or more properties of a color.') },
21928 { func: 'ie-hex-str($color)', desc: localize('scss.builtin.ie-hex-str', 'Converts a color into the format understood by IE filters.') }
21930 SCSSCompletion.selectorFuncs = [
21931 { func: 'selector-nest($selectors…)', desc: localize('scss.builtin.selector-nest', 'Nests selector beneath one another like they would be nested in the stylesheet.') },
21932 { func: 'selector-append($selectors…)', desc: localize('scss.builtin.selector-append', 'Appends selectors to one another without spaces in between.') },
21933 { func: 'selector-extend($selector, $extendee, $extender)', desc: localize('scss.builtin.selector-extend', 'Extends $extendee with $extender within $selector.') },
21934 { func: 'selector-replace($selector, $original, $replacement)', desc: localize('scss.builtin.selector-replace', 'Replaces $original with $replacement within $selector.') },
21935 { func: 'selector-unify($selector1, $selector2)', desc: localize('scss.builtin.selector-unify', 'Unifies two selectors to produce a selector that matches elements matched by both.') },
21936 { func: 'is-superselector($super, $sub)', desc: localize('scss.builtin.is-superselector', 'Returns whether $super matches all the elements $sub does, and possibly more.') },
21937 { func: 'simple-selectors($selector)', desc: localize('scss.builtin.simple-selectors', 'Returns the simple selectors that comprise a compound selector.') },
21938 { func: 'selector-parse($selector)', desc: localize('scss.builtin.selector-parse', 'Parses a selector into the format returned by &.') }
21940 SCSSCompletion.builtInFuncs = [
21941 { func: 'unquote($string)', desc: localize('scss.builtin.unquote', 'Removes quotes from a string.') },
21942 { func: 'quote($string)', desc: localize('scss.builtin.quote', 'Adds quotes to a string.') },
21943 { func: 'str-length($string)', desc: localize('scss.builtin.str-length', 'Returns the number of characters in a string.') },
21944 { func: 'str-insert($string, $insert, $index)', desc: localize('scss.builtin.str-insert', 'Inserts $insert into $string at $index.') },
21945 { func: 'str-index($string, $substring)', desc: localize('scss.builtin.str-index', 'Returns the index of the first occurance of $substring in $string.') },
21946 { func: 'str-slice($string, $start-at, [$end-at])', desc: localize('scss.builtin.str-slice', 'Extracts a substring from $string.') },
21947 { func: 'to-upper-case($string)', desc: localize('scss.builtin.to-upper-case', 'Converts a string to upper case.') },
21948 { func: 'to-lower-case($string)', desc: localize('scss.builtin.to-lower-case', 'Converts a string to lower case.') },
21949 { func: 'percentage($number)', desc: localize('scss.builtin.percentage', 'Converts a unitless number to a percentage.'), type: 'percentage' },
21950 { func: 'round($number)', desc: localize('scss.builtin.round', 'Rounds a number to the nearest whole number.') },
21951 { func: 'ceil($number)', desc: localize('scss.builtin.ceil', 'Rounds a number up to the next whole number.') },
21952 { func: 'floor($number)', desc: localize('scss.builtin.floor', 'Rounds a number down to the previous whole number.') },
21953 { func: 'abs($number)', desc: localize('scss.builtin.abs', 'Returns the absolute value of a number.') },
21954 { func: 'min($numbers)', desc: localize('scss.builtin.min', 'Finds the minimum of several numbers.') },
21955 { func: 'max($numbers)', desc: localize('scss.builtin.max', 'Finds the maximum of several numbers.') },
21956 { func: 'random([$limit])', desc: localize('scss.builtin.random', 'Returns a random number.') },
21957 { func: 'length($list)', desc: localize('scss.builtin.length', 'Returns the length of a list.') },
21958 { func: 'nth($list, $n)', desc: localize('scss.builtin.nth', 'Returns a specific item in a list.') },
21959 { func: 'set-nth($list, $n, $value)', desc: localize('scss.builtin.set-nth', 'Replaces the nth item in a list.') },
21960 { func: 'join($list1, $list2, [$separator])', desc: localize('scss.builtin.join', 'Joins together two lists into one.') },
21961 { func: 'append($list1, $val, [$separator])', desc: localize('scss.builtin.append', 'Appends a single value onto the end of a list.') },
21962 { func: 'zip($lists)', desc: localize('scss.builtin.zip', 'Combines several lists into a single multidimensional list.') },
21963 { func: 'index($list, $value)', desc: localize('scss.builtin.index', 'Returns the position of a value within a list.') },
21964 { func: 'list-separator(#list)', desc: localize('scss.builtin.list-separator', 'Returns the separator of a list.') },
21965 { func: 'map-get($map, $key)', desc: localize('scss.builtin.map-get', 'Returns the value in a map associated with a given key.') },
21966 { func: 'map-merge($map1, $map2)', desc: localize('scss.builtin.map-merge', 'Merges two maps together into a new map.') },
21967 { func: 'map-remove($map, $keys)', desc: localize('scss.builtin.map-remove', 'Returns a new map with keys removed.') },
21968 { func: 'map-keys($map)', desc: localize('scss.builtin.map-keys', 'Returns a list of all keys in a map.') },
21969 { func: 'map-values($map)', desc: localize('scss.builtin.map-values', 'Returns a list of all values in a map.') },
21970 { func: 'map-has-key($map, $key)', desc: localize('scss.builtin.map-has-key', 'Returns whether a map has a value associated with a given key.') },
21971 { func: 'keywords($args)', desc: localize('scss.builtin.keywords', 'Returns the keywords passed to a function that takes variable arguments.') },
21972 { func: 'feature-exists($feature)', desc: localize('scss.builtin.feature-exists', 'Returns whether a feature exists in the current Sass runtime.') },
21973 { func: 'variable-exists($name)', desc: localize('scss.builtin.variable-exists', 'Returns whether a variable with the given name exists in the current scope.') },
21974 { func: 'global-variable-exists($name)', desc: localize('scss.builtin.global-variable-exists', 'Returns whether a variable with the given name exists in the global scope.') },
21975 { func: 'function-exists($name)', desc: localize('scss.builtin.function-exists', 'Returns whether a function with the given name exists.') },
21976 { func: 'mixin-exists($name)', desc: localize('scss.builtin.mixin-exists', 'Returns whether a mixin with the given name exists.') },
21977 { func: 'inspect($value)', desc: localize('scss.builtin.inspect', 'Returns the string representation of a value as it would be represented in Sass.') },
21978 { func: 'type-of($value)', desc: localize('scss.builtin.type-of', 'Returns the type of a value.') },
21979 { func: 'unit($number)', desc: localize('scss.builtin.unit', 'Returns the unit(s) associated with a number.') },
21980 { func: 'unitless($number)', desc: localize('scss.builtin.unitless', 'Returns whether a number has units.') },
21981 { func: 'comparable($number1, $number2)', desc: localize('scss.builtin.comparable', 'Returns whether two numbers can be added, subtracted, or compared.') },
21982 { func: 'call($name, $args…)', desc: localize('scss.builtin.call', 'Dynamically calls a Sass function.') }
21984 SCSSCompletion.scssAtDirectives = [
21987 documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector."),
21988 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
21992 documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."),
21993 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
21997 documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
21998 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22002 documentation: localize("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),
22003 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22007 documentation: localize("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),
22008 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22012 documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
22013 insertText: "@if ${1:expr} {\n\t$0\n}",
22014 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22015 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22019 documentation: localize("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),
22020 insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",
22021 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22022 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22026 documentation: localize("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),
22027 insertText: "@each \\$${1:var} in ${2:list} {\n\t$0\n}",
22028 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22029 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22033 documentation: localize("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),
22034 insertText: "@while ${1:condition} {\n\t$0\n}",
22035 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22036 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22040 documentation: localize("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."),
22041 insertText: "@mixin ${1:name} {\n\t$0\n}",
22042 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22043 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22047 documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."),
22048 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22051 label: "@function",
22052 documentation: localize("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."),
22053 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22056 SCSSCompletion.scssModuleLoaders = [
22059 documentation: localize("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),
22060 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/use' }],
22061 insertText: "@use '$0';",
22062 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22063 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22067 documentation: localize("scss.builtin.@forward", "Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),
22068 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/forward' }],
22069 insertText: "@forward '$0';",
22070 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
22071 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
22074 SCSSCompletion.scssModuleBuiltIns = [
22076 label: 'sass:math',
22077 documentation: localize('scss.builtin.sass:math', 'Provides functions that operate on numbers.'),
22078 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/math' }]
22081 label: 'sass:string',
22082 documentation: localize('scss.builtin.sass:string', 'Makes it easy to combine, search, or split apart strings.'),
22083 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/string' }]
22086 label: 'sass:color',
22087 documentation: localize('scss.builtin.sass:color', 'Generates new colors based on existing ones, making it easy to build color themes.'),
22088 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/color' }]
22091 label: 'sass:list',
22092 documentation: localize('scss.builtin.sass:list', 'Lets you access and modify values in lists.'),
22093 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/list' }]
22097 documentation: localize('scss.builtin.sass:map', 'Makes it possible to look up the value associated with a key in a map, and much more.'),
22098 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/map' }]
22101 label: 'sass:selector',
22102 documentation: localize('scss.builtin.sass:selector', 'Provides access to Sass’s powerful selector engine.'),
22103 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/selector' }]
22106 label: 'sass:meta',
22107 documentation: localize('scss.builtin.sass:meta', 'Exposes the details of Sass’s inner workings.'),
22108 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/meta' }]
22111 return SCSSCompletion;
22112 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__["CSSCompletion"]));
22115 * Todo @Pine: Remove this and do it through custom data
22117 function addReferencesToDocumentation(items) {
22118 items.forEach(function (i) {
22119 if (i.documentation && i.references && i.references.length > 0) {
22120 var markdownDoc = typeof i.documentation === 'string'
22121 ? { kind: 'markdown', value: i.documentation }
22122 : { kind: 'markdown', value: i.documentation.value };
22123 markdownDoc.value += '\n\n';
22124 markdownDoc.value += i.references
22125 .map(function (r) {
22126 return "[" + r.name + "](" + r.url + ")";
22129 i.documentation = markdownDoc;
22137 /***/ (function(module, __webpack_exports__, __webpack_require__) {
22140 __webpack_require__.r(__webpack_exports__);
22141 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSParser", function() { return LESSParser; });
22142 /* harmony import */ var _lessScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(121);
22143 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
22144 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
22145 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91);
22146 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93);
22147 /*---------------------------------------------------------------------------------------------
22148 * Copyright (c) Microsoft Corporation. All rights reserved.
22149 * Licensed under the MIT License. See License.txt in the project root for license information.
22150 *--------------------------------------------------------------------------------------------*/
22152 var __extends = (undefined && undefined.__extends) || (function () {
22153 var extendStatics = function (d, b) {
22154 extendStatics = Object.setPrototypeOf ||
22155 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22156 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22157 return extendStatics(d, b);
22159 return function (d, b) {
22160 extendStatics(d, b);
22161 function __() { this.constructor = d; }
22162 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22171 /// A parser for LESS
22172 /// http://lesscss.org/
22174 var LESSParser = /** @class */ (function (_super) {
22175 __extends(LESSParser, _super);
22176 function LESSParser() {
22177 return _super.call(this, new _lessScanner__WEBPACK_IMPORTED_MODULE_0__["LESSScanner"]()) || this;
22179 LESSParser.prototype._parseStylesheetStatement = function (isNested) {
22180 if (isNested === void 0) { isNested = false; }
22181 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
22182 return this._parseVariableDeclaration()
22183 || this._parsePlugin()
22184 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
22186 return this._tryParseMixinDeclaration()
22187 || this._tryParseMixinReference()
22188 || this._parseFunction()
22189 || this._parseRuleset(true);
22191 LESSParser.prototype._parseImport = function () {
22192 if (!this.peekKeyword('@import') && !this.peekKeyword('@import-once') /* deprecated in less 1.4.1 */) {
22195 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Import"]);
22196 this.consumeToken();
22197 // less 1.4.1: @import (css) "lib"
22198 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22199 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident)) {
22200 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
22203 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
22206 } while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident));
22207 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22208 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
22211 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
22212 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].URIOrStringExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
22214 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
22215 node.setMedialist(this._parseMediaQueryList());
22217 return this.finish(node);
22219 LESSParser.prototype._parsePlugin = function () {
22220 if (!this.peekKeyword('@plugin')) {
22223 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Plugin);
22224 this.consumeToken(); // @import
22225 if (!node.addChild(this._parseStringLiteral())) {
22226 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].StringLiteralExpected);
22228 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22229 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SemiColonExpected);
22231 return this.finish(node);
22233 LESSParser.prototype._parseMediaQuery = function (resyncStopToken) {
22234 var node = _super.prototype._parseMediaQuery.call(this, resyncStopToken);
22236 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"]);
22237 if (node_1.addChild(this._parseVariable())) {
22238 return this.finish(node_1);
22244 LESSParser.prototype._parseMediaDeclaration = function (isNested) {
22245 if (isNested === void 0) { isNested = false; }
22246 return this._tryParseRuleset(isNested)
22247 || this._tryToParseDeclaration()
22248 || this._tryParseMixinDeclaration()
22249 || this._tryParseMixinReference()
22250 || this._parseDetachedRuleSetMixin()
22251 || this._parseStylesheetStatement(isNested);
22253 LESSParser.prototype._parseMediaFeatureName = function () {
22254 return this._parseIdent() || this._parseVariable();
22256 LESSParser.prototype._parseVariableDeclaration = function (panic) {
22257 if (panic === void 0) { panic = []; }
22258 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["VariableDeclaration"]);
22259 var mark = this.mark();
22260 if (!node.setVariable(this._parseVariable(true))) {
22263 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
22264 if (this.prevToken) {
22265 node.colonPosition = this.prevToken.offset;
22267 if (node.setValue(this._parseDetachedRuleSet())) {
22268 node.needsSemicolon = false;
22270 else if (!node.setValue(this._parseExpr())) {
22271 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].VariableValueExpected, [], panic);
22273 node.addChild(this._parsePrio());
22276 this.restoreAtMark(mark);
22277 return null; // at keyword, but no ':', not a variable declaration but some at keyword
22279 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22280 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
22282 return this.finish(node);
22284 LESSParser.prototype._parseDetachedRuleSet = function () {
22285 var mark = this.mark();
22286 // "Anonymous mixin" used in each() and possibly a generic type in the future
22287 if (this.peekDelim('#') || this.peekDelim('.')) {
22288 this.consumeToken();
22289 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22290 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
22291 if (node.getParameters().addChild(this._parseMixinParameter())) {
22292 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22293 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22296 if (!node.getParameters().addChild(this._parseMixinParameter())) {
22297 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
22301 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22302 this.restoreAtMark(mark);
22307 this.restoreAtMark(mark);
22311 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
22314 var content = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["BodyDeclaration"]);
22315 this._parseBody(content, this._parseDetachedRuleSetBody.bind(this));
22316 return this.finish(content);
22318 LESSParser.prototype._parseDetachedRuleSetBody = function () {
22319 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
22321 LESSParser.prototype._addLookupChildren = function (node) {
22322 if (!node.addChild(this._parseLookupValue())) {
22325 var expectsValue = false;
22327 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
22328 expectsValue = true;
22330 if (!node.addChild(this._parseLookupValue())) {
22333 expectsValue = false;
22335 return !expectsValue;
22337 LESSParser.prototype._parseLookupValue = function () {
22338 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
22339 var mark = this.mark();
22340 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
22341 this.restoreAtMark(mark);
22344 if (((node.addChild(this._parseVariable(false, true)) ||
22345 node.addChild(this._parsePropertyIdentifier())) &&
22346 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketR)) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketR)) {
22349 this.restoreAtMark(mark);
22352 LESSParser.prototype._parseVariable = function (declaration, insideLookup) {
22353 if (declaration === void 0) { declaration = false; }
22354 if (insideLookup === void 0) { insideLookup = false; }
22355 var isPropertyReference = !declaration && this.peekDelim('$');
22356 if (!this.peekDelim('@') && !isPropertyReference && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
22359 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Variable"]);
22360 var mark = this.mark();
22361 while (this.acceptDelim('@') || (!declaration && this.acceptDelim('$'))) {
22362 if (this.hasWhitespace()) {
22363 this.restoreAtMark(mark);
22367 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident)) {
22368 this.restoreAtMark(mark);
22371 if (!insideLookup && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
22372 if (!this._addLookupChildren(node)) {
22373 this.restoreAtMark(mark);
22379 LESSParser.prototype._parseTermExpression = function () {
22380 return this._parseVariable() ||
22381 this._parseEscaped() ||
22382 _super.prototype._parseTermExpression.call(this) || // preference for colors before mixin references
22383 this._tryParseMixinReference(false);
22385 LESSParser.prototype._parseEscaped = function () {
22386 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EscapedJavaScript) ||
22387 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BadEscapedJavaScript)) {
22388 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].EscapedValue);
22389 this.consumeToken();
22390 return this.finish(node);
22392 if (this.peekDelim('~')) {
22393 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].EscapedValue);
22394 this.consumeToken();
22395 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].String) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EscapedJavaScript)) {
22396 return this.finish(node);
22399 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].TermExpected);
22404 LESSParser.prototype._parseOperator = function () {
22405 var node = this._parseGuardOperator();
22410 return _super.prototype._parseOperator.call(this);
22413 LESSParser.prototype._parseGuardOperator = function () {
22414 if (this.peekDelim('>')) {
22415 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
22416 this.consumeToken();
22417 this.acceptDelim('=');
22420 else if (this.peekDelim('=')) {
22421 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
22422 this.consumeToken();
22423 this.acceptDelim('<');
22426 else if (this.peekDelim('<')) {
22427 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
22428 this.consumeToken();
22429 this.acceptDelim('=');
22434 LESSParser.prototype._parseRuleSetDeclaration = function () {
22435 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
22436 return this._parseKeyframe()
22437 || this._parseMedia(true)
22438 || this._parseImport()
22439 || this._parseSupports(true) // @supports
22440 || this._parseDetachedRuleSetMixin() // less detached ruleset mixin
22441 || this._parseVariableDeclaration() // Variable declarations
22442 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
22444 return this._tryParseMixinDeclaration()
22445 || this._tryParseRuleset(true) // nested ruleset
22446 || this._tryParseMixinReference() // less mixin reference
22447 || this._parseFunction()
22448 || this._parseExtend() // less extend declaration
22449 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as the last option
22451 LESSParser.prototype._parseKeyframeIdent = function () {
22452 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Keyframe]) || this._parseVariable();
22454 LESSParser.prototype._parseKeyframeSelector = function () {
22455 return this._parseDetachedRuleSetMixin() // less detached ruleset mixin
22456 || _super.prototype._parseKeyframeSelector.call(this);
22458 LESSParser.prototype._parseSimpleSelectorBody = function () {
22459 return this._parseSelectorCombinator() || _super.prototype._parseSimpleSelectorBody.call(this);
22461 LESSParser.prototype._parseSelector = function (isNested) {
22463 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Selector"]);
22464 var hasContent = false;
22466 // nested selectors can start with a combinator
22467 hasContent = node.addChild(this._parseCombinator());
22469 while (node.addChild(this._parseSimpleSelector())) {
22471 var mark = this.mark();
22472 if (node.addChild(this._parseGuard()) && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
22475 this.restoreAtMark(mark);
22476 node.addChild(this._parseCombinator()); // optional
22478 return hasContent ? this.finish(node) : null;
22480 LESSParser.prototype._parseSelectorCombinator = function () {
22481 if (this.peekDelim('&')) {
22482 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorCombinator);
22483 this.consumeToken();
22484 while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Num) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
22487 return this.finish(node);
22491 LESSParser.prototype._parseSelectorIdent = function () {
22492 if (!this.peekInterpolatedIdent()) {
22495 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorInterpolation);
22496 var hasContent = this._acceptInterpolatedIdent(node);
22497 return hasContent ? this.finish(node) : null;
22499 LESSParser.prototype._parsePropertyIdentifier = function (inLookup) {
22500 if (inLookup === void 0) { inLookup = false; }
22501 var propertyRegex = /^[\w-]+/;
22502 if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) {
22505 var mark = this.mark();
22506 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
22507 node.isCustomProperty = this.acceptDelim('-') && this.acceptDelim('-');
22508 var childAdded = false;
22510 if (node.isCustomProperty) {
22511 childAdded = this._acceptInterpolatedIdent(node);
22514 childAdded = this._acceptInterpolatedIdent(node, propertyRegex);
22518 if (node.isCustomProperty) {
22519 childAdded = node.addChild(this._parseIdent());
22522 childAdded = node.addChild(this._parseRegexp(propertyRegex));
22526 this.restoreAtMark(mark);
22529 if (!inLookup && !this.hasWhitespace()) {
22530 this.acceptDelim('+');
22531 if (!this.hasWhitespace()) {
22532 this.acceptIdent('_');
22535 return this.finish(node);
22537 LESSParser.prototype.peekInterpolatedIdent = function () {
22538 return this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) ||
22539 this.peekDelim('@') ||
22540 this.peekDelim('$') ||
22541 this.peekDelim('-');
22543 LESSParser.prototype._acceptInterpolatedIdent = function (node, identRegex) {
22545 var hasContent = false;
22546 var indentInterpolation = function () {
22547 var pos = _this.mark();
22548 if (_this.acceptDelim('-')) {
22549 if (!_this.hasWhitespace()) {
22550 _this.acceptDelim('-');
22552 if (_this.hasWhitespace()) {
22553 _this.restoreAtMark(pos);
22557 return _this._parseInterpolation();
22559 var accept = identRegex ?
22560 function () { return _this.acceptRegexp(identRegex); } :
22561 function () { return _this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident); };
22563 node.addChild(this._parseInterpolation() ||
22564 this.try(indentInterpolation))) {
22566 if (this.hasWhitespace()) {
22572 LESSParser.prototype._parseInterpolation = function () {
22573 // @{name} Variable or
22574 // ${name} Property
22575 var mark = this.mark();
22576 if (this.peekDelim('@') || this.peekDelim('$')) {
22577 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Interpolation);
22578 this.consumeToken();
22579 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
22580 this.restoreAtMark(mark);
22583 if (!node.addChild(this._parseIdent())) {
22584 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected);
22586 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
22587 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightCurlyExpected);
22589 return this.finish(node);
22593 LESSParser.prototype._tryParseMixinDeclaration = function () {
22594 var mark = this.mark();
22595 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
22596 if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22597 this.restoreAtMark(mark);
22600 if (node.getParameters().addChild(this._parseMixinParameter())) {
22601 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22602 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22605 if (!node.getParameters().addChild(this._parseMixinParameter())) {
22606 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
22610 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22611 this.restoreAtMark(mark);
22614 node.setGuard(this._parseGuard());
22615 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
22616 this.restoreAtMark(mark);
22619 return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this));
22621 LESSParser.prototype._parseMixInBodyDeclaration = function () {
22622 return this._parseFontFace() || this._parseRuleSetDeclaration();
22624 LESSParser.prototype._parseMixinDeclarationIdentifier = function () {
22626 if (this.peekDelim('#') || this.peekDelim('.')) {
22627 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
22628 this.consumeToken(); // # or .
22629 if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) {
22633 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Hash)) {
22634 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
22635 this.consumeToken(); // TokenType.Hash
22640 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin];
22641 return this.finish(identifier);
22643 LESSParser.prototype._parsePseudo = function () {
22644 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
22647 var mark = this.mark();
22648 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
22649 this.consumeToken(); // :
22650 if (this.acceptIdent('extend')) {
22651 return this._completeExtends(node);
22653 this.restoreAtMark(mark);
22654 return _super.prototype._parsePseudo.call(this);
22656 LESSParser.prototype._parseExtend = function () {
22657 if (!this.peekDelim('&')) {
22660 var mark = this.mark();
22661 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
22662 this.consumeToken(); // &
22663 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon) || !this.acceptIdent('extend')) {
22664 this.restoreAtMark(mark);
22667 return this._completeExtends(node);
22669 LESSParser.prototype._completeExtends = function (node) {
22670 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22671 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].LeftParenthesisExpected);
22673 var selectors = node.getSelectors();
22674 if (!selectors.addChild(this._parseSelector(true))) {
22675 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SelectorExpected);
22677 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
22678 if (!selectors.addChild(this._parseSelector(true))) {
22679 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SelectorExpected);
22682 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22683 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
22685 return this.finish(node);
22687 LESSParser.prototype._parseDetachedRuleSetMixin = function () {
22688 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
22691 var mark = this.mark();
22692 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
22693 if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL))) {
22694 this.restoreAtMark(mark);
22697 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22698 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
22700 return this.finish(node);
22702 LESSParser.prototype._tryParseMixinReference = function (atRoot) {
22703 if (atRoot === void 0) { atRoot = true; }
22704 var mark = this.mark();
22705 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
22706 var identifier = this._parseMixinDeclarationIdentifier();
22707 while (identifier) {
22708 this.acceptDelim('>');
22709 var nextId = this._parseMixinDeclarationIdentifier();
22711 node.getNamespaces().addChild(identifier);
22712 identifier = nextId;
22718 if (!node.setIdentifier(identifier)) {
22719 this.restoreAtMark(mark);
22722 var hasArguments = false;
22723 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22724 hasArguments = true;
22725 if (node.getArguments().addChild(this._parseMixinArgument())) {
22726 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22727 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22730 if (!node.getArguments().addChild(this._parseMixinArgument())) {
22731 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ExpressionExpected);
22735 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22736 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
22738 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin];
22741 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin, _cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Rule];
22743 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
22745 this._addLookupChildren(node);
22749 node.addChild(this._parsePrio());
22751 if (!hasArguments && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
22752 this.restoreAtMark(mark);
22755 return this.finish(node);
22757 LESSParser.prototype._parseMixinArgument = function () {
22758 // [variableName ':'] expression | variableName '...'
22759 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionArgument"]);
22760 var pos = this.mark();
22761 var argument = this._parseVariable();
22763 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
22764 this.restoreAtMark(pos);
22767 node.setIdentifier(argument);
22770 if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) {
22771 return this.finish(node);
22773 this.restoreAtMark(pos);
22776 LESSParser.prototype._parseMixinParameter = function () {
22777 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionParameter"]);
22778 // special rest variable: @rest...
22779 if (this.peekKeyword('@rest')) {
22780 var restNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
22781 this.consumeToken();
22782 if (!this.accept(_lessScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
22783 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].DotExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
22785 node.setIdentifier(this.finish(restNode));
22786 return this.finish(node);
22788 // special const args: ...
22789 if (this.peek(_lessScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
22790 var varargsNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
22791 this.consumeToken();
22792 node.setIdentifier(this.finish(varargsNode));
22793 return this.finish(node);
22795 var hasContent = false;
22796 // default variable declaration: @param: 12 or @name
22797 if (node.setIdentifier(this._parseVariable())) {
22798 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon);
22801 if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) {
22804 return this.finish(node);
22806 LESSParser.prototype._parseGuard = function () {
22807 if (!this.peekIdent('when')) {
22810 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["LessGuard"]);
22811 this.consumeToken(); // when
22812 node.isNegated = this.acceptIdent('not');
22813 if (!node.getConditions().addChild(this._parseGuardCondition())) {
22814 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ConditionExpected);
22816 while (this.acceptIdent('and') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
22817 if (!node.getConditions().addChild(this._parseGuardCondition())) {
22818 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ConditionExpected);
22821 return this.finish(node);
22823 LESSParser.prototype._parseGuardCondition = function () {
22824 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22827 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["GuardCondition"]);
22828 this.consumeToken(); // ParenthesisL
22829 if (!node.addChild(this._parseExpr())) {
22832 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22833 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
22835 return this.finish(node);
22837 LESSParser.prototype._parseFunction = function () {
22838 var pos = this.mark();
22839 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Function"]);
22840 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
22843 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
22844 this.restoreAtMark(pos);
22847 if (node.getArguments().addChild(this._parseMixinArgument())) {
22848 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
22849 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22852 if (!node.getArguments().addChild(this._parseMixinArgument())) {
22853 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ExpressionExpected);
22857 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22858 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
22860 return this.finish(node);
22862 LESSParser.prototype._parseFunctionIdentifier = function () {
22863 if (this.peekDelim('%')) {
22864 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
22865 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Function];
22866 this.consumeToken();
22867 return this.finish(node);
22869 return _super.prototype._parseFunctionIdentifier.call(this);
22871 LESSParser.prototype._parseURLArgument = function () {
22872 var pos = this.mark();
22873 var node = _super.prototype._parseURLArgument.call(this);
22874 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
22875 this.restoreAtMark(pos);
22876 var node_2 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
22877 node_2.addChild(this._parseBinaryExpr());
22878 return this.finish(node_2);
22883 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__["Parser"]));
22889 /***/ (function(module, __webpack_exports__, __webpack_require__) {
22892 __webpack_require__.r(__webpack_exports__);
22893 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ellipsis", function() { return Ellipsis; });
22894 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSScanner", function() { return LESSScanner; });
22895 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
22896 /*---------------------------------------------------------------------------------------------
22897 * Copyright (c) Microsoft Corporation. All rights reserved.
22898 * Licensed under the MIT License. See License.txt in the project root for license information.
22899 *--------------------------------------------------------------------------------------------*/
22901 var __extends = (undefined && undefined.__extends) || (function () {
22902 var extendStatics = function (d, b) {
22903 extendStatics = Object.setPrototypeOf ||
22904 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22905 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22906 return extendStatics(d, b);
22908 return function (d, b) {
22909 extendStatics(d, b);
22910 function __() { this.constructor = d; }
22911 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22915 var _FSL = '/'.charCodeAt(0);
22916 var _NWL = '\n'.charCodeAt(0);
22917 var _CAR = '\r'.charCodeAt(0);
22918 var _LFD = '\f'.charCodeAt(0);
22919 var _TIC = '`'.charCodeAt(0);
22920 var _DOT = '.'.charCodeAt(0);
22921 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CustomToken;
22922 var Ellipsis = customTokenValue++;
22923 var LESSScanner = /** @class */ (function (_super) {
22924 __extends(LESSScanner, _super);
22925 function LESSScanner() {
22926 return _super !== null && _super.apply(this, arguments) || this;
22928 LESSScanner.prototype.scanNext = function (offset) {
22929 // LESS: escaped JavaScript code `const a = "dddd"`
22930 var tokenType = this.escapedJavaScript();
22931 if (tokenType !== null) {
22932 return this.finishToken(offset, tokenType);
22934 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
22935 return this.finishToken(offset, Ellipsis);
22937 return _super.prototype.scanNext.call(this, offset);
22939 LESSScanner.prototype.comment = function () {
22940 if (_super.prototype.comment.call(this)) {
22943 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
22944 this.stream.advanceWhileChar(function (ch) {
22960 LESSScanner.prototype.escapedJavaScript = function () {
22961 var ch = this.stream.peekChar();
22963 this.stream.advance(1);
22964 this.stream.advanceWhileChar(function (ch) { return ch !== _TIC; });
22965 return this.stream.advanceIfChar(_TIC) ? _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EscapedJavaScript : _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadEscapedJavaScript;
22969 return LESSScanner;
22970 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]));
22976 /***/ (function(module, __webpack_exports__, __webpack_require__) {
22979 __webpack_require__.r(__webpack_exports__);
22980 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSCompletion", function() { return LESSCompletion; });
22981 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100);
22982 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(103);
22983 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
22984 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_2__);
22985 /*---------------------------------------------------------------------------------------------
22986 * Copyright (c) Microsoft Corporation. All rights reserved.
22987 * Licensed under the MIT License. See License.txt in the project root for license information.
22988 *--------------------------------------------------------------------------------------------*/
22990 var __extends = (undefined && undefined.__extends) || (function () {
22991 var extendStatics = function (d, b) {
22992 extendStatics = Object.setPrototypeOf ||
22993 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22994 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22995 return extendStatics(d, b);
22997 return function (d, b) {
22998 extendStatics(d, b);
22999 function __() { this.constructor = d; }
23000 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23006 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__["loadMessageBundle"]();
23007 var LESSCompletion = /** @class */ (function (_super) {
23008 __extends(LESSCompletion, _super);
23009 function LESSCompletion(lsOptions, cssDataManager) {
23010 return _super.call(this, '@', lsOptions, cssDataManager) || this;
23012 LESSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
23013 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
23014 var p = proposals_1[_i];
23018 documentation: p.description,
23019 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TextEdit"].replace(this.getCompletionRange(existingNode), p.name + '($0)'),
23020 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["InsertTextFormat"].Snippet,
23021 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["CompletionItemKind"].Function
23024 item.sortText = 'z';
23026 result.items.push(item);
23030 LESSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
23031 var functions = LESSCompletion.builtInProposals;
23033 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
23035 this.createFunctionProposals(functions, existingNode, true, result);
23036 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
23038 LESSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
23039 this.createFunctionProposals(LESSCompletion.colorProposals, existingNode, false, result);
23040 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
23042 LESSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
23043 this.getCompletionsForSelector(null, true, result);
23044 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
23046 LESSCompletion.builtInProposals = [
23047 // Boolean functions
23050 'example': 'if(condition, trueValue [, falseValue]);',
23051 'description': localize('less.builtin.if', 'returns one of two values depending on a condition.')
23055 'example': 'boolean(condition);',
23056 'description': localize('less.builtin.boolean', '"store" a boolean test for later evaluation in a guard or if().')
23061 'example': 'length(@list);',
23062 'description': localize('less.builtin.length', 'returns the number of elements in a value list')
23066 'example': 'extract(@list, index);',
23067 'description': localize('less.builtin.extract', 'returns a value at the specified position in the list')
23071 'example': 'range([start, ] end [, step]);',
23072 'description': localize('less.builtin.range', 'generate a list spanning a range of values')
23076 'example': 'each(@list, ruleset);',
23077 'description': localize('less.builtin.each', 'bind the evaluation of a ruleset to each member of a list.')
23082 'example': 'escape(@string);',
23083 'description': localize('less.builtin.escape', 'URL encodes a string')
23087 'example': 'e(@string);',
23088 'description': localize('less.builtin.e', 'escape string content')
23092 'example': 'replace(@string, @pattern, @replacement[, @flags]);',
23093 'description': localize('less.builtin.replace', 'string replace')
23097 'example': 'unit(@dimension, [@unit: \'\']);',
23098 'description': localize('less.builtin.unit', 'remove or change the unit of a dimension')
23102 'example': 'color(@string);',
23103 'description': localize('less.builtin.color', 'parses a string to a color'),
23108 'example': 'convert(@value, unit);',
23109 'description': localize('less.builtin.convert', 'converts numbers from one type into another')
23112 'name': 'data-uri',
23113 'example': 'data-uri([mimetype,] url);',
23114 'description': localize('less.builtin.data-uri', 'inlines a resource and falls back to `url()`'),
23119 'description': localize('less.builtin.abs', 'absolute value of a number'),
23120 'example': 'abs(number);'
23124 'description': localize('less.builtin.acos', 'arccosine - inverse of cosine function'),
23125 'example': 'acos(number);'
23129 'description': localize('less.builtin.asin', 'arcsine - inverse of sine function'),
23130 'example': 'asin(number);'
23134 'example': 'ceil(@number);',
23135 'description': localize('less.builtin.ceil', 'rounds up to an integer')
23139 'description': localize('less.builtin.cos', 'cosine function'),
23140 'example': 'cos(number);'
23144 'description': localize('less.builtin.floor', 'rounds down to an integer'),
23145 'example': 'floor(@number);'
23148 'name': 'percentage',
23149 'description': localize('less.builtin.percentage', 'converts to a %, e.g. 0.5 > 50%'),
23150 'example': 'percentage(@number);',
23151 'type': 'percentage'
23155 'description': localize('less.builtin.round', 'rounds a number to a number of places'),
23156 'example': 'round(number, [places: 0]);'
23160 'description': localize('less.builtin.sqrt', 'calculates square root of a number'),
23161 'example': 'sqrt(number);'
23165 'description': localize('less.builtin.sin', 'sine function'),
23166 'example': 'sin(number);'
23170 'description': localize('less.builtin.tan', 'tangent function'),
23171 'example': 'tan(number);'
23175 'description': localize('less.builtin.atan', 'arctangent - inverse of tangent function'),
23176 'example': 'atan(number);'
23180 'description': localize('less.builtin.pi', 'returns pi'),
23185 'description': localize('less.builtin.pow', 'first argument raised to the power of the second argument'),
23186 'example': 'pow(@base, @exponent);'
23190 'description': localize('less.builtin.mod', 'first argument modulus second argument'),
23191 'example': 'mod(number, number);'
23195 'description': localize('less.builtin.min', 'returns the lowest of one or more values'),
23196 'example': 'min(@x, @y);'
23200 'description': localize('less.builtin.max', 'returns the lowest of one or more values'),
23201 'example': 'max(@x, @y);'
23204 LESSCompletion.colorProposals = [
23207 'example': 'argb(@color);',
23208 'description': localize('less.builtin.argb', 'creates a #AARRGGBB')
23212 'example': 'hsl(@hue, @saturation, @lightness);',
23213 'description': localize('less.builtin.hsl', 'creates a color')
23217 'example': 'hsla(@hue, @saturation, @lightness, @alpha);',
23218 'description': localize('less.builtin.hsla', 'creates a color')
23222 'example': 'hsv(@hue, @saturation, @value);',
23223 'description': localize('less.builtin.hsv', 'creates a color')
23227 'example': 'hsva(@hue, @saturation, @value, @alpha);',
23228 'description': localize('less.builtin.hsva', 'creates a color')
23232 'example': 'hue(@color);',
23233 'description': localize('less.builtin.hue', 'returns the `hue` channel of `@color` in the HSL space')
23236 'name': 'saturation',
23237 'example': 'saturation(@color);',
23238 'description': localize('less.builtin.saturation', 'returns the `saturation` channel of `@color` in the HSL space')
23241 'name': 'lightness',
23242 'example': 'lightness(@color);',
23243 'description': localize('less.builtin.lightness', 'returns the `lightness` channel of `@color` in the HSL space')
23247 'example': 'hsvhue(@color);',
23248 'description': localize('less.builtin.hsvhue', 'returns the `hue` channel of `@color` in the HSV space')
23251 'name': 'hsvsaturation',
23252 'example': 'hsvsaturation(@color);',
23253 'description': localize('less.builtin.hsvsaturation', 'returns the `saturation` channel of `@color` in the HSV space')
23256 'name': 'hsvvalue',
23257 'example': 'hsvvalue(@color);',
23258 'description': localize('less.builtin.hsvvalue', 'returns the `value` channel of `@color` in the HSV space')
23262 'example': 'red(@color);',
23263 'description': localize('less.builtin.red', 'returns the `red` channel of `@color`')
23267 'example': 'green(@color);',
23268 'description': localize('less.builtin.green', 'returns the `green` channel of `@color`')
23272 'example': 'blue(@color);',
23273 'description': localize('less.builtin.blue', 'returns the `blue` channel of `@color`')
23277 'example': 'alpha(@color);',
23278 'description': localize('less.builtin.alpha', 'returns the `alpha` channel of `@color`')
23282 'example': 'luma(@color);',
23283 'description': localize('less.builtin.luma', 'returns the `luma` value (perceptual brightness) of `@color`')
23286 'name': 'saturate',
23287 'example': 'saturate(@color, 10%);',
23288 'description': localize('less.builtin.saturate', 'return `@color` 10% points more saturated')
23291 'name': 'desaturate',
23292 'example': 'desaturate(@color, 10%);',
23293 'description': localize('less.builtin.desaturate', 'return `@color` 10% points less saturated')
23297 'example': 'lighten(@color, 10%);',
23298 'description': localize('less.builtin.lighten', 'return `@color` 10% points lighter')
23302 'example': 'darken(@color, 10%);',
23303 'description': localize('less.builtin.darken', 'return `@color` 10% points darker')
23307 'example': 'fadein(@color, 10%);',
23308 'description': localize('less.builtin.fadein', 'return `@color` 10% points less transparent')
23312 'example': 'fadeout(@color, 10%);',
23313 'description': localize('less.builtin.fadeout', 'return `@color` 10% points more transparent')
23317 'example': 'fade(@color, 50%);',
23318 'description': localize('less.builtin.fade', 'return `@color` with 50% transparency')
23322 'example': 'spin(@color, 10);',
23323 'description': localize('less.builtin.spin', 'return `@color` with a 10 degree larger in hue')
23327 'example': 'mix(@color1, @color2, [@weight: 50%]);',
23328 'description': localize('less.builtin.mix', 'return a mix of `@color1` and `@color2`')
23331 'name': 'greyscale',
23332 'example': 'greyscale(@color);',
23333 'description': localize('less.builtin.greyscale', 'returns a grey, 100% desaturated color'),
23336 'name': 'contrast',
23337 'example': 'contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);',
23338 'description': localize('less.builtin.contrast', 'return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes')
23341 'name': 'multiply',
23342 'example': 'multiply(@color1, @color2);'
23346 'example': 'screen(@color1, @color2);'
23350 'example': 'overlay(@color1, @color2);'
23353 'name': 'softlight',
23354 'example': 'softlight(@color1, @color2);'
23357 'name': 'hardlight',
23358 'example': 'hardlight(@color1, @color2);'
23361 'name': 'difference',
23362 'example': 'difference(@color1, @color2);'
23365 'name': 'exclusion',
23366 'example': 'exclusion(@color1, @color2);'
23370 'example': 'average(@color1, @color2);'
23373 'name': 'negation',
23374 'example': 'negation(@color1, @color2);'
23377 return LESSCompletion;
23378 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__["CSSCompletion"]));
23384 /***/ (function(module, __webpack_exports__, __webpack_require__) {
23387 __webpack_require__.r(__webpack_exports__);
23388 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFoldingRanges", function() { return getFoldingRanges; });
23389 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
23390 /* harmony import */ var _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
23391 /* harmony import */ var _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(121);
23392 /*---------------------------------------------------------------------------------------------
23393 * Copyright (c) Microsoft Corporation. All rights reserved.
23394 * Licensed under the MIT License. See License.txt in the project root for license information.
23395 *--------------------------------------------------------------------------------------------*/
23400 function getFoldingRanges(document, context) {
23401 var ranges = computeFoldingRanges(document);
23402 return limitFoldingRanges(ranges, context);
23404 function computeFoldingRanges(document) {
23405 function getStartLine(t) {
23406 return document.positionAt(t.offset).line;
23408 function getEndLine(t) {
23409 return document.positionAt(t.offset + t.len).line;
23411 function getScanner() {
23412 switch (document.languageId) {
23414 return new _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__["SCSSScanner"]();
23416 return new _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__["LESSScanner"]();
23418 return new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]();
23421 function tokenToRange(t, kind) {
23422 var startLine = getStartLine(t);
23423 var endLine = getEndLine(t);
23424 if (startLine !== endLine) {
23426 startLine: startLine,
23436 var delimiterStack = [];
23437 var scanner = getScanner();
23438 scanner.ignoreComment = false;
23439 scanner.setSource(document.getText());
23440 var token = scanner.scan();
23441 var prevToken = null;
23442 var _loop_1 = function () {
23443 switch (token.type) {
23444 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
23445 case _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__["InterpolationFunction"]:
23447 delimiterStack.push({ line: getStartLine(token), type: 'brace', isStart: true });
23450 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR: {
23451 if (delimiterStack.length !== 0) {
23452 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
23453 if (!prevDelimiter) {
23456 var endLine = getEndLine(token);
23457 if (prevDelimiter.type === 'brace') {
23459 * Other than the case when curly brace is not on a new line by itself, for example
23462 * Use endLine minus one to show ending curly brace
23464 if (prevToken && getEndLine(prevToken) !== endLine) {
23467 if (prevDelimiter.line !== endLine) {
23469 startLine: prevDelimiter.line,
23479 * In CSS, there is no single line comment prefixed with //
23480 * All comments are marked as `Comment`
23482 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comment: {
23483 var commentRegionMarkerToDelimiter_1 = function (marker) {
23484 if (marker === '#region') {
23485 return { line: getStartLine(token), type: 'comment', isStart: true };
23488 return { line: getEndLine(token), type: 'comment', isStart: false };
23491 var getCurrDelimiter = function (token) {
23492 var matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
23494 return commentRegionMarkerToDelimiter_1(matches[1]);
23496 else if (document.languageId === 'scss' || document.languageId === 'less') {
23497 var matches_1 = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
23499 return commentRegionMarkerToDelimiter_1(matches_1[1]);
23504 var currDelimiter = getCurrDelimiter(token);
23505 // /* */ comment region folding
23506 // All #region and #endregion cases
23507 if (currDelimiter) {
23508 if (currDelimiter.isStart) {
23509 delimiterStack.push(currDelimiter);
23512 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
23513 if (!prevDelimiter) {
23516 if (prevDelimiter.type === 'comment') {
23517 if (prevDelimiter.line !== currDelimiter.line) {
23519 startLine: prevDelimiter.line,
23520 endLine: currDelimiter.line,
23527 // Multiline comment case
23529 var range = tokenToRange(token, 'comment');
23531 ranges.push(range);
23538 token = scanner.scan();
23540 while (token.type !== _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) {
23545 function popPrevStartDelimiterOfType(stack, type) {
23546 if (stack.length === 0) {
23549 for (var i = stack.length - 1; i >= 0; i--) {
23550 if (stack[i].type === type && stack[i].isStart) {
23551 return stack.splice(i, 1)[0];
23558 * - Remove invalid regions (intersections)
23559 * - If limit exceeds, only return `rangeLimit` amount of ranges
23561 function limitFoldingRanges(ranges, context) {
23562 var maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
23563 var sortedRanges = ranges.sort(function (r1, r2) {
23564 var diff = r1.startLine - r2.startLine;
23566 diff = r1.endLine - r2.endLine;
23570 var validRanges = [];
23571 var prevEndLine = -1;
23572 sortedRanges.forEach(function (r) {
23573 if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
23574 validRanges.push(r);
23575 prevEndLine = r.endLine;
23578 if (validRanges.length < maxRanges) {
23579 return validRanges;
23582 return validRanges.slice(0, maxRanges);
23589 /***/ (function(module, __webpack_exports__, __webpack_require__) {
23592 __webpack_require__.r(__webpack_exports__);
23593 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSDataManager", function() { return CSSDataManager; });
23594 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99);
23595 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(125);
23596 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126);
23597 /*---------------------------------------------------------------------------------------------
23598 * Copyright (c) Microsoft Corporation. All rights reserved.
23599 * Licensed under the MIT License. See License.txt in the project root for license information.
23600 *--------------------------------------------------------------------------------------------*/
23605 var CSSDataManager = /** @class */ (function () {
23606 function CSSDataManager(options) {
23607 this.dataProviders = [];
23608 this._propertySet = {};
23609 this._atDirectiveSet = {};
23610 this._pseudoClassSet = {};
23611 this._pseudoElementSet = {};
23612 this._properties = [];
23613 this._atDirectives = [];
23614 this._pseudoClasses = [];
23615 this._pseudoElements = [];
23616 this.setDataProviders((options === null || options === void 0 ? void 0 : options.useDefaultDataProvider) !== false, (options === null || options === void 0 ? void 0 : options.customDataProviders) || []);
23618 CSSDataManager.prototype.setDataProviders = function (builtIn, providers) {
23620 this.dataProviders = [];
23622 this.dataProviders.push(new _dataProvider__WEBPACK_IMPORTED_MODULE_2__["CSSDataProvider"](_data_webCustomData__WEBPACK_IMPORTED_MODULE_1__["cssData"]));
23624 (_a = this.dataProviders).push.apply(_a, providers);
23625 this.collectData();
23628 * Collect all data & handle duplicates
23630 CSSDataManager.prototype.collectData = function () {
23632 this._propertySet = {};
23633 this._atDirectiveSet = {};
23634 this._pseudoClassSet = {};
23635 this._pseudoElementSet = {};
23636 this.dataProviders.forEach(function (provider) {
23637 provider.provideProperties().forEach(function (p) {
23638 if (!_this._propertySet[p.name]) {
23639 _this._propertySet[p.name] = p;
23642 provider.provideAtDirectives().forEach(function (p) {
23643 if (!_this._atDirectiveSet[p.name]) {
23644 _this._atDirectiveSet[p.name] = p;
23647 provider.providePseudoClasses().forEach(function (p) {
23648 if (!_this._pseudoClassSet[p.name]) {
23649 _this._pseudoClassSet[p.name] = p;
23652 provider.providePseudoElements().forEach(function (p) {
23653 if (!_this._pseudoElementSet[p.name]) {
23654 _this._pseudoElementSet[p.name] = p;
23658 this._properties = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._propertySet);
23659 this._atDirectives = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._atDirectiveSet);
23660 this._pseudoClasses = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._pseudoClassSet);
23661 this._pseudoElements = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._pseudoElementSet);
23663 CSSDataManager.prototype.getProperty = function (name) { return this._propertySet[name]; };
23664 CSSDataManager.prototype.getAtDirective = function (name) { return this._atDirectiveSet[name]; };
23665 CSSDataManager.prototype.getPseudoClass = function (name) { return this._pseudoClassSet[name]; };
23666 CSSDataManager.prototype.getPseudoElement = function (name) { return this._pseudoElementSet[name]; };
23667 CSSDataManager.prototype.getProperties = function () {
23668 return this._properties;
23670 CSSDataManager.prototype.getAtDirectives = function () {
23671 return this._atDirectives;
23673 CSSDataManager.prototype.getPseudoClasses = function () {
23674 return this._pseudoClasses;
23676 CSSDataManager.prototype.getPseudoElements = function () {
23677 return this._pseudoElements;
23679 CSSDataManager.prototype.isKnownProperty = function (name) {
23680 return name.toLowerCase() in this._propertySet;
23682 CSSDataManager.prototype.isStandardProperty = function (name) {
23683 return this.isKnownProperty(name) &&
23684 (!this._propertySet[name.toLowerCase()].status || this._propertySet[name.toLowerCase()].status === 'standard');
23686 return CSSDataManager;
23693 /***/ (function(module, __webpack_exports__, __webpack_require__) {
23696 __webpack_require__.r(__webpack_exports__);
23697 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssData", function() { return cssData; });
23698 /*---------------------------------------------------------------------------------------------
23699 * Copyright (c) Microsoft Corporation. All rights reserved.
23700 * Licensed under the MIT License. See License.txt in the project root for license information.
23701 *--------------------------------------------------------------------------------------------*/
23702 // file generated from vscode-web-custom-data NPM package
23711 "description": "The width depends on the values of other properties."
23714 "name": "fit-content",
23715 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
23718 "name": "max-content",
23719 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
23722 "name": "min-content",
23723 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
23726 "syntax": "<viewport-length>{1,2}",
23729 "name": "MDN Reference",
23730 "url": "https://developer.mozilla.org/docs/Web/CSS/width"
23733 "description": "Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
23744 "description": "The height depends on the values of other properties."
23747 "name": "fit-content",
23748 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
23751 "name": "max-content",
23752 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
23755 "name": "min-content",
23756 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
23759 "syntax": "<viewport-length>{1,2}",
23762 "name": "MDN Reference",
23763 "url": "https://developer.mozilla.org/docs/Web/CSS/height"
23766 "description": "Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
23777 "description": "The element generates a block-level box"
23780 "name": "contents",
23781 "description": "The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal."
23785 "description": "The element generates a principal flex container box and establishes a flex formatting context."
23789 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
23792 "name": "flow-root",
23793 "description": "The element generates a block container box, and lays out its contents using flow layout."
23797 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
23801 "description": "The element generates an inline-level box."
23804 "name": "inline-block",
23805 "description": "A block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the box itself is formatted as an inline box."
23808 "name": "inline-flex",
23809 "description": "Inline-level flex container."
23812 "name": "inline-flexbox",
23813 "description": "Inline-level flex container. Standardized as 'inline-flex'"
23816 "name": "inline-table",
23817 "description": "Inline-level table wrapper box containing table box."
23820 "name": "list-item",
23821 "description": "One or more block boxes and one marker box."
23824 "name": "-moz-box",
23825 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
23828 "name": "-moz-deck"
23831 "name": "-moz-grid"
23834 "name": "-moz-grid-group"
23837 "name": "-moz-grid-line"
23840 "name": "-moz-groupbox"
23843 "name": "-moz-inline-box",
23844 "description": "Inline-level flex container. Standardized as 'inline-flex'"
23847 "name": "-moz-inline-grid"
23850 "name": "-moz-inline-stack"
23853 "name": "-moz-marker"
23856 "name": "-moz-popup"
23859 "name": "-moz-stack"
23862 "name": "-ms-flexbox",
23863 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
23866 "name": "-ms-grid",
23867 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
23870 "name": "-ms-inline-flexbox",
23871 "description": "Inline-level flex container. Standardized as 'inline-flex'"
23874 "name": "-ms-inline-grid",
23875 "description": "Inline-level grid container."
23879 "description": "The element and its descendants generates no boxes."
23883 "description": "The element generates a principal ruby container box, and establishes a ruby formatting context."
23886 "name": "ruby-base"
23889 "name": "ruby-base-container"
23892 "name": "ruby-text"
23895 "name": "ruby-text-container"
23899 "description": "The element generates a run-in box. Run-in elements act like inlines or blocks, depending on the surrounding elements."
23903 "description": "The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context."
23906 "name": "table-caption"
23909 "name": "table-cell"
23912 "name": "table-column"
23915 "name": "table-column-group"
23918 "name": "table-footer-group"
23921 "name": "table-header-group"
23924 "name": "table-row"
23927 "name": "table-row-group"
23930 "name": "-webkit-box",
23931 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
23934 "name": "-webkit-flex",
23935 "description": "The element lays out its contents using flow layout (block-and-inline layout)."
23938 "name": "-webkit-inline-box",
23939 "description": "Inline-level flex container. Standardized as 'inline-flex'"
23942 "name": "-webkit-inline-flex",
23943 "description": "Inline-level flex container."
23946 "syntax": "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
23949 "name": "MDN Reference",
23950 "url": "https://developer.mozilla.org/docs/Web/CSS/display"
23953 "description": "In combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",
23961 "syntax": "[ <length> | <percentage> ]{1,4}",
23964 "name": "MDN Reference",
23965 "url": "https://developer.mozilla.org/docs/Web/CSS/padding"
23968 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
23975 "name": "position",
23978 "name": "absolute",
23979 "description": "The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's 'containing block'."
23983 "description": "The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins."
23986 "name": "-ms-page",
23987 "description": "The box's position is calculated according to the 'absolute' model."
23990 "name": "relative",
23991 "description": "The box's position is calculated according to the normal flow (this is called the position in normal flow). Then the box is offset relative to its normal position."
23995 "description": "The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."
23999 "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
24002 "name": "-webkit-sticky",
24003 "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
24006 "syntax": "static | relative | absolute | sticky | fixed",
24009 "name": "MDN Reference",
24010 "url": "https://developer.mozilla.org/docs/Web/CSS/position"
24013 "description": "The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.",
24020 "syntax": "<line-width> || <line-style> || <color>",
24023 "name": "MDN Reference",
24024 "url": "https://developer.mozilla.org/docs/Web/CSS/border"
24027 "description": "Shorthand property for setting border width, style, and color.",
24042 "syntax": "[ <length> | <percentage> | auto ]{1,4}",
24045 "name": "MDN Reference",
24046 "url": "https://developer.mozilla.org/docs/Web/CSS/margin"
24049 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits.",
24060 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
24063 "syntax": "<length> | <percentage> | auto",
24066 "name": "MDN Reference",
24067 "url": "https://developer.mozilla.org/docs/Web/CSS/top"
24070 "description": "Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",
24081 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
24084 "syntax": "<length> | <percentage> | auto",
24087 "name": "MDN Reference",
24088 "url": "https://developer.mozilla.org/docs/Web/CSS/left"
24091 "description": "Specifies how far an absolutely positioned box's left margin edge is offset to the right of the left edge of the box's 'containing block'.",
24098 "name": "margin-top",
24104 "syntax": "<length> | <percentage> | auto",
24107 "name": "MDN Reference",
24108 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
24111 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
24119 "syntax": "<color>",
24122 "name": "MDN Reference",
24123 "url": "https://developer.mozilla.org/docs/Web/CSS/color"
24126 "description": "Sets the color of an element's text",
24132 "name": "font-size",
24162 "syntax": "<absolute-size> | <relative-size> | <length-percentage>",
24165 "name": "MDN Reference",
24166 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size"
24169 "description": "Indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. (Note that certain glyphs may bleed outside their EM box.) For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.",
24176 "name": "background-color",
24177 "syntax": "<color>",
24180 "name": "MDN Reference",
24181 "url": "https://developer.mozilla.org/docs/Web/CSS/background-color"
24184 "description": "Sets the background color of an element.",
24190 "name": "text-align",
24194 "description": "The inline contents are centered within the line box."
24198 "description": "The inline contents are aligned to the end edge of the line box."
24202 "description": "The text is justified according to the method specified by the 'text-justify' property."
24206 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
24210 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
24214 "description": "The inline contents are aligned to the start edge of the line box."
24217 "syntax": "start | end | left | right | center | justify | match-parent",
24220 "name": "MDN Reference",
24221 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align"
24224 "description": "Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",
24231 "syntax": "<alpha-value>",
24234 "name": "MDN Reference",
24235 "url": "https://developer.mozilla.org/docs/Web/CSS/opacity"
24238 "description": "Opacity of an element's text, where 1 is opaque and 0 is entirely transparent.",
24244 "name": "background",
24248 "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
24252 "description": "The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."
24256 "description": "A value of 'none' counts as an image layer but draws nothing."
24260 "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"
24263 "syntax": "[ <bg-layer> , ]* <final-bg-layer>",
24266 "name": "MDN Reference",
24267 "url": "https://developer.mozilla.org/docs/Web/CSS/background"
24270 "description": "Shorthand property for setting most background properties at the same place in the style sheet.",
24283 "name": "font-weight",
24287 "description": "Thin"
24291 "description": "Extra Light (Ultra Light)"
24295 "description": "Light"
24299 "description": "Normal"
24303 "description": "Medium"
24307 "description": "Semi Bold (Demi Bold)"
24311 "description": "Bold"
24315 "description": "Extra Bold (Ultra Bold)"
24319 "description": "Black (Heavy)"
24323 "description": "Same as 700"
24327 "description": "Specifies the weight of the face bolder than the inherited value."
24331 "description": "Specifies the weight of the face lighter than the inherited value."
24335 "description": "Same as 400"
24338 "syntax": "<font-weight-absolute>{1,2}",
24341 "name": "MDN Reference",
24342 "url": "https://developer.mozilla.org/docs/Web/CSS/font-weight"
24345 "description": "Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",
24351 "name": "overflow",
24355 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
24359 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
24362 "name": "-moz-hidden-unscrollable",
24363 "description": "Same as the standardized 'clip', except doesn’t establish a block formatting context."
24367 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
24371 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
24374 "syntax": "[ visible | hidden | clip | scroll | auto ]{1,2}",
24377 "name": "MDN Reference",
24378 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
24381 "description": "Shorthand for setting 'overflow-x' and 'overflow-y'.",
24387 "name": "font-family",
24390 "name": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
24393 "name": "Arial, Helvetica, sans-serif"
24396 "name": "Cambria, Cochin, Georgia, Times, 'Times New Roman', serif"
24399 "name": "'Courier New', Courier, monospace"
24408 "name": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
24411 "name": "Georgia, 'Times New Roman', Times, serif"
24414 "name": "'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif"
24417 "name": "Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif"
24420 "name": "'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif"
24423 "name": "monospace"
24426 "name": "sans-serif"
24429 "name": "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"
24435 "name": "'Times New Roman', Times, serif"
24438 "name": "'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif"
24441 "name": "Verdana, Geneva, Tahoma, sans-serif"
24444 "syntax": "<family-name>",
24447 "name": "MDN Reference",
24448 "url": "https://developer.mozilla.org/docs/Web/CSS/font-family"
24451 "description": "Specifies a prioritized list of font family names or generic family names. A user agent iterates through the list of family names until it matches an available font that contains a glyph for the character to be rendered.",
24460 "name": "inline-end",
24461 "description": "A keyword indicating that the element must float on the end side of its containing block. That is the right side with ltr scripts, and the left side with rtl scripts."
24464 "name": "inline-start",
24465 "description": "A keyword indicating that the element must float on the start side of its containing block. That is the left side with ltr scripts, and the right side with rtl scripts."
24469 "description": "The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top (subject to the 'clear' property)."
24473 "description": "The box is not floated."
24477 "description": "Similar to 'left', except the box is floated to the right, and content flows on the left side of the box, starting at the top."
24480 "syntax": "left | right | none | inline-start | inline-end",
24483 "name": "MDN Reference",
24484 "url": "https://developer.mozilla.org/docs/Web/CSS/float"
24487 "description": "Specifies how a box should be floated. It may be set for any element, but only applies to elements that generate boxes that are not absolutely positioned.",
24493 "name": "line-height",
24497 "description": "Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."
24500 "syntax": "normal | <number> | <length> | <percentage>",
24503 "name": "MDN Reference",
24504 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height"
24507 "description": "Determines the block-progression dimension of the text content area of an inline box.",
24515 "name": "box-sizing",
24518 "name": "border-box",
24519 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
24522 "name": "content-box",
24523 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
24526 "syntax": "content-box | border-box",
24529 "name": "MDN Reference",
24530 "url": "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
24533 "description": "Specifies the behavior of the 'width' and 'height' properties.",
24539 "name": "text-decoration",
24543 "description": "Produces a dashed line style."
24547 "description": "Produces a dotted line."
24551 "description": "Produces a double line."
24554 "name": "line-through",
24555 "description": "Each line of text has a line through the middle."
24559 "description": "Produces no line."
24562 "name": "overline",
24563 "description": "Each line of text has a line above it."
24567 "description": "Produces a solid line."
24570 "name": "underline",
24571 "description": "Each line of text is underlined."
24575 "description": "Produces a wavy line."
24578 "syntax": "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
24581 "name": "MDN Reference",
24582 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
24585 "description": "Decorations applied to font used for an element's text.",
24596 "description": "The stack level of the generated box in the current stacking context is 0. The box does not establish a new stacking context unless it is the root element."
24599 "syntax": "auto | <integer>",
24602 "name": "MDN Reference",
24603 "url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
24606 "description": "For a positioned box, the 'z-index' property specifies the stack level of the box in the current stacking context and whether the box establishes a local stacking context.",
24612 "name": "vertical-align",
24616 "description": "Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."
24619 "name": "baseline",
24620 "description": "Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."
24624 "description": "Align the after edge of the extended inline box with the after-edge of the line box."
24628 "description": "Align the 'middle' baseline of the inline element with the middle baseline of the parent."
24632 "description": "Lower the baseline of the box to the proper position for subscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
24636 "description": "Raise the baseline of the box to the proper position for superscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
24639 "name": "text-bottom",
24640 "description": "Align the bottom of the box with the after-edge of the parent element's font."
24643 "name": "text-top",
24644 "description": "Align the top of the box with the before-edge of the parent element's font."
24648 "description": "Align the before edge of the extended inline box with the before-edge of the line box."
24651 "name": "-webkit-baseline-middle"
24654 "syntax": "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
24657 "name": "MDN Reference",
24658 "url": "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
24661 "description": "Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",
24672 "description": "Indicates an alias of/shortcut to something is to be created. Often rendered as an arrow with a small curved arrow next to it."
24675 "name": "all-scroll",
24676 "description": "Indicates that the something can be scrolled in any direction. Often rendered as arrows pointing up, down, left, and right with a dot in the middle."
24680 "description": "The UA determines the cursor to display based on the current context."
24684 "description": "Indicates that a cell or set of cells may be selected. Often rendered as a thick plus-sign with a dot in the middle."
24687 "name": "col-resize",
24688 "description": "Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."
24691 "name": "context-menu",
24692 "description": "A context menu is available for the object under the cursor. Often rendered as an arrow with a small menu-like graphic next to it."
24696 "description": "Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."
24699 "name": "crosshair",
24700 "description": "A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."
24704 "description": "The platform-dependent default cursor. Often rendered as an arrow."
24707 "name": "e-resize",
24708 "description": "Indicates that east edge is to be moved."
24711 "name": "ew-resize",
24712 "description": "Indicates a bidirectional east-west resize cursor."
24716 "description": "Indicates that something can be grabbed."
24719 "name": "grabbing",
24720 "description": "Indicates that something is being grabbed."
24724 "description": "Help is available for the object under the cursor. Often rendered as a question mark or a balloon."
24728 "description": "Indicates something is to be moved."
24731 "name": "-moz-grab",
24732 "description": "Indicates that something can be grabbed."
24735 "name": "-moz-grabbing",
24736 "description": "Indicates that something is being grabbed."
24739 "name": "-moz-zoom-in",
24740 "description": "Indicates that something can be zoomed (magnified) in."
24743 "name": "-moz-zoom-out",
24744 "description": "Indicates that something can be zoomed (magnified) out."
24747 "name": "ne-resize",
24748 "description": "Indicates that movement starts from north-east corner."
24751 "name": "nesw-resize",
24752 "description": "Indicates a bidirectional north-east/south-west cursor."
24756 "description": "Indicates that the dragged item cannot be dropped at the current cursor location. Often rendered as a hand or pointer with a small circle with a line through it."
24760 "description": "No cursor is rendered for the element."
24763 "name": "not-allowed",
24764 "description": "Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."
24767 "name": "n-resize",
24768 "description": "Indicates that north edge is to be moved."
24771 "name": "ns-resize",
24772 "description": "Indicates a bidirectional north-south cursor."
24775 "name": "nw-resize",
24776 "description": "Indicates that movement starts from north-west corner."
24779 "name": "nwse-resize",
24780 "description": "Indicates a bidirectional north-west/south-east cursor."
24784 "description": "The cursor is a pointer that indicates a link."
24787 "name": "progress",
24788 "description": "A progress indicator. The program is performing some processing, but is different from 'wait' in that the user may still interact with the program. Often rendered as a spinning beach ball, or an arrow with a watch or hourglass."
24791 "name": "row-resize",
24792 "description": "Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."
24795 "name": "se-resize",
24796 "description": "Indicates that movement starts from south-east corner."
24799 "name": "s-resize",
24800 "description": "Indicates that south edge is to be moved."
24803 "name": "sw-resize",
24804 "description": "Indicates that movement starts from south-west corner."
24808 "description": "Indicates text that may be selected. Often rendered as a vertical I-beam."
24811 "name": "vertical-text",
24812 "description": "Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."
24816 "description": "Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."
24819 "name": "-webkit-grab",
24820 "description": "Indicates that something can be grabbed."
24823 "name": "-webkit-grabbing",
24824 "description": "Indicates that something is being grabbed."
24827 "name": "-webkit-zoom-in",
24828 "description": "Indicates that something can be zoomed (magnified) in."
24831 "name": "-webkit-zoom-out",
24832 "description": "Indicates that something can be zoomed (magnified) out."
24835 "name": "w-resize",
24836 "description": "Indicates that west edge is to be moved."
24840 "description": "Indicates that something can be zoomed (magnified) in."
24843 "name": "zoom-out",
24844 "description": "Indicates that something can be zoomed (magnified) out."
24847 "syntax": "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
24850 "name": "MDN Reference",
24851 "url": "https://developer.mozilla.org/docs/Web/CSS/cursor"
24854 "description": "Allows control over cursor appearance in an element",
24862 "name": "margin-left",
24868 "syntax": "<length> | <percentage> | auto",
24871 "name": "MDN Reference",
24872 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
24875 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
24882 "name": "border-radius",
24883 "syntax": "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
24886 "name": "MDN Reference",
24887 "url": "https://developer.mozilla.org/docs/Web/CSS/border-radius"
24890 "description": "Defines the radii of the outer border edge.",
24897 "name": "margin-bottom",
24903 "syntax": "<length> | <percentage> | auto",
24906 "name": "MDN Reference",
24907 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
24910 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
24917 "name": "margin-right",
24923 "syntax": "<length> | <percentage> | auto",
24926 "name": "MDN Reference",
24927 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
24930 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
24941 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
24944 "syntax": "<length> | <percentage> | auto",
24947 "name": "MDN Reference",
24948 "url": "https://developer.mozilla.org/docs/Web/CSS/right"
24951 "description": "Specifies how far an absolutely positioned box's right margin edge is offset to the left of the right edge of the box's 'containing block'.",
24958 "name": "padding-left",
24959 "syntax": "<length> | <percentage>",
24962 "name": "MDN Reference",
24963 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
24966 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
24973 "name": "padding-top",
24974 "syntax": "<length> | <percentage>",
24977 "name": "MDN Reference",
24978 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
24981 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
24988 "name": "max-width",
24992 "description": "No limit on the width of the box."
24995 "name": "fit-content",
24996 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
24999 "name": "max-content",
25000 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
25003 "name": "min-content",
25004 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
25007 "syntax": "<viewport-length>",
25010 "name": "MDN Reference",
25011 "url": "https://developer.mozilla.org/docs/Web/CSS/max-width"
25014 "description": "Allows authors to constrain content width to a certain range.",
25025 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
25028 "syntax": "<length> | <percentage> | auto",
25031 "name": "MDN Reference",
25032 "url": "https://developer.mozilla.org/docs/Web/CSS/bottom"
25035 "description": "Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",
25046 "description": "The attr(n) function returns as a string the value of attribute n for the subject of the selector."
25049 "name": "counter(name)",
25050 "description": "Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."
25054 "description": "The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."
25058 "description": "On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty. On pseudo-elements it causes the pseudo-element to have no content."
25062 "description": "See http://www.w3.org/TR/css3-content/#content for computation rules."
25068 "syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
25071 "name": "MDN Reference",
25072 "url": "https://developer.mozilla.org/docs/Web/CSS/content"
25075 "description": "Determines which page-based occurrence of a given element is applied to a counter or string value.",
25082 "name": "box-shadow",
25086 "description": "Changes the drop shadow from an outer shadow (one that shadows the box onto the canvas, as if it were lifted above the canvas) to an inner shadow (one that shadows the canvas onto the box, as if the box were cut out of the canvas and shifted behind it)."
25090 "description": "No shadow."
25093 "syntax": "none | <shadow>#",
25096 "name": "MDN Reference",
25097 "url": "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
25100 "description": "Attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional 'inset' keyword. Omitted lengths are 0; omitted colors are a user agent chosen color.",
25108 "name": "background-image",
25112 "description": "Counts as an image layer but draws nothing."
25115 "syntax": "<bg-image>#",
25118 "name": "MDN Reference",
25119 "url": "https://developer.mozilla.org/docs/Web/CSS/background-image"
25122 "description": "Sets the background image(s) of an element.",
25129 "name": "padding-right",
25130 "syntax": "<length> | <percentage>",
25133 "name": "MDN Reference",
25134 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
25137 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
25144 "name": "white-space",
25148 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'normal'."
25152 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'none'."
25156 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'none'."
25159 "name": "pre-line",
25160 "description": "Sets 'white-space-collapsing' to 'preserve-breaks' and 'text-wrap' to 'normal'."
25163 "name": "pre-wrap",
25164 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'normal'."
25167 "syntax": "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
25170 "name": "MDN Reference",
25171 "url": "https://developer.mozilla.org/docs/Web/CSS/white-space"
25174 "description": "Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.",
25180 "name": "padding-bottom",
25181 "syntax": "<length> | <percentage>",
25184 "name": "MDN Reference",
25185 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
25188 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
25195 "name": "min-height",
25201 "name": "fit-content",
25202 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
25205 "name": "max-content",
25206 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
25209 "name": "min-content",
25210 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
25213 "syntax": "<viewport-length>",
25216 "name": "MDN Reference",
25217 "url": "https://developer.mozilla.org/docs/Web/CSS/min-height"
25220 "description": "Allows authors to constrain content height to a certain range.",
25227 "name": "transform",
25230 "name": "matrix()",
25231 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
25234 "name": "matrix3d()",
25235 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
25241 "name": "perspective()",
25242 "description": "Specifies a perspective projection matrix."
25245 "name": "rotate()",
25246 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
25249 "name": "rotate3d()",
25250 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
25253 "name": "rotateX('angle')",
25254 "description": "Specifies a clockwise rotation by the given angle about the X axis."
25257 "name": "rotateY('angle')",
25258 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
25261 "name": "rotateZ('angle')",
25262 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
25266 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
25269 "name": "scale3d()",
25270 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
25273 "name": "scaleX()",
25274 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
25277 "name": "scaleY()",
25278 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
25281 "name": "scaleZ()",
25282 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
25286 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
25290 "description": "Specifies a skew transformation along the X axis by the given angle."
25294 "description": "Specifies a skew transformation along the Y axis by the given angle."
25297 "name": "translate()",
25298 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
25301 "name": "translate3d()",
25302 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
25305 "name": "translateX()",
25306 "description": "Specifies a translation by the given amount in the X direction."
25309 "name": "translateY()",
25310 "description": "Specifies a translation by the given amount in the Y direction."
25313 "name": "translateZ()",
25314 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
25317 "syntax": "none | <transform-list>",
25320 "name": "MDN Reference",
25321 "url": "https://developer.mozilla.org/docs/Web/CSS/transform"
25324 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
25330 "name": "border-bottom",
25331 "syntax": "<line-width> || <line-style> || <color>",
25334 "name": "MDN Reference",
25335 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
25338 "description": "Shorthand property for setting border width, style and color.",
25347 "name": "visibility",
25350 "name": "collapse",
25351 "description": "Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."
25355 "description": "The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."
25359 "description": "The generated box is visible."
25362 "syntax": "visible | hidden | collapse",
25365 "name": "MDN Reference",
25366 "url": "https://developer.mozilla.org/docs/Web/CSS/visibility"
25369 "description": "Specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the ‘display’ property to ‘none’ to suppress box generation altogether).",
25375 "name": "background-position",
25376 "syntax": "<bg-position>#",
25379 "name": "MDN Reference",
25380 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
25383 "description": "Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",
25391 "name": "border-top",
25392 "syntax": "<line-width> || <line-style> || <color>",
25395 "name": "MDN Reference",
25396 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top"
25399 "description": "Shorthand property for setting border width, style and color",
25408 "name": "min-width",
25414 "name": "fit-content",
25415 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
25418 "name": "max-content",
25419 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
25422 "name": "min-content",
25423 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
25426 "syntax": "<viewport-length>",
25429 "name": "MDN Reference",
25430 "url": "https://developer.mozilla.org/docs/Web/CSS/min-width"
25433 "description": "Allows authors to constrain content width to a certain range.",
25444 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
25448 "description": "Performs a color inversion on the pixels on the screen."
25451 "syntax": "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
25454 "name": "MDN Reference",
25455 "url": "https://developer.mozilla.org/docs/Web/CSS/outline"
25458 "description": "Shorthand property for 'outline-style', 'outline-width', and 'outline-color'.",
25468 "name": "transition",
25472 "description": "Every property that is able to undergo a transition will do so."
25476 "description": "No property will transition."
25479 "syntax": "<single-transition>#",
25482 "name": "MDN Reference",
25483 "url": "https://developer.mozilla.org/docs/Web/CSS/transition"
25486 "description": "Shorthand property combines four of the transition properties into a single property.",
25495 "name": "border-color",
25497 "syntax": "<color>{1,4}",
25500 "name": "MDN Reference",
25501 "url": "https://developer.mozilla.org/docs/Web/CSS/border-color"
25504 "description": "The color of the border around all four edges of an element.",
25510 "name": "background-repeat",
25512 "syntax": "<repeat-style>#",
25515 "name": "MDN Reference",
25516 "url": "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
25519 "description": "Specifies how background images are tiled after they have been sized and positioned.",
25525 "name": "text-transform",
25528 "name": "capitalize",
25529 "description": "Puts the first typographic letter unit of each word in titlecase."
25532 "name": "lowercase",
25533 "description": "Puts all letters in lowercase."
25537 "description": "No effects."
25540 "name": "uppercase",
25541 "description": "Puts all letters in uppercase."
25544 "syntax": "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
25547 "name": "MDN Reference",
25548 "url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
25551 "description": "Controls capitalization effects of an element’s text.",
25557 "name": "background-size",
25561 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
25565 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
25569 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
25572 "syntax": "<bg-size>#",
25575 "name": "MDN Reference",
25576 "url": "https://developer.mozilla.org/docs/Web/CSS/background-size"
25579 "description": "Specifies the size of the background images.",
25590 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating and left-floating boxes that resulted from elements earlier in the source document."
25594 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any left-floating boxes that resulted from elements earlier in the source document."
25598 "description": "No constraint on the box's position with respect to floats."
25602 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating boxes that resulted from elements earlier in the source document."
25605 "syntax": "none | left | right | both | inline-start | inline-end",
25608 "name": "MDN Reference",
25609 "url": "https://developer.mozilla.org/docs/Web/CSS/clear"
25612 "description": "Indicates which sides of an element's box(es) may not be adjacent to an earlier floating box. The 'clear' property does not consider floats inside the element itself or in other block formatting contexts.",
25618 "name": "max-height",
25622 "description": "No limit on the height of the box."
25625 "name": "fit-content",
25626 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
25629 "name": "max-content",
25630 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
25633 "name": "min-content",
25634 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
25637 "syntax": "<viewport-length>",
25640 "name": "MDN Reference",
25641 "url": "https://developer.mozilla.org/docs/Web/CSS/max-height"
25644 "description": "Allows authors to constrain content height to a certain range.",
25651 "name": "list-style",
25658 "description": "A hollow circle."
25664 "name": "decimal-leading-zero"
25668 "description": "A filled circle."
25675 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
25678 "name": "lower-alpha"
25681 "name": "lower-greek"
25684 "name": "lower-latin"
25687 "name": "lower-roman"
25694 "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
25698 "description": "A filled square."
25701 "name": "symbols()",
25702 "description": "Allows a counter style to be defined inline."
25705 "name": "upper-alpha"
25708 "name": "upper-latin"
25711 "name": "upper-roman"
25717 "syntax": "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
25720 "name": "MDN Reference",
25721 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style"
25724 "description": "Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",
25732 "name": "font-style",
25736 "description": "Selects a font that is labeled as an 'italic' face, or an 'oblique' face if one is not"
25740 "description": "Selects a face that is classified as 'normal'."
25744 "description": "Selects a font that is labeled as an 'oblique' face, or an 'italic' face if one is not."
25747 "syntax": "normal | italic | oblique <angle>{0,2}",
25750 "name": "MDN Reference",
25751 "url": "https://developer.mozilla.org/docs/Web/CSS/font-style"
25754 "description": "Allows italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.",
25764 "description": "Thin"
25768 "description": "Extra Light (Ultra Light)"
25772 "description": "Light"
25776 "description": "Normal"
25780 "description": "Medium"
25784 "description": "Semi Bold (Demi Bold)"
25788 "description": "Bold"
25792 "description": "Extra Bold (Ultra Bold)"
25796 "description": "Black (Heavy)"
25800 "description": "Same as 700"
25804 "description": "Specifies the weight of the face bolder than the inherited value."
25808 "description": "The font used for captioned controls (e.g., buttons, drop-downs, etc.)."
25812 "description": "The font used to label icons."
25816 "description": "Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."
25826 "description": "Specifies the weight of the face lighter than the inherited value."
25833 "description": "The font used in menus (e.g., dropdown menus and menu lists)."
25836 "name": "message-box",
25837 "description": "The font used in dialog boxes."
25841 "description": "Specifies a face that is not labeled as a small-caps font."
25845 "description": "Selects a font that is labeled 'oblique'."
25851 "name": "small-caps",
25852 "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
25855 "name": "small-caption",
25856 "description": "The font used for labeling small controls."
25862 "name": "status-bar",
25863 "description": "The font used in window status bars."
25878 "syntax": "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
25881 "name": "MDN Reference",
25882 "url": "https://developer.mozilla.org/docs/Web/CSS/font"
25885 "description": "Shorthand property for setting 'font-style', 'font-variant', 'font-weight', 'font-size', 'line-height', and 'font-family', at the same place in the style sheet. The syntax of this property is based on a traditional typographical shorthand notation to set multiple properties related to fonts.",
25891 "name": "border-left",
25892 "syntax": "<line-width> || <line-style> || <color>",
25895 "name": "MDN Reference",
25896 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left"
25899 "description": "Shorthand property for setting border width, style and color",
25908 "name": "border-right",
25909 "syntax": "<line-width> || <line-style> || <color>",
25912 "name": "MDN Reference",
25913 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right"
25916 "description": "Shorthand property for setting border width, style and color",
25925 "name": "text-overflow",
25929 "description": "Clip inline content that overflows. Characters may be only partially rendered."
25932 "name": "ellipsis",
25933 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
25936 "syntax": "[ clip | ellipsis | <string> ]{1,2}",
25939 "name": "MDN Reference",
25940 "url": "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
25943 "description": "Text can overflow for example when it is prevented from wrapping.",
25950 "name": "border-width",
25952 "syntax": "<line-width>{1,4}",
25955 "name": "MDN Reference",
25956 "url": "https://developer.mozilla.org/docs/Web/CSS/border-width"
25959 "description": "Shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",
25966 "name": "justify-content",
25970 "description": "Flex items are packed toward the center of the line."
25974 "description": "The items are packed flush to each other toward the start edge of the alignment container in the main axis."
25978 "description": "The items are packed flush to each other toward the end edge of the alignment container in the main axis."
25982 "description": "The items are packed flush to each other toward the left edge of the alignment container in the main axis."
25986 "description": "The items are packed flush to each other toward the right edge of the alignment container in the main axis."
25990 "description": "If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were start."
25994 "description": "Regardless of the relative sizes of the item and alignment container, the given alignment value is honored."
25998 "description": "If the combined size of the alignment subjects is less than the size of the alignment container, any auto-sized alignment subjects have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container."
26001 "name": "space-evenly",
26002 "description": "The items are evenly distributed within the alignment container along the main axis."
26005 "name": "flex-end",
26006 "description": "Flex items are packed toward the end of the line."
26009 "name": "flex-start",
26010 "description": "Flex items are packed toward the start of the line."
26013 "name": "space-around",
26014 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
26017 "name": "space-between",
26018 "description": "Flex items are evenly distributed in the line."
26021 "name": "baseline",
26022 "description": "Specifies participation in first-baseline alignment."
26025 "name": "first baseline",
26026 "description": "Specifies participation in first-baseline alignment."
26029 "name": "last baseline",
26030 "description": "Specifies participation in last-baseline alignment."
26033 "syntax": "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
26034 "description": "Aligns flex items along the main axis of the current line of the flex container.",
26040 "name": "align-items",
26043 "name": "baseline",
26044 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
26048 "description": "The flex item’s margin box is centered in the cross axis within the line."
26051 "name": "flex-end",
26052 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
26055 "name": "flex-start",
26056 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
26060 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
26063 "syntax": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
26064 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
26070 "name": "overflow-y",
26074 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
26078 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
26082 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
26086 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
26089 "syntax": "visible | hidden | clip | scroll | auto",
26092 "name": "MDN Reference",
26093 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
26096 "description": "Specifies the handling of overflow in the vertical direction.",
26102 "name": "pointer-events",
26106 "description": "The given element can be the target element for pointer events whenever the pointer is over either the interior or the perimeter of the element."
26110 "description": "The given element can be the target element for pointer events whenever the pointer is over the interior of the element."
26114 "description": "The given element does not receive pointer events."
26118 "description": "The given element can be the target element for pointer events when the pointer is over a \"painted\" area. "
26122 "description": "The given element can be the target element for pointer events whenever the pointer is over the perimeter of the element."
26126 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and the pointer is over either the interior or the perimete of the element."
26129 "name": "visibleFill",
26130 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over the interior of the element."
26133 "name": "visiblePainted",
26134 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over a ‘painted’ area."
26137 "name": "visibleStroke",
26138 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over the perimeter of the element."
26141 "syntax": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
26144 "name": "MDN Reference",
26145 "url": "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
26148 "description": "Specifies under what circumstances a given element can be the target element for a pointer event.",
26154 "name": "border-style",
26156 "syntax": "<line-style>{1,4}",
26159 "name": "MDN Reference",
26160 "url": "https://developer.mozilla.org/docs/Web/CSS/border-style"
26163 "description": "The style of the border around edges of an element.",
26169 "name": "letter-spacing",
26173 "description": "The spacing is the normal spacing for the current font. It is typically zero-length."
26176 "syntax": "normal | <length>",
26179 "name": "MDN Reference",
26180 "url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
26183 "description": "Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",
26189 "name": "animation",
26192 "name": "alternate",
26193 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
26196 "name": "alternate-reverse",
26197 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
26200 "name": "backwards",
26201 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
26205 "description": "Both forwards and backwards fill modes are applied."
26208 "name": "forwards",
26209 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
26212 "name": "infinite",
26213 "description": "Causes the animation to repeat forever."
26217 "description": "No animation is performed"
26221 "description": "Normal playback."
26225 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
26228 "syntax": "<single-animation>#",
26231 "name": "MDN Reference",
26232 "url": "https://developer.mozilla.org/docs/Web/CSS/animation"
26235 "description": "Shorthand property combines six of the animation properties into a single property.",
26245 "name": "overflow-x",
26249 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
26253 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
26257 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
26261 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
26264 "syntax": "visible | hidden | clip | scroll | auto",
26267 "name": "MDN Reference",
26268 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
26271 "description": "Specifies the handling of overflow in the horizontal direction.",
26277 "name": "flex-direction",
26281 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
26284 "name": "column-reverse",
26285 "description": "Same as 'column', except the main-start and main-end directions are swapped."
26289 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
26292 "name": "row-reverse",
26293 "description": "Same as 'row', except the main-start and main-end directions are swapped."
26296 "syntax": "row | row-reverse | column | column-reverse",
26299 "name": "MDN Reference",
26300 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
26303 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
26309 "name": "word-wrap",
26312 "name": "break-word",
26313 "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
26317 "description": "Lines may break only at allowed break points."
26320 "syntax": "normal | break-word",
26323 "name": "MDN Reference",
26324 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
26327 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
26337 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
26341 "description": "Indicates automatic sizing, based on the flex item’s content."
26345 "description": "Expands to '0 0 auto'."
26348 "syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
26351 "name": "MDN Reference",
26352 "url": "https://developer.mozilla.org/docs/Web/CSS/flex"
26355 "description": "Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",
26363 "name": "border-collapse",
26366 "name": "collapse",
26367 "description": "Selects the collapsing borders model."
26370 "name": "separate",
26371 "description": "Selects the separated borders border model."
26374 "syntax": "collapse | separate",
26377 "name": "MDN Reference",
26378 "url": "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
26381 "description": "Selects a table's border model.",
26400 "syntax": "auto | <number> | <percentage>",
26403 "name": "MDN Reference",
26404 "url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
26407 "description": "Non-standard. Specifies the magnification scale of the object. See 'transform: scale()' for a standards-based alternative.",
26416 "name": "list-style-type",
26419 "name": "armenian",
26420 "description": "Traditional uppercase Armenian numbering."
26424 "description": "A hollow circle."
26428 "description": "Western decimal numbers."
26431 "name": "decimal-leading-zero",
26432 "description": "Decimal numbers padded by initial zeros."
26436 "description": "A filled circle."
26439 "name": "georgian",
26440 "description": "Traditional Georgian numbering."
26443 "name": "lower-alpha",
26444 "description": "Lowercase ASCII letters."
26447 "name": "lower-greek",
26448 "description": "Lowercase classical Greek."
26451 "name": "lower-latin",
26452 "description": "Lowercase ASCII letters."
26455 "name": "lower-roman",
26456 "description": "Lowercase ASCII Roman numerals."
26460 "description": "No marker"
26464 "description": "A filled square."
26467 "name": "symbols()",
26468 "description": "Allows a counter style to be defined inline."
26471 "name": "upper-alpha",
26472 "description": "Uppercase ASCII letters."
26475 "name": "upper-latin",
26476 "description": "Uppercase ASCII letters."
26479 "name": "upper-roman",
26480 "description": "Uppercase ASCII Roman numerals."
26483 "syntax": "<counter-style> | <string> | none",
26486 "name": "MDN Reference",
26487 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
26490 "description": "Used to construct the default contents of a list item’s marker",
26497 "name": "border-bottom-left-radius",
26498 "syntax": "<length-percentage>{1,2}",
26501 "name": "MDN Reference",
26502 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
26505 "description": "Defines the radii of the bottom left outer border edge.",
26516 "description": "A URL reference to a paint server element, which is an element that defines a paint server: ‘hatch’, ‘linearGradient’, ‘mesh’, ‘pattern’, ‘radialGradient’ and ‘solidcolor’."
26520 "description": "No paint is applied in this layer."
26523 "description": "Paints the interior of the given graphical element.",
26531 "name": "transform-origin",
26532 "syntax": "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
26535 "name": "MDN Reference",
26536 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
26539 "description": "Establishes the origin of transformation for an element.",
26547 "name": "flex-wrap",
26551 "description": "The flex container is single-line."
26555 "description": "The flexbox is multi-line."
26558 "name": "wrap-reverse",
26559 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
26562 "syntax": "nowrap | wrap | wrap-reverse",
26565 "name": "MDN Reference",
26566 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
26569 "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
26575 "name": "text-shadow",
26579 "description": "No shadow."
26582 "syntax": "none | <shadow-t>#",
26585 "name": "MDN Reference",
26586 "url": "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
26589 "description": "Enables shadow effects to be applied to the text of the element.",
26596 "name": "border-top-left-radius",
26597 "syntax": "<length-percentage>{1,2}",
26600 "name": "MDN Reference",
26601 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
26604 "description": "Defines the radii of the top left outer border edge.",
26611 "name": "user-select",
26615 "description": "The content of the element must be selected atomically"
26622 "description": "UAs must not allow a selection which is started in this element to be extended outside of this element."
26626 "description": "The UA must not allow selections to be started in this element."
26630 "description": "The element imposes no constraint on the selection."
26633 "status": "nonstandard",
26634 "syntax": "auto | text | none | contain | all",
26637 "name": "MDN Reference",
26638 "url": "https://developer.mozilla.org/docs/Web/CSS/user-select"
26641 "description": "Controls the appearance of selection.",
26651 "description": "The element does not clip."
26655 "description": "Specifies offsets from the edges of the border box."
26658 "syntax": "<shape> | auto",
26661 "name": "MDN Reference",
26662 "url": "https://developer.mozilla.org/docs/Web/CSS/clip"
26665 "description": "Deprecated. Use the 'clip-path' property when support allows. Defines the visible portion of an element’s box.",
26671 "name": "border-bottom-right-radius",
26672 "syntax": "<length-percentage>{1,2}",
26675 "name": "MDN Reference",
26676 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
26679 "description": "Defines the radii of the bottom right outer border edge.",
26686 "name": "word-break",
26689 "name": "break-all",
26690 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
26693 "name": "keep-all",
26694 "description": "Block characters can no longer create implied break points."
26698 "description": "Breaks non-CJK scripts according to their own rules."
26701 "syntax": "normal | break-all | keep-all | break-word",
26704 "name": "MDN Reference",
26705 "url": "https://developer.mozilla.org/docs/Web/CSS/word-break"
26708 "description": "Specifies line break opportunities for non-CJK scripts.",
26714 "name": "border-top-right-radius",
26715 "syntax": "<length-percentage>{1,2}",
26718 "name": "MDN Reference",
26719 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
26722 "description": "Defines the radii of the top right outer border edge.",
26729 "name": "flex-grow",
26730 "syntax": "<number>",
26733 "name": "MDN Reference",
26734 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
26737 "description": "Sets the flex grow factor. Negative numbers are invalid.",
26743 "name": "border-top-color",
26744 "syntax": "<color>",
26747 "name": "MDN Reference",
26748 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
26751 "description": "Sets the color of the top border.",
26757 "name": "border-bottom-color",
26758 "syntax": "<'border-top-color'>",
26761 "name": "MDN Reference",
26762 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
26765 "description": "Sets the color of the bottom border.",
26771 "name": "flex-shrink",
26772 "syntax": "<number>",
26775 "name": "MDN Reference",
26776 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
26779 "description": "Sets the flex shrink factor. Negative numbers are invalid.",
26785 "name": "text-rendering",
26798 "name": "geometricPrecision",
26799 "description": "Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed."
26802 "name": "optimizeLegibility",
26803 "description": "Indicates that the user agent shall emphasize legibility over rendering speed and geometric precision."
26806 "name": "optimizeSpeed",
26807 "description": "Indicates that the user agent shall emphasize rendering speed over legibility and geometric precision."
26810 "syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
26813 "name": "MDN Reference",
26814 "url": "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
26817 "description": "The creator of SVG content might want to provide a hint to the implementation about what tradeoffs to make as it renders text. The ‘text-rendering’ property provides these hints.",
26823 "name": "align-self",
26827 "description": "Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."
26830 "name": "baseline",
26831 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
26835 "description": "The flex item’s margin box is centered in the cross axis within the line."
26838 "name": "flex-end",
26839 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
26842 "name": "flex-start",
26843 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
26847 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
26850 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
26851 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
26857 "name": "text-indent",
26859 "syntax": "<length-percentage> && hanging? && each-line?",
26862 "name": "MDN Reference",
26863 "url": "https://developer.mozilla.org/docs/Web/CSS/text-indent"
26866 "description": "Specifies the indentation applied to lines of inline content in a block. The indentation only affects the first line of inline content in the block unless the 'hanging' keyword is specified, in which case it affects all lines except the first.",
26873 "name": "animation-timing-function",
26874 "syntax": "<timing-function>#",
26877 "name": "MDN Reference",
26878 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
26881 "description": "Describes how the animation will progress over one cycle of its duration.",
26887 "name": "border-spacing",
26888 "syntax": "<length> <length>?",
26891 "name": "MDN Reference",
26892 "url": "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
26895 "description": "The lengths specify the distance that separates adjoining cell borders. If one length is specified, it gives both the horizontal and vertical spacing. If two are specified, the first gives the horizontal spacing and the second the vertical spacing. Lengths may not be negative.",
26901 "name": "direction",
26905 "description": "Left-to-right direction."
26909 "description": "Right-to-left direction."
26912 "syntax": "ltr | rtl",
26915 "name": "MDN Reference",
26916 "url": "https://developer.mozilla.org/docs/Web/CSS/direction"
26919 "description": "Specifies the inline base direction or directionality of any bidi paragraph, embedding, isolate, or override established by the box. Note: for HTML content use the 'dir' attribute and 'bdo' element rather than this property.",
26925 "name": "background-clip",
26926 "syntax": "<box>#",
26929 "name": "MDN Reference",
26930 "url": "https://developer.mozilla.org/docs/Web/CSS/background-clip"
26933 "description": "Determines the background painting area.",
26939 "name": "border-left-color",
26940 "syntax": "<color>",
26943 "name": "MDN Reference",
26944 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
26947 "description": "Sets the color of the left border.",
26957 "description": "Reference font by URL"
26960 "name": "format()",
26961 "description": "Optional hint describing the format of the font resource."
26965 "description": "Format-specific string that identifies a locally available copy of a given font."
26968 "syntax": "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
26969 "description": "@font-face descriptor. Specifies the resource containing font data. It is required, whether the font is downloadable or locally installed.",
26977 "name": "touch-action",
26981 "description": "The user agent may determine any permitted touch behaviors for touches that begin on the element."
26984 "name": "cross-slide-x"
26987 "name": "cross-slide-y"
26990 "name": "double-tap-zoom"
26993 "name": "manipulation",
26994 "description": "The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming."
26998 "description": "Touches that begin on the element must not trigger default touch behaviors."
27002 "description": "The user agent may consider touches that begin on the element only for the purposes of horizontally scrolling the element’s nearest ancestor with horizontally scrollable content."
27006 "description": "The user agent may consider touches that begin on the element only for the purposes of vertically scrolling the element’s nearest ancestor with vertically scrollable content."
27009 "name": "pinch-zoom"
27012 "syntax": "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
27015 "name": "MDN Reference",
27016 "url": "https://developer.mozilla.org/docs/Web/CSS/touch-action"
27019 "description": "Determines whether touch input may trigger default behavior supplied by user agent.",
27025 "name": "border-right-color",
27026 "syntax": "<color>",
27029 "name": "MDN Reference",
27030 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
27033 "description": "Sets the color of the right border.",
27039 "name": "transition-property",
27043 "description": "Every property that is able to undergo a transition will do so."
27047 "description": "No property will transition."
27050 "syntax": "none | <single-transition-property>#",
27053 "name": "MDN Reference",
27054 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-property"
27057 "description": "Specifies the name of the CSS property to which the transition is applied.",
27063 "name": "animation-name",
27067 "description": "No animation is performed"
27070 "syntax": "[ none | <keyframes-name> ]#",
27073 "name": "MDN Reference",
27074 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-name"
27077 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
27095 "description": "No filter effects are applied."
27099 "description": "Applies a Gaussian blur to the input image."
27102 "name": "brightness()",
27103 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
27106 "name": "contrast()",
27107 "description": "Adjusts the contrast of the input."
27110 "name": "drop-shadow()",
27111 "description": "Applies a drop shadow effect to the input image."
27114 "name": "grayscale()",
27115 "description": "Converts the input image to grayscale."
27118 "name": "hue-rotate()",
27119 "description": "Applies a hue rotation on the input image. "
27122 "name": "invert()",
27123 "description": "Inverts the samples in the input image."
27126 "name": "opacity()",
27127 "description": "Applies transparency to the samples in the input image."
27130 "name": "saturate()",
27131 "description": "Saturates the input image."
27135 "description": "Converts the input image to sepia."
27146 "description": "A filter reference to a <filter> element."
27149 "syntax": "none | <filter-function-list>",
27152 "name": "MDN Reference",
27153 "url": "https://developer.mozilla.org/docs/Web/CSS/filter"
27156 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
27163 "name": "animation-duration",
27164 "syntax": "<time>#",
27167 "name": "MDN Reference",
27168 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
27171 "description": "Defines the length of time that an animation takes to complete one cycle.",
27177 "name": "overflow-wrap",
27180 "name": "break-word",
27181 "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
27185 "description": "Lines may break only at allowed break points."
27188 "syntax": "normal | break-word | anywhere",
27191 "name": "MDN Reference",
27192 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
27195 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit within the line box.",
27201 "name": "transition-delay",
27202 "syntax": "<time>#",
27205 "name": "MDN Reference",
27206 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
27209 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
27219 "description": "A URL reference to a paint server element, which is an element that defines a paint server: ‘hatch’, ‘linearGradient’, ‘mesh’, ‘pattern’, ‘radialGradient’ and ‘solidcolor’."
27223 "description": "No paint is applied in this layer."
27226 "description": "Paints along the outline of the given graphical element.",
27234 "name": "font-variant",
27238 "description": "Specifies a face that is not labeled as a small-caps font."
27241 "name": "small-caps",
27242 "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
27245 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
27248 "name": "MDN Reference",
27249 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant"
27252 "description": "Specifies variant representations of the font",
27258 "name": "border-bottom-width",
27259 "syntax": "<line-width>",
27262 "name": "MDN Reference",
27263 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
27266 "description": "Sets the thickness of the bottom border.",
27273 "name": "animation-delay",
27274 "syntax": "<time>#",
27277 "name": "MDN Reference",
27278 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
27281 "description": "Defines when the animation will start.",
27287 "name": "border-top-width",
27288 "syntax": "<line-width>",
27291 "name": "MDN Reference",
27292 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
27295 "description": "Sets the thickness of the top border.",
27302 "name": "transition-duration",
27303 "syntax": "<time>#",
27306 "name": "MDN Reference",
27307 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
27310 "description": "Specifies how long the transition from the old value to the new value should take.",
27316 "name": "flex-basis",
27320 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
27324 "description": "Indicates automatic sizing, based on the flex item’s content."
27327 "syntax": "content | <'width'>",
27330 "name": "MDN Reference",
27331 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
27334 "description": "Sets the flex basis.",
27342 "name": "will-change",
27353 "description": "Expresses no particular intent."
27356 "name": "contents",
27357 "description": "Indicates that the author expects to animate or change something about the element’s contents in the near future."
27360 "name": "scroll-position",
27361 "description": "Indicates that the author expects to animate or change the scroll position of the element in the near future."
27364 "syntax": "auto | <animateable-feature>#",
27367 "name": "MDN Reference",
27368 "url": "https://developer.mozilla.org/docs/Web/CSS/will-change"
27371 "description": "Provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element.",
27378 "name": "animation-fill-mode",
27381 "name": "backwards",
27382 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
27386 "description": "Both forwards and backwards fill modes are applied."
27389 "name": "forwards",
27390 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
27394 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
27397 "syntax": "<single-animation-fill-mode>#",
27400 "name": "MDN Reference",
27401 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
27404 "description": "Defines what values are applied by the animation outside the time it is executing.",
27410 "name": "outline-width",
27411 "syntax": "<line-width>",
27414 "name": "MDN Reference",
27415 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-width"
27418 "description": "Width of the outline.",
27425 "name": "table-layout",
27429 "description": "Use any automatic table layout algorithm."
27433 "description": "Use the fixed table layout algorithm."
27436 "syntax": "auto | fixed",
27439 "name": "MDN Reference",
27440 "url": "https://developer.mozilla.org/docs/Web/CSS/table-layout"
27443 "description": "Controls the algorithm used to lay out the table cells, rows, and columns.",
27449 "name": "object-fit",
27460 "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element’s content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
27464 "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element’s used width and height."
27468 "description": "The replaced content is sized to fill the element’s content box: the object's concrete object size is the element's used width and height."
27472 "description": "The replaced content is not resized to fit inside the element's content box"
27475 "name": "scale-down",
27476 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
27479 "syntax": "fill | contain | cover | none | scale-down",
27482 "name": "MDN Reference",
27483 "url": "https://developer.mozilla.org/docs/Web/CSS/object-fit"
27486 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
27493 "syntax": "<integer>",
27496 "name": "MDN Reference",
27497 "url": "https://developer.mozilla.org/docs/Web/CSS/order"
27500 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
27506 "name": "transition-timing-function",
27507 "syntax": "<timing-function>#",
27510 "name": "MDN Reference",
27511 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
27514 "description": "Describes how the intermediate values used during a transition will be calculated.",
27531 "description": "The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."
27534 "name": "horizontal",
27535 "description": "The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."
27539 "description": "The UA does not present a resizing mechanism on the element, and the user is given no direct manipulation mechanism to resize the element."
27542 "name": "vertical",
27543 "description": "The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."
27546 "syntax": "none | both | horizontal | vertical | block | inline",
27549 "name": "MDN Reference",
27550 "url": "https://developer.mozilla.org/docs/Web/CSS/resize"
27553 "description": "Specifies whether or not an element is resizable by the user, and if so, along which axis/axes.",
27559 "name": "outline-style",
27563 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
27566 "syntax": "auto | <'border-style'>",
27569 "name": "MDN Reference",
27570 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-style"
27573 "description": "Style of the outline.",
27580 "name": "border-right-width",
27581 "syntax": "<line-width>",
27584 "name": "MDN Reference",
27585 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
27588 "description": "Sets the thickness of the right border.",
27595 "name": "stroke-width",
27596 "description": "Specifies the width of the stroke on the current object.",
27603 "name": "animation-iteration-count",
27606 "name": "infinite",
27607 "description": "Causes the animation to repeat forever."
27610 "syntax": "<single-animation-iteration-count>#",
27613 "name": "MDN Reference",
27614 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
27617 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
27624 "name": "align-content",
27628 "description": "Lines are packed toward the center of the flex container."
27631 "name": "flex-end",
27632 "description": "Lines are packed toward the end of the flex container."
27635 "name": "flex-start",
27636 "description": "Lines are packed toward the start of the flex container."
27639 "name": "space-around",
27640 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
27643 "name": "space-between",
27644 "description": "Lines are evenly distributed in the flex container."
27648 "description": "Lines stretch to take up the remaining space."
27651 "syntax": "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
27652 "description": "Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",
27658 "name": "outline-offset",
27666 "syntax": "<length>",
27669 "name": "MDN Reference",
27670 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
27673 "description": "Offset the outline and draw it beyond the border edge.",
27679 "name": "backface-visibility",
27683 "description": "Back side is hidden."
27687 "description": "Back side is visible."
27690 "syntax": "visible | hidden",
27693 "name": "MDN Reference",
27694 "url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
27697 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
27703 "name": "border-left-width",
27704 "syntax": "<line-width>",
27707 "name": "MDN Reference",
27708 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
27711 "description": "Sets the thickness of the left border.",
27718 "name": "flex-flow",
27722 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
27725 "name": "column-reverse",
27726 "description": "Same as 'column', except the main-start and main-end directions are swapped."
27730 "description": "The flex container is single-line."
27734 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
27737 "name": "row-reverse",
27738 "description": "Same as 'row', except the main-start and main-end directions are swapped."
27742 "description": "The flexbox is multi-line."
27745 "name": "wrap-reverse",
27746 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
27749 "syntax": "<'flex-direction'> || <'flex-wrap'>",
27752 "name": "MDN Reference",
27753 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
27756 "description": "Specifies how flexbox items are placed in the flexbox.",
27762 "name": "appearance",
27763 "status": "experimental",
27764 "syntax": "none | auto | button | textfield | <compat>",
27774 "name": "MDN Reference",
27775 "url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
27778 "description": "Changes the appearance of buttons and other controls to resemble native controls."
27781 "name": "unicode-bidi",
27784 "name": "bidi-override",
27785 "description": "Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."
27789 "description": "If the element is inline-level, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the 'direction' property."
27793 "description": "The contents of the element are considered to be inside a separate, independent paragraph."
27796 "name": "isolate-override",
27797 "description": "This combines the isolation behavior of 'isolate' with the directional override behavior of 'bidi-override'"
27801 "description": "The element does not open an additional level of embedding with respect to the bidirectional algorithm. For inline-level elements, implicit reordering works across element boundaries."
27804 "name": "plaintext",
27805 "description": "For the purposes of the Unicode bidirectional algorithm, the base directionality of each bidi paragraph for which the element forms the containing block is determined not by the element's computed 'direction'."
27808 "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
27811 "name": "MDN Reference",
27812 "url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
27815 "description": "The level of embedding with respect to the bidirectional algorithm.",
27821 "name": "stroke-dasharray",
27825 "description": "Indicates that no dashing is used."
27828 "description": "Controls the pattern of dashes and gaps used to stroke paths.",
27837 "name": "stroke-dashoffset",
27838 "description": "Specifies the distance into the dash pattern to start the dash.",
27845 "name": "unicode-range",
27849 "description": "Ampersand."
27852 "name": "U+20-24F, U+2B0-2FF, U+370-4FF, U+1E00-1EFF, U+2000-20CF, U+2100-23FF, U+2500-26FF, U+E000-F8FF, U+FB00–FB4F",
27853 "description": "WGL4 character set (Pan-European)."
27856 "name": "U+20-17F, U+2B0-2FF, U+2000-206F, U+20A0-20CF, U+2100-21FF, U+2600-26FF",
27857 "description": "The Multilingual European Subset No. 1. Latin. Covers ~44 languages."
27860 "name": "U+20-2FF, U+370-4FF, U+1E00-20CF, U+2100-23FF, U+2500-26FF, U+FB00-FB4F, U+FFF0-FFFD",
27861 "description": "The Multilingual European Subset No. 2. Latin, Greek, and Cyrillic. Covers ~128 language."
27864 "name": "U+20-4FF, U+530-58F, U+10D0-10FF, U+1E00-23FF, U+2440-245F, U+2500-26FF, U+FB00-FB4F, U+FE20-FE2F, U+FFF0-FFFD",
27865 "description": "The Multilingual European Subset No. 3. Covers all characters belonging to European scripts."
27869 "description": "Basic Latin (ASCII)."
27873 "description": "Latin-1 Supplement. Accented characters for Western European languages, common punctuation characters, multiplication and division signs."
27876 "name": "U+100-17F",
27877 "description": "Latin Extended-A. Accented characters for for Czech, Dutch, Polish, and Turkish."
27880 "name": "U+180-24F",
27881 "description": "Latin Extended-B. Croatian, Slovenian, Romanian, Non-European and historic latin, Khoisan, Pinyin, Livonian, Sinology."
27884 "name": "U+1E00-1EFF",
27885 "description": "Latin Extended Additional. Vietnamese, German captial sharp s, Medievalist, Latin general use."
27888 "name": "U+250-2AF",
27889 "description": "International Phonetic Alphabet Extensions."
27892 "name": "U+370-3FF",
27893 "description": "Greek and Coptic."
27896 "name": "U+1F00-1FFF",
27897 "description": "Greek Extended. Accented characters for polytonic Greek."
27900 "name": "U+400-4FF",
27901 "description": "Cyrillic."
27904 "name": "U+500-52F",
27905 "description": "Cyrillic Supplement. Extra letters for Komi, Khanty, Chukchi, Mordvin, Kurdish, Aleut, Chuvash, Abkhaz, Azerbaijani, and Orok."
27908 "name": "U+00-52F, U+1E00-1FFF, U+2200–22FF",
27909 "description": "Latin, Greek, Cyrillic, some punctuation and symbols."
27912 "name": "U+530–58F",
27913 "description": "Armenian."
27916 "name": "U+590–5FF",
27917 "description": "Hebrew."
27920 "name": "U+600–6FF",
27921 "description": "Arabic."
27924 "name": "U+750–77F",
27925 "description": "Arabic Supplement. Additional letters for African languages, Khowar, Torwali, Burushaski, and early Persian."
27928 "name": "U+8A0–8FF",
27929 "description": "Arabic Extended-A. Additional letters for African languages, European and Central Asian languages, Rohingya, Tamazight, Arwi, and Koranic annotation signs."
27932 "name": "U+700–74F",
27933 "description": "Syriac."
27936 "name": "U+900–97F",
27937 "description": "Devanagari."
27940 "name": "U+980–9FF",
27941 "description": "Bengali."
27944 "name": "U+A00–A7F",
27945 "description": "Gurmukhi."
27948 "name": "U+A80–AFF",
27949 "description": "Gujarati."
27952 "name": "U+B00–B7F",
27953 "description": "Oriya."
27956 "name": "U+B80–BFF",
27957 "description": "Tamil."
27960 "name": "U+C00–C7F",
27961 "description": "Telugu."
27964 "name": "U+C80–CFF",
27965 "description": "Kannada."
27968 "name": "U+D00–D7F",
27969 "description": "Malayalam."
27972 "name": "U+D80–DFF",
27973 "description": "Sinhala."
27976 "name": "U+118A0–118FF",
27977 "description": "Warang Citi."
27980 "name": "U+E00–E7F",
27981 "description": "Thai."
27984 "name": "U+1A20–1AAF",
27985 "description": "Tai Tham."
27988 "name": "U+AA80–AADF",
27989 "description": "Tai Viet."
27992 "name": "U+E80–EFF",
27993 "description": "Lao."
27996 "name": "U+F00–FFF",
27997 "description": "Tibetan."
28000 "name": "U+1000–109F",
28001 "description": "Myanmar (Burmese)."
28004 "name": "U+10A0–10FF",
28005 "description": "Georgian."
28008 "name": "U+1200–137F",
28009 "description": "Ethiopic."
28012 "name": "U+1380–139F",
28013 "description": "Ethiopic Supplement. Extra Syllables for Sebatbeit, and Tonal marks"
28016 "name": "U+2D80–2DDF",
28017 "description": "Ethiopic Extended. Extra Syllables for Me'en, Blin, and Sebatbeit."
28020 "name": "U+AB00–AB2F",
28021 "description": "Ethiopic Extended-A. Extra characters for Gamo-Gofa-Dawro, Basketo, and Gumuz."
28024 "name": "U+1780–17FF",
28025 "description": "Khmer."
28028 "name": "U+1800–18AF",
28029 "description": "Mongolian."
28032 "name": "U+1B80–1BBF",
28033 "description": "Sundanese."
28036 "name": "U+1CC0–1CCF",
28037 "description": "Sundanese Supplement. Punctuation."
28040 "name": "U+4E00–9FD5",
28041 "description": "CJK (Chinese, Japanese, Korean) Unified Ideographs. Most common ideographs for modern Chinese and Japanese."
28044 "name": "U+3400–4DB5",
28045 "description": "CJK Unified Ideographs Extension A. Rare ideographs."
28048 "name": "U+2F00–2FDF",
28049 "description": "Kangxi Radicals."
28052 "name": "U+2E80–2EFF",
28053 "description": "CJK Radicals Supplement. Alternative forms of Kangxi Radicals."
28056 "name": "U+1100–11FF",
28057 "description": "Hangul Jamo."
28060 "name": "U+AC00–D7AF",
28061 "description": "Hangul Syllables."
28064 "name": "U+3040–309F",
28065 "description": "Hiragana."
28068 "name": "U+30A0–30FF",
28069 "description": "Katakana."
28072 "name": "U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F",
28073 "description": "Japanese Kanji, Hiragana and Katakana characters plus Yen/Yuan symbol."
28076 "name": "U+A4D0–A4FF",
28077 "description": "Lisu."
28080 "name": "U+A000–A48F",
28081 "description": "Yi Syllables."
28084 "name": "U+A490–A4CF",
28085 "description": "Yi Radicals."
28088 "name": "U+2000-206F",
28089 "description": "General Punctuation."
28092 "name": "U+3000–303F",
28093 "description": "CJK Symbols and Punctuation."
28096 "name": "U+2070–209F",
28097 "description": "Superscripts and Subscripts."
28100 "name": "U+20A0–20CF",
28101 "description": "Currency Symbols."
28104 "name": "U+2100–214F",
28105 "description": "Letterlike Symbols."
28108 "name": "U+2150–218F",
28109 "description": "Number Forms."
28112 "name": "U+2190–21FF",
28113 "description": "Arrows."
28116 "name": "U+2200–22FF",
28117 "description": "Mathematical Operators."
28120 "name": "U+2300–23FF",
28121 "description": "Miscellaneous Technical."
28124 "name": "U+E000-F8FF",
28125 "description": "Private Use Area."
28128 "name": "U+FB00–FB4F",
28129 "description": "Alphabetic Presentation Forms. Ligatures for latin, Armenian, and Hebrew."
28132 "name": "U+FB50–FDFF",
28133 "description": "Arabic Presentation Forms-A. Contextual forms / ligatures for Persian, Urdu, Sindhi, Central Asian languages, etc, Arabic pedagogical symbols, word ligatures."
28136 "name": "U+1F600–1F64F",
28137 "description": "Emoji: Emoticons."
28140 "name": "U+2600–26FF",
28141 "description": "Emoji: Miscellaneous Symbols."
28144 "name": "U+1F300–1F5FF",
28145 "description": "Emoji: Miscellaneous Symbols and Pictographs."
28148 "name": "U+1F900–1F9FF",
28149 "description": "Emoji: Supplemental Symbols and Pictographs."
28152 "name": "U+1F680–1F6FF",
28153 "description": "Emoji: Transport and Map Symbols."
28156 "syntax": "<unicode-range>#",
28157 "description": "@font-face descriptor. Defines the set of Unicode codepoints that may be supported by the font face for which it is declared.",
28163 "name": "word-spacing",
28167 "description": "No additional spacing is applied. Computes to zero."
28170 "syntax": "normal | <length-percentage>",
28173 "name": "MDN Reference",
28174 "url": "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
28177 "description": "Specifies additional spacing between “words”.",
28184 "name": "text-size-adjust",
28185 "status": "experimental",
28186 "syntax": "none | auto | <percentage>",
28194 "name": "MDN Reference",
28195 "url": "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
28198 "description": "The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."
28201 "name": "border-top-style",
28202 "syntax": "<line-style>",
28205 "name": "MDN Reference",
28206 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
28209 "description": "Sets the style of the top border.",
28215 "name": "border-bottom-style",
28216 "syntax": "<line-style>",
28219 "name": "MDN Reference",
28220 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
28223 "description": "Sets the style of the bottom border.",
28229 "name": "animation-direction",
28232 "name": "alternate",
28233 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
28236 "name": "alternate-reverse",
28237 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
28241 "description": "Normal playback."
28245 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
28248 "syntax": "<single-animation-direction>#",
28251 "name": "MDN Reference",
28252 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
28255 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
28261 "name": "image-rendering",
28272 "description": "The image should be scaled with an algorithm that maximizes the appearance of the image."
28275 "name": "crisp-edges",
28276 "description": "The image must be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process."
28279 "name": "-moz-crisp-edges",
28289 "name": "optimizeQuality",
28290 "description": "Deprecated."
28293 "name": "optimizeSpeed",
28294 "description": "Deprecated."
28297 "name": "pixelated",
28298 "description": "When scaling the image up, the 'nearest neighbor' or similar algorithm must be used, so that the image appears to be simply composed of very large pixels."
28301 "syntax": "auto | crisp-edges | pixelated",
28304 "name": "MDN Reference",
28305 "url": "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
28308 "description": "Provides a hint to the user-agent about what aspects of an image are most important to preserve when the image is scaled, to aid the user-agent in the choice of an appropriate scaling algorithm.",
28314 "name": "perspective",
28318 "description": "No perspective transform is applied."
28321 "syntax": "none | <length>",
28324 "name": "MDN Reference",
28325 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective"
28328 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
28335 "name": "grid-template-columns",
28346 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
28349 "name": "min-content",
28350 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
28353 "name": "max-content",
28354 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
28358 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
28362 "description": "Indicates that the grid will align to its parent grid in that axis."
28365 "name": "minmax()",
28366 "description": "Defines a size range greater than or equal to min and less than or equal to max."
28369 "name": "repeat()",
28370 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
28373 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
28376 "name": "MDN Reference",
28377 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
28380 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
28389 "name": "list-style-position",
28393 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
28397 "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
28400 "syntax": "inside | outside",
28403 "name": "MDN Reference",
28404 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
28407 "description": "Specifies the position of the '::marker' pseudo-element's box in the list item.",
28413 "name": "font-feature-settings",
28416 "name": "\"aalt\"",
28417 "description": "Access All Alternates."
28420 "name": "\"abvf\"",
28421 "description": "Above-base Forms. Required in Khmer script."
28424 "name": "\"abvm\"",
28425 "description": "Above-base Mark Positioning. Required in Indic scripts."
28428 "name": "\"abvs\"",
28429 "description": "Above-base Substitutions. Required in Indic scripts."
28432 "name": "\"afrc\"",
28433 "description": "Alternative Fractions."
28436 "name": "\"akhn\"",
28437 "description": "Akhand. Required in most Indic scripts."
28440 "name": "\"blwf\"",
28441 "description": "Below-base Form. Required in a number of Indic scripts."
28444 "name": "\"blwm\"",
28445 "description": "Below-base Mark Positioning. Required in Indic scripts."
28448 "name": "\"blws\"",
28449 "description": "Below-base Substitutions. Required in Indic scripts."
28452 "name": "\"calt\"",
28453 "description": "Contextual Alternates."
28456 "name": "\"case\"",
28457 "description": "Case-Sensitive Forms. Applies only to European scripts; particularly prominent in Spanish-language setting."
28460 "name": "\"ccmp\"",
28461 "description": "Glyph Composition/Decomposition."
28464 "name": "\"cfar\"",
28465 "description": "Conjunct Form After Ro. Required in Khmer scripts."
28468 "name": "\"cjct\"",
28469 "description": "Conjunct Forms. Required in Indic scripts that show similarity to Devanagari."
28472 "name": "\"clig\"",
28473 "description": "Contextual Ligatures."
28476 "name": "\"cpct\"",
28477 "description": "Centered CJK Punctuation. Used primarily in Chinese fonts."
28480 "name": "\"cpsp\"",
28481 "description": "Capital Spacing. Should not be used in connecting scripts (e.g. most Arabic)."
28484 "name": "\"cswh\"",
28485 "description": "Contextual Swash."
28488 "name": "\"curs\"",
28489 "description": "Cursive Positioning. Can be used in any cursive script."
28492 "name": "\"c2pc\"",
28493 "description": "Petite Capitals From Capitals. Applies only to bicameral scripts."
28496 "name": "\"c2sc\"",
28497 "description": "Small Capitals From Capitals. Applies only to bicameral scripts."
28500 "name": "\"dist\"",
28501 "description": "Distances. Required in Indic scripts."
28504 "name": "\"dlig\"",
28505 "description": "Discretionary ligatures."
28508 "name": "\"dnom\"",
28509 "description": "Denominators."
28512 "name": "\"dtls\"",
28513 "description": "Dotless Forms. Applied to math formula layout."
28516 "name": "\"expt\"",
28517 "description": "Expert Forms. Applies only to Japanese."
28520 "name": "\"falt\"",
28521 "description": "Final Glyph on Line Alternates. Can be used in any cursive script."
28524 "name": "\"fin2\"",
28525 "description": "Terminal Form #2. Used only with the Syriac script."
28528 "name": "\"fin3\"",
28529 "description": "Terminal Form #3. Used only with the Syriac script."
28532 "name": "\"fina\"",
28533 "description": "Terminal Forms. Can be used in any alphabetic script."
28536 "name": "\"flac\"",
28537 "description": "Flattened ascent forms. Applied to math formula layout."
28540 "name": "\"frac\"",
28541 "description": "Fractions."
28544 "name": "\"fwid\"",
28545 "description": "Full Widths. Applies to any script which can use monospaced forms."
28548 "name": "\"half\"",
28549 "description": "Half Forms. Required in Indic scripts that show similarity to Devanagari."
28552 "name": "\"haln\"",
28553 "description": "Halant Forms. Required in Indic scripts."
28556 "name": "\"halt\"",
28557 "description": "Alternate Half Widths. Used only in CJKV fonts."
28560 "name": "\"hist\"",
28561 "description": "Historical Forms."
28564 "name": "\"hkna\"",
28565 "description": "Horizontal Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
28568 "name": "\"hlig\"",
28569 "description": "Historical Ligatures."
28572 "name": "\"hngl\"",
28573 "description": "Hangul. Korean only."
28576 "name": "\"hojo\"",
28577 "description": "Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms). Used only with Kanji script."
28580 "name": "\"hwid\"",
28581 "description": "Half Widths. Generally used only in CJKV fonts."
28584 "name": "\"init\"",
28585 "description": "Initial Forms. Can be used in any alphabetic script."
28588 "name": "\"isol\"",
28589 "description": "Isolated Forms. Can be used in any cursive script."
28592 "name": "\"ital\"",
28593 "description": "Italics. Applies mostly to Latin; note that many non-Latin fonts contain Latin as well."
28596 "name": "\"jalt\"",
28597 "description": "Justification Alternates. Can be used in any cursive script."
28600 "name": "\"jp78\"",
28601 "description": "JIS78 Forms. Applies only to Japanese."
28604 "name": "\"jp83\"",
28605 "description": "JIS83 Forms. Applies only to Japanese."
28608 "name": "\"jp90\"",
28609 "description": "JIS90 Forms. Applies only to Japanese."
28612 "name": "\"jp04\"",
28613 "description": "JIS2004 Forms. Applies only to Japanese."
28616 "name": "\"kern\"",
28617 "description": "Kerning."
28620 "name": "\"lfbd\"",
28621 "description": "Left Bounds."
28624 "name": "\"liga\"",
28625 "description": "Standard Ligatures."
28628 "name": "\"ljmo\"",
28629 "description": "Leading Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28632 "name": "\"lnum\"",
28633 "description": "Lining Figures."
28636 "name": "\"locl\"",
28637 "description": "Localized Forms."
28640 "name": "\"ltra\"",
28641 "description": "Left-to-right glyph alternates."
28644 "name": "\"ltrm\"",
28645 "description": "Left-to-right mirrored forms."
28648 "name": "\"mark\"",
28649 "description": "Mark Positioning."
28652 "name": "\"med2\"",
28653 "description": "Medial Form #2. Used only with the Syriac script."
28656 "name": "\"medi\"",
28657 "description": "Medial Forms."
28660 "name": "\"mgrk\"",
28661 "description": "Mathematical Greek."
28664 "name": "\"mkmk\"",
28665 "description": "Mark to Mark Positioning."
28668 "name": "\"nalt\"",
28669 "description": "Alternate Annotation Forms."
28672 "name": "\"nlck\"",
28673 "description": "NLC Kanji Forms. Used only with Kanji script."
28676 "name": "\"nukt\"",
28677 "description": "Nukta Forms. Required in Indic scripts.."
28680 "name": "\"numr\"",
28681 "description": "Numerators."
28684 "name": "\"onum\"",
28685 "description": "Oldstyle Figures."
28688 "name": "\"opbd\"",
28689 "description": "Optical Bounds."
28692 "name": "\"ordn\"",
28693 "description": "Ordinals. Applies mostly to Latin script."
28696 "name": "\"ornm\"",
28697 "description": "Ornaments."
28700 "name": "\"palt\"",
28701 "description": "Proportional Alternate Widths. Used mostly in CJKV fonts."
28704 "name": "\"pcap\"",
28705 "description": "Petite Capitals."
28708 "name": "\"pkna\"",
28709 "description": "Proportional Kana. Generally used only in Japanese fonts."
28712 "name": "\"pnum\"",
28713 "description": "Proportional Figures."
28716 "name": "\"pref\"",
28717 "description": "Pre-base Forms. Required in Khmer and Myanmar (Burmese) scripts and southern Indic scripts that may display a pre-base form of Ra."
28720 "name": "\"pres\"",
28721 "description": "Pre-base Substitutions. Required in Indic scripts."
28724 "name": "\"pstf\"",
28725 "description": "Post-base Forms. Required in scripts of south and southeast Asia that have post-base forms for consonants eg: Gurmukhi, Malayalam, Khmer."
28728 "name": "\"psts\"",
28729 "description": "Post-base Substitutions."
28732 "name": "\"pwid\"",
28733 "description": "Proportional Widths."
28736 "name": "\"qwid\"",
28737 "description": "Quarter Widths. Generally used only in CJKV fonts."
28740 "name": "\"rand\"",
28741 "description": "Randomize."
28744 "name": "\"rclt\"",
28745 "description": "Required Contextual Alternates. May apply to any script, but is especially important for many styles of Arabic."
28748 "name": "\"rlig\"",
28749 "description": "Required Ligatures. Applies to Arabic and Syriac. May apply to some other scripts."
28752 "name": "\"rkrf\"",
28753 "description": "Rakar Forms. Required in Devanagari and Gujarati scripts."
28756 "name": "\"rphf\"",
28757 "description": "Reph Form. Required in Indic scripts. E.g. Devanagari, Kannada."
28760 "name": "\"rtbd\"",
28761 "description": "Right Bounds."
28764 "name": "\"rtla\"",
28765 "description": "Right-to-left alternates."
28768 "name": "\"rtlm\"",
28769 "description": "Right-to-left mirrored forms."
28772 "name": "\"ruby\"",
28773 "description": "Ruby Notation Forms. Applies only to Japanese."
28776 "name": "\"salt\"",
28777 "description": "Stylistic Alternates."
28780 "name": "\"sinf\"",
28781 "description": "Scientific Inferiors."
28784 "name": "\"size\"",
28785 "description": "Optical size."
28788 "name": "\"smcp\"",
28789 "description": "Small Capitals. Applies only to bicameral scripts."
28792 "name": "\"smpl\"",
28793 "description": "Simplified Forms. Applies only to Chinese and Japanese."
28796 "name": "\"ssty\"",
28797 "description": "Math script style alternates."
28800 "name": "\"stch\"",
28801 "description": "Stretching Glyph Decomposition."
28804 "name": "\"subs\"",
28805 "description": "Subscript."
28808 "name": "\"sups\"",
28809 "description": "Superscript."
28812 "name": "\"swsh\"",
28813 "description": "Swash. Does not apply to ideographic scripts."
28816 "name": "\"titl\"",
28817 "description": "Titling."
28820 "name": "\"tjmo\"",
28821 "description": "Trailing Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28824 "name": "\"tnam\"",
28825 "description": "Traditional Name Forms. Applies only to Japanese."
28828 "name": "\"tnum\"",
28829 "description": "Tabular Figures."
28832 "name": "\"trad\"",
28833 "description": "Traditional Forms. Applies only to Chinese and Japanese."
28836 "name": "\"twid\"",
28837 "description": "Third Widths. Generally used only in CJKV fonts."
28840 "name": "\"unic\"",
28841 "description": "Unicase."
28844 "name": "\"valt\"",
28845 "description": "Alternate Vertical Metrics. Applies only to scripts with vertical writing modes."
28848 "name": "\"vatu\"",
28849 "description": "Vattu Variants. Used for Indic scripts. E.g. Devanagari."
28852 "name": "\"vert\"",
28853 "description": "Vertical Alternates. Applies only to scripts with vertical writing modes."
28856 "name": "\"vhal\"",
28857 "description": "Alternate Vertical Half Metrics. Used only in CJKV fonts."
28860 "name": "\"vjmo\"",
28861 "description": "Vowel Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28864 "name": "\"vkna\"",
28865 "description": "Vertical Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
28868 "name": "\"vkrn\"",
28869 "description": "Vertical Kerning."
28872 "name": "\"vpal\"",
28873 "description": "Proportional Alternate Vertical Metrics. Used mostly in CJKV fonts."
28876 "name": "\"vrt2\"",
28877 "description": "Vertical Alternates and Rotation. Applies only to scripts with vertical writing modes."
28880 "name": "\"zero\"",
28881 "description": "Slashed Zero."
28885 "description": "No change in glyph substitution or positioning occurs."
28889 "description": "Disable feature."
28893 "description": "Enable feature."
28896 "syntax": "normal | <feature-tag-value>#",
28899 "name": "MDN Reference",
28900 "url": "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
28903 "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
28920 "description": "Indicates that the property has no effect."
28924 "description": "Turns on all forms of containment for the element."
28928 "description": "All containment rules except size are applied to the element."
28932 "description": "For properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element."
28936 "description": "Turns on layout containment for the element."
28940 "description": "Turns on style containment for the element."
28944 "description": "Turns on paint containment for the element."
28947 "syntax": "none | strict | content | [ size || layout || style || paint ]",
28950 "name": "MDN Reference",
28951 "url": "https://developer.mozilla.org/docs/Web/CSS/contain"
28954 "description": "Indicates that an element and its contents are, as much as possible, independent of the rest of the document tree.",
28960 "name": "background-position-x",
28964 "description": "Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."
28968 "description": "Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."
28972 "description": "Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."
28975 "status": "experimental",
28976 "syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
28979 "name": "MDN Reference",
28980 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
28983 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
28990 "name": "transform-style",
29001 "description": "All children of this element are rendered flattened into the 2D plane of the element."
29004 "name": "preserve-3d",
29012 "description": "Flattening is not performed, so children maintain their position in 3D space."
29015 "syntax": "flat | preserve-3d",
29018 "name": "MDN Reference",
29019 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-style"
29022 "description": "Defines how nested elements are rendered in 3D space.",
29028 "name": "background-origin",
29029 "syntax": "<box>#",
29032 "name": "MDN Reference",
29033 "url": "https://developer.mozilla.org/docs/Web/CSS/background-origin"
29036 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
29042 "name": "border-left-style",
29043 "syntax": "<line-style>",
29046 "name": "MDN Reference",
29047 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
29050 "description": "Sets the style of the left border.",
29056 "name": "font-display",
29057 "status": "experimental",
29058 "syntax": "[ auto | block | swap | fallback | optional ]",
29059 "description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
29062 "name": "clip-path",
29066 "description": "No clipping path gets created."
29070 "description": "References a <clipPath> element to create a clipping path."
29073 "syntax": "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
29076 "name": "MDN Reference",
29077 "url": "https://developer.mozilla.org/docs/Web/CSS/clip-path"
29080 "description": "Specifies a clipping path where everything inside the path is visible and everything outside is clipped out.",
29093 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
29097 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
29101 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
29104 "syntax": "none | manual | auto",
29107 "name": "MDN Reference",
29108 "url": "https://developer.mozilla.org/docs/Web/CSS/hyphens"
29111 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
29117 "name": "background-attachment",
29121 "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
29125 "description": "The background is fixed with regard to the element’s contents: if the element has a scrolling mechanism, the background scrolls with the element’s contents."
29129 "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element’s border.)"
29132 "syntax": "<attachment>#",
29135 "name": "MDN Reference",
29136 "url": "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
29139 "description": "Specifies whether the background images are fixed with regard to the viewport ('fixed') or scroll along with the element ('scroll') or its contents ('local').",
29145 "name": "border-right-style",
29146 "syntax": "<line-style>",
29149 "name": "MDN Reference",
29150 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
29153 "description": "Sets the style of the right border.",
29159 "name": "outline-color",
29163 "description": "Performs a color inversion on the pixels on the screen."
29166 "syntax": "<color> | invert",
29169 "name": "MDN Reference",
29170 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-color"
29173 "description": "The color of the outline.",
29180 "name": "margin-block-end",
29193 "syntax": "<'margin-left'>",
29196 "name": "MDN Reference",
29197 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
29200 "description": "Logical 'margin-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29207 "name": "animation-play-state",
29211 "description": "A running animation will be paused."
29215 "description": "Resume playback of a paused animation."
29218 "syntax": "<single-animation-play-state>#",
29221 "name": "MDN Reference",
29222 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
29225 "description": "Defines whether the animation is running or paused.",
29235 "description": "The 'open-quote' and 'close-quote' values of the 'content' property produce no quotations marks, as if they were 'no-open-quote' and 'no-close-quote' respectively."
29238 "syntax": "none | auto | [ <string> <string> ]+",
29241 "name": "MDN Reference",
29242 "url": "https://developer.mozilla.org/docs/Web/CSS/quotes"
29245 "description": "Specifies quotation marks for any number of embedded quotations.",
29251 "name": "background-position-y",
29255 "description": "Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."
29259 "description": "Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."
29263 "description": "Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."
29266 "status": "experimental",
29267 "syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
29270 "name": "MDN Reference",
29271 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
29274 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
29281 "name": "font-stretch",
29284 "name": "condensed"
29290 "name": "extra-condensed"
29293 "name": "extra-expanded"
29296 "name": "narrower",
29297 "description": "Indicates a narrower value relative to the width of the parent element."
29303 "name": "semi-condensed"
29306 "name": "semi-expanded"
29309 "name": "ultra-condensed"
29312 "name": "ultra-expanded"
29316 "description": "Indicates a wider value relative to the width of the parent element."
29319 "syntax": "<font-stretch-absolute>{1,2}",
29322 "name": "MDN Reference",
29323 "url": "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
29326 "description": "Selects a normal, condensed, or expanded face from a font family.",
29332 "name": "stroke-linecap",
29336 "description": "Indicates that the stroke for each subpath does not extend beyond its two endpoints."
29340 "description": "Indicates that at each end of each subpath, the shape representing the stroke will be extended by a half circle with a radius equal to the stroke width."
29344 "description": "Indicates that at the end of each subpath, the shape representing the stroke will be extended by a rectangle with the same width as the stroke width and whose length is half of the stroke width."
29347 "description": "Specifies the shape to be used at the end of open subpaths when they are stroked.",
29353 "name": "object-position",
29361 "syntax": "<position>",
29364 "name": "MDN Reference",
29365 "url": "https://developer.mozilla.org/docs/Web/CSS/object-position"
29368 "description": "Determines the alignment of the replaced element inside its box.",
29376 "name": "counter-reset",
29380 "description": "The counter is not modified."
29383 "syntax": "[ <custom-ident> <integer>? ]+ | none",
29386 "name": "MDN Reference",
29387 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
29390 "description": "Property accepts one or more names of counters (identifiers), each one optionally followed by an integer. The integer gives the value that the counter is set to on each occurrence of the element.",
29397 "name": "margin-block-start",
29410 "syntax": "<'margin-left'>",
29413 "name": "MDN Reference",
29414 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
29417 "description": "Logical 'margin-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29424 "name": "counter-increment",
29428 "description": "This element does not alter the value of any counters."
29431 "syntax": "[ <custom-ident> <integer>? ]+ | none",
29434 "name": "MDN Reference",
29435 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
29438 "description": "Manipulate the value of existing counters.",
29450 "syntax": "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
29456 "name": "text-decoration-color",
29464 "syntax": "<color>",
29467 "name": "MDN Reference",
29468 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
29471 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
29477 "name": "list-style-image",
29481 "description": "The default contents of the of the list item’s marker are given by 'list-style-type' instead."
29484 "syntax": "<url> | none",
29487 "name": "MDN Reference",
29488 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
29491 "description": "Sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker.",
29497 "name": "column-count",
29501 "description": "Determines the number of columns by the 'column-width' property and the element width."
29504 "syntax": "<integer> | auto",
29507 "name": "MDN Reference",
29508 "url": "https://developer.mozilla.org/docs/Web/CSS/column-count"
29511 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
29518 "name": "border-image",
29522 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
29526 "description": "Causes the middle part of the border-image to be preserved."
29530 "description": "Use the border styles."
29534 "description": "The image is tiled (repeated) to fill the area."
29538 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
29542 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
29546 "description": "The image is stretched to fill the area."
29552 "syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
29555 "name": "MDN Reference",
29556 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image"
29559 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
29569 "name": "column-gap",
29573 "description": "User agent specific and typically equivalent to 1em."
29576 "syntax": "normal | <length-percentage>",
29577 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
29584 "name": "page-break-inside",
29588 "description": "Neither force nor forbid a page break inside the generated box."
29592 "description": "Avoid a page break inside the generated box."
29595 "syntax": "auto | avoid",
29598 "name": "MDN Reference",
29599 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
29602 "description": "Defines rules for page breaks inside an element.",
29608 "name": "fill-opacity",
29609 "description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
29615 "name": "padding-inline-start",
29623 "syntax": "<'padding-left'>",
29626 "name": "MDN Reference",
29627 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
29630 "description": "Logical 'padding-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29637 "name": "empty-cells",
29641 "description": "No borders or backgrounds are drawn around/behind empty cells."
29644 "name": "-moz-show-background"
29648 "description": "Borders and backgrounds are drawn around/behind empty cells (like normal cells)."
29651 "syntax": "show | hide",
29654 "name": "MDN Reference",
29655 "url": "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
29658 "description": "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",
29664 "name": "font-variant-ligatures",
29674 "name": "additional-ligatures",
29675 "description": "Enables display of additional ligatures."
29678 "name": "common-ligatures",
29679 "description": "Enables display of common ligatures."
29682 "name": "contextual",
29690 "description": "Enables display of contextual alternates."
29693 "name": "discretionary-ligatures",
29694 "description": "Enables display of discretionary ligatures."
29697 "name": "historical-ligatures",
29698 "description": "Enables display of historical ligatures."
29701 "name": "no-additional-ligatures",
29702 "description": "Disables display of additional ligatures."
29705 "name": "no-common-ligatures",
29706 "description": "Disables display of common ligatures."
29709 "name": "no-contextual",
29717 "description": "Disables display of contextual alternates."
29720 "name": "no-discretionary-ligatures",
29721 "description": "Disables display of discretionary ligatures."
29724 "name": "no-historical-ligatures",
29725 "description": "Disables display of historical ligatures."
29736 "description": "Disables all ligatures."
29740 "description": "Implies that the defaults set by the font are used."
29743 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
29746 "name": "MDN Reference",
29747 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
29750 "description": "Specifies control over which ligatures are enabled or disabled. A value of ‘normal’ implies that the defaults set by the font are used.",
29756 "name": "text-decoration-skip",
29757 "status": "experimental",
29758 "syntax": "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
29766 "name": "MDN Reference",
29767 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
29770 "description": "The text-decoration-skip CSS property specifies what parts of the element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors."
29773 "name": "justify-self",
29795 "name": "flex-end",
29796 "description": "\"Flex items are packed toward the end of the line.\""
29799 "name": "flex-start",
29800 "description": "\"Flex items are packed toward the start of the line.\""
29803 "name": "self-end",
29804 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
29807 "name": "self-start",
29808 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
29812 "description": "The items are packed flush to each other toward the center of the of the alignment container."
29824 "name": "first baseline"
29827 "name": "last baseline"
29831 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
29840 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
29841 "description": "Defines the way of justifying a box inside its container along the appropriate axis.",
29847 "name": "page-break-after",
29851 "description": "Always force a page break after the generated box."
29855 "description": "Neither force nor forbid a page break after generated box."
29859 "description": "Avoid a page break after the generated box."
29863 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a left page."
29867 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a right page."
29870 "syntax": "auto | always | avoid | left | right | recto | verso",
29873 "name": "MDN Reference",
29874 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
29877 "description": "Defines rules for page breaks after an element.",
29883 "name": "grid-template-rows",
29894 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
29897 "name": "min-content",
29898 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
29901 "name": "max-content",
29902 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
29906 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
29910 "description": "Indicates that the grid will align to its parent grid in that axis."
29913 "name": "minmax()",
29914 "description": "Defines a size range greater than or equal to min and less than or equal to max."
29917 "name": "repeat()",
29918 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
29921 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
29924 "name": "MDN Reference",
29925 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
29928 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
29938 "name": "padding-inline-end",
29946 "syntax": "<'padding-left'>",
29949 "name": "MDN Reference",
29950 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
29953 "description": "Logical 'padding-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29960 "name": "grid-gap",
29967 "status": "obsolete",
29968 "syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
29969 "description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
29984 "syntax": "initial | inherit | unset | revert",
29987 "name": "MDN Reference",
29988 "url": "https://developer.mozilla.org/docs/Web/CSS/all"
29991 "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",
29997 "name": "grid-column",
30008 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
30012 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
30015 "syntax": "<grid-line> [ / <grid-line> ]?",
30018 "name": "MDN Reference",
30019 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column"
30022 "description": "Shorthand for 'grid-column-start' and 'grid-column-end'.",
30030 "name": "stroke-opacity",
30031 "description": "Specifies the opacity of the painting operation used to stroke the current object.",
30037 "name": "margin-inline-start",
30050 "syntax": "<'margin-left'>",
30053 "name": "MDN Reference",
30054 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
30057 "description": "Logical 'margin-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
30064 "name": "margin-inline-end",
30077 "syntax": "<'margin-left'>",
30080 "name": "MDN Reference",
30081 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
30084 "description": "Logical 'margin-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
30091 "name": "caret-color",
30102 "description": "The user agent selects an appropriate color for the caret. This is generally currentcolor, but the user agent may choose a different color to ensure good visibility and contrast with the surrounding content, taking into account the value of currentcolor, the background, shadows, and other factors."
30105 "syntax": "auto | <color>",
30108 "name": "MDN Reference",
30109 "url": "https://developer.mozilla.org/docs/Web/CSS/caret-color"
30112 "description": "Controls the color of the text insertion indicator.",
30127 "syntax": "<integer>",
30130 "name": "MDN Reference",
30131 "url": "https://developer.mozilla.org/docs/Web/CSS/orphans"
30134 "description": "Specifies the minimum number of line boxes in a block container that must be left in a fragment before a fragmentation break.",
30140 "name": "caption-side",
30144 "description": "Positions the caption box below the table box."
30148 "description": "Positions the caption box above the table box."
30151 "syntax": "top | bottom | block-start | block-end | inline-start | inline-end",
30154 "name": "MDN Reference",
30155 "url": "https://developer.mozilla.org/docs/Web/CSS/caption-side"
30158 "description": "Specifies the position of the caption box with respect to the table box.",
30164 "name": "perspective-origin",
30165 "syntax": "<position>",
30168 "name": "MDN Reference",
30169 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
30172 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
30180 "name": "stop-color",
30181 "description": "Indicates what color to use at that gradient stop.",
30195 "syntax": "<integer>",
30198 "name": "MDN Reference",
30199 "url": "https://developer.mozilla.org/docs/Web/CSS/widows"
30202 "description": "Specifies the minimum number of line boxes of a block container that must be left in a fragment after a break.",
30208 "name": "scroll-behavior",
30218 "description": "Scrolls in an instant fashion."
30222 "description": "Scrolls in a smooth fashion using a user-agent-defined timing function and time period."
30225 "syntax": "auto | smooth",
30228 "name": "MDN Reference",
30229 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
30232 "description": "Specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs.",
30238 "name": "grid-column-gap",
30245 "status": "obsolete",
30246 "syntax": "<length-percentage>",
30247 "description": "Specifies the gutters between grid columns. Replaced by 'column-gap' property.",
30257 "description": "The width depends on the values of other properties."
30260 "syntax": "<'column-width'> || <'column-count'>",
30263 "name": "MDN Reference",
30264 "url": "https://developer.mozilla.org/docs/Web/CSS/columns"
30267 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
30275 "name": "column-width",
30279 "description": "The width depends on the values of other properties."
30282 "syntax": "<length> | auto",
30285 "name": "MDN Reference",
30286 "url": "https://developer.mozilla.org/docs/Web/CSS/column-width"
30289 "description": "Describes the width of columns in multicol elements.",
30296 "name": "mix-blend-mode",
30307 "description": "Default attribute which specifies no blending"
30310 "name": "multiply",
30311 "description": "The source color is multiplied by the destination color and replaces the destination."
30315 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
30319 "description": "Multiplies or screens the colors, depending on the backdrop color value."
30323 "description": "Selects the darker of the backdrop and source colors."
30327 "description": "Selects the lighter of the backdrop and source colors."
30330 "name": "color-dodge",
30331 "description": "Brightens the backdrop color to reflect the source color."
30334 "name": "color-burn",
30335 "description": "Darkens the backdrop color to reflect the source color."
30338 "name": "hard-light",
30339 "description": "Multiplies or screens the colors, depending on the source color value."
30342 "name": "soft-light",
30343 "description": "Darkens or lightens the colors, depending on the source color value."
30346 "name": "difference",
30347 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
30350 "name": "exclusion",
30351 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
30362 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
30365 "name": "saturation",
30373 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
30384 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
30387 "name": "luminosity",
30395 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
30398 "syntax": "<blend-mode>",
30401 "name": "MDN Reference",
30402 "url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
30405 "description": "Defines the formula that must be used to mix the colors with the backdrop.",
30411 "name": "font-kerning",
30422 "description": "Specifies that kerning is applied at the discretion of the user agent."
30426 "description": "Specifies that kerning is not applied."
30430 "description": "Specifies that kerning is applied."
30433 "syntax": "auto | normal | none",
30436 "name": "MDN Reference",
30437 "url": "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
30440 "description": "Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",
30446 "name": "border-image-slice",
30450 "description": "Causes the middle part of the border-image to be preserved."
30453 "syntax": "<number-percentage>{1,4} && fill?",
30456 "name": "MDN Reference",
30457 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
30460 "description": "Specifies inward offsets from the top, right, bottom, and left edges of the image, dividing it into nine regions: four corners, four edges and a middle.",
30467 "name": "border-image-repeat",
30471 "description": "The image is tiled (repeated) to fill the area."
30475 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
30479 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
30483 "description": "The image is stretched to fill the area."
30486 "syntax": "[ stretch | repeat | round | space ]{1,2}",
30489 "name": "MDN Reference",
30490 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
30493 "description": "Specifies how the images for the sides and the middle part of the border image are scaled and tiled. If the second keyword is absent, it is assumed to be the same as the first.",
30499 "name": "border-image-width",
30503 "description": "The border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
30506 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
30509 "name": "MDN Reference",
30510 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
30513 "description": "The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the top, right, bottom, and left sides of the area, respectively.",
30521 "name": "grid-row",
30532 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
30536 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
30539 "syntax": "<grid-line> [ / <grid-line> ]?",
30542 "name": "MDN Reference",
30543 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row"
30546 "description": "Shorthand for 'grid-row-start' and 'grid-row-end'.",
30554 "name": "tab-size",
30562 "syntax": "<integer> | <length>",
30565 "name": "MDN Reference",
30566 "url": "https://developer.mozilla.org/docs/Web/CSS/tab-size"
30569 "description": "Determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
30576 "name": "grid-row-gap",
30583 "status": "obsolete",
30584 "syntax": "<length-percentage>",
30585 "description": "Specifies the gutters between grid rows. Replaced by 'row-gap' property.",
30591 "name": "text-decoration-style",
30602 "description": "Produces a dashed line style."
30606 "description": "Produces a dotted line."
30610 "description": "Produces a double line."
30614 "description": "Produces no line."
30618 "description": "Produces a solid line."
30622 "description": "Produces a wavy line."
30625 "syntax": "solid | double | dotted | dashed | wavy",
30628 "name": "MDN Reference",
30629 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
30632 "description": "Specifies the line style for underline, line-through and overline text decoration.",
30638 "name": "line-break",
30642 "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
30646 "description": "Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
30650 "description": "Breaks text using the most common set of line-breaking rules."
30654 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
30657 "syntax": "auto | loose | normal | strict | anywhere",
30660 "name": "MDN Reference",
30661 "url": "https://developer.mozilla.org/docs/Web/CSS/line-break"
30664 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
30670 "name": "border-image-outset",
30671 "syntax": "[ <length> | <number> ]{1,4}",
30674 "name": "MDN Reference",
30675 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
30678 "description": "The values specify the amount by which the border image area extends beyond the border box on the top, right, bottom, and left sides respectively. If the fourth value is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first. Numbers represent multiples of the corresponding border-width.",
30685 "name": "column-rule",
30686 "syntax": "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
30689 "name": "MDN Reference",
30690 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule"
30693 "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
30702 "name": "justify-items",
30717 "name": "flex-end",
30718 "description": "\"Flex items are packed toward the end of the line.\""
30721 "name": "flex-start",
30722 "description": "\"Flex items are packed toward the start of the line.\""
30725 "name": "self-end",
30726 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
30729 "name": "self-start",
30730 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
30734 "description": "The items are packed flush to each other toward the center of the of the alignment container."
30746 "name": "first baseline"
30749 "name": "last baseline"
30753 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
30765 "syntax": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
30766 "description": "Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",
30772 "name": "grid-area",
30783 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
30787 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
30790 "syntax": "<grid-line> [ / <grid-line> ]{0,3}",
30793 "name": "MDN Reference",
30794 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-area"
30797 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement. Shorthand for 'grid-row-start', 'grid-column-start', 'grid-row-end', and 'grid-column-end'.",
30804 "name": "stroke-miterlimit",
30805 "description": "When two line segments meet at a sharp angle and miter joins have been specified for 'stroke-linejoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path.",
30811 "name": "text-align-last",
30822 "description": "Content on the affected line is aligned per 'text-align' unless 'text-align' is set to 'justify', in which case it is 'start-aligned'."
30826 "description": "The inline contents are centered within the line box."
30830 "description": "The text is justified according to the method specified by the 'text-justify' property."
30834 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
30838 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
30841 "syntax": "auto | start | end | left | right | center | justify",
30844 "name": "MDN Reference",
30845 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
30848 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
30854 "name": "backdrop-filter",
30855 "syntax": "none | <filter-function-list>",
30865 "name": "MDN Reference",
30866 "url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
30869 "description": "The backdrop-filter CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent."
30872 "name": "grid-auto-rows",
30875 "name": "min-content",
30876 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
30879 "name": "max-content",
30880 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
30884 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
30887 "name": "minmax()",
30888 "description": "Defines a size range greater than or equal to min and less than or equal to max."
30891 "syntax": "<track-size>+",
30894 "name": "MDN Reference",
30895 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
30898 "description": "Specifies the size of implicitly created rows.",
30905 "name": "stroke-linejoin",
30909 "description": "Indicates that a bevelled corner is to be used to join path segments."
30913 "description": "Indicates that a sharp corner is to be used to join path segments."
30917 "description": "Indicates that a round corner is to be used to join path segments."
30920 "description": "Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",
30926 "name": "shape-outside",
30936 "name": "margin-box",
30937 "description": "The background is painted within (clipped to) the margin box."
30941 "description": "The float area is unaffected."
30944 "syntax": "none | <shape-box> || <basic-shape> | <image>",
30947 "name": "MDN Reference",
30948 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
30951 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
30960 "name": "text-decoration-line",
30970 "name": "line-through",
30971 "description": "Each line of text has a line through the middle."
30975 "description": "Neither produces nor inhibits text decoration."
30978 "name": "overline",
30979 "description": "Each line of text has a line above it."
30982 "name": "underline",
30983 "description": "Each line of text is underlined."
30986 "syntax": "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
30989 "name": "MDN Reference",
30990 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
30993 "description": "Specifies what line decorations, if any, are added to the element.",
30999 "name": "scroll-snap-align",
31000 "syntax": "[ none | start | end | center ]{1,2}",
31010 "name": "MDN Reference",
31011 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
31014 "description": "The scroll-snap-align property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value."
31017 "name": "fill-rule",
31021 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
31025 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
31028 "description": "Indicates the algorithm (or winding rule) which is to be used to determine what parts of the canvas are included inside the shape.",
31034 "name": "grid-auto-flow",
31045 "description": "The auto-placement algorithm places items by filling each row in turn, adding new rows as necessary."
31049 "description": "The auto-placement algorithm places items by filling each column in turn, adding new columns as necessary."
31053 "description": "If specified, the auto-placement algorithm uses a “dense” packing algorithm, which attempts to fill in holes earlier in the grid if smaller items come up later."
31056 "syntax": "[ row | column ] || dense",
31059 "name": "MDN Reference",
31060 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
31063 "description": "Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.",
31069 "name": "scroll-snap-type",
31073 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
31076 "name": "mandatory",
31077 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
31080 "name": "proximity",
31081 "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
31084 "syntax": "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
31087 "name": "MDN Reference",
31088 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
31091 "description": "Defines how strictly snap points are enforced on the scroll container.",
31097 "name": "page-break-before",
31101 "description": "Always force a page break before the generated box."
31105 "description": "Neither force nor forbid a page break before the generated box."
31109 "description": "Avoid a page break before the generated box."
31113 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a left page."
31117 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a right page."
31120 "syntax": "auto | always | avoid | left | right | recto | verso",
31123 "name": "MDN Reference",
31124 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
31127 "description": "Defines rules for page breaks before an element.",
31133 "name": "grid-column-start",
31144 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
31148 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
31151 "syntax": "<grid-line>",
31154 "name": "MDN Reference",
31155 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
31158 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
31166 "name": "grid-template-areas",
31177 "description": "The grid container doesn’t define any named grid areas."
31180 "syntax": "none | <string>+",
31183 "name": "MDN Reference",
31184 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
31187 "description": "Specifies named grid areas, which are not associated with any particular grid item, but can be referenced from the grid-placement properties.",
31193 "name": "break-inside",
31197 "description": "Impose no additional breaking constraints within the box."
31201 "description": "Avoid breaks within the box."
31204 "name": "avoid-column",
31205 "description": "Avoid a column break within the box."
31208 "name": "avoid-page",
31209 "description": "Avoid a page break within the box."
31212 "syntax": "auto | avoid | avoid-page | avoid-column | avoid-region",
31213 "description": "Describes the page/column/region break behavior inside the principal box.",
31219 "name": "column-fill",
31223 "description": "Fills columns sequentially."
31227 "description": "Balance content equally between columns, if possible."
31230 "syntax": "auto | balance | balance-all",
31233 "name": "MDN Reference",
31234 "url": "https://developer.mozilla.org/docs/Web/CSS/column-fill"
31237 "description": "In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",
31243 "name": "grid-column-end",
31254 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
31258 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
31261 "syntax": "<grid-line>",
31264 "name": "MDN Reference",
31265 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
31268 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
31276 "name": "border-image-source",
31280 "description": "Use the border styles."
31283 "syntax": "none | <image>",
31286 "name": "MDN Reference",
31287 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
31290 "description": "Specifies an image to use instead of the border styles given by the 'border-style' properties and as an additional background layer for the element. If the value is 'none' or if the image cannot be displayed, the border styles will be used.",
31296 "name": "overflow-anchor",
31297 "syntax": "auto | none",
31306 "name": "MDN Reference",
31307 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"
31310 "description": "The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."
31313 "name": "grid-row-start",
31324 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
31328 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
31331 "syntax": "<grid-line>",
31334 "name": "MDN Reference",
31335 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
31338 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
31346 "name": "grid-row-end",
31357 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
31361 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
31364 "syntax": "<grid-line>",
31367 "name": "MDN Reference",
31368 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
31371 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
31379 "name": "font-variant-numeric",
31389 "name": "diagonal-fractions",
31390 "description": "Enables display of lining diagonal fractions."
31393 "name": "lining-nums",
31394 "description": "Enables display of lining numerals."
31398 "description": "None of the features are enabled."
31401 "name": "oldstyle-nums",
31402 "description": "Enables display of old-style numerals."
31406 "description": "Enables display of letter forms used with ordinal numbers."
31409 "name": "proportional-nums",
31410 "description": "Enables display of proportional numerals."
31413 "name": "slashed-zero",
31414 "description": "Enables display of slashed zeros."
31417 "name": "stacked-fractions",
31418 "description": "Enables display of lining stacked fractions."
31421 "name": "tabular-nums",
31422 "description": "Enables display of tabular numerals."
31425 "syntax": "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
31428 "name": "MDN Reference",
31429 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
31432 "description": "Specifies control over numerical forms.",
31438 "name": "background-blend-mode",
31449 "description": "Default attribute which specifies no blending"
31452 "name": "multiply",
31453 "description": "The source color is multiplied by the destination color and replaces the destination."
31457 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
31461 "description": "Multiplies or screens the colors, depending on the backdrop color value."
31465 "description": "Selects the darker of the backdrop and source colors."
31469 "description": "Selects the lighter of the backdrop and source colors."
31472 "name": "color-dodge",
31473 "description": "Brightens the backdrop color to reflect the source color."
31476 "name": "color-burn",
31477 "description": "Darkens the backdrop color to reflect the source color."
31480 "name": "hard-light",
31481 "description": "Multiplies or screens the colors, depending on the source color value."
31484 "name": "soft-light",
31485 "description": "Darkens or lightens the colors, depending on the source color value."
31488 "name": "difference",
31489 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
31492 "name": "exclusion",
31493 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
31504 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
31507 "name": "saturation",
31515 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
31526 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
31529 "name": "luminosity",
31537 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
31540 "syntax": "<blend-mode>#",
31543 "name": "MDN Reference",
31544 "url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
31547 "description": "Defines the blending mode of each background layer.",
31553 "name": "text-decoration-skip-ink",
31554 "syntax": "auto | all | none",
31563 "name": "MDN Reference",
31564 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
31567 "description": "The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."
31570 "name": "column-rule-color",
31571 "syntax": "<color>",
31574 "name": "MDN Reference",
31575 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
31578 "description": "Sets the color of the column rule",
31584 "name": "isolation",
31595 "description": "Elements are not isolated unless an operation is applied that causes the creation of a stacking context."
31599 "description": "In CSS will turn the element into a stacking context."
31602 "syntax": "auto | isolate",
31605 "name": "MDN Reference",
31606 "url": "https://developer.mozilla.org/docs/Web/CSS/isolation"
31609 "description": "In CSS setting to 'isolate' will turn the element into a stacking context. In SVG, it defines whether an element is isolated or not.",
31615 "name": "shape-rendering",
31619 "description": "Suppresses aural rendering."
31622 "name": "crispEdges",
31623 "description": "Emphasize the contrast between clean edges of artwork over rendering speed and geometric precision."
31626 "name": "geometricPrecision",
31627 "description": "Emphasize geometric precision over speed and crisp edges."
31630 "name": "optimizeSpeed",
31631 "description": "Emphasize rendering speed over geometric precision and crisp edges."
31634 "description": "Provides hints about what tradeoffs to make as it renders vector graphics elements such as <path> elements and basic shapes such as circles and rectangles.",
31640 "name": "column-rule-style",
31641 "syntax": "<'border-style'>",
31644 "name": "MDN Reference",
31645 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
31648 "description": "Sets the style of the rule between columns of an element.",
31654 "name": "border-inline-end-width",
31662 "syntax": "<'border-top-width'>",
31665 "name": "MDN Reference",
31666 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
31669 "description": "Logical 'border-right-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
31676 "name": "border-inline-start-width",
31684 "syntax": "<'border-top-width'>",
31687 "name": "MDN Reference",
31688 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
31691 "description": "Logical 'border-left-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
31698 "name": "grid-auto-columns",
31701 "name": "min-content",
31702 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
31705 "name": "max-content",
31706 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
31710 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
31713 "name": "minmax()",
31714 "description": "Defines a size range greater than or equal to min and less than or equal to max."
31717 "syntax": "<track-size>+",
31720 "name": "MDN Reference",
31721 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
31724 "description": "Specifies the size of implicitly created columns.",
31731 "name": "writing-mode",
31734 "name": "horizontal-tb",
31735 "description": "Top-to-bottom block flow direction. The writing mode is horizontal."
31738 "name": "sideways-lr",
31739 "description": "Left-to-right block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
31742 "name": "sideways-rl",
31743 "description": "Right-to-left block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
31746 "name": "vertical-lr",
31747 "description": "Left-to-right block flow direction. The writing mode is vertical."
31750 "name": "vertical-rl",
31751 "description": "Right-to-left block flow direction. The writing mode is vertical."
31754 "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
31757 "name": "MDN Reference",
31758 "url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
31761 "description": "This is a shorthand property for both 'direction' and 'block-progression'.",
31767 "name": "clip-rule",
31779 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
31783 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
31786 "description": "Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",
31792 "name": "font-variant-caps",
31801 "name": "all-petite-caps",
31802 "description": "Enables display of petite capitals for both upper and lowercase letters."
31805 "name": "all-small-caps",
31806 "description": "Enables display of small capitals for both upper and lowercase letters."
31810 "description": "None of the features are enabled."
31813 "name": "petite-caps",
31814 "description": "Enables display of petite capitals."
31817 "name": "small-caps",
31818 "description": "Enables display of small capitals. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters."
31821 "name": "titling-caps",
31822 "description": "Enables display of titling capitals."
31826 "description": "Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."
31829 "syntax": "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
31832 "name": "MDN Reference",
31833 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
31836 "description": "Specifies control over capitalized forms.",
31842 "name": "text-anchor",
31846 "description": "The rendered characters are aligned such that the end of the resulting rendered text is at the initial current text position."
31850 "description": "The rendered characters are aligned such that the geometric middle of the resulting rendered text is at the initial current text position."
31854 "description": "The rendered characters are aligned such that the start of the resulting rendered text is at the initial current text position."
31857 "description": "Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",
31863 "name": "stop-opacity",
31864 "description": "Defines the opacity of a given gradient stop.",
31871 "syntax": "<mask-layer>#",
31881 "name": "MDN Reference",
31882 "url": "https://developer.mozilla.org/docs/Web/CSS/mask"
31885 "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
31888 "name": "column-span",
31892 "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
31896 "description": "The element does not span multiple columns."
31899 "syntax": "none | all",
31902 "name": "MDN Reference",
31903 "url": "https://developer.mozilla.org/docs/Web/CSS/column-span"
31906 "description": "Describes the page/column break behavior after the generated box.",
31912 "name": "font-variant-east-asian",
31921 "name": "full-width",
31922 "description": "Enables rendering of full-width variants."
31926 "description": "Enables rendering of JIS04 forms."
31930 "description": "Enables rendering of JIS78 forms."
31934 "description": "Enables rendering of JIS83 forms."
31938 "description": "Enables rendering of JIS90 forms."
31942 "description": "None of the features are enabled."
31945 "name": "proportional-width",
31946 "description": "Enables rendering of proportionally-spaced variants."
31950 "description": "Enables display of ruby variant glyphs."
31953 "name": "simplified",
31954 "description": "Enables rendering of simplified forms."
31957 "name": "traditional",
31958 "description": "Enables rendering of traditional forms."
31961 "syntax": "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
31964 "name": "MDN Reference",
31965 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
31968 "description": "Allows control of glyph substitute and positioning in East Asian text.",
31974 "name": "text-underline-position",
31981 "description": "The user agent may use any algorithm to determine the underline’s position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
31985 "description": "The underline is aligned with the under edge of the element’s content box."
31988 "syntax": "auto | from-font | [ under || [ left | right ] ]",
31991 "name": "MDN Reference",
31992 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
31995 "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements. This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
32001 "name": "break-after",
32005 "description": "Always force a page break before/after the generated box."
32009 "description": "Neither force nor forbid a page/column break before/after the principal box."
32013 "description": "Avoid a break before/after the principal box."
32016 "name": "avoid-column",
32017 "description": "Avoid a column break before/after the principal box."
32020 "name": "avoid-page",
32021 "description": "Avoid a page break before/after the principal box."
32025 "description": "Always force a column break before/after the principal box."
32029 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
32033 "description": "Always force a page break before/after the principal box."
32037 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
32040 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
32041 "description": "Describes the page/column/region break behavior after the generated box.",
32047 "name": "break-before",
32051 "description": "Always force a page break before/after the generated box."
32055 "description": "Neither force nor forbid a page/column break before/after the principal box."
32059 "description": "Avoid a break before/after the principal box."
32062 "name": "avoid-column",
32063 "description": "Avoid a column break before/after the principal box."
32066 "name": "avoid-page",
32067 "description": "Avoid a page break before/after the principal box."
32071 "description": "Always force a column break before/after the principal box."
32075 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
32079 "description": "Always force a page break before/after the principal box."
32083 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
32086 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
32087 "description": "Describes the page/column/region break behavior before the generated box.",
32093 "name": "mask-type",
32104 "description": "Indicates that the alpha values of the mask should be used."
32107 "name": "luminance",
32108 "description": "Indicates that the luminance values of the mask should be used."
32111 "syntax": "luminance | alpha",
32114 "name": "MDN Reference",
32115 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
32118 "description": "Defines whether the content of the <mask> element is treated as as luminance mask or alpha mask.",
32124 "name": "column-rule-width",
32125 "syntax": "<'border-width'>",
32128 "name": "MDN Reference",
32129 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
32132 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
32140 "syntax": "normal | <length-percentage>",
32148 "description": "The row-gap CSS property specifies the gutter between grid rows."
32151 "name": "text-orientation",
32161 "name": "sideways",
32169 "description": "This value is equivalent to 'sideways-right' in 'vertical-rl' writing mode and equivalent to 'sideways-left' in 'vertical-lr' writing mode."
32172 "name": "sideways-right",
32180 "description": "In vertical writing modes, this causes text to be set as if in a horizontal layout, but rotated 90° clockwise."
32184 "description": "In vertical writing modes, characters from horizontal-only scripts are rendered upright, i.e. in their standard horizontal orientation."
32187 "syntax": "mixed | upright | sideways",
32190 "name": "MDN Reference",
32191 "url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
32194 "description": "Specifies the orientation of text within a line.",
32200 "name": "scroll-padding",
32201 "syntax": "[ auto | <length-percentage> ]{1,4}",
32211 "name": "MDN Reference",
32212 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
32215 "description": "The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-* longhands."
32218 "name": "grid-template",
32229 "description": "Sets all three properties to their initial values."
32232 "name": "min-content",
32233 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
32236 "name": "max-content",
32237 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
32241 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
32245 "description": "Sets 'grid-template-rows' and 'grid-template-columns' to 'subgrid', and 'grid-template-areas' to its initial value."
32248 "name": "minmax()",
32249 "description": "Defines a size range greater than or equal to min and less than or equal to max."
32252 "name": "repeat()",
32253 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
32256 "syntax": "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
32259 "name": "MDN Reference",
32260 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template"
32263 "description": "Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.",
32273 "name": "border-inline-end-color",
32281 "syntax": "<'border-top-color'>",
32284 "name": "MDN Reference",
32285 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
32288 "description": "Logical 'border-right-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32294 "name": "border-inline-start-color",
32302 "syntax": "<'border-top-color'>",
32305 "name": "MDN Reference",
32306 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
32309 "description": "Logical 'border-left-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32315 "name": "scroll-snap-stop",
32316 "syntax": "normal | always",
32324 "name": "MDN Reference",
32325 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
32328 "description": "The scroll-snap-stop CSS property defines whether the scroll container is allowed to \"pass over\" possible snap positions."
32331 "name": "shape-margin",
32339 "syntax": "<length-percentage>",
32342 "name": "MDN Reference",
32343 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
32346 "description": "Adds a margin to a 'shape-outside'. This defines a new shape that is the smallest contour that includes all the points that are the 'shape-margin' distance outward in the perpendicular direction from a point on the underlying shape.",
32354 "name": "shape-image-threshold",
32362 "syntax": "<alpha-value>",
32365 "name": "MDN Reference",
32366 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
32369 "description": "Defines the alpha channel threshold used to extract the shape using an image. A value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.",
32376 "syntax": "<'row-gap'> <'column-gap'>?",
32384 "description": "The gap CSS property is a shorthand property for row-gap and column-gap specifying the gutters between grid rows and columns."
32387 "name": "min-inline-size",
32395 "syntax": "<'min-width'>",
32398 "name": "MDN Reference",
32399 "url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
32402 "description": "Logical 'min-height'. Mapping depends on the element’s 'writing-mode'.",
32409 "name": "image-orientation",
32416 "description": "After rotating by the precededing angle, the image is flipped horizontally. Defaults to 0deg if the angle is ommitted."
32419 "name": "from-image",
32420 "description": "If the image has an orientation specified in its metadata, such as EXIF, this value computes to the angle that the metadata specifies is necessary to correctly orient the image."
32423 "syntax": "from-image | <angle> | [ <angle>? flip ]",
32426 "name": "MDN Reference",
32427 "url": "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
32430 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
32436 "name": "inline-size",
32447 "description": "Depends on the values of other properties."
32450 "syntax": "<'width'>",
32453 "name": "MDN Reference",
32454 "url": "https://developer.mozilla.org/docs/Web/CSS/inline-size"
32457 "description": "Logical 'height'. Mapping depends on the element’s 'writing-mode'.",
32464 "name": "padding-block-start",
32472 "syntax": "<'padding-left'>",
32475 "name": "MDN Reference",
32476 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
32479 "description": "Logical 'padding-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32486 "name": "padding-block-end",
32494 "syntax": "<'padding-left'>",
32497 "name": "MDN Reference",
32498 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
32501 "description": "Logical 'padding-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32508 "name": "text-combine-upright",
32509 "syntax": "none | all | [ digits <integer>? ]",
32512 "name": "MDN Reference",
32513 "url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
32516 "description": "The text-combine-upright CSS property specifies the combination of multiple characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes.\n\nThis is used to produce an effect that is known as tate-chū-yoko (縦中横) in Japanese, or as 直書橫向 in Chinese."
32519 "name": "block-size",
32530 "description": "Depends on the values of other properties."
32533 "syntax": "<'width'>",
32536 "name": "MDN Reference",
32537 "url": "https://developer.mozilla.org/docs/Web/CSS/block-size"
32540 "description": "Logical 'width'. Mapping depends on the element’s 'writing-mode'.",
32547 "name": "min-block-size",
32555 "syntax": "<'min-width'>",
32558 "name": "MDN Reference",
32559 "url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
32562 "description": "Logical 'min-width'. Mapping depends on the element’s 'writing-mode'.",
32569 "name": "scroll-padding-top",
32570 "syntax": "auto | <length-percentage>",
32580 "name": "MDN Reference",
32581 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
32584 "description": "The scroll-padding-top property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
32587 "name": "border-inline-end-style",
32595 "syntax": "<'border-top-style'>",
32598 "name": "MDN Reference",
32599 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
32602 "description": "Logical 'border-right-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32608 "name": "border-block-start-width",
32616 "syntax": "<'border-top-width'>",
32619 "name": "MDN Reference",
32620 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
32623 "description": "Logical 'border-top-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32630 "name": "border-block-end-width",
32638 "syntax": "<'border-top-width'>",
32641 "name": "MDN Reference",
32642 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
32645 "description": "Logical 'border-bottom-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32652 "name": "border-block-end-color",
32660 "syntax": "<'border-top-color'>",
32663 "name": "MDN Reference",
32664 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
32667 "description": "Logical 'border-bottom-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32673 "name": "border-inline-start-style",
32681 "syntax": "<'border-top-style'>",
32684 "name": "MDN Reference",
32685 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
32688 "description": "Logical 'border-left-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32694 "name": "border-block-start-color",
32702 "syntax": "<'border-top-color'>",
32705 "name": "MDN Reference",
32706 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
32709 "description": "Logical 'border-top-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32715 "name": "border-block-end-style",
32723 "syntax": "<'border-top-style'>",
32726 "name": "MDN Reference",
32727 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
32730 "description": "Logical 'border-bottom-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32736 "name": "border-block-start-style",
32744 "syntax": "<'border-top-style'>",
32747 "name": "MDN Reference",
32748 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
32751 "description": "Logical 'border-top-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
32757 "name": "font-variation-settings",
32758 "syntax": "normal | [ <string> <number> ]#",
32768 "name": "MDN Reference",
32769 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
32772 "description": "The font-variation-settings CSS property provides low-level control over OpenType or TrueType font variations, by specifying the four letter axis names of the features you want to vary, along with their variation values."
32775 "name": "paint-order",
32792 "description": "The element is painted with the standard order of painting operations: the 'fill' is painted first, then its 'stroke' and finally its markers."
32798 "syntax": "normal | [ fill || stroke || markers ]",
32801 "name": "MDN Reference",
32802 "url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
32805 "description": "Controls the order that the three paint operations that shapes and text are rendered with: their fill, their stroke and any markers they might have.",
32811 "name": "color-interpolation-filters",
32823 "description": "Color operations are not required to occur in a particular color space."
32826 "name": "linearRGB",
32827 "description": "Color operations should occur in the linearized RGB color space."
32831 "description": "Color operations should occur in the sRGB color space."
32834 "description": "Specifies the color space for imaging operations performed via filter effects.",
32840 "name": "marker-end",
32844 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
32848 "description": "Indicates that the <marker> element referenced will be used."
32851 "description": "Specifies the marker that will be drawn at the last vertices of the given markable element.",
32857 "name": "scroll-padding-left",
32858 "syntax": "auto | <length-percentage>",
32868 "name": "MDN Reference",
32869 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
32872 "description": "The scroll-padding-left property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
32875 "name": "flood-color",
32884 "description": "Indicates what color to use to flood the current filter primitive subregion.",
32890 "name": "flood-opacity",
32899 "description": "Indicates what opacity to use to flood the current filter primitive subregion.",
32906 "name": "lighting-color",
32915 "description": "Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",
32921 "name": "marker-start",
32925 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
32929 "description": "Indicates that the <marker> element referenced will be used."
32932 "description": "Specifies the marker that will be drawn at the first vertices of the given markable element.",
32938 "name": "marker-mid",
32942 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
32946 "description": "Indicates that the <marker> element referenced will be used."
32949 "description": "Specifies the marker that will be drawn at all vertices except the first and last.",
32959 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
32963 "description": "Indicates that the <marker> element referenced will be used."
32966 "description": "Specifies the marker symbol that shall be used for all points on the sets the value for all vertices on the given ‘path’ element or basic shape.",
32972 "name": "place-content",
32973 "syntax": "<'align-content'> <'justify-content'>?",
32981 "description": "The place-content CSS shorthand property sets both the align-content and justify-content properties."
32984 "name": "offset-path",
32985 "syntax": "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
32994 "name": "MDN Reference",
32995 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
32998 "description": "The offset-path CSS property specifies the offset path where the element gets positioned. The exact element’s position on the offset path is determined by the offset-distance property. An offset path is either a specified path with one or multiple sub-paths or the geometry of a not-styled basic shape. Each shape or path must define an initial position for the computed value of \"0\" for offset-distance and an initial direction which specifies the rotation of the object to the initial position.\n\nIn this specification, a direction (or rotation) of 0 degrees is equivalent to the direction of the positive x-axis in the object’s local coordinate system. In other words, a rotation of 0 degree points to the right side of the UA if the object and its ancestors have no transformation applied."
33001 "name": "offset-rotate",
33002 "syntax": "[ auto | reverse ] || <angle>",
33011 "name": "MDN Reference",
33012 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
33015 "description": "The offset-rotate CSS property defines the direction of the element while positioning along the offset path."
33018 "name": "offset-distance",
33019 "syntax": "<length-percentage>",
33028 "name": "MDN Reference",
33029 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
33032 "description": "The offset-distance CSS property specifies a position along an offset-path."
33035 "name": "transform-box",
33036 "syntax": "border-box | fill-box | view-box",
33046 "name": "MDN Reference",
33047 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
33050 "description": "The transform-box CSS property defines the layout box to which the transform and transform-origin properties relate."
33053 "name": "place-items",
33054 "syntax": "<'align-items'> <'justify-items'>?",
33062 "description": "The CSS place-items shorthand property sets both the align-items and justify-items properties. The first value is the align-items property value, the second the justify-items one. If the second value is not present, the first value is also used for it."
33065 "name": "max-inline-size",
33076 "description": "No limit on the height of the box."
33079 "syntax": "<'max-width'>",
33082 "name": "MDN Reference",
33083 "url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
33086 "description": "Logical 'max-height'. Mapping depends on the element’s 'writing-mode'.",
33093 "name": "max-block-size",
33104 "description": "No limit on the width of the box."
33107 "syntax": "<'max-width'>",
33110 "name": "MDN Reference",
33111 "url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
33114 "description": "Logical 'max-width'. Mapping depends on the element’s 'writing-mode'.",
33121 "name": "ruby-position",
33129 "description": "The ruby text appears after the base. This is a relatively rare setting used in ideographic East Asian writing systems, most easily found in educational text."
33133 "description": "The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."
33140 "description": "The ruby text appears on the right of the base. Unlike 'before' and 'after', this value is not relative to the text flow direction."
33143 "status": "experimental",
33144 "syntax": "over | under | inter-character",
33147 "name": "MDN Reference",
33148 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
33151 "description": "Used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",
33157 "name": "scroll-padding-right",
33158 "syntax": "auto | <length-percentage>",
33168 "name": "MDN Reference",
33169 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
33172 "description": "The scroll-padding-right property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33175 "name": "scroll-padding-bottom",
33176 "syntax": "auto | <length-percentage>",
33186 "name": "MDN Reference",
33187 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
33190 "description": "The scroll-padding-bottom property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33193 "name": "scroll-padding-inline-start",
33194 "syntax": "auto | <length-percentage>",
33203 "name": "MDN Reference",
33204 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
33207 "description": "The scroll-padding-inline-start property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33210 "name": "scroll-padding-block-start",
33211 "syntax": "auto | <length-percentage>",
33220 "name": "MDN Reference",
33221 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
33224 "description": "The scroll-padding-block-start property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33227 "name": "scroll-padding-block-end",
33228 "syntax": "auto | <length-percentage>",
33237 "name": "MDN Reference",
33238 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
33241 "description": "The scroll-padding-block-end property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33244 "name": "scroll-padding-inline-end",
33245 "syntax": "auto | <length-percentage>",
33254 "name": "MDN Reference",
33255 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
33258 "description": "The scroll-padding-inline-end property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
33261 "name": "place-self",
33262 "syntax": "<'align-self'> <'justify-self'>?",
33269 "description": "The place-self CSS property is a shorthand property sets both the align-self and justify-self properties. The first value is the align-self property value, the second the justify-self one. If the second value is not present, the first value is also used for it."
33272 "name": "font-optical-sizing",
33273 "syntax": "auto | none",
33283 "name": "MDN Reference",
33284 "url": "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
33287 "description": "The font-optical-sizing CSS property allows developers to control whether browsers render text with slightly differing visual representations to optimize viewing at different sizes, or not. This only works for fonts that have an optical size variation axis."
33298 "syntax": "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
33301 "name": "MDN Reference",
33302 "url": "https://developer.mozilla.org/docs/Web/CSS/grid"
33305 "description": "The grid CSS property is a shorthand property that sets all of the explicit grid properties ('grid-template-rows', 'grid-template-columns', and 'grid-template-areas'), and all the implicit grid properties ('grid-auto-rows', 'grid-auto-columns', and 'grid-auto-flow'), in a single declaration.",
33315 "name": "border-inline-start",
33323 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33326 "name": "MDN Reference",
33327 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
33330 "description": "Logical 'border-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
33339 "name": "border-inline-end",
33347 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33350 "name": "MDN Reference",
33351 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
33354 "description": "Logical 'border-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
33363 "name": "border-block-end",
33371 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33374 "name": "MDN Reference",
33375 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
33378 "description": "Logical 'border-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
33388 "syntax": "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
33397 "name": "MDN Reference",
33398 "url": "https://developer.mozilla.org/docs/Web/CSS/offset"
33401 "description": "The offset CSS property is a shorthand property for animating an element along a defined path."
33404 "name": "border-block-start",
33412 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33415 "name": "MDN Reference",
33416 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
33419 "description": "Logical 'border-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
33428 "name": "scroll-padding-block",
33429 "syntax": "[ auto | <length-percentage> ]{1,2}",
33438 "name": "MDN Reference",
33439 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
33442 "description": "The scroll-padding-block property is a shorthand property which sets the scroll-padding longhands for the block dimension."
33445 "name": "scroll-padding-inline",
33446 "syntax": "[ auto | <length-percentage> ]{1,2}",
33455 "name": "MDN Reference",
33456 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
33459 "description": "The scroll-padding-inline property is a shorthand property which sets the scroll-padding longhands for the inline dimension."
33462 "name": "overscroll-behavior-block",
33463 "syntax": "contain | none | auto",
33472 "name": "MDN Reference",
33473 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
33476 "description": "The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached."
33479 "name": "overscroll-behavior-inline",
33480 "syntax": "contain | none | auto",
33489 "name": "MDN Reference",
33490 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
33493 "description": "The overscroll-behavior-inline CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached."
33504 "description": "No motion path gets created."
33508 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
33512 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
33516 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
33519 "description": "Shorthand property for setting 'motion-path', 'motion-offset' and 'motion-rotation'.",
33531 "name": "font-size-adjust",
33541 "description": "Do not preserve the font’s x-height."
33544 "syntax": "none | <number>",
33547 "name": "MDN Reference",
33548 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
33551 "description": "Preserves the readability of text when font fallback occurs by adjusting the font-size so that the x-height is the same regardless of the font used.",
33558 "syntax": "<'top'>{1,4}",
33564 "name": "MDN Reference",
33565 "url": "https://developer.mozilla.org/docs/Web/CSS/inset"
33568 "description": "The inset CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
33571 "name": "text-justify",
33582 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
33585 "name": "distribute",
33586 "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
33589 "name": "distribute-all-lines"
33592 "name": "inter-cluster",
33593 "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
33596 "name": "inter-ideograph",
33597 "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
33600 "name": "inter-word",
33601 "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
33605 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
33608 "name": "newspaper"
33611 "syntax": "auto | inter-character | inter-word | none",
33614 "name": "MDN Reference",
33615 "url": "https://developer.mozilla.org/docs/Web/CSS/text-justify"
33618 "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
33624 "name": "motion-path",
33632 "description": "No motion path gets created."
33636 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
33639 "description": "Specifies the motion path the element gets positioned at.",
33648 "name": "inset-inline-start",
33649 "syntax": "<'top'>",
33658 "name": "MDN Reference",
33659 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
33662 "description": "The inset-inline-start CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
33665 "name": "inset-inline-end",
33666 "syntax": "<'top'>",
33675 "name": "MDN Reference",
33676 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
33679 "description": "The inset-inline-end CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
33683 "syntax": "none | <number>{1,3}",
33689 "name": "MDN Reference",
33690 "url": "https://developer.mozilla.org/docs/Web/CSS/scale"
33693 "description": "The scale CSS property allows you to specify scale transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
33697 "syntax": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
33703 "name": "MDN Reference",
33704 "url": "https://developer.mozilla.org/docs/Web/CSS/rotate"
33707 "description": "The rotate CSS property allows you to specify rotation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
33710 "name": "translate",
33711 "syntax": "none | <length-percentage> [ <length-percentage> <length>? ]?",
33717 "name": "MDN Reference",
33718 "url": "https://developer.mozilla.org/docs/Web/CSS/translate"
33721 "description": "The translate CSS property allows you to specify translation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
33724 "name": "offset-anchor",
33725 "syntax": "auto | <position>",
33733 "name": "MDN Reference",
33734 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
33737 "description": "Defines an anchor point of the box positioned along the path. The anchor point specifies the point of the box which is to be considered as the point that is moved along the path."
33740 "name": "offset-position",
33741 "status": "experimental",
33742 "syntax": "auto | <position>",
33745 "name": "MDN Reference",
33746 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-position"
33749 "description": "Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."
33752 "name": "padding-block",
33753 "syntax": "<'padding-left'>{1,2}",
33762 "name": "MDN Reference",
33763 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block"
33766 "description": "The padding-block CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
33769 "name": "orientation",
33770 "syntax": "auto | portrait | landscape",
33771 "description": "The orientation CSS @media media feature can be used to apply styles based on the orientation of the viewport (or the page box, for paged media)."
33774 "name": "user-zoom",
33775 "syntax": "zoom | fixed",
33776 "description": "The user-zoom CSS descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport."
33779 "name": "margin-block",
33780 "syntax": "<'margin-left'>{1,2}",
33789 "name": "MDN Reference",
33790 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block"
33793 "description": "The margin-block CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
33796 "name": "margin-inline",
33797 "syntax": "<'margin-left'>{1,2}",
33806 "name": "MDN Reference",
33807 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
33810 "description": "The margin-inline CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
33813 "name": "padding-inline",
33814 "syntax": "<'padding-left'>{1,2}",
33823 "name": "MDN Reference",
33824 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
33827 "description": "The padding-inline CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
33830 "name": "inset-block",
33831 "syntax": "<'top'>{1,2}",
33840 "name": "MDN Reference",
33841 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block"
33844 "description": "The inset-block CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
33847 "name": "inset-inline",
33848 "syntax": "<'top'>{1,2}",
33857 "name": "MDN Reference",
33858 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
33861 "description": "The inset-inline CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
33864 "name": "border-block-color",
33865 "syntax": "<'border-top-color'>{1,2}",
33874 "name": "MDN Reference",
33875 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
33878 "description": "The border-block-color CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
33881 "name": "border-block",
33882 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33891 "name": "MDN Reference",
33892 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block"
33895 "description": "The border-block CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet."
33898 "name": "border-inline",
33899 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
33908 "name": "MDN Reference",
33909 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline"
33912 "description": "The border-inline CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet."
33915 "name": "inset-block-start",
33916 "syntax": "<'top'>",
33925 "name": "MDN Reference",
33926 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
33929 "description": "The inset-block-start CSS property defines the logical block start offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
33932 "name": "inset-block-end",
33933 "syntax": "<'top'>",
33942 "name": "MDN Reference",
33943 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
33946 "description": "The inset-block-end CSS property defines the logical block end offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
33949 "name": "enable-background",
33952 "name": "accumulate",
33953 "description": "If the ancestor container element has a property of new, then all graphics elements within the current container are rendered both on the parent's background image and onto the target."
33957 "description": "Create a new background image canvas. All children of the current container element can access the background, and they will be rendered onto both the parent's background image canvas in addition to the target device."
33960 "description": "Deprecated. Use 'isolation' property instead when support allows. Specifies how the accumulation of the background image is managed.",
33969 "name": "glyph-orientation-horizontal",
33970 "description": "Controls glyph orientation when the inline-progression-direction is horizontal.",
33977 "name": "glyph-orientation-vertical",
33981 "description": "Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."
33984 "description": "Controls glyph orientation when the inline-progression-direction is vertical.",
33996 "description": "Indicates that the user agent should adjust inter-glyph spacing based on kerning tables that are included in the font that will be used."
33999 "description": "Indicates whether the user agent should adjust inter-glyph spacing based on kerning tables that are included in the relevant font or instead disable auto-kerning and set inter-character spacing to a specific length.",
34006 "name": "image-resolution",
34007 "status": "experimental",
34008 "syntax": "[ from-image || <resolution> ] && snap?",
34009 "description": "The image-resolution property specifies the intrinsic resolution of all raster images used in or on the element. It affects both content images (e.g. replaced elements and generated content) and decorative images (such as background-image). The intrinsic resolution of an image is used to determine the image’s intrinsic dimensions."
34012 "name": "max-zoom",
34013 "syntax": "auto | <number> | <percentage>",
34014 "description": "The max-zoom CSS descriptor sets the maximum zoom factor of a document defined by the @viewport at-rule. The browser will not zoom in any further than this, whether automatically or at the user's request.\n\nA zoom factor of 1.0 or 100% corresponds to no zooming. Larger values are zoomed in. Smaller values are zoomed out."
34017 "name": "min-zoom",
34018 "syntax": "auto | <number> | <percentage>",
34019 "description": "The min-zoom CSS descriptor sets the minimum zoom factor of a document defined by the @viewport at-rule. The browser will not zoom out any further than this, whether automatically or at the user's request.\n\nA zoom factor of 1.0 or 100% corresponds to no zooming. Larger values are zoomed in. Smaller values are zoomed out."
34022 "name": "motion-offset",
34027 "description": "A distance that describes the position along the specified motion path.",
34034 "name": "motion-rotation",
34042 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
34046 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
34049 "description": "Defines the direction of the element while positioning along the motion path.",
34055 "name": "scroll-snap-points-x",
34063 "description": "No snap points are defined by this scroll container."
34066 "name": "repeat()",
34067 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
34070 "status": "obsolete",
34071 "syntax": "none | repeat( <length-percentage> )",
34074 "name": "MDN Reference",
34075 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
34078 "description": "Defines the positioning of snap points along the x axis of the scroll container it is applied to.",
34084 "name": "scroll-snap-points-y",
34092 "description": "No snap points are defined by this scroll container."
34095 "name": "repeat()",
34096 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
34099 "status": "obsolete",
34100 "syntax": "none | repeat( <length-percentage> )",
34103 "name": "MDN Reference",
34104 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
34107 "description": "Defines the positioning of snap points along the y axis of the scroll container it is applied to.",
34113 "name": "scroll-snap-coordinate",
34120 "description": "Specifies that this element does not contribute a snap point."
34123 "status": "obsolete",
34124 "syntax": "none | <position>#",
34127 "name": "MDN Reference",
34128 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
34131 "description": "Defines the x and y coordinate within the element which will align with the nearest ancestor scroll container’s snap-destination for the respective axis.",
34140 "name": "scroll-snap-destination",
34144 "status": "obsolete",
34145 "syntax": "<position>",
34148 "name": "MDN Reference",
34149 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
34152 "description": "Define the x and y coordinate within the scroll container’s visual viewport which element snap points will align with.",
34160 "name": "viewport-fit",
34161 "syntax": "auto | contain | cover",
34162 "description": "The border-block-style CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation."
34165 "name": "border-block-style",
34166 "syntax": "<'border-top-style'>",
34175 "name": "MDN Reference",
34176 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
34179 "description": "The border-block-style CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
34182 "name": "border-block-width",
34183 "syntax": "<'border-top-width'>",
34192 "name": "MDN Reference",
34193 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
34196 "description": "The border-block-width CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
34199 "name": "border-inline-color",
34200 "syntax": "<'border-top-color'>{1,2}",
34209 "name": "MDN Reference",
34210 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
34213 "description": "The border-inline-color CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
34216 "name": "border-inline-style",
34217 "syntax": "<'border-top-style'>",
34226 "name": "MDN Reference",
34227 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
34230 "description": "The border-inline-style CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
34233 "name": "border-inline-width",
34234 "syntax": "<'border-top-width'>",
34243 "name": "MDN Reference",
34244 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
34247 "description": "The border-inline-width CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
34250 "name": "overflow-block",
34251 "syntax": "visible | hidden | clip | scroll | auto",
34257 "name": "MDN Reference",
34258 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-block"
34261 "description": "The overflow-block CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis."
34264 "name": "additive-symbols",
34268 "syntax": "[ <integer> && <symbol> ]#",
34269 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",
34285 "name": "MDN Reference",
34286 "url": "https://developer.mozilla.org/docs/Web/CSS/alt"
34289 "description": "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",
34296 "name": "behavior",
34300 "description": "IE only. Used to extend behaviors of the browser.",
34306 "name": "box-decoration-break",
34317 "description": "Each box is independently wrapped with the border and padding."
34321 "description": "The effect is as though the element were rendered with no breaks present, and then sliced by the breaks afterward."
34324 "syntax": "slice | clone",
34327 "name": "MDN Reference",
34328 "url": "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
34331 "description": "Specifies whether individual boxes are treated as broken pieces of one continuous box, or whether each box is individually wrapped with the border and padding.",
34337 "name": "fallback",
34341 "syntax": "<counter-style-name>",
34342 "description": "@counter-style descriptor. Specifies a fallback counter style to be used when the current counter style can’t create a representation for a given counter value.",
34348 "name": "font-language-override",
34355 "description": "Implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering."
34358 "syntax": "normal | <string>",
34361 "name": "MDN Reference",
34362 "url": "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
34365 "description": "The value of 'normal' implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering.",
34371 "name": "font-synthesis",
34379 "description": "Disallow all synthetic faces."
34383 "description": "Allow synthetic italic faces."
34387 "description": "Allow synthetic bold faces."
34390 "syntax": "none | [ weight || style ]",
34393 "name": "MDN Reference",
34394 "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
34397 "description": "Controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",
34403 "name": "font-variant-alternates",
34409 "name": "annotation()",
34410 "description": "Enables display of alternate annotation forms."
34413 "name": "character-variant()",
34414 "description": "Enables display of specific character variants."
34417 "name": "historical-forms",
34418 "description": "Enables display of historical forms."
34422 "description": "None of the features are enabled."
34425 "name": "ornaments()",
34426 "description": "Enables replacement of default glyphs with ornaments, if provided in the font."
34429 "name": "styleset()",
34430 "description": "Enables display with stylistic sets."
34433 "name": "stylistic()",
34434 "description": "Enables display of stylistic alternates."
34438 "description": "Enables display of swash glyphs."
34441 "syntax": "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
34444 "name": "MDN Reference",
34445 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
34448 "description": "For any given character, fonts can provide a variety of alternate glyphs in addition to the default glyph for that character. This property provides control over the selection of these alternate glyphs.",
34454 "name": "font-variant-position",
34461 "description": "None of the features are enabled."
34465 "description": "Enables display of subscript variants (OpenType feature: subs)."
34469 "description": "Enables display of superscript variants (OpenType feature: sups)."
34472 "syntax": "normal | sub | super",
34475 "name": "MDN Reference",
34476 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
34479 "description": "Specifies the vertical position",
34485 "name": "ime-mode",
34494 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
34498 "description": "No change is made to the current input method editor state. This is the default."
34501 "name": "disabled",
34502 "description": "The input method editor is disabled and may not be activated by the user."
34505 "name": "inactive",
34506 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
34510 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
34513 "status": "obsolete",
34514 "syntax": "auto | normal | active | inactive | disabled",
34517 "name": "MDN Reference",
34518 "url": "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
34521 "description": "Controls the state of the input method editor for text fields.",
34527 "name": "mask-image",
34538 "description": "Counts as a transparent black image layer."
34542 "description": "Reference to a <mask element or to a CSS image."
34545 "syntax": "<mask-reference>#",
34548 "name": "MDN Reference",
34549 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-image"
34552 "description": "Sets the mask layer image of an element.",
34560 "name": "mask-mode",
34567 "description": "Alpha values of the mask layer image should be used as the mask values."
34571 "description": "Use alpha values if 'mask-image' is an image, luminance if a <mask> element or a CSS image."
34574 "name": "luminance",
34575 "description": "Luminance values of the mask layer image should be used as the mask values."
34578 "syntax": "<masking-mode>#",
34581 "name": "MDN Reference",
34582 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
34585 "description": "Indicates whether the mask layer image is treated as luminance mask or alpha mask.",
34593 "name": "mask-origin",
34601 "syntax": "<geometry-box>#",
34604 "name": "MDN Reference",
34605 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
34608 "description": "Specifies the mask positioning area.",
34615 "name": "mask-position",
34623 "syntax": "<position>#",
34626 "name": "MDN Reference",
34627 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-position"
34630 "description": "Specifies how mask layer images are positioned.",
34638 "name": "mask-repeat",
34646 "syntax": "<repeat-style>#",
34649 "name": "MDN Reference",
34650 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
34653 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
34659 "name": "mask-size",
34670 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
34674 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
34678 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
34681 "syntax": "<bg-size>#",
34684 "name": "MDN Reference",
34685 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-size"
34688 "description": "Specifies the size of the mask layer images.",
34696 "name": "-moz-animation",
34702 "name": "alternate",
34703 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
34706 "name": "alternate-reverse",
34707 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
34710 "name": "backwards",
34711 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
34715 "description": "Both forwards and backwards fill modes are applied."
34718 "name": "forwards",
34719 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
34722 "name": "infinite",
34723 "description": "Causes the animation to repeat forever."
34727 "description": "No animation is performed"
34731 "description": "Normal playback."
34735 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
34738 "description": "Shorthand property combines six of the animation properties into a single property.",
34748 "name": "-moz-animation-delay",
34752 "description": "Defines when the animation will start.",
34758 "name": "-moz-animation-direction",
34764 "name": "alternate",
34765 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
34768 "name": "alternate-reverse",
34769 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
34773 "description": "Normal playback."
34777 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
34780 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
34786 "name": "-moz-animation-duration",
34790 "description": "Defines the length of time that an animation takes to complete one cycle.",
34796 "name": "-moz-animation-iteration-count",
34802 "name": "infinite",
34803 "description": "Causes the animation to repeat forever."
34806 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
34813 "name": "-moz-animation-name",
34820 "description": "No animation is performed"
34823 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
34830 "name": "-moz-animation-play-state",
34837 "description": "A running animation will be paused."
34841 "description": "Resume playback of a paused animation."
34844 "description": "Defines whether the animation is running or paused.",
34850 "name": "-moz-animation-timing-function",
34854 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
34860 "name": "-moz-appearance",
34869 "name": "button-arrow-down"
34872 "name": "button-arrow-next"
34875 "name": "button-arrow-previous"
34878 "name": "button-arrow-up"
34881 "name": "button-bevel"
34887 "name": "checkbox-container"
34890 "name": "checkbox-label"
34902 "name": "menuarrow"
34905 "name": "menuimage"
34911 "name": "menuitemtext"
34917 "name": "menulist-button"
34920 "name": "menulist-text"
34923 "name": "menulist-textfield"
34926 "name": "menupopup"
34929 "name": "menuradio"
34932 "name": "menuseparator"
34935 "name": "-moz-mac-unified-toolbar"
34938 "name": "-moz-win-borderless-glass"
34941 "name": "-moz-win-browsertabbar-toolbox"
34944 "name": "-moz-win-communications-toolbox"
34947 "name": "-moz-win-glass"
34950 "name": "-moz-win-media-toolbox"
34956 "name": "progressbar"
34959 "name": "progresschunk"
34965 "name": "radio-container"
34968 "name": "radio-label"
34971 "name": "radiomenuitem"
34977 "name": "resizerpanel"
34980 "name": "scrollbarbutton-down"
34983 "name": "scrollbarbutton-left"
34986 "name": "scrollbarbutton-right"
34989 "name": "scrollbarbutton-up"
34992 "name": "scrollbar-small"
34995 "name": "scrollbartrack-horizontal"
34998 "name": "scrollbartrack-vertical"
35001 "name": "separator"
35007 "name": "spinner-downbutton"
35010 "name": "spinner-textfield"
35013 "name": "spinner-upbutton"
35016 "name": "statusbar"
35019 "name": "statusbarpanel"
35025 "name": "tabpanels"
35028 "name": "tab-scroll-arrow-back"
35031 "name": "tab-scroll-arrow-forward"
35034 "name": "textfield"
35037 "name": "textfield-multiline"
35049 "name": "treeheadercell"
35052 "name": "treeheadersortarrow"
35058 "name": "treetwistyopen"
35064 "name": "treewisty"
35070 "status": "nonstandard",
35071 "syntax": "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
35072 "description": "Used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",
35078 "name": "-moz-backface-visibility",
35090 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
35096 "name": "-moz-background-clip",
35105 "description": "Determines the background painting area.",
35112 "name": "-moz-background-inline-policy",
35118 "name": "bounding-box"
35121 "name": "continuous"
35127 "description": "In Gecko-based applications like Firefox, the -moz-background-inline-policy CSS property specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines. The choice of position has significant effects on repetition.",
35133 "name": "-moz-background-origin",
35137 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
35143 "name": "-moz-border-bottom-colors",
35147 "status": "nonstandard",
35148 "syntax": "<color>+ | none",
35151 "name": "MDN Reference",
35152 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
35155 "description": "Sets a list of colors for the bottom border.",
35161 "name": "-moz-border-image",
35168 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
35172 "description": "Causes the middle part of the border-image to be preserved."
35179 "description": "The image is tiled (repeated) to fill the area."
35183 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
35187 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
35191 "description": "The image is stretched to fill the area."
35197 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
35207 "name": "-moz-border-left-colors",
35211 "status": "nonstandard",
35212 "syntax": "<color>+ | none",
35215 "name": "MDN Reference",
35216 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
35219 "description": "Sets a list of colors for the bottom border.",
35225 "name": "-moz-border-right-colors",
35229 "status": "nonstandard",
35230 "syntax": "<color>+ | none",
35233 "name": "MDN Reference",
35234 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
35237 "description": "Sets a list of colors for the bottom border.",
35243 "name": "-moz-border-top-colors",
35247 "status": "nonstandard",
35248 "syntax": "<color>+ | none",
35251 "name": "MDN Reference",
35252 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
35255 "description": "Ske Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",
35261 "name": "-moz-box-align",
35267 "name": "baseline",
35268 "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
35272 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
35276 "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
35280 "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
35284 "description": "The height of each child is adjusted to that of the containing block."
35287 "description": "Specifies how a XUL box aligns its contents across (perpendicular to) the direction of its layout. The effect of this is only visible if there is extra space in the box.",
35293 "name": "-moz-box-direction",
35300 "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
35304 "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
35307 "description": "Specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
35313 "name": "-moz-box-flex",
35317 "description": "Specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout.",
35323 "name": "-moz-box-flexgroup",
35327 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
35333 "name": "-moz-box-ordinal-group",
35337 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
35343 "name": "-moz-box-orient",
35349 "name": "block-axis",
35350 "description": "Elements are oriented along the box's axis."
35353 "name": "horizontal",
35354 "description": "The box displays its children from left to right in a horizontal line."
35357 "name": "inline-axis",
35358 "description": "Elements are oriented vertically."
35361 "name": "vertical",
35362 "description": "The box displays its children from stacked from top to bottom vertically."
35365 "description": "In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",
35371 "name": "-moz-box-pack",
35378 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
35382 "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
35386 "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
35390 "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
35393 "description": "Specifies how a box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.",
35399 "name": "-moz-box-sizing",
35405 "name": "border-box",
35406 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
35409 "name": "content-box",
35410 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
35413 "name": "padding-box",
35414 "description": "The specified width and height (and respective min/max properties) on this element determine the padding box of the element."
35417 "description": "Box Model addition in CSS3.",
35423 "name": "-moz-column-count",
35430 "description": "Determines the number of columns by the 'column-width' property and the element width."
35433 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
35439 "name": "-moz-column-gap",
35446 "description": "User agent specific and typically equivalent to 1em."
35449 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
35455 "name": "-moz-column-rule",
35459 "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
35468 "name": "-moz-column-rule-color",
35472 "description": "Sets the color of the column rule",
35478 "name": "-moz-column-rule-style",
35482 "description": "Sets the style of the rule between columns of an element.",
35488 "name": "-moz-column-rule-width",
35492 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
35499 "name": "-moz-columns",
35506 "description": "The width depends on the values of other properties."
35509 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
35516 "name": "-moz-column-width",
35523 "description": "The width depends on the values of other properties."
35526 "description": "This property describes the width of columns in multicol elements.",
35532 "name": "-moz-font-feature-settings",
35566 "description": "No change in glyph substitution or positioning occurs."
35581 "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
35588 "name": "-moz-hyphens",
35595 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
35599 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
35603 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
35606 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
35612 "name": "-moz-perspective",
35619 "description": "No perspective transform is applied."
35622 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
35628 "name": "-moz-perspective-origin",
35632 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
35640 "name": "-moz-text-align-last",
35650 "description": "The inline contents are centered within the line box."
35654 "description": "The text is justified according to the method specified by the 'text-justify' property."
35658 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
35662 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
35665 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
35671 "name": "-moz-text-decoration-color",
35675 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
35681 "name": "-moz-text-decoration-line",
35687 "name": "line-through",
35688 "description": "Each line of text has a line through the middle."
35692 "description": "Neither produces nor inhibits text decoration."
35695 "name": "overline",
35696 "description": "Each line of text has a line above it."
35699 "name": "underline",
35700 "description": "Each line of text is underlined."
35703 "description": "Specifies what line decorations, if any, are added to the element.",
35709 "name": "-moz-text-decoration-style",
35716 "description": "Produces a dashed line style."
35720 "description": "Produces a dotted line."
35724 "description": "Produces a double line."
35728 "description": "Produces no line."
35732 "description": "Produces a solid line."
35736 "description": "Produces a wavy line."
35739 "description": "Specifies the line style for underline, line-through and overline text decoration.",
35745 "name": "-moz-text-size-adjust",
35752 "description": "Renderers must use the default size adjustment when displaying on a small device."
35756 "description": "Renderers must not do size adjustment when displaying on a small device."
35759 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
35766 "name": "-moz-transform",
35772 "name": "matrix()",
35773 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
35776 "name": "matrix3d()",
35777 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
35783 "name": "perspective",
35784 "description": "Specifies a perspective projection matrix."
35787 "name": "rotate()",
35788 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
35791 "name": "rotate3d()",
35792 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
35795 "name": "rotateX('angle')",
35796 "description": "Specifies a clockwise rotation by the given angle about the X axis."
35799 "name": "rotateY('angle')",
35800 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
35803 "name": "rotateZ('angle')",
35804 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
35808 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
35811 "name": "scale3d()",
35812 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
35815 "name": "scaleX()",
35816 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
35819 "name": "scaleY()",
35820 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
35823 "name": "scaleZ()",
35824 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
35828 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
35832 "description": "Specifies a skew transformation along the X axis by the given angle."
35836 "description": "Specifies a skew transformation along the Y axis by the given angle."
35839 "name": "translate()",
35840 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
35843 "name": "translate3d()",
35844 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
35847 "name": "translateX()",
35848 "description": "Specifies a translation by the given amount in the X direction."
35851 "name": "translateY()",
35852 "description": "Specifies a translation by the given amount in the Y direction."
35855 "name": "translateZ()",
35856 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
35859 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
35865 "name": "-moz-transform-origin",
35869 "description": "Establishes the origin of transformation for an element.",
35877 "name": "-moz-transition",
35884 "description": "Every property that is able to undergo a transition will do so."
35888 "description": "No property will transition."
35891 "description": "Shorthand property combines four of the transition properties into a single property.",
35900 "name": "-moz-transition-delay",
35904 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
35910 "name": "-moz-transition-duration",
35914 "description": "Specifies how long the transition from the old value to the new value should take.",
35920 "name": "-moz-transition-property",
35927 "description": "Every property that is able to undergo a transition will do so."
35931 "description": "No property will transition."
35934 "description": "Specifies the name of the CSS property to which the transition is applied.",
35940 "name": "-moz-transition-timing-function",
35944 "description": "Describes how the intermediate values used during a transition will be calculated.",
35950 "name": "-moz-user-focus",
35962 "status": "nonstandard",
35963 "syntax": "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
35966 "name": "MDN Reference",
35967 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
35970 "description": "Used to indicate whether the element can have focus."
35973 "name": "-moz-user-select",
35991 "name": "-moz-none"
36003 "description": "Controls the appearance of selection.",
36009 "name": "-ms-accelerator",
36017 "description": "The element does not contain an accelerator key sequence."
36021 "description": "The element contains an accelerator key sequence."
36024 "status": "nonstandard",
36025 "syntax": "false | true",
36026 "description": "IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",
36032 "name": "-ms-behavior",
36036 "description": "IE only. Used to extend behaviors of the browser",
36042 "name": "-ms-block-progression",
36049 "description": "Bottom-to-top block flow. Layout is horizontal."
36053 "description": "Left-to-right direction. The flow orientation is vertical."
36057 "description": "Right-to-left direction. The flow orientation is vertical."
36061 "description": "Top-to-bottom direction. The flow orientation is horizontal."
36064 "status": "nonstandard",
36065 "syntax": "tb | rl | bt | lr",
36066 "description": "Sets the block-progression value and the flow orientation",
36072 "name": "-ms-content-zoom-chaining",
36080 "description": "The nearest zoomable parent element begins zooming when the user hits a zoom limit during a manipulation. No bounce effect is shown."
36084 "description": "A bounce effect is shown when the user hits a zoom limit during a manipulation."
36087 "status": "nonstandard",
36088 "syntax": "none | chained",
36089 "description": "Specifies the zoom behavior that occurs when a user hits the zoom limit during a manipulation."
36092 "name": "-ms-content-zooming",
36100 "description": "The element is not zoomable."
36104 "description": "The element is zoomable."
36107 "status": "nonstandard",
36108 "syntax": "none | zoom",
36109 "description": "Specifies whether zooming is enabled.",
36115 "name": "-ms-content-zoom-limit",
36120 "status": "nonstandard",
36121 "syntax": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
36122 "description": "Shorthand property for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.",
36128 "name": "-ms-content-zoom-limit-max",
36133 "status": "nonstandard",
36134 "syntax": "<percentage>",
36135 "description": "Specifies the maximum zoom factor.",
36141 "name": "-ms-content-zoom-limit-min",
36146 "status": "nonstandard",
36147 "syntax": "<percentage>",
36148 "description": "Specifies the minimum zoom factor.",
36154 "name": "-ms-content-zoom-snap",
36161 "name": "mandatory",
36162 "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
36166 "description": "Indicates that zooming is unaffected by any defined snap-points."
36169 "name": "proximity",
36170 "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
36173 "name": "snapInterval(100%, 100%)",
36174 "description": "Specifies where the snap-points will be placed."
36177 "name": "snapList()",
36178 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
36181 "status": "nonstandard",
36182 "syntax": "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
36183 "description": "Shorthand property for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties."
36186 "name": "-ms-content-zoom-snap-points",
36193 "name": "snapInterval(100%, 100%)",
36194 "description": "Specifies where the snap-points will be placed."
36197 "name": "snapList()",
36198 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
36201 "status": "nonstandard",
36202 "syntax": "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
36203 "description": "Defines where zoom snap-points are located."
36206 "name": "-ms-content-zoom-snap-type",
36213 "name": "mandatory",
36214 "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
36218 "description": "Indicates that zooming is unaffected by any defined snap-points."
36221 "name": "proximity",
36222 "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
36225 "status": "nonstandard",
36226 "syntax": "none | proximity | mandatory",
36227 "description": "Specifies how zooming is affected by defined snap-points.",
36233 "name": "-ms-filter",
36237 "status": "nonstandard",
36238 "syntax": "<string>",
36239 "description": "IE only. Used to produce visual effects.",
36245 "name": "-ms-flex",
36252 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
36256 "description": "Expands to '0 0 auto'."
36259 "description": "specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",
36267 "name": "-ms-flex-align",
36273 "name": "baseline",
36274 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
36278 "description": "The flex item’s margin box is centered in the cross axis within the line."
36282 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
36286 "description": "The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."
36290 "description": "If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."
36293 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
36299 "name": "-ms-flex-direction",
36306 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
36309 "name": "column-reverse",
36310 "description": "Same as 'column', except the main-start and main-end directions are swapped."
36314 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
36317 "name": "row-reverse",
36318 "description": "Same as 'row', except the main-start and main-end directions are swapped."
36321 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
36327 "name": "-ms-flex-flow",
36334 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
36337 "name": "column-reverse",
36338 "description": "Same as 'column', except the main-start and main-end directions are swapped."
36342 "description": "The flex container is single-line."
36346 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
36350 "description": "The flexbox is multi-line."
36353 "name": "wrap-reverse",
36354 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
36357 "description": "Specifies how flexbox items are placed in the flexbox.",
36363 "name": "-ms-flex-item-align",
36370 "description": "Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."
36373 "name": "baseline",
36374 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
36378 "description": "The flex item’s margin box is centered in the cross axis within the line."
36382 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
36386 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
36390 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
36393 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
36399 "name": "-ms-flex-line-pack",
36406 "description": "Lines are packed toward the center of the flex container."
36409 "name": "distribute",
36410 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
36414 "description": "Lines are packed toward the end of the flex container."
36418 "description": "Lines are evenly distributed in the flex container."
36422 "description": "Lines are packed toward the start of the flex container."
36426 "description": "Lines stretch to take up the remaining space."
36429 "description": "Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",
36435 "name": "-ms-flex-order",
36439 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
36445 "name": "-ms-flex-pack",
36452 "description": "Flex items are packed toward the center of the line."
36455 "name": "distribute",
36456 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
36460 "description": "Flex items are packed toward the end of the line."
36464 "description": "Flex items are evenly distributed in the line."
36468 "description": "Flex items are packed toward the start of the line."
36471 "description": "Aligns flex items along the main axis of the current line of the flex container.",
36477 "name": "-ms-flex-wrap",
36484 "description": "The flex container is single-line."
36488 "description": "The flexbox is multi-line."
36491 "name": "wrap-reverse",
36492 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
36495 "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
36501 "name": "-ms-flow-from",
36509 "description": "The block container is not a CSS Region."
36512 "status": "nonstandard",
36513 "syntax": "[ none | <custom-ident> ]#",
36514 "description": "Makes a block container a region and associates it with a named flow.",
36520 "name": "-ms-flow-into",
36528 "description": "The element is not moved to a named flow and normal CSS processing takes place."
36531 "status": "nonstandard",
36532 "syntax": "[ none | <custom-ident> ]#",
36533 "description": "Places an element or its contents into a named flow.",
36539 "name": "-ms-grid-column",
36555 "description": "Used to place grid items and explicitly defined grid cells in the Grid.",
36563 "name": "-ms-grid-column-align",
36571 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's column."
36575 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."
36579 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."
36583 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."
36586 "description": "Aligns the columns in a grid.",
36592 "name": "-ms-grid-columns",
36597 "description": "Lays out the columns of the grid."
36600 "name": "-ms-grid-column-span",
36605 "description": "Specifies the number of columns to span.",
36611 "name": "-ms-grid-layer",
36616 "description": "Grid-layer is similar in concept to z-index, but avoids overloading the meaning of the z-index property, which is applicable only to positioned elements.",
36622 "name": "-ms-grid-row",
36638 "description": "grid-row is used to place grid items and explicitly defined grid cells in the Grid.",
36646 "name": "-ms-grid-row-align",
36654 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's row."
36658 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."
36662 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."
36666 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."
36669 "description": "Aligns the rows in a grid.",
36675 "name": "-ms-grid-rows",
36680 "description": "Lays out the columns of the grid."
36683 "name": "-ms-grid-row-span",
36688 "description": "Specifies the number of rows to span.",
36694 "name": "-ms-high-contrast-adjust",
36702 "description": "Properties will be adjusted as applicable."
36706 "description": "No adjustments will be applied."
36709 "status": "nonstandard",
36710 "syntax": "auto | none",
36711 "description": "Specifies if properties should be adjusted in high contrast mode.",
36717 "name": "-ms-hyphenate-limit-chars",
36725 "description": "The user agent chooses a value that adapts to the current layout."
36728 "status": "nonstandard",
36729 "syntax": "auto | <integer>{1,3}",
36730 "description": "Specifies the minimum number of characters in a hyphenated word.",
36736 "name": "-ms-hyphenate-limit-lines",
36743 "name": "no-limit",
36744 "description": "There is no limit."
36747 "status": "nonstandard",
36748 "syntax": "no-limit | <integer>",
36749 "description": "Indicates the maximum number of successive hyphenated lines in an element.",
36755 "name": "-ms-hyphenate-limit-zone",
36760 "status": "nonstandard",
36761 "syntax": "<percentage> | <length>",
36762 "description": "Specifies the maximum amount of unfilled space (before justification) that may be left in the line box before hyphenation is triggered to pull part of a word from the next line back up into the current line.",
36769 "name": "-ms-hyphens",
36777 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
36781 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
36785 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
36788 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
36794 "name": "-ms-ime-mode",
36801 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
36805 "description": "No change is made to the current input method editor state. This is the default."
36808 "name": "disabled",
36809 "description": "The input method editor is disabled and may not be activated by the user."
36812 "name": "inactive",
36813 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
36817 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
36820 "description": "Controls the state of the input method editor for text fields.",
36826 "name": "-ms-interpolation-mode",
36835 "name": "nearest-neighbor"
36838 "description": "Gets or sets the interpolation (resampling) method used to stretch images.",
36844 "name": "-ms-layout-grid",
36852 "description": "Any of the range of character values available to the -ms-layout-grid-char property."
36856 "description": "Any of the range of line values available to the -ms-layout-grid-line property."
36860 "description": "Any of the range of mode values available to the -ms-layout-grid-mode property."
36864 "description": "Any of the range of type values available to the -ms-layout-grid-type property."
36867 "description": "Sets or retrieves the composite document grid properties that specify the layout of text characters."
36870 "name": "-ms-layout-grid-char",
36878 "description": "Largest character in the font of the element is used to set the character grid."
36882 "description": "Default. No character grid is set."
36885 "description": "Sets or retrieves the size of the character grid used for rendering the text content of an element.",
36893 "name": "-ms-layout-grid-line",
36901 "description": "Largest character in the font of the element is used to set the character grid."
36905 "description": "Default. No grid line is set."
36908 "description": "Sets or retrieves the gridline value used for rendering the text content of an element.",
36914 "name": "-ms-layout-grid-mode",
36922 "description": "Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."
36926 "description": "Only a character grid is used. This is recommended for use with block-level elements, such as a blockquote, where the line grid is intended to be disabled."
36930 "description": "Only a line grid is used. This is recommended for use with inline elements, such as a span, to disable the horizontal grid on runs of text that act as a single entity in the grid layout."
36934 "description": "No grid is used."
36937 "description": "Gets or sets whether the text layout grid uses two dimensions.",
36943 "name": "-ms-layout-grid-type",
36951 "description": "Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."
36955 "description": "Default. Grid used for Japanese and Korean characters."
36959 "description": "Grid used for Chinese, as well as Japanese (Genko) and Korean characters. Only the ideographs, kanas, and wide characters are snapped to the grid."
36962 "description": "Sets or retrieves the type of grid used for rendering the text content of an element.",
36968 "name": "-ms-line-break",
36976 "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
36979 "name": "keep-all",
36980 "description": "Sequences of CJK characters can no longer break on implied break points. This option should only be used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."
36983 "name": "newspaper",
36984 "description": "Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
36988 "description": "Breaks CJK scripts using a normal set of line-breaking rules."
36992 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
36995 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
37001 "name": "-ms-overflow-style",
37009 "description": "No preference, UA should use the first scrolling method in the list that it supports."
37012 "name": "-ms-autohiding-scrollbar",
37013 "description": "Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."
37017 "description": "Indicates the element does not display scrollbars or panning indicators, even when its content overflows."
37020 "name": "scrollbar",
37021 "description": "Scrollbars are typically narrow strips inserted on one or two edges of an element and which often have arrows to click on and a \"thumb\" to drag up and down (or left and right) to move the contents of the element."
37024 "status": "nonstandard",
37025 "syntax": "auto | none | scrollbar | -ms-autohiding-scrollbar",
37026 "description": "Specify whether content is clipped when it overflows the element's content area.",
37032 "name": "-ms-perspective",
37039 "description": "No perspective transform is applied."
37042 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
37048 "name": "-ms-perspective-origin",
37052 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
37060 "name": "-ms-perspective-origin-x",
37064 "description": "Establishes the origin for the perspective property. It effectively sets the X position at which the viewer appears to be looking at the children of the element.",
37072 "name": "-ms-perspective-origin-y",
37076 "description": "Establishes the origin for the perspective property. It effectively sets the Y position at which the viewer appears to be looking at the children of the element.",
37084 "name": "-ms-progress-appearance",
37096 "description": "Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",
37102 "name": "-ms-scrollbar-3dlight-color",
37106 "status": "nonstandard",
37107 "syntax": "<color>",
37108 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
37114 "name": "-ms-scrollbar-arrow-color",
37118 "status": "nonstandard",
37119 "syntax": "<color>",
37120 "description": "Determines the color of the arrow elements of a scroll arrow.",
37126 "name": "-ms-scrollbar-base-color",
37130 "status": "nonstandard",
37131 "syntax": "<color>",
37132 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
37138 "name": "-ms-scrollbar-darkshadow-color",
37142 "status": "nonstandard",
37143 "syntax": "<color>",
37144 "description": "Determines the color of the gutter of a scroll bar.",
37150 "name": "-ms-scrollbar-face-color",
37154 "status": "nonstandard",
37155 "syntax": "<color>",
37156 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
37162 "name": "-ms-scrollbar-highlight-color",
37166 "status": "nonstandard",
37167 "syntax": "<color>",
37168 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
37174 "name": "-ms-scrollbar-shadow-color",
37178 "status": "nonstandard",
37179 "syntax": "<color>",
37180 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
37186 "name": "-ms-scrollbar-track-color",
37190 "status": "nonstandard",
37191 "syntax": "<color>",
37194 "name": "MDN Reference",
37195 "url": "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
37198 "description": "Determines the color of the track element of a scroll bar.",
37204 "name": "-ms-scroll-chaining",
37217 "status": "nonstandard",
37218 "syntax": "chained | none",
37219 "description": "Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",
37226 "name": "-ms-scroll-limit",
37236 "status": "nonstandard",
37237 "syntax": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
37238 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-limit-x-min, -ms-scroll-limit-y-min, -ms-scroll-limit-x-max, and -ms-scroll-limit-y-max properties.",
37244 "name": "-ms-scroll-limit-x-max",
37254 "status": "nonstandard",
37255 "syntax": "auto | <length>",
37256 "description": "Gets or sets a value that specifies the maximum value for the scrollLeft property.",
37262 "name": "-ms-scroll-limit-x-min",
37267 "status": "nonstandard",
37268 "syntax": "<length>",
37269 "description": "Gets or sets a value that specifies the minimum value for the scrollLeft property.",
37275 "name": "-ms-scroll-limit-y-max",
37285 "status": "nonstandard",
37286 "syntax": "auto | <length>",
37287 "description": "Gets or sets a value that specifies the maximum value for the scrollTop property.",
37293 "name": "-ms-scroll-limit-y-min",
37298 "status": "nonstandard",
37299 "syntax": "<length>",
37300 "description": "Gets or sets a value that specifies the minimum value for the scrollTop property.",
37306 "name": "-ms-scroll-rails",
37319 "status": "nonstandard",
37320 "syntax": "none | railed",
37321 "description": "Gets or sets a value that indicates whether or not small motions perpendicular to the primary axis of motion will result in either changes to both the scrollTop and scrollLeft properties or a change to the primary axis (for instance, either the scrollTop or scrollLeft properties will change, but not both).",
37328 "name": "-ms-scroll-snap-points-x",
37335 "name": "snapInterval(100%, 100%)"
37338 "name": "snapList()"
37341 "status": "nonstandard",
37342 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
37343 "description": "Gets or sets a value that defines where snap-points will be located along the x-axis.",
37349 "name": "-ms-scroll-snap-points-y",
37356 "name": "snapInterval(100%, 100%)"
37359 "name": "snapList()"
37362 "status": "nonstandard",
37363 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
37364 "description": "Gets or sets a value that defines where snap-points will be located along the y-axis.",
37370 "name": "-ms-scroll-snap-type",
37378 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
37381 "name": "mandatory",
37382 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
37385 "name": "proximity",
37386 "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
37389 "status": "nonstandard",
37390 "syntax": "none | proximity | mandatory",
37391 "description": "Gets or sets a value that defines what type of snap-point should be used for the current element. There are two type of snap-points, with the primary difference being whether or not the user is guaranteed to always stop on a snap-point.",
37397 "name": "-ms-scroll-snap-x",
37404 "name": "mandatory"
37410 "name": "proximity"
37413 "name": "snapInterval(100%, 100%)"
37416 "name": "snapList()"
37419 "status": "nonstandard",
37420 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
37421 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",
37427 "name": "-ms-scroll-snap-y",
37434 "name": "mandatory"
37440 "name": "proximity"
37443 "name": "snapInterval(100%, 100%)"
37446 "name": "snapList()"
37449 "status": "nonstandard",
37450 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
37451 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",
37457 "name": "-ms-scroll-translation",
37467 "name": "vertical-to-horizontal"
37470 "status": "nonstandard",
37471 "syntax": "none | vertical-to-horizontal",
37472 "description": "Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",
37478 "name": "-ms-text-align-last",
37489 "description": "The inline contents are centered within the line box."
37493 "description": "The text is justified according to the method specified by the 'text-justify' property."
37497 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
37501 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
37504 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
37510 "name": "-ms-text-autospace",
37517 "name": "ideograph-alpha",
37518 "description": "Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."
37521 "name": "ideograph-numeric",
37522 "description": "Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."
37525 "name": "ideograph-parenthesis",
37526 "description": "Creates extra spacing between normal (non wide) parenthesis and ideographs."
37529 "name": "ideograph-space",
37530 "description": "Extends the width of the space character while surrounded by ideographs."
37534 "description": "No extra space is created."
37537 "name": "punctuation",
37538 "description": "Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."
37541 "status": "nonstandard",
37542 "syntax": "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
37543 "description": "Determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its 'ink' lines up with the first glyph in the line above and below.",
37549 "name": "-ms-text-combine-horizontal",
37557 "description": "Attempt to typeset horizontally all consecutive characters within the box such that they take up the space of a single character within the vertical line box."
37561 "description": "Attempt to typeset horizontally each maximal sequence of consecutive ASCII digits (U+0030–U+0039) that has as many or fewer characters than the specified integer such that it takes up the space of a single character within the vertical line box."
37565 "description": "No special processing."
37568 "description": "This property specifies the combination of multiple characters into the space of a single character.",
37575 "name": "-ms-text-justify",
37583 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
37586 "name": "distribute",
37587 "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
37590 "name": "inter-cluster",
37591 "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
37594 "name": "inter-ideograph",
37595 "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
37598 "name": "inter-word",
37599 "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
37603 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
37606 "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
37612 "name": "-ms-text-kashida-space",
37617 "description": "Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.",
37623 "name": "-ms-text-overflow",
37630 "description": "Clip inline content that overflows. Characters may be only partially rendered."
37633 "name": "ellipsis",
37634 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
37637 "description": "Text can overflow for example when it is prevented from wrapping",
37643 "name": "-ms-text-size-adjust",
37651 "description": "Renderers must use the default size adjustment when displaying on a small device."
37655 "description": "Renderers must not do size adjustment when displaying on a small device."
37658 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
37665 "name": "-ms-text-underline-position",
37672 "name": "alphabetic",
37673 "description": "The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."
37677 "description": "The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
37681 "description": "The underline is aligned with the 'top' (right in vertical writing) edge of the element's em-box. In this mode, an overline also switches sides."
37685 "description": "The underline is aligned with the 'bottom' (left in vertical writing) edge of the element's em-box. In this case the underline usually does not cross the descenders. This is sometimes called 'accounting' underline."
37688 "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements.This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
37694 "name": "-ms-touch-action",
37701 "description": "The element is a passive element, with several exceptions."
37704 "name": "double-tap-zoom",
37705 "description": "The element will zoom on double-tap."
37708 "name": "manipulation",
37709 "description": "The element is a manipulation-causing element."
37713 "description": "The element is a manipulation-blocking element."
37717 "description": "The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."
37721 "description": "The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."
37724 "name": "pinch-zoom",
37725 "description": "The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."
37728 "description": "Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",
37734 "name": "-ms-touch-select",
37741 "name": "grippers",
37742 "description": "Grippers are always on."
37746 "description": "Grippers are always off."
37749 "status": "nonstandard",
37750 "syntax": "grippers | none",
37751 "description": "Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",
37757 "name": "-ms-transform",
37763 "name": "matrix()",
37764 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
37767 "name": "matrix3d()",
37768 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
37774 "name": "rotate()",
37775 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
37778 "name": "rotate3d()",
37779 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
37782 "name": "rotateX('angle')",
37783 "description": "Specifies a clockwise rotation by the given angle about the X axis."
37786 "name": "rotateY('angle')",
37787 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
37790 "name": "rotateZ('angle')",
37791 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
37795 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
37798 "name": "scale3d()",
37799 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
37802 "name": "scaleX()",
37803 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
37806 "name": "scaleY()",
37807 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
37810 "name": "scaleZ()",
37811 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
37815 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
37819 "description": "Specifies a skew transformation along the X axis by the given angle."
37823 "description": "Specifies a skew transformation along the Y axis by the given angle."
37826 "name": "translate()",
37827 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
37830 "name": "translate3d()",
37831 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
37834 "name": "translateX()",
37835 "description": "Specifies a translation by the given amount in the X direction."
37838 "name": "translateY()",
37839 "description": "Specifies a translation by the given amount in the Y direction."
37842 "name": "translateZ()",
37843 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
37846 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
37852 "name": "-ms-transform-origin",
37856 "description": "Establishes the origin of transformation for an element.",
37864 "name": "-ms-transform-origin-x",
37868 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
37875 "name": "-ms-transform-origin-y",
37879 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
37886 "name": "-ms-transform-origin-z",
37890 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
37897 "name": "-ms-user-select",
37913 "status": "nonstandard",
37914 "syntax": "none | element | text",
37915 "description": "Controls the appearance of selection.",
37921 "name": "-ms-word-break",
37927 "name": "break-all",
37928 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
37931 "name": "keep-all",
37932 "description": "Block characters can no longer create implied break points."
37936 "description": "Breaks non-CJK scripts according to their own rules."
37939 "description": "Specifies line break opportunities for non-CJK scripts.",
37945 "name": "-ms-word-wrap",
37951 "name": "break-word",
37952 "description": "An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
37956 "description": "Lines may break only at allowed break points."
37959 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
37965 "name": "-ms-wrap-flow",
37973 "description": "For floats an exclusion is created, for all other elements an exclusion is not created."
37977 "description": "Inline flow content can flow on all sides of the exclusion."
37981 "description": "Inline flow content can only wrap on top and bottom of the exclusion and must leave the areas to the start and end edges of the exclusion box empty."
37985 "description": "Inline flow content can wrap on the end side of the exclusion area but must leave the area to the start edge of the exclusion area empty."
37989 "description": "Inline flow content can wrap on the side of the exclusion with the largest available space for the given line, and must leave the other side of the exclusion empty."
37993 "description": "Inline flow content can flow around the edge of the exclusion with the smallest available space within the flow content’s containing block, and must leave the other edge of the exclusion empty."
37997 "description": "Inline flow content can wrap on the start edge of the exclusion area but must leave the area to end edge of the exclusion area empty."
38000 "status": "nonstandard",
38001 "syntax": "auto | both | start | end | maximum | clear",
38002 "description": "An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",
38008 "name": "-ms-wrap-margin",
38013 "status": "nonstandard",
38014 "syntax": "<length>",
38015 "description": "Gets or sets a value that is used to offset the inner wrap shape from other shapes.",
38022 "name": "-ms-wrap-through",
38030 "description": "The exclusion element does not inherit its parent node's wrapping context. Its descendants are only subject to exclusion shapes defined inside the element."
38034 "description": "The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."
38037 "status": "nonstandard",
38038 "syntax": "wrap | none",
38039 "description": "Specifies if an element inherits its parent wrapping context. In other words if it is subject to the exclusions defined outside the element.",
38045 "name": "-ms-writing-mode",
38075 "description": "Shorthand property for both 'direction' and 'block-progression'.",
38081 "name": "-ms-zoom",
38090 "description": "Sets or retrieves the magnification scale of the object.",
38099 "name": "-ms-zoom-animation",
38111 "description": "Gets or sets a value that indicates whether an animation is used when zooming.",
38117 "name": "nav-down",
38124 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
38128 "description": "Indicates that the user agent should target the frame that the element is in."
38132 "description": "Indicates that the user agent should target the full window."
38135 "description": "Provides an way to control directional focus navigation.",
38143 "name": "nav-index",
38150 "description": "The element's sequential navigation order is assigned automatically by the user agent."
38153 "description": "Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",
38159 "name": "nav-left",
38166 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
38170 "description": "Indicates that the user agent should target the frame that the element is in."
38174 "description": "Indicates that the user agent should target the full window."
38177 "description": "Provides an way to control directional focus navigation.",
38185 "name": "nav-right",
38192 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
38196 "description": "Indicates that the user agent should target the frame that the element is in."
38200 "description": "Indicates that the user agent should target the full window."
38203 "description": "Provides an way to control directional focus navigation.",
38218 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
38222 "description": "Indicates that the user agent should target the frame that the element is in."
38226 "description": "Indicates that the user agent should target the full window."
38229 "description": "Provides an way to control directional focus navigation.",
38237 "name": "negative",
38241 "syntax": "<symbol> <symbol>?",
38242 "description": "@counter-style descriptor. Defines how to alter the representation when the counter value is negative.",
38250 "name": "-o-animation",
38256 "name": "alternate",
38257 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
38260 "name": "alternate-reverse",
38261 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
38264 "name": "backwards",
38265 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
38269 "description": "Both forwards and backwards fill modes are applied."
38272 "name": "forwards",
38273 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
38276 "name": "infinite",
38277 "description": "Causes the animation to repeat forever."
38281 "description": "No animation is performed"
38285 "description": "Normal playback."
38289 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
38292 "description": "Shorthand property combines six of the animation properties into a single property.",
38302 "name": "-o-animation-delay",
38306 "description": "Defines when the animation will start.",
38312 "name": "-o-animation-direction",
38318 "name": "alternate",
38319 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
38322 "name": "alternate-reverse",
38323 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
38327 "description": "Normal playback."
38331 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
38334 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
38340 "name": "-o-animation-duration",
38344 "description": "Defines the length of time that an animation takes to complete one cycle.",
38350 "name": "-o-animation-fill-mode",
38356 "name": "backwards",
38357 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
38361 "description": "Both forwards and backwards fill modes are applied."
38364 "name": "forwards",
38365 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
38369 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
38372 "description": "Defines what values are applied by the animation outside the time it is executing.",
38378 "name": "-o-animation-iteration-count",
38384 "name": "infinite",
38385 "description": "Causes the animation to repeat forever."
38388 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
38395 "name": "-o-animation-name",
38402 "description": "No animation is performed"
38405 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
38412 "name": "-o-animation-play-state",
38419 "description": "A running animation will be paused."
38423 "description": "Resume playback of a paused animation."
38426 "description": "Defines whether the animation is running or paused.",
38432 "name": "-o-animation-timing-function",
38436 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
38442 "name": "-o-border-image",
38449 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
38453 "description": "Causes the middle part of the border-image to be preserved."
38460 "description": "The image is tiled (repeated) to fill the area."
38464 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
38468 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
38472 "description": "The image is stretched to fill the area."
38475 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
38485 "name": "-o-object-fit",
38492 "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element’s content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
38496 "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element’s used width and height."
38500 "description": "The replaced content is sized to fill the element’s content box: the object's concrete object size is the element's used width and height."
38504 "description": "The replaced content is not resized to fit inside the element's content box"
38507 "name": "scale-down",
38508 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
38511 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
38517 "name": "-o-object-position",
38521 "description": "Determines the alignment of the replaced element inside its box.",
38529 "name": "-o-table-baseline",
38533 "description": "Determines which row of a inline-table should be used as baseline of inline-table.",
38539 "name": "-o-tab-size",
38543 "description": "This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
38550 "name": "-o-text-overflow",
38557 "description": "Clip inline content that overflows. Characters may be only partially rendered."
38560 "name": "ellipsis",
38561 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
38564 "description": "Text can overflow for example when it is prevented from wrapping",
38570 "name": "-o-transform",
38576 "name": "matrix()",
38577 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
38580 "name": "matrix3d()",
38581 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
38587 "name": "rotate()",
38588 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
38591 "name": "rotate3d()",
38592 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
38595 "name": "rotateX('angle')",
38596 "description": "Specifies a clockwise rotation by the given angle about the X axis."
38599 "name": "rotateY('angle')",
38600 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
38603 "name": "rotateZ('angle')",
38604 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
38608 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
38611 "name": "scale3d()",
38612 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
38615 "name": "scaleX()",
38616 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
38619 "name": "scaleY()",
38620 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
38623 "name": "scaleZ()",
38624 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
38628 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
38632 "description": "Specifies a skew transformation along the X axis by the given angle."
38636 "description": "Specifies a skew transformation along the Y axis by the given angle."
38639 "name": "translate()",
38640 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
38643 "name": "translate3d()",
38644 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
38647 "name": "translateX()",
38648 "description": "Specifies a translation by the given amount in the X direction."
38651 "name": "translateY()",
38652 "description": "Specifies a translation by the given amount in the Y direction."
38655 "name": "translateZ()",
38656 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
38659 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
38665 "name": "-o-transform-origin",
38669 "description": "Establishes the origin of transformation for an element.",
38677 "name": "-o-transition",
38684 "description": "Every property that is able to undergo a transition will do so."
38688 "description": "No property will transition."
38691 "description": "Shorthand property combines four of the transition properties into a single property.",
38700 "name": "-o-transition-delay",
38704 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
38710 "name": "-o-transition-duration",
38714 "description": "Specifies how long the transition from the old value to the new value should take.",
38720 "name": "-o-transition-property",
38727 "description": "Every property that is able to undergo a transition will do so."
38731 "description": "No property will transition."
38734 "description": "Specifies the name of the CSS property to which the transition is applied.",
38740 "name": "-o-transition-timing-function",
38744 "description": "Describes how the intermediate values used during a transition will be calculated.",
38750 "name": "offset-block-end",
38757 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
38760 "description": "Logical 'bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
38767 "name": "offset-block-start",
38774 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
38777 "description": "Logical 'top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
38784 "name": "offset-inline-end",
38791 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
38794 "description": "Logical 'right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
38801 "name": "offset-inline-start",
38808 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
38811 "description": "Logical 'left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
38822 "syntax": "<integer> && <symbol>",
38823 "description": "@counter-style descriptor. Specifies a “fixed-width” counter style, where representations shorter than the pad value are padded with a particular <symbol>",
38836 "syntax": "<symbol>",
38837 "description": "@counter-style descriptor. Specifies a <symbol> that is prepended to the marker representation.",
38852 "description": "The range depends on the counter system."
38855 "name": "infinite",
38856 "description": "If used as the first value in a range, it represents negative infinity; if used as the second value, it represents positive infinity."
38859 "syntax": "[ [ <integer> | infinite ]{2} ]# | auto",
38860 "description": "@counter-style descriptor. Defines the ranges over which the counter style is defined.",
38867 "name": "ruby-align",
38877 "description": "The user agent determines how the ruby contents are aligned. This is the initial value."
38881 "description": "The ruby content is centered within its box."
38884 "name": "distribute-letter",
38888 "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with the first and last ruby text glyphs lining up with the corresponding first and last base glyphs. If the width of the ruby text is at least the width of the base, then the letters of the base are evenly distributed across the width of the ruby text."
38891 "name": "distribute-space",
38895 "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with a certain amount of white space preceding the first and following the last character in the ruby text. That amount of white space is normally equal to half the amount of inter-character space of the ruby text."
38899 "description": "The ruby text content is aligned with the start edge of the base."
38902 "name": "line-edge",
38906 "description": "If the ruby text is not adjacent to a line edge, it is aligned as in 'auto'. If it is adjacent to a line edge, then it is still aligned as in auto, but the side of the ruby text that touches the end of the line is lined up with the corresponding edge of the base."
38913 "description": "The ruby text content is aligned with the end edge of the base."
38920 "description": "The ruby text content is aligned with the start edge of the base."
38923 "name": "space-between",
38927 "description": "The ruby content expands as defined for normal text justification (as defined by 'text-justify'),"
38930 "name": "space-around",
38934 "description": "As for 'space-between' except that there exists an extra justification opportunities whose space is distributed half before and half after the ruby content."
38937 "status": "experimental",
38938 "syntax": "start | center | space-between | space-around",
38941 "name": "MDN Reference",
38942 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
38945 "description": "Specifies how text is distributed within the various ruby boxes when their contents do not exactly fill their respective boxes.",
38951 "name": "ruby-overhang",
38959 "description": "The ruby text can overhang text adjacent to the base on either side. This is the initial value."
38963 "description": "The ruby text can overhang the text that follows it."
38967 "description": "The ruby text cannot overhang any text adjacent to its base, only its own base."
38971 "description": "The ruby text can overhang the text that precedes it."
38974 "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
38980 "name": "ruby-span",
38987 "description": "The value of attribute 'x' is a string value. The string value is evaluated as a <number> to determine the number of ruby base elements to be spanned by the annotation element."
38991 "description": "No spanning. The computed value is '1'."
38994 "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
39000 "name": "scrollbar-3dlight-color",
39006 "name": "MDN Reference",
39007 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-3dlight-color"
39010 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
39016 "name": "scrollbar-arrow-color",
39022 "name": "MDN Reference",
39023 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-arrow-color"
39026 "description": "Determines the color of the arrow elements of a scroll arrow.",
39032 "name": "scrollbar-base-color",
39038 "name": "MDN Reference",
39039 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-base-color"
39042 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
39048 "name": "scrollbar-darkshadow-color",
39054 "name": "MDN Reference",
39055 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-darkshadow-color"
39058 "description": "Determines the color of the gutter of a scroll bar.",
39064 "name": "scrollbar-face-color",
39070 "name": "MDN Reference",
39071 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-face-color"
39074 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
39080 "name": "scrollbar-highlight-color",
39086 "name": "MDN Reference",
39087 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-highlight-color"
39090 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
39096 "name": "scrollbar-shadow-color",
39102 "name": "MDN Reference",
39103 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-shadow-color"
39106 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
39112 "name": "scrollbar-track-color",
39116 "description": "Determines the color of the track element of a scroll bar.",
39126 "syntax": "<symbol>",
39127 "description": "@counter-style descriptor. Specifies a <symbol> that is appended to the marker representation.",
39141 "name": "additive",
39142 "description": "Represents “sign-value” numbering systems, which, rather than using reusing digits in different positions to change their value, define additional digits with much larger values, so that the value of the number can be obtained by adding all the digits together."
39145 "name": "alphabetic",
39146 "description": "Interprets the list of counter symbols as digits to an alphabetic numbering system, similar to the default lower-alpha counter style, which wraps from \"a\", \"b\", \"c\", to \"aa\", \"ab\", \"ac\"."
39150 "description": "Cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list."
39154 "description": "Use the algorithm of another counter style, but alter other aspects."
39158 "description": "Runs through its list of counter symbols once, then falls back."
39162 "description": "interprets the list of counter symbols as digits to a \"place-value\" numbering system, similar to the default 'decimal' counter style."
39165 "name": "symbolic",
39166 "description": "Cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."
39169 "syntax": "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
39170 "description": "@counter-style descriptor. Specifies which algorithm will be used to construct the counter’s representation based on the counter value.",
39181 "syntax": "<symbol>+",
39182 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor.",
39190 "name": "-webkit-animation",
39197 "name": "alternate",
39198 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
39201 "name": "alternate-reverse",
39202 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
39205 "name": "backwards",
39206 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
39210 "description": "Both forwards and backwards fill modes are applied."
39213 "name": "forwards",
39214 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
39217 "name": "infinite",
39218 "description": "Causes the animation to repeat forever."
39222 "description": "No animation is performed"
39226 "description": "Normal playback."
39230 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
39233 "description": "Shorthand property combines six of the animation properties into a single property.",
39243 "name": "-webkit-animation-delay",
39248 "description": "Defines when the animation will start.",
39254 "name": "-webkit-animation-direction",
39261 "name": "alternate",
39262 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
39265 "name": "alternate-reverse",
39266 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
39270 "description": "Normal playback."
39274 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
39277 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
39283 "name": "-webkit-animation-duration",
39288 "description": "Defines the length of time that an animation takes to complete one cycle.",
39294 "name": "-webkit-animation-fill-mode",
39301 "name": "backwards",
39302 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
39306 "description": "Both forwards and backwards fill modes are applied."
39309 "name": "forwards",
39310 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
39314 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
39317 "description": "Defines what values are applied by the animation outside the time it is executing.",
39323 "name": "-webkit-animation-iteration-count",
39330 "name": "infinite",
39331 "description": "Causes the animation to repeat forever."
39334 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
39341 "name": "-webkit-animation-name",
39349 "description": "No animation is performed"
39352 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
39359 "name": "-webkit-animation-play-state",
39367 "description": "A running animation will be paused."
39371 "description": "Resume playback of a paused animation."
39374 "description": "Defines whether the animation is running or paused.",
39380 "name": "-webkit-animation-timing-function",
39385 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
39391 "name": "-webkit-appearance",
39401 "name": "button-bevel"
39404 "name": "caps-lock-indicator"
39413 "name": "default-button"
39422 "name": "media-fullscreen-button"
39425 "name": "media-mute-button"
39428 "name": "media-play-button"
39431 "name": "media-seek-back-button"
39434 "name": "media-seek-forward-button"
39437 "name": "media-slider"
39440 "name": "media-sliderthumb"
39446 "name": "menulist-button"
39449 "name": "menulist-text"
39452 "name": "menulist-textfield"
39458 "name": "push-button"
39464 "name": "scrollbarbutton-down"
39467 "name": "scrollbarbutton-left"
39470 "name": "scrollbarbutton-right"
39473 "name": "scrollbarbutton-up"
39476 "name": "scrollbargripper-horizontal"
39479 "name": "scrollbargripper-vertical"
39482 "name": "scrollbarthumb-horizontal"
39485 "name": "scrollbarthumb-vertical"
39488 "name": "scrollbartrack-horizontal"
39491 "name": "scrollbartrack-vertical"
39494 "name": "searchfield"
39497 "name": "searchfield-cancel-button"
39500 "name": "searchfield-decoration"
39503 "name": "searchfield-results-button"
39506 "name": "searchfield-results-decoration"
39509 "name": "slider-horizontal"
39512 "name": "sliderthumb-horizontal"
39515 "name": "sliderthumb-vertical"
39518 "name": "slider-vertical"
39521 "name": "square-button"
39527 "name": "textfield"
39530 "status": "nonstandard",
39531 "syntax": "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield",
39532 "description": "Changes the appearance of buttons and other controls to resemble native controls.",
39538 "name": "-webkit-backdrop-filter",
39545 "description": "No filter effects are applied."
39549 "description": "Applies a Gaussian blur to the input image."
39552 "name": "brightness()",
39553 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
39556 "name": "contrast()",
39557 "description": "Adjusts the contrast of the input."
39560 "name": "drop-shadow()",
39561 "description": "Applies a drop shadow effect to the input image."
39564 "name": "grayscale()",
39565 "description": "Converts the input image to grayscale."
39568 "name": "hue-rotate()",
39569 "description": "Applies a hue rotation on the input image. "
39572 "name": "invert()",
39573 "description": "Inverts the samples in the input image."
39576 "name": "opacity()",
39577 "description": "Applies transparency to the samples in the input image."
39580 "name": "saturate()",
39581 "description": "Saturates the input image."
39585 "description": "Converts the input image to sepia."
39589 "description": "A filter reference to a <filter> element."
39592 "description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image.",
39599 "name": "-webkit-backface-visibility",
39612 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
39618 "name": "-webkit-background-clip",
39623 "description": "Determines the background painting area.",
39629 "name": "-webkit-background-composite",
39647 "name": "-webkit-background-origin",
39652 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
39658 "name": "-webkit-border-image",
39666 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
39670 "description": "Causes the middle part of the border-image to be preserved."
39677 "description": "The image is tiled (repeated) to fill the area."
39681 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
39685 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
39689 "description": "The image is stretched to fill the area."
39695 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
39705 "name": "-webkit-box-align",
39712 "name": "baseline",
39713 "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
39717 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
39721 "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
39725 "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
39729 "description": "The height of each child is adjusted to that of the containing block."
39732 "description": "Specifies the alignment of nested elements within an outer flexible box element.",
39738 "name": "-webkit-box-direction",
39746 "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
39750 "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
39753 "description": "In webkit applications, -webkit-box-direction specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
39759 "name": "-webkit-box-flex",
39764 "description": "Specifies an element's flexibility.",
39770 "name": "-webkit-box-flex-group",
39775 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
39781 "name": "-webkit-box-ordinal-group",
39786 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
39792 "name": "-webkit-box-orient",
39799 "name": "block-axis",
39800 "description": "Elements are oriented along the box's axis."
39803 "name": "horizontal",
39804 "description": "The box displays its children from left to right in a horizontal line."
39807 "name": "inline-axis",
39808 "description": "Elements are oriented vertically."
39811 "name": "vertical",
39812 "description": "The box displays its children from stacked from top to bottom vertically."
39815 "description": "In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",
39821 "name": "-webkit-box-pack",
39829 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
39833 "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
39837 "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
39841 "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
39844 "description": "Specifies alignment of child elements within the current element in the direction of orientation.",
39850 "name": "-webkit-box-reflect",
39860 "description": "The reflection appears above the border box."
39864 "description": "The reflection appears below the border box."
39868 "description": "The reflection appears to the left of the border box."
39872 "description": "The reflection appears to the right of the border box."
39875 "status": "nonstandard",
39876 "syntax": "[ above | below | right | left ]? <length>? <image>?",
39879 "name": "MDN Reference",
39880 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
39883 "description": "Defines a reflection of a border box."
39886 "name": "-webkit-box-sizing",
39893 "name": "border-box",
39894 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
39897 "name": "content-box",
39898 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
39901 "description": "Box Model addition in CSS3.",
39907 "name": "-webkit-break-after",
39914 "description": "Always force a page break before/after the generated box."
39918 "description": "Neither force nor forbid a page/column break before/after the generated box."
39922 "description": "Avoid a page/column break before/after the generated box."
39925 "name": "avoid-column",
39926 "description": "Avoid a column break before/after the generated box."
39929 "name": "avoid-page",
39930 "description": "Avoid a page break before/after the generated box."
39933 "name": "avoid-region"
39937 "description": "Always force a column break before/after the generated box."
39941 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
39945 "description": "Always force a page break before/after the generated box."
39952 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
39955 "description": "Describes the page/column break behavior before the generated box.",
39961 "name": "-webkit-break-before",
39968 "description": "Always force a page break before/after the generated box."
39972 "description": "Neither force nor forbid a page/column break before/after the generated box."
39976 "description": "Avoid a page/column break before/after the generated box."
39979 "name": "avoid-column",
39980 "description": "Avoid a column break before/after the generated box."
39983 "name": "avoid-page",
39984 "description": "Avoid a page break before/after the generated box."
39987 "name": "avoid-region"
39991 "description": "Always force a column break before/after the generated box."
39995 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
39999 "description": "Always force a page break before/after the generated box."
40006 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40009 "description": "Describes the page/column break behavior before the generated box.",
40015 "name": "-webkit-break-inside",
40022 "description": "Neither force nor forbid a page/column break inside the generated box."
40026 "description": "Avoid a page/column break inside the generated box."
40029 "name": "avoid-column",
40030 "description": "Avoid a column break inside the generated box."
40033 "name": "avoid-page",
40034 "description": "Avoid a page break inside the generated box."
40037 "name": "avoid-region"
40040 "description": "Describes the page/column break behavior inside the generated box.",
40046 "name": "-webkit-column-break-after",
40054 "description": "Always force a page break before/after the generated box."
40058 "description": "Neither force nor forbid a page/column break before/after the generated box."
40062 "description": "Avoid a page/column break before/after the generated box."
40065 "name": "avoid-column",
40066 "description": "Avoid a column break before/after the generated box."
40069 "name": "avoid-page",
40070 "description": "Avoid a page break before/after the generated box."
40073 "name": "avoid-region"
40077 "description": "Always force a column break before/after the generated box."
40081 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40085 "description": "Always force a page break before/after the generated box."
40092 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40095 "description": "Describes the page/column break behavior before the generated box.",
40101 "name": "-webkit-column-break-before",
40109 "description": "Always force a page break before/after the generated box."
40113 "description": "Neither force nor forbid a page/column break before/after the generated box."
40117 "description": "Avoid a page/column break before/after the generated box."
40120 "name": "avoid-column",
40121 "description": "Avoid a column break before/after the generated box."
40124 "name": "avoid-page",
40125 "description": "Avoid a page break before/after the generated box."
40128 "name": "avoid-region"
40132 "description": "Always force a column break before/after the generated box."
40136 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40140 "description": "Always force a page break before/after the generated box."
40147 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40150 "description": "Describes the page/column break behavior before the generated box.",
40156 "name": "-webkit-column-break-inside",
40164 "description": "Neither force nor forbid a page/column break inside the generated box."
40168 "description": "Avoid a page/column break inside the generated box."
40171 "name": "avoid-column",
40172 "description": "Avoid a column break inside the generated box."
40175 "name": "avoid-page",
40176 "description": "Avoid a page break inside the generated box."
40179 "name": "avoid-region"
40182 "description": "Describes the page/column break behavior inside the generated box.",
40188 "name": "-webkit-column-count",
40196 "description": "Determines the number of columns by the 'column-width' property and the element width."
40199 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
40205 "name": "-webkit-column-gap",
40213 "description": "User agent specific and typically equivalent to 1em."
40216 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
40222 "name": "-webkit-column-rule",
40227 "description": "This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
40236 "name": "-webkit-column-rule-color",
40241 "description": "Sets the color of the column rule",
40247 "name": "-webkit-column-rule-style",
40252 "description": "Sets the style of the rule between columns of an element.",
40258 "name": "-webkit-column-rule-width",
40263 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
40270 "name": "-webkit-columns",
40278 "description": "The width depends on the values of other properties."
40281 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
40288 "name": "-webkit-column-span",
40296 "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
40300 "description": "The element does not span multiple columns."
40303 "description": "Describes the page/column break behavior after the generated box.",
40309 "name": "-webkit-column-width",
40317 "description": "The width depends on the values of other properties."
40320 "description": "This property describes the width of columns in multicol elements.",
40326 "name": "-webkit-filter",
40335 "description": "No filter effects are applied."
40339 "description": "Applies a Gaussian blur to the input image."
40342 "name": "brightness()",
40343 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
40346 "name": "contrast()",
40347 "description": "Adjusts the contrast of the input."
40350 "name": "drop-shadow()",
40351 "description": "Applies a drop shadow effect to the input image."
40354 "name": "grayscale()",
40355 "description": "Converts the input image to grayscale."
40358 "name": "hue-rotate()",
40359 "description": "Applies a hue rotation on the input image. "
40362 "name": "invert()",
40363 "description": "Inverts the samples in the input image."
40366 "name": "opacity()",
40367 "description": "Applies transparency to the samples in the input image."
40370 "name": "saturate()",
40371 "description": "Saturates the input image."
40375 "description": "Converts the input image to sepia."
40379 "description": "A filter reference to a <filter> element."
40382 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
40389 "name": "-webkit-flow-from",
40396 "description": "The block container is not a CSS Region."
40399 "description": "Makes a block container a region and associates it with a named flow.",
40405 "name": "-webkit-flow-into",
40412 "description": "The element is not moved to a named flow and normal CSS processing takes place."
40415 "description": "Places an element or its contents into a named flow.",
40421 "name": "-webkit-font-feature-settings",
40455 "description": "No change in glyph substitution or positioning occurs."
40464 "description": "This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
40471 "name": "-webkit-hyphens",
40478 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
40482 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
40486 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
40489 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
40495 "name": "-webkit-line-break",
40502 "name": "after-white-space"
40508 "description": "Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text."
40511 "name": "-webkit-margin-bottom-collapse",
40532 "name": "-webkit-margin-collapse",
40553 "name": "-webkit-margin-start",
40569 "name": "-webkit-margin-top-collapse",
40590 "name": "-webkit-mask-clip",
40596 "status": "nonstandard",
40597 "syntax": "[ <box> | border | padding | content | text ]#",
40598 "description": "Determines the mask painting area, which determines the area that is affected by the mask.",
40604 "name": "-webkit-mask-image",
40613 "description": "Counts as a transparent black image layer."
40617 "description": "Reference to a <mask element or to a CSS image."
40620 "status": "nonstandard",
40621 "syntax": "<mask-reference>#",
40622 "description": "Sets the mask layer image of an element.",
40630 "name": "-webkit-mask-origin",
40636 "status": "nonstandard",
40637 "syntax": "[ <box> | border | padding | content ]#",
40638 "description": "Specifies the mask positioning area.",
40644 "name": "-webkit-mask-repeat",
40650 "status": "nonstandard",
40651 "syntax": "<repeat-style>#",
40652 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
40658 "name": "-webkit-mask-size",
40667 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
40671 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
40675 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
40678 "status": "nonstandard",
40679 "syntax": "<bg-size>#",
40680 "description": "Specifies the size of the mask layer images.",
40688 "name": "-webkit-nbsp-mode",
40701 "description": "Defines the behavior of nonbreaking spaces within text."
40704 "name": "-webkit-overflow-scrolling",
40717 "status": "nonstandard",
40718 "syntax": "auto | touch",
40721 "name": "MDN Reference",
40722 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
40725 "description": "Specifies whether to use native-style scrolling in an overflow:scroll element."
40728 "name": "-webkit-padding-start",
40739 "name": "-webkit-perspective",
40747 "description": "No perspective transform is applied."
40750 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
40756 "name": "-webkit-perspective-origin",
40761 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
40769 "name": "-webkit-region-fragment",
40776 "description": "Content flows as it would in a regular content box."
40780 "description": "If the content fits within the CSS Region, then this property has no effect."
40783 "description": "The 'region-fragment' property controls the behavior of the last region associated with a named flow.",
40789 "name": "-webkit-tap-highlight-color",
40795 "status": "nonstandard",
40796 "syntax": "<color>",
40802 "name": "-webkit-text-fill-color",
40810 "status": "nonstandard",
40811 "syntax": "<color>",
40814 "name": "MDN Reference",
40815 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
40823 "name": "-webkit-text-size-adjust",
40832 "description": "Renderers must use the default size adjustment when displaying on a small device."
40836 "description": "Renderers must not do size adjustment when displaying on a small device."
40839 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
40845 "name": "-webkit-text-stroke",
40853 "status": "nonstandard",
40854 "syntax": "<length> || <color>",
40857 "name": "MDN Reference",
40858 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
40869 "name": "-webkit-text-stroke-color",
40877 "status": "nonstandard",
40878 "syntax": "<color>",
40881 "name": "MDN Reference",
40882 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
40890 "name": "-webkit-text-stroke-width",
40898 "status": "nonstandard",
40899 "syntax": "<length>",
40902 "name": "MDN Reference",
40903 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
40913 "name": "-webkit-touch-callout",
40922 "status": "nonstandard",
40923 "syntax": "default | none",
40926 "name": "MDN Reference",
40927 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
40935 "name": "-webkit-transform",
40943 "name": "matrix()",
40944 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
40947 "name": "matrix3d()",
40948 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
40954 "name": "perspective()",
40955 "description": "Specifies a perspective projection matrix."
40958 "name": "rotate()",
40959 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
40962 "name": "rotate3d()",
40963 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
40966 "name": "rotateX('angle')",
40967 "description": "Specifies a clockwise rotation by the given angle about the X axis."
40970 "name": "rotateY('angle')",
40971 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
40974 "name": "rotateZ('angle')",
40975 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
40979 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
40982 "name": "scale3d()",
40983 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
40986 "name": "scaleX()",
40987 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
40990 "name": "scaleY()",
40991 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
40994 "name": "scaleZ()",
40995 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
40999 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
41003 "description": "Specifies a skew transformation along the X axis by the given angle."
41007 "description": "Specifies a skew transformation along the Y axis by the given angle."
41010 "name": "translate()",
41011 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
41014 "name": "translate3d()",
41015 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
41018 "name": "translateX()",
41019 "description": "Specifies a translation by the given amount in the X direction."
41022 "name": "translateY()",
41023 "description": "Specifies a translation by the given amount in the Y direction."
41026 "name": "translateZ()",
41027 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
41030 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
41036 "name": "-webkit-transform-origin",
41042 "description": "Establishes the origin of transformation for an element.",
41050 "name": "-webkit-transform-origin-x",
41055 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
41062 "name": "-webkit-transform-origin-y",
41067 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
41074 "name": "-webkit-transform-origin-z",
41079 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
41086 "name": "-webkit-transform-style",
41094 "description": "All children of this element are rendered flattened into the 2D plane of the element."
41097 "description": "Defines how nested elements are rendered in 3D space.",
41103 "name": "-webkit-transition",
41112 "description": "Every property that is able to undergo a transition will do so."
41116 "description": "No property will transition."
41119 "description": "Shorthand property combines four of the transition properties into a single property.",
41128 "name": "-webkit-transition-delay",
41134 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
41140 "name": "-webkit-transition-duration",
41146 "description": "Specifies how long the transition from the old value to the new value should take.",
41152 "name": "-webkit-transition-property",
41161 "description": "Every property that is able to undergo a transition will do so."
41165 "description": "No property will transition."
41168 "description": "Specifies the name of the CSS property to which the transition is applied.",
41174 "name": "-webkit-transition-timing-function",
41180 "description": "Describes how the intermediate values used during a transition will be calculated.",
41186 "name": "-webkit-user-drag",
41206 "name": "-webkit-user-modify",
41213 "name": "read-only"
41216 "name": "read-write"
41219 "name": "read-write-plaintext-only"
41222 "status": "nonstandard",
41223 "syntax": "read-only | read-write | read-write-plaintext-only",
41224 "description": "Determines whether a user can edit the content of an element.",
41230 "name": "-webkit-user-select",
41246 "description": "Controls the appearance of selection.",
41252 "name": "-ms-ime-align",
41253 "status": "nonstandard",
41254 "syntax": "auto | after",
41255 "description": "Aligns the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active."
41258 "name": "-moz-binding",
41259 "status": "nonstandard",
41260 "syntax": "<url> | none",
41266 "name": "MDN Reference",
41267 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
41270 "description": "The -moz-binding CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element."
41273 "name": "-moz-context-properties",
41274 "status": "nonstandard",
41275 "syntax": "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
41281 "name": "MDN Reference",
41282 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
41285 "description": "If you reference an SVG image in a webpage (such as with the <img> element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-context-properties property, and the image needs to opt in to using those properties by using values such as the context-fill value.\n\nThis feature is available since Firefox 55, but is only currently supported with SVG images loaded via chrome:// or resource:// URLs. To experiment with the feature in SVG on the Web it is necessary to set the svg.context-properties.content.enabled pref to true."
41288 "name": "-moz-float-edge",
41289 "status": "nonstandard",
41290 "syntax": "border-box | content-box | margin-box | padding-box",
41291 "description": "The non-standard -moz-float-edge CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness."
41294 "name": "-moz-force-broken-image-icon",
41295 "status": "nonstandard",
41296 "syntax": "<integer>",
41297 "description": "The -moz-force-broken-image-icon extended CSS property can be used to force the broken image icon to be shown even when a broken image has an alt attribute."
41300 "name": "-moz-image-region",
41301 "status": "nonstandard",
41302 "syntax": "<shape> | auto",
41308 "name": "MDN Reference",
41309 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
41312 "description": "For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance."
41315 "name": "-moz-orient",
41316 "status": "nonstandard",
41317 "syntax": "inline | block | horizontal | vertical",
41323 "name": "MDN Reference",
41324 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
41327 "description": "The -moz-orient CSS property specifies the orientation of the element to which it's applied."
41330 "name": "-moz-outline-radius",
41331 "status": "nonstandard",
41332 "syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
41338 "name": "MDN Reference",
41339 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
41342 "description": "In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."
41345 "name": "-moz-outline-radius-bottomleft",
41346 "status": "nonstandard",
41347 "syntax": "<outline-radius>",
41348 "description": "In Mozilla applications, the -moz-outline-radius-bottomleft CSS property can be used to round the bottom-left corner of an element's outline."
41351 "name": "-moz-outline-radius-bottomright",
41352 "status": "nonstandard",
41353 "syntax": "<outline-radius>",
41354 "description": "In Mozilla applications, the -moz-outline-radius-bottomright CSS property can be used to round the bottom-right corner of an element's outline."
41357 "name": "-moz-outline-radius-topleft",
41358 "status": "nonstandard",
41359 "syntax": "<outline-radius>",
41360 "description": "In Mozilla applications, the -moz-outline-radius-topleft CSS property can be used to round the top-left corner of an element's outline."
41363 "name": "-moz-outline-radius-topright",
41364 "status": "nonstandard",
41365 "syntax": "<outline-radius>",
41366 "description": "In Mozilla applications, the -moz-outline-radius-topright CSS property can be used to round the top-right corner of an element's outline."
41369 "name": "-moz-stack-sizing",
41370 "status": "nonstandard",
41371 "syntax": "ignore | stretch-to-fit",
41372 "description": "-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible."
41375 "name": "-moz-text-blink",
41376 "status": "nonstandard",
41377 "syntax": "none | blink",
41383 "name": "MDN Reference",
41384 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
41387 "description": "The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."
41390 "name": "-moz-user-input",
41391 "status": "nonstandard",
41392 "syntax": "auto | none | enabled | disabled",
41398 "name": "MDN Reference",
41399 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
41402 "description": "In Mozilla applications, -moz-user-input determines if an element will accept user input."
41405 "name": "-moz-user-modify",
41406 "status": "nonstandard",
41407 "syntax": "read-only | read-write | write-only",
41408 "description": "The -moz-user-modify property has no effect. It was originally planned to determine whether or not the content of an element can be edited by a user."
41411 "name": "-moz-window-dragging",
41412 "status": "nonstandard",
41413 "syntax": "drag | no-drag",
41414 "description": "The -moz-window-dragging CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X."
41417 "name": "-moz-window-shadow",
41418 "status": "nonstandard",
41419 "syntax": "default | menu | tooltip | sheet | none",
41425 "name": "MDN Reference",
41426 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
41429 "description": "The -moz-window-shadow CSS property specifies whether a window will have a shadow. It only works on Mac OS X."
41432 "name": "-webkit-border-before",
41433 "status": "nonstandard",
41434 "syntax": "<'border-width'> || <'border-style'> || <'color'>",
41443 "name": "MDN Reference",
41444 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
41447 "description": "The -webkit-border-before CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet."
41450 "name": "-webkit-border-before-color",
41451 "status": "nonstandard",
41452 "syntax": "<'color'>",
41453 "description": "The -webkit-border-before-color CSS property sets the color of the individual logical block start border in a single place in the style sheet."
41456 "name": "-webkit-border-before-style",
41457 "status": "nonstandard",
41458 "syntax": "<'border-style'>",
41459 "description": "The -webkit-border-before-style CSS property sets the style of the individual logical block start border in a single place in the style sheet."
41462 "name": "-webkit-border-before-width",
41463 "status": "nonstandard",
41464 "syntax": "<'border-width'>",
41465 "description": "The -webkit-border-before-width CSS property sets the width of the individual logical block start border in a single place in the style sheet."
41468 "name": "-webkit-line-clamp",
41469 "syntax": "none | <integer>",
41479 "name": "MDN Reference",
41480 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
41483 "description": "The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines."
41486 "name": "-webkit-mask",
41487 "status": "nonstandard",
41488 "syntax": "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
41489 "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
41492 "name": "-webkit-mask-attachment",
41493 "status": "nonstandard",
41494 "syntax": "<attachment>#",
41501 "name": "MDN Reference",
41502 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
41505 "description": "If a -webkit-mask-image is specified, -webkit-mask-attachment determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block."
41508 "name": "-webkit-mask-composite",
41509 "status": "nonstandard",
41510 "syntax": "<composite-style>#",
41520 "name": "MDN Reference",
41521 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
41524 "description": "The -webkit-mask-composite property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the -webkit-mask-image property."
41527 "name": "-webkit-mask-position",
41528 "status": "nonstandard",
41529 "syntax": "<position>#",
41530 "description": "The mask-position CSS property sets the initial position, relative to the mask position layer defined by mask-origin, for each defined mask image."
41533 "name": "-webkit-mask-position-x",
41534 "status": "nonstandard",
41535 "syntax": "[ <length-percentage> | left | center | right ]#",
41545 "name": "MDN Reference",
41546 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
41549 "description": "The -webkit-mask-position-x CSS property sets the initial horizontal position of a mask image."
41552 "name": "-webkit-mask-position-y",
41553 "status": "nonstandard",
41554 "syntax": "[ <length-percentage> | top | center | bottom ]#",
41564 "name": "MDN Reference",
41565 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
41568 "description": "The -webkit-mask-position-y CSS property sets the initial vertical position of a mask image."
41571 "name": "-webkit-mask-repeat-x",
41572 "status": "nonstandard",
41573 "syntax": "repeat | no-repeat | space | round",
41582 "name": "MDN Reference",
41583 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
41586 "description": "The -webkit-mask-repeat-x property specifies whether and how a mask image is repeated (tiled) horizontally."
41589 "name": "-webkit-mask-repeat-y",
41590 "status": "nonstandard",
41591 "syntax": "repeat | no-repeat | space | round",
41600 "name": "MDN Reference",
41601 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
41604 "description": "The -webkit-mask-repeat-y property specifies whether and how a mask image is repeated (tiled) vertically."
41607 "name": "aspect-ratio",
41608 "status": "experimental",
41609 "syntax": "auto | <ratio>",
41617 "name": "MDN Reference",
41618 "url": "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
41621 "description": "The aspect-ratio CSS property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions."
41625 "status": "obsolete",
41626 "syntax": "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
41629 "name": "MDN Reference",
41630 "url": "https://developer.mozilla.org/docs/Web/CSS/azimuth"
41633 "description": "In combination with elevation, the azimuth CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage."
41636 "name": "border-end-end-radius",
41637 "syntax": "<length-percentage>{1,2}",
41643 "name": "MDN Reference",
41644 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
41647 "description": "The border-end-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation."
41650 "name": "border-end-start-radius",
41651 "syntax": "<length-percentage>{1,2}",
41657 "name": "MDN Reference",
41658 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
41661 "description": "The border-end-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
41664 "name": "border-start-end-radius",
41665 "syntax": "<length-percentage>{1,2}",
41671 "name": "MDN Reference",
41672 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
41675 "description": "The border-start-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
41678 "name": "border-start-start-radius",
41679 "syntax": "<length-percentage>{1,2}",
41685 "name": "MDN Reference",
41686 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
41689 "description": "The border-start-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation."
41692 "name": "box-align",
41693 "status": "nonstandard",
41694 "syntax": "start | center | end | baseline | stretch",
41704 "name": "MDN Reference",
41705 "url": "https://developer.mozilla.org/docs/Web/CSS/box-align"
41708 "description": "The box-align CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box."
41711 "name": "box-direction",
41712 "status": "nonstandard",
41713 "syntax": "normal | reverse | inherit",
41723 "name": "MDN Reference",
41724 "url": "https://developer.mozilla.org/docs/Web/CSS/box-direction"
41727 "description": "The box-direction CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge)."
41730 "name": "box-flex",
41731 "status": "nonstandard",
41732 "syntax": "<number>",
41742 "name": "MDN Reference",
41743 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex"
41746 "description": "The -moz-box-flex and -webkit-box-flex CSS properties specify how a -moz-box or -webkit-box grows to fill the box that contains it, in the direction of the containing box's layout."
41749 "name": "box-flex-group",
41750 "status": "nonstandard",
41751 "syntax": "<integer>",
41759 "name": "MDN Reference",
41760 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
41763 "description": "The box-flex-group CSS property assigns the flexbox's child elements to a flex group."
41766 "name": "box-lines",
41767 "status": "nonstandard",
41768 "syntax": "single | multiple",
41776 "name": "MDN Reference",
41777 "url": "https://developer.mozilla.org/docs/Web/CSS/box-lines"
41780 "description": "The box-lines CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes)."
41783 "name": "box-ordinal-group",
41784 "status": "nonstandard",
41785 "syntax": "<integer>",
41795 "name": "MDN Reference",
41796 "url": "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
41799 "description": "The box-ordinal-group CSS property assigns the flexbox's child elements to an ordinal group."
41802 "name": "box-orient",
41803 "status": "nonstandard",
41804 "syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
41814 "name": "MDN Reference",
41815 "url": "https://developer.mozilla.org/docs/Web/CSS/box-orient"
41818 "description": "The box-orient CSS property specifies whether an element lays out its contents horizontally or vertically."
41821 "name": "box-pack",
41822 "status": "nonstandard",
41823 "syntax": "start | center | end | justify",
41833 "name": "MDN Reference",
41834 "url": "https://developer.mozilla.org/docs/Web/CSS/box-pack"
41837 "description": "The -moz-box-pack and -webkit-box-pack CSS properties specify how a -moz-box or -webkit-box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box."
41840 "name": "color-adjust",
41841 "syntax": "economy | exact",
41851 "name": "MDN Reference",
41852 "url": "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
41855 "description": "The color-adjust property is a non-standard CSS extension that can be used to force printing of background colors and images in browsers based on the WebKit engine."
41858 "name": "counter-set",
41859 "syntax": "[ <custom-ident> <integer>? ]+ | none",
41865 "name": "MDN Reference",
41866 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-set"
41869 "description": "The counter-set CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element."
41872 "name": "hanging-punctuation",
41873 "syntax": "none | [ first || [ force-end | allow-end ] || last ]",
41879 "name": "MDN Reference",
41880 "url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
41883 "description": "The hanging-punctuation CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box."
41886 "name": "initial-letter",
41887 "status": "experimental",
41888 "syntax": "normal | [ <number> <integer>? ]",
41894 "name": "MDN Reference",
41895 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
41898 "description": "The initial-letter CSS property specifies styling for dropped, raised, and sunken initial letters."
41901 "name": "initial-letter-align",
41902 "status": "experimental",
41903 "syntax": "[ auto | alphabetic | hanging | ideographic ]",
41906 "name": "MDN Reference",
41907 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
41910 "description": "The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph."
41913 "name": "line-clamp",
41914 "status": "experimental",
41915 "syntax": "none | <integer>",
41916 "description": "The line-clamp property allows limiting the contents of a block container to the specified number of lines; remaining content is fragmented away and neither rendered nor measured. Optionally, it also allows inserting content into the last line box to indicate the continuity of truncated/interrupted content."
41919 "name": "line-height-step",
41920 "status": "experimental",
41921 "syntax": "<length>",
41929 "name": "MDN Reference",
41930 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
41933 "description": "The line-height-step CSS property defines the step units for line box heights. When the step unit is positive, line box heights are rounded up to the closest multiple of the unit. Negative values are invalid."
41936 "name": "margin-trim",
41937 "status": "experimental",
41938 "syntax": "none | in-flow | all",
41941 "name": "MDN Reference",
41942 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
41945 "description": "The margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges."
41948 "name": "mask-border",
41949 "syntax": "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
41950 "description": "The mask-border CSS property lets you create a mask along the edge of an element's border.\n\nThis property is a shorthand for mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, mask-border-repeat, and mask-border-mode. As with all shorthand properties, any omitted sub-values will be set to their initial value."
41953 "name": "mask-border-mode",
41954 "syntax": "luminance | alpha",
41955 "description": "The mask-border-mode CSS property specifies the blending mode used in a mask border."
41958 "name": "mask-border-outset",
41959 "syntax": "[ <length> | <number> ]{1,4}",
41960 "description": "The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."
41963 "name": "mask-border-repeat",
41964 "syntax": "[ stretch | repeat | round | space ]{1,2}",
41965 "description": "The mask-border-repeat CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border."
41968 "name": "mask-border-slice",
41969 "syntax": "<number-percentage>{1,4} fill?",
41970 "description": "The mask-border-slice CSS property divides the image specified by mask-border-source into regions. These regions are used to form the components of an element's mask border."
41973 "name": "mask-border-source",
41974 "syntax": "none | <image>",
41975 "description": "The mask-border-source CSS property specifies the source image used to create an element's mask border.\n\nThe mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border."
41978 "name": "mask-border-width",
41979 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
41980 "description": "The mask-border-width CSS property specifies the width of an element's mask border."
41983 "name": "mask-clip",
41984 "syntax": "[ <geometry-box> | no-clip ]#",
41994 "name": "MDN Reference",
41995 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
41998 "description": "The mask-clip CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area."
42001 "name": "mask-composite",
42002 "syntax": "<compositing-operator>#",
42009 "name": "MDN Reference",
42010 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
42013 "description": "The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."
42016 "name": "max-lines",
42017 "status": "experimental",
42018 "syntax": "none | <integer>",
42019 "description": "The max-liens property forces a break after a set number of lines"
42022 "name": "overflow-clip-box",
42023 "status": "nonstandard",
42024 "syntax": "padding-box | content-box",
42030 "name": "MDN Reference",
42031 "url": "https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box"
42034 "description": "The overflow-clip-box CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties."
42037 "name": "overflow-inline",
42038 "syntax": "visible | hidden | clip | scroll | auto",
42044 "name": "MDN Reference",
42045 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-inline"
42048 "description": "The overflow-inline CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis."
42051 "name": "overscroll-behavior",
42052 "syntax": "[ contain | none | auto ]{1,2}",
42061 "name": "MDN Reference",
42062 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
42065 "description": "The overscroll-behavior CSS property is shorthand for the overscroll-behavior-x and overscroll-behavior-y properties, which allow you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached."
42068 "name": "overscroll-behavior-x",
42069 "syntax": "contain | none | auto",
42078 "name": "MDN Reference",
42079 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
42082 "description": "The overscroll-behavior-x CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the x axis direction."
42085 "name": "overscroll-behavior-y",
42086 "syntax": "contain | none | auto",
42095 "name": "MDN Reference",
42096 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
42099 "description": "The overscroll-behavior-y CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the y axis direction."
42102 "name": "ruby-merge",
42103 "status": "experimental",
42104 "syntax": "separate | collapse | auto",
42105 "description": "This property controls how ruby annotation boxes should be rendered when there are more than one in a ruby container box: whether each pair should be kept separate, the annotations should be collapsed and rendered as a group, or the separation should be determined based on the space available."
42108 "name": "scrollbar-color",
42109 "syntax": "auto | dark | light | <color>{2}",
42115 "name": "MDN Reference",
42116 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
42119 "description": "The scrollbar-color CSS property sets the color of the scrollbar track and thumb."
42122 "name": "scrollbar-width",
42123 "syntax": "auto | thin | none",
42129 "name": "MDN Reference",
42130 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
42133 "description": "The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. "
42136 "name": "scroll-margin",
42137 "syntax": "<length>{1,4}",
42147 "name": "MDN Reference",
42148 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
42151 "description": "The scroll-margin property is a shorthand property which sets all of the scroll-margin longhands, assigning values much like the margin property does for the margin-* longhands."
42154 "name": "scroll-margin-block",
42155 "syntax": "<length>{1,2}",
42164 "name": "MDN Reference",
42165 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
42168 "description": "The scroll-margin-block property is a shorthand property which sets the scroll-margin longhands in the block dimension."
42171 "name": "scroll-margin-block-start",
42172 "syntax": "<length>",
42181 "name": "MDN Reference",
42182 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
42185 "description": "The scroll-margin-block-start property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42188 "name": "scroll-margin-block-end",
42189 "syntax": "<length>",
42198 "name": "MDN Reference",
42199 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
42202 "description": "The scroll-margin-block-end property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42205 "name": "scroll-margin-bottom",
42206 "syntax": "<length>",
42216 "name": "MDN Reference",
42217 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
42220 "description": "The scroll-margin-bottom property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42223 "name": "scroll-margin-inline",
42224 "syntax": "<length>{1,2}",
42230 "name": "MDN Reference",
42231 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
42234 "description": "The scroll-margin-inline property is a shorthand property which sets the scroll-margin longhands in the inline dimension."
42237 "name": "scroll-margin-inline-start",
42238 "syntax": "<length>",
42247 "name": "MDN Reference",
42248 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
42251 "description": "The scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42254 "name": "scroll-margin-inline-end",
42255 "syntax": "<length>",
42264 "name": "MDN Reference",
42265 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
42268 "description": "The scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42271 "name": "scroll-margin-left",
42272 "syntax": "<length>",
42282 "name": "MDN Reference",
42283 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
42286 "description": "The scroll-margin-left property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42289 "name": "scroll-margin-right",
42290 "syntax": "<length>",
42300 "name": "MDN Reference",
42301 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
42304 "description": "The scroll-margin-right property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42307 "name": "scroll-margin-top",
42308 "syntax": "<length>",
42318 "name": "MDN Reference",
42319 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
42322 "description": "The scroll-margin-top property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
42325 "name": "scroll-snap-type-x",
42326 "status": "obsolete",
42327 "syntax": "none | mandatory | proximity",
42334 "name": "MDN Reference",
42335 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
42338 "description": "The scroll-snap-type-x CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
42341 "name": "scroll-snap-type-y",
42342 "status": "obsolete",
42343 "syntax": "none | mandatory | proximity",
42349 "name": "MDN Reference",
42350 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
42353 "description": "The scroll-snap-type-y CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
42356 "name": "text-decoration-thickness",
42357 "syntax": "auto | from-font | <length> | <percentage> ",
42364 "name": "MDN Reference",
42365 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
42368 "description": "The text-decoration-thickness CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline."
42371 "name": "text-emphasis",
42372 "syntax": "<'text-emphasis-style'> || <'text-emphasis-color'>",
42382 "name": "MDN Reference",
42383 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
42386 "description": "The text-emphasis CSS property is a shorthand property for setting text-emphasis-style and text-emphasis-color in one declaration. This property will apply the specified emphasis mark to each character of the element's text, except separator characters, like spaces, and control characters."
42389 "name": "text-emphasis-color",
42390 "syntax": "<color>",
42400 "name": "MDN Reference",
42401 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
42404 "description": "The text-emphasis-color CSS property defines the color used to draw emphasis marks on text being rendered in the HTML document. This value can also be set and reset using the text-emphasis shorthand."
42407 "name": "text-emphasis-position",
42408 "syntax": "[ over | under ] && [ right | left ]",
42418 "name": "MDN Reference",
42419 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
42422 "description": "The text-emphasis-position CSS property describes where emphasis marks are drawn at. The effect of emphasis marks on the line height is the same as for ruby text: if there isn't enough place, the line height is increased."
42425 "name": "text-emphasis-style",
42426 "syntax": "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
42436 "name": "MDN Reference",
42437 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
42440 "description": "The text-emphasis-style CSS property defines the type of emphasis used. It can also be set, and reset, using the text-emphasis shorthand."
42443 "name": "text-underline-offset",
42444 "syntax": "auto | from-font | <length> | <percentage> ",
42451 "name": "MDN Reference",
42452 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
42455 "description": "The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position."
42458 "name": "speak-as",
42459 "syntax": "auto | bullets | numbers | words | spell-out | <counter-style-name>",
42460 "description": "The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue."
42464 "syntax": "auto | <length>",
42465 "description": "The bleed CSS at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box. This property only has effect if crop marks are enabled using the marks property."
42469 "syntax": "none | [ crop || cross ]",
42470 "description": "The marks CSS at-rule descriptor, used with the @page at-rule, adds crop and/or cross marks to the presentation of the document. Crop marks indicate where the page should be cut. Cross marks are used to align sheets."
42475 "name": "@charset",
42478 "name": "MDN Reference",
42479 "url": "https://developer.mozilla.org/docs/Web/CSS/@charset"
42482 "description": "Defines character set of the document."
42485 "name": "@counter-style",
42491 "name": "MDN Reference",
42492 "url": "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
42495 "description": "Defines a custom counter style."
42498 "name": "@font-face",
42501 "name": "MDN Reference",
42502 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-face"
42505 "description": "Allows for linking to fonts that are automatically activated when needed. This permits authors to work around the limitation of 'web-safe' fonts, allowing for consistent rendering independent of the fonts available in a given user's environment."
42508 "name": "@font-feature-values",
42515 "name": "MDN Reference",
42516 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
42519 "description": "Defines named values for the indices used to select alternate glyphs for a given font family."
42525 "name": "MDN Reference",
42526 "url": "https://developer.mozilla.org/docs/Web/CSS/@import"
42529 "description": "Includes content of another file."
42532 "name": "@keyframes",
42535 "name": "MDN Reference",
42536 "url": "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
42539 "description": "Defines set of animation key frames."
42545 "name": "MDN Reference",
42546 "url": "https://developer.mozilla.org/docs/Web/CSS/@media"
42549 "description": "Defines a stylesheet for a particular media type."
42552 "name": "@-moz-document",
42556 "description": "Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."
42559 "name": "@-moz-keyframes",
42563 "description": "Defines set of animation key frames."
42566 "name": "@-ms-viewport",
42571 "description": "Specifies the size, zoom factor, and orientation of the viewport."
42574 "name": "@namespace",
42577 "name": "MDN Reference",
42578 "url": "https://developer.mozilla.org/docs/Web/CSS/@namespace"
42581 "description": "Declares a prefix and associates it with a namespace name."
42584 "name": "@-o-keyframes",
42588 "description": "Defines set of animation key frames."
42591 "name": "@-o-viewport",
42595 "description": "Specifies the size, zoom factor, and orientation of the viewport."
42608 "name": "MDN Reference",
42609 "url": "https://developer.mozilla.org/docs/Web/CSS/@page"
42612 "description": "Directive defines various page parameters."
42615 "name": "@supports",
42625 "name": "MDN Reference",
42626 "url": "https://developer.mozilla.org/docs/Web/CSS/@supports"
42629 "description": "A conditional group rule whose condition tests whether the user agent supports CSS property:value pairs."
42632 "name": "@-webkit-keyframes",
42637 "description": "Defines set of animation key frames."
42645 "name": "MDN Reference",
42646 "url": "https://developer.mozilla.org/docs/Web/CSS/:active"
42649 "description": "Applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it."
42652 "name": ":any-link",
42662 "name": "MDN Reference",
42663 "url": "https://developer.mozilla.org/docs/Web/CSS/:any-link"
42666 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
42669 "name": ":checked",
42672 "name": "MDN Reference",
42673 "url": "https://developer.mozilla.org/docs/Web/CSS/:checked"
42676 "description": "Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies."
42679 "name": ":corner-present",
42684 "description": "Non-standard. Indicates whether or not a scrollbar corner is present."
42687 "name": ":decrement",
42692 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will decrement the view’s position when used."
42695 "name": ":default",
42705 "name": "MDN Reference",
42706 "url": "https://developer.mozilla.org/docs/Web/CSS/:default"
42709 "description": "Applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons, and select lists/menus."
42712 "name": ":disabled",
42715 "name": "MDN Reference",
42716 "url": "https://developer.mozilla.org/docs/Web/CSS/:disabled"
42719 "description": "Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."
42722 "name": ":double-button",
42727 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar."
42733 "name": "MDN Reference",
42734 "url": "https://developer.mozilla.org/docs/Web/CSS/:empty"
42737 "description": "Represents an element that has no children at all."
42740 "name": ":enabled",
42743 "name": "MDN Reference",
42744 "url": "https://developer.mozilla.org/docs/Web/CSS/:enabled"
42747 "description": "Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."
42755 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb."
42768 "name": "MDN Reference",
42769 "url": "https://developer.mozilla.org/docs/Web/CSS/:first"
42772 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
42775 "name": ":first-child",
42778 "name": "MDN Reference",
42779 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-child"
42782 "description": "Same as :nth-child(1). Represents an element that is the first child of some other element."
42785 "name": ":first-of-type",
42788 "name": "MDN Reference",
42789 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-of-type"
42792 "description": "Same as :nth-of-type(1). Represents an element that is the first sibling of its type in the list of children of its parent element."
42798 "name": "MDN Reference",
42799 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus"
42802 "description": "Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."
42805 "name": ":fullscreen",
42808 "name": "MDN Reference",
42809 "url": "https://developer.mozilla.org/docs/Web/CSS/:fullscreen"
42812 "description": "Matches any element that has its fullscreen flag set."
42821 "description": "Represents any element that is defined to occur entirely after a :current element."
42824 "name": ":horizontal",
42829 "description": "Non-standard. Applies to any scrollbar pieces that have a horizontal orientation."
42842 "name": "MDN Reference",
42843 "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
42846 "description": "When evaluated in the context of a shadow tree, matches the shadow tree’s host element."
42854 "description": "When evaluated in the context of a shadow tree, it matches the shadow tree’s host element if the host element, in its normal context, matches the selector argument."
42857 "name": ":host-context()",
42862 "description": "Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector."
42868 "name": "MDN Reference",
42869 "url": "https://developer.mozilla.org/docs/Web/CSS/:hover"
42872 "description": "Applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element."
42875 "name": ":increment",
42880 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will increment the view’s position when used."
42883 "name": ":indeterminate",
42886 "name": "MDN Reference",
42887 "url": "https://developer.mozilla.org/docs/Web/CSS/:indeterminate"
42890 "description": "Applies to UI elements whose value is in an indeterminate state."
42893 "name": ":in-range",
42903 "name": "MDN Reference",
42904 "url": "https://developer.mozilla.org/docs/Web/CSS/:in-range"
42907 "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
42910 "name": ":invalid",
42913 "name": "MDN Reference",
42914 "url": "https://developer.mozilla.org/docs/Web/CSS/:invalid"
42917 "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
42929 "description": "Represents an element that is in language specified."
42932 "name": ":last-child",
42935 "name": "MDN Reference",
42936 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-child"
42939 "description": "Same as :nth-last-child(1). Represents an element that is the last child of some other element."
42942 "name": ":last-of-type",
42945 "name": "MDN Reference",
42946 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-of-type"
42949 "description": "Same as :nth-last-of-type(1). Represents an element that is the last sibling of its type in the list of children of its parent element."
42962 "name": "MDN Reference",
42963 "url": "https://developer.mozilla.org/docs/Web/CSS/:left"
42966 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
42972 "name": "MDN Reference",
42973 "url": "https://developer.mozilla.org/docs/Web/CSS/:link"
42976 "description": "Applies to links that have not yet been visited."
42979 "name": ":matches()",
42983 "description": "Takes a selector list as its argument. It represents an element that is represented by its argument."
42986 "name": ":-moz-any()",
42990 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
42993 "name": ":-moz-any-link",
42997 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
43000 "name": ":-moz-broken",
43004 "description": "Non-standard. Matches elements representing broken images."
43007 "name": ":-moz-drag-over",
43011 "description": "Non-standard. Matches elements when a drag-over event applies to it."
43014 "name": ":-moz-first-node",
43018 "description": "Non-standard. Represents an element that is the first child node of some other element."
43021 "name": ":-moz-focusring",
43025 "description": "Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser."
43028 "name": ":-moz-full-screen",
43032 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
43035 "name": ":-moz-last-node",
43039 "description": "Non-standard. Represents an element that is the last child node of some other element."
43042 "name": ":-moz-loading",
43046 "description": "Non-standard. Matches elements, such as images, that haven’t started loading yet."
43049 "name": ":-moz-only-whitespace",
43055 "name": "MDN Reference",
43056 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-only-whitespace"
43059 "description": "The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank."
43062 "name": ":-moz-placeholder",
43066 "description": "Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+."
43069 "name": ":-moz-submit-invalid",
43075 "name": "MDN Reference",
43076 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-submit-invalid"
43079 "description": "Non-standard. Represents any submit button when the contents of the associated form are not valid."
43082 "name": ":-moz-suppressed",
43086 "description": "Non-standard. Matches elements representing images that have been blocked from loading."
43089 "name": ":-moz-ui-invalid",
43095 "name": "MDN Reference",
43096 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-invalid"
43099 "description": "Non-standard. Represents any validated form element whose value isn't valid "
43102 "name": ":-moz-ui-valid",
43108 "name": "MDN Reference",
43109 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-valid"
43112 "description": "Non-standard. Represents any validated form element whose value is valid "
43115 "name": ":-moz-user-disabled",
43119 "description": "Non-standard. Matches elements representing images that have been disabled due to the user’s preferences."
43122 "name": ":-moz-window-inactive",
43128 "name": "MDN Reference",
43129 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-window-inactive"
43132 "description": "Non-standard. Matches elements in an inactive window."
43135 "name": ":-ms-fullscreen",
43139 "description": "Matches any element that has its fullscreen flag set."
43142 "name": ":-ms-input-placeholder",
43146 "description": "Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder."
43149 "name": ":-ms-keyboard-active",
43153 "description": "Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar."
43156 "name": ":-ms-lang()",
43161 "description": "Represents an element that is in the language specified. Accepts a comma separated list of language tokens."
43164 "name": ":no-button",
43169 "description": "Non-standard. Applies to track pieces. Applies when there is no button at that end of the track."
43181 "description": "The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument."
43184 "name": ":nth-child()",
43193 "description": "Represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element."
43196 "name": ":nth-last-child()",
43205 "description": "Represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element."
43208 "name": ":nth-last-of-type()",
43217 "description": "Represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element."
43220 "name": ":nth-of-type()",
43229 "description": "Represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element."
43232 "name": ":only-child",
43235 "name": "MDN Reference",
43236 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-child"
43239 "description": "Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity."
43242 "name": ":only-of-type",
43245 "name": "MDN Reference",
43246 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-of-type"
43249 "description": "Matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity."
43252 "name": ":optional",
43255 "name": "MDN Reference",
43256 "url": "https://developer.mozilla.org/docs/Web/CSS/:optional"
43259 "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
43262 "name": ":out-of-range",
43272 "name": "MDN Reference",
43273 "url": "https://developer.mozilla.org/docs/Web/CSS/:out-of-range"
43276 "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
43285 "description": "Represents any element that is defined to occur entirely prior to a :current element."
43288 "name": ":read-only",
43298 "name": "MDN Reference",
43299 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-only"
43302 "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
43305 "name": ":read-write",
43315 "name": "MDN Reference",
43316 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-write"
43319 "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
43322 "name": ":required",
43325 "name": "MDN Reference",
43326 "url": "https://developer.mozilla.org/docs/Web/CSS/:required"
43329 "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
43342 "name": "MDN Reference",
43343 "url": "https://developer.mozilla.org/docs/Web/CSS/:right"
43346 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
43352 "name": "MDN Reference",
43353 "url": "https://developer.mozilla.org/docs/Web/CSS/:root"
43356 "description": "Represents an element that is the root of the document. In HTML 4, this is always the HTML element."
43369 "name": "MDN Reference",
43370 "url": "https://developer.mozilla.org/docs/Web/CSS/:scope"
43373 "description": "Represents any element that is in the contextual reference element set."
43376 "name": ":single-button",
43381 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar."
43389 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb."
43395 "name": "MDN Reference",
43396 "url": "https://developer.mozilla.org/docs/Web/CSS/:target"
43399 "description": "Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier)."
43405 "name": "MDN Reference",
43406 "url": "https://developer.mozilla.org/docs/Web/CSS/:valid"
43409 "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
43412 "name": ":vertical",
43417 "description": "Non-standard. Applies to any scrollbar pieces that have a vertical orientation."
43420 "name": ":visited",
43423 "name": "MDN Reference",
43424 "url": "https://developer.mozilla.org/docs/Web/CSS/:visited"
43427 "description": "Applies once the link has been visited by the user."
43430 "name": ":-webkit-any()",
43435 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
43438 "name": ":-webkit-full-screen",
43443 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
43446 "name": ":window-inactive",
43451 "description": "Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active."
43455 "status": "experimental",
43458 "name": "MDN Reference",
43459 "url": "https://developer.mozilla.org/docs/Web/CSS/:blank"
43462 "description": "The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>)."
43465 "name": ":defined",
43466 "status": "experimental",
43476 "name": "MDN Reference",
43477 "url": "https://developer.mozilla.org/docs/Web/CSS/:defined"
43480 "description": "The :defined CSS pseudo-class represents any element that has been defined. This includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e. with the CustomElementRegistry.define() method)."
43489 "name": "MDN Reference",
43490 "url": "https://developer.mozilla.org/docs/Web/CSS/:dir"
43493 "description": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them."
43496 "name": ":focus-visible",
43497 "status": "experimental",
43506 "name": "MDN Reference",
43507 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-visible"
43510 "description": "The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA determines via heuristics that the focus should be made evident on the element."
43513 "name": ":focus-within",
43514 "status": "experimental",
43524 "name": "MDN Reference",
43525 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-within"
43528 "description": "The :focus-within pseudo-class applies to any element for which the :focus pseudo class applies as well as to an element whose descendant in the flat tree (including non-element nodes, such as text nodes) matches the conditions for matching :focus."
43532 "status": "experimental",
43535 "name": "MDN Reference",
43536 "url": "https://developer.mozilla.org/docs/Web/CSS/:has"
43539 "description": ":The :has() CSS pseudo-class represents an element if any of the selectors passed as parameters (relative to the :scope of the given element), match at least one element."
43543 "status": "experimental",
43553 "name": "MDN Reference",
43554 "url": "https://developer.mozilla.org/docs/Web/CSS/:is"
43557 "description": "The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form."
43560 "name": ":placeholder-shown",
43561 "status": "experimental",
43564 "name": "MDN Reference",
43565 "url": "https://developer.mozilla.org/docs/Web/CSS/:placeholder-shown"
43568 "description": "The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."
43572 "status": "experimental",
43573 "description": "The :where() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list."
43576 "pseudoElements": [
43581 "name": "MDN Reference",
43582 "url": "https://developer.mozilla.org/docs/Web/CSS/::after"
43585 "description": "Represents a styleable child pseudo-element immediately after the originating element’s actual content."
43588 "name": "::backdrop",
43598 "name": "MDN Reference",
43599 "url": "https://developer.mozilla.org/docs/Web/CSS/::backdrop"
43602 "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
43605 "name": "::before",
43608 "name": "MDN Reference",
43609 "url": "https://developer.mozilla.org/docs/Web/CSS/::before"
43612 "description": "Represents a styleable child pseudo-element immediately before the originating element’s actual content."
43615 "name": "::content",
43620 "description": "Deprecated. Matches the distribution list itself, on elements that have one. Use ::slotted for forward compatibility."
43633 "name": "MDN Reference",
43634 "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
43647 "name": "::cue-region",
43655 "name": "::cue-region()",
43663 "name": "::first-letter",
43666 "name": "MDN Reference",
43667 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-letter"
43670 "description": "Represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line."
43673 "name": "::first-line",
43676 "name": "MDN Reference",
43677 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-line"
43680 "description": "Describes the contents of the first formatted line of its originating element."
43683 "name": "::-moz-focus-inner",
43689 "name": "::-moz-focus-outer",
43695 "name": "::-moz-list-bullet",
43699 "description": "Used to style the bullet of a list element. Similar to the standardized ::marker."
43702 "name": "::-moz-list-number",
43706 "description": "Used to style the numbers of a list element. Similar to the standardized ::marker."
43709 "name": "::-moz-placeholder",
43713 "description": "Represents placeholder text in an input field"
43716 "name": "::-moz-progress-bar",
43720 "description": "Represents the bar portion of a progress bar."
43723 "name": "::-moz-selection",
43727 "description": "Represents the portion of a document that has been highlighted by the user."
43730 "name": "::-ms-backdrop",
43734 "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
43737 "name": "::-ms-browse",
43744 "name": "MDN Reference",
43745 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-browse"
43748 "description": "Represents the browse button of an input type=file control."
43751 "name": "::-ms-check",
43758 "name": "MDN Reference",
43759 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-check"
43762 "description": "Represents the check of a checkbox or radio button input control."
43765 "name": "::-ms-clear",
43772 "name": "MDN Reference",
43773 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-clear"
43776 "description": "Represents the clear button of a text input control"
43779 "name": "::-ms-expand",
43784 "description": "Represents the drop-down button of a select control."
43787 "name": "::-ms-fill",
43794 "name": "MDN Reference",
43795 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill"
43798 "description": "Represents the bar portion of a progress bar."
43801 "name": "::-ms-fill-lower",
43808 "name": "MDN Reference",
43809 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill-lower"
43812 "description": "Represents the portion of the slider track from its smallest value up to the value currently selected by the thumb. In a left-to-right layout, this is the portion of the slider track to the left of the thumb."
43815 "name": "::-ms-fill-upper",
43822 "name": "MDN Reference",
43823 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill-upper"
43826 "description": "Represents the portion of the slider track from the value currently selected by the thumb up to the slider's largest value. In a left-to-right layout, this is the portion of the slider track to the right of the thumb."
43829 "name": "::-ms-reveal",
43836 "name": "MDN Reference",
43837 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-reveal"
43840 "description": "Represents the password reveal button of an input type=password control."
43843 "name": "::-ms-thumb",
43848 "description": "Represents the portion of range input control (also known as a slider control) that the user drags."
43851 "name": "::-ms-ticks-after",
43856 "description": "Represents the tick marks of a slider that begin just after the thumb and continue up to the slider's largest value. In a left-to-right layout, these are the ticks to the right of the thumb."
43859 "name": "::-ms-ticks-before",
43864 "description": "Represents the tick marks of a slider that represent its smallest values up to the value currently selected by the thumb. In a left-to-right layout, these are the ticks to the left of the thumb."
43867 "name": "::-ms-tooltip",
43872 "description": "Represents the tooltip of a slider (input type=range)."
43875 "name": "::-ms-track",
43880 "description": "Represents the track of a slider."
43883 "name": "::-ms-value",
43890 "name": "MDN Reference",
43891 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-value"
43894 "description": "Represents the content of a text or password input control, or a select control."
43897 "name": "::selection",
43900 "name": "MDN Reference",
43901 "url": "https://developer.mozilla.org/docs/Web/CSS/::selection"
43904 "description": "Represents the portion of a document that has been highlighted by the user."
43907 "name": "::shadow",
43912 "description": "Matches the shadow root if an element has a shadow tree."
43915 "name": "::-webkit-file-upload-button",
43924 "name": "MDN Reference",
43925 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-file-upload-button"
43930 "name": "::-webkit-inner-spin-button",
43939 "name": "MDN Reference",
43940 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-inner-spin-button"
43945 "name": "::-webkit-input-placeholder",
43952 "name": "::-webkit-keygen-select",
43960 "name": "::-webkit-meter-bar",
43969 "name": "MDN Reference",
43970 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-bar"
43975 "name": "::-webkit-meter-even-less-good-value",
43984 "name": "MDN Reference",
43985 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-even-less-good-value"
43990 "name": "::-webkit-meter-optimum-value",
43999 "name": "MDN Reference",
44000 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-optimum-value"
44005 "name": "::-webkit-meter-suboptimum-value",
44014 "name": "MDN Reference",
44015 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-suboptimum-value"
44020 "name": "::-webkit-outer-spin-button",
44027 "name": "MDN Reference",
44028 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-outer-spin-button"
44033 "name": "::-webkit-progress-bar",
44042 "name": "MDN Reference",
44043 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-bar"
44048 "name": "::-webkit-progress-inner-element",
44057 "name": "MDN Reference",
44058 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-inner-element"
44063 "name": "::-webkit-progress-value",
44072 "name": "MDN Reference",
44073 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-value"
44078 "name": "::-webkit-resizer",
44087 "name": "MDN Reference",
44088 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44093 "name": "::-webkit-scrollbar",
44102 "name": "MDN Reference",
44103 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44108 "name": "::-webkit-scrollbar-button",
44117 "name": "MDN Reference",
44118 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44123 "name": "::-webkit-scrollbar-corner",
44132 "name": "MDN Reference",
44133 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44138 "name": "::-webkit-scrollbar-thumb",
44147 "name": "MDN Reference",
44148 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44153 "name": "::-webkit-scrollbar-track",
44162 "name": "MDN Reference",
44163 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44168 "name": "::-webkit-scrollbar-track-piece",
44177 "name": "MDN Reference",
44178 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44183 "name": "::-webkit-search-cancel-button",
44192 "name": "MDN Reference",
44193 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-cancel-button"
44198 "name": "::-webkit-search-decoration",
44205 "name": "::-webkit-search-results-button",
44214 "name": "MDN Reference",
44215 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-results-button"
44220 "name": "::-webkit-search-results-decoration",
44227 "name": "::-webkit-slider-runnable-track",
44235 "name": "::-webkit-slider-thumb",
44243 "name": "::-webkit-textfield-decoration-container",
44251 "name": "::-webkit-validation-bubble",
44259 "name": "::-webkit-validation-bubble-arrow",
44267 "name": "::-webkit-validation-bubble-arrow-clipper",
44275 "name": "::-webkit-validation-bubble-heading",
44283 "name": "::-webkit-validation-bubble-message",
44291 "name": "::-webkit-validation-bubble-text-block",
44299 "name": "::-moz-range-progress",
44300 "status": "nonstandard",
44306 "name": "MDN Reference",
44307 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-progress"
44310 "description": "The ::-moz-range-progress CSS pseudo-element is a Mozilla extension that represents the lower portion of the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\". This portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob)."
44313 "name": "::-moz-range-thumb",
44314 "status": "nonstandard",
44320 "name": "MDN Reference",
44321 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-thumb"
44324 "description": "The ::-moz-range-thumb CSS pseudo-element is a Mozilla extension that represents the thumb (i.e., virtual knob) of an <input> of type=\"range\". The user can move the thumb along the input's track to alter its numerical value."
44327 "name": "::-moz-range-track",
44328 "status": "nonstandard",
44334 "name": "MDN Reference",
44335 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-track"
44338 "description": "The ::-moz-range-track CSS pseudo-element is a Mozilla extension that represents the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\"."
44341 "name": "::-webkit-progress-inner-value",
44342 "status": "nonstandard",
44343 "description": "The ::-webkit-progress-value CSS pseudo-element represents the filled-in portion of the bar of a <progress> element. It is a child of the ::-webkit-progress-bar pseudo-element.\n\nIn order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element."
44346 "name": "::grammar-error",
44347 "status": "experimental",
44350 "name": "MDN Reference",
44351 "url": "https://developer.mozilla.org/docs/Web/CSS/::grammar-error"
44354 "description": "The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."
44357 "name": "::marker",
44365 "name": "MDN Reference",
44366 "url": "https://developer.mozilla.org/docs/Web/CSS/::marker"
44369 "description": "The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."
44373 "status": "experimental",
44383 "name": "MDN Reference",
44384 "url": "https://developer.mozilla.org/docs/Web/CSS/::part"
44387 "description": "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."
44390 "name": "::placeholder",
44400 "name": "MDN Reference",
44401 "url": "https://developer.mozilla.org/docs/Web/CSS/::placeholder"
44404 "description": "The ::placeholder CSS pseudo-element represents the placeholder text of a form element."
44407 "name": "::slotted",
44417 "name": "MDN Reference",
44418 "url": "https://developer.mozilla.org/docs/Web/CSS/::slotted"
44421 "description": "The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."
44424 "name": "::spelling-error",
44425 "status": "experimental",
44428 "name": "MDN Reference",
44429 "url": "https://developer.mozilla.org/docs/Web/CSS/::spelling-error"
44432 "description": "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."
44440 /***/ (function(module, __webpack_exports__, __webpack_require__) {
44443 __webpack_require__.r(__webpack_exports__);
44444 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSDataProvider", function() { return CSSDataProvider; });
44445 /*---------------------------------------------------------------------------------------------
44446 * Copyright (c) Microsoft Corporation. All rights reserved.
44447 * Licensed under the MIT License. See License.txt in the project root for license information.
44448 *--------------------------------------------------------------------------------------------*/
44450 var CSSDataProvider = /** @class */ (function () {
44452 * Currently, unversioned data uses the V1 implementation
44453 * In the future when the provider handles multiple versions of HTML custom data,
44454 * use the latest implementation for unversioned data
44456 function CSSDataProvider(data) {
44457 this._properties = [];
44458 this._atDirectives = [];
44459 this._pseudoClasses = [];
44460 this._pseudoElements = [];
44461 this.addData(data);
44463 CSSDataProvider.prototype.provideProperties = function () {
44464 return this._properties;
44466 CSSDataProvider.prototype.provideAtDirectives = function () {
44467 return this._atDirectives;
44469 CSSDataProvider.prototype.providePseudoClasses = function () {
44470 return this._pseudoClasses;
44472 CSSDataProvider.prototype.providePseudoElements = function () {
44473 return this._pseudoElements;
44475 CSSDataProvider.prototype.addData = function (data) {
44476 if (Array.isArray(data.properties)) {
44477 for (var _i = 0, _a = data.properties; _i < _a.length; _i++) {
44479 if (isPropertyData(prop)) {
44480 this._properties.push(prop);
44484 if (Array.isArray(data.atDirectives)) {
44485 for (var _b = 0, _c = data.atDirectives; _b < _c.length; _b++) {
44487 if (isAtDirective(prop)) {
44488 this._atDirectives.push(prop);
44492 if (Array.isArray(data.pseudoClasses)) {
44493 for (var _d = 0, _e = data.pseudoClasses; _d < _e.length; _d++) {
44495 if (isPseudoClassData(prop)) {
44496 this._pseudoClasses.push(prop);
44500 if (Array.isArray(data.pseudoElements)) {
44501 for (var _f = 0, _g = data.pseudoElements; _f < _g.length; _f++) {
44503 if (isPseudoElementData(prop)) {
44504 this._pseudoElements.push(prop);
44509 return CSSDataProvider;
44512 function isPropertyData(d) {
44513 return typeof d.name === 'string';
44515 function isAtDirective(d) {
44516 return typeof d.name === 'string';
44518 function isPseudoClassData(d) {
44519 return typeof d.name === 'string';
44521 function isPseudoElementData(d) {
44522 return typeof d.name === 'string';
44528 /***/ (function(module, __webpack_exports__, __webpack_require__) {
44531 __webpack_require__.r(__webpack_exports__);
44532 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionRanges", function() { return getSelectionRanges; });
44533 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103);
44534 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
44535 /*---------------------------------------------------------------------------------------------
44536 * Copyright (c) Microsoft Corporation. All rights reserved.
44537 * Licensed under the MIT License. See License.txt in the project root for license information.
44538 *--------------------------------------------------------------------------------------------*/
44542 function getSelectionRanges(document, positions, stylesheet) {
44543 function getSelectionRange(position) {
44544 var applicableRanges = getApplicableRanges(position);
44545 var current = undefined;
44546 for (var index = applicableRanges.length - 1; index >= 0; index--) {
44547 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
44550 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(position, position));
44554 return positions.map(getSelectionRange);
44555 function getApplicableRanges(position) {
44556 var offset = document.offsetAt(position);
44557 var currNode = stylesheet.findChildAtOffset(offset, true);
44563 if (currNode.parent &&
44564 currNode.offset === currNode.parent.offset &&
44565 currNode.end === currNode.parent.end) {
44566 currNode = currNode.parent;
44569 // The `{ }` part of `.a { }`
44570 if (currNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Declarations) {
44571 if (offset > currNode.offset && offset < currNode.end) {
44572 // Return `{ }` and the range inside `{` and `}`
44573 result.push([currNode.offset + 1, currNode.end - 1]);
44576 result.push([currNode.offset, currNode.end]);
44577 currNode = currNode.parent;
44586 /***/ (function(module, __webpack_exports__, __webpack_require__) {
44589 __webpack_require__.r(__webpack_exports__);
44590 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSNavigation", function() { return SCSSNavigation; });
44591 /* harmony import */ var _cssNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(110);
44592 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
44593 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87);
44594 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92);
44595 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(107);
44596 /*---------------------------------------------------------------------------------------------
44597 * Copyright (c) Microsoft Corporation. All rights reserved.
44598 * Licensed under the MIT License. See License.txt in the project root for license information.
44599 *--------------------------------------------------------------------------------------------*/
44601 var __extends = (undefined && undefined.__extends) || (function () {
44602 var extendStatics = function (d, b) {
44603 extendStatics = Object.setPrototypeOf ||
44604 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
44605 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
44606 return extendStatics(d, b);
44608 return function (d, b) {
44609 extendStatics(d, b);
44610 function __() { this.constructor = d; }
44611 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44614 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
44615 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44616 return new (P || (P = Promise))(function (resolve, reject) {
44617 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44618 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44619 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44620 step((generator = generator.apply(thisArg, _arguments || [])).next());
44623 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
44624 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44625 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44626 function verb(n) { return function (v) { return step([n, v]); }; }
44627 function step(op) {
44628 if (f) throw new TypeError("Generator is already executing.");
44630 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;
44631 if (y = 0, t) op = [op[0] & 2, t.value];
44633 case 0: case 1: t = op; break;
44634 case 4: _.label++; return { value: op[1], done: false };
44635 case 5: _.label++; y = op[1]; op = [0]; continue;
44636 case 7: op = _.ops.pop(); _.trys.pop(); continue;
44638 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
44639 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
44640 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44641 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44642 if (t[2]) _.ops.pop();
44643 _.trys.pop(); continue;
44645 op = body.call(thisArg, _);
44646 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
44647 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
44655 var SCSSNavigation = /** @class */ (function (_super) {
44656 __extends(SCSSNavigation, _super);
44657 function SCSSNavigation(fileSystemProvider) {
44658 return _super.call(this, fileSystemProvider) || this;
44660 SCSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
44661 return (_super.prototype.isRawStringDocumentLinkNode.call(this, node) ||
44662 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Use ||
44663 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Forward);
44665 SCSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
44666 return __awaiter(this, void 0, void 0, function () {
44667 function toPathVariations(uri) {
44669 if (uri.path === '') {
44672 // No variation for links that ends with suffix
44673 if (uri.path.endsWith('.scss') || uri.path.endsWith('.css')) {
44676 // If a link is like a/, try resolving a/index.scss and a/_index.scss
44677 if (uri.path.endsWith('/')) {
44679 uri.with({ path: uri.path + 'index.scss' }).toString(),
44680 uri.with({ path: uri.path + '_index.scss' }).toString()
44683 // Use `uri.path` since it's normalized to use `/` in all platforms
44684 var pathFragments = uri.path.split('/');
44685 var basename = pathFragments[pathFragments.length - 1];
44686 var pathWithoutBasename = uri.path.slice(0, -basename.length);
44687 // No variation for links such as _a
44688 if (basename.startsWith('_')) {
44689 if (uri.path.endsWith('.scss')) {
44693 return [uri.with({ path: uri.path + '.scss' }).toString()];
44696 var normalizedBasename = basename + '.scss';
44697 var documentUriWithBasename = function (newBasename) {
44698 return uri.with({ path: pathWithoutBasename + newBasename }).toString();
44700 var normalizedPath = documentUriWithBasename(normalizedBasename);
44701 var underScorePath = documentUriWithBasename('_' + normalizedBasename);
44702 var indexPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/index.scss');
44703 var indexUnderscoreUri = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/_index.scss');
44704 var cssPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '.css');
44705 return [normalizedPath, underScorePath, indexPath, indexUnderscoreUri, cssPath];
44707 var target, parsedUri, pathVariations, j, e_1;
44708 return __generator(this, function (_a) {
44709 switch (_a.label) {
44711 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"])(ref, 'sass:')) {
44712 return [2 /*return*/, undefined]; // sass library
44714 return [4 /*yield*/, _super.prototype.resolveRelativeReference.call(this, ref, documentUri, documentContext)];
44716 target = _a.sent();
44717 if (!(this.fileSystemProvider && target && Object(_utils_resources__WEBPACK_IMPORTED_MODULE_4__["extname"])(target).length === 0)) return [3 /*break*/, 8];
44720 _a.trys.push([2, 7, , 8]);
44721 parsedUri = vscode_uri__WEBPACK_IMPORTED_MODULE_2__["URI"].parse(target);
44722 pathVariations = toPathVariations(parsedUri);
44723 if (!pathVariations) return [3 /*break*/, 6];
44727 if (!(j < pathVariations.length)) return [3 /*break*/, 6];
44728 return [4 /*yield*/, this.fileExists(pathVariations[j])];
44731 return [2 /*return*/, pathVariations[j]];
44736 return [3 /*break*/, 3];
44737 case 6: return [2 /*return*/, undefined];
44740 return [3 /*break*/, 8];
44741 case 8: return [2 /*return*/, target];
44746 return SCSSNavigation;
44747 }(_cssNavigation__WEBPACK_IMPORTED_MODULE_0__["CSSNavigation"]));
44753 /***/ (function(module, exports, __webpack_require__) {
44757 /*---------------------------------------------------------------------------------------------
44758 * Copyright (c) Microsoft Corporation. All rights reserved.
44759 * Licensed under the MIT License. See License.txt in the project root for license information.
44760 *--------------------------------------------------------------------------------------------*/
44761 Object.defineProperty(exports, "__esModule", { value: true });
44762 exports.getLanguageModelCache = void 0;
44763 function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
44764 let languageModels = {};
44766 let cleanupInterval = undefined;
44767 if (cleanupIntervalTimeInSec > 0) {
44768 cleanupInterval = setInterval(() => {
44769 let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
44770 let uris = Object.keys(languageModels);
44771 for (let uri of uris) {
44772 let languageModelInfo = languageModels[uri];
44773 if (languageModelInfo.cTime < cutoffTime) {
44774 delete languageModels[uri];
44778 }, cleanupIntervalTimeInSec * 1000);
44782 let version = document.version;
44783 let languageId = document.languageId;
44784 let languageModelInfo = languageModels[document.uri];
44785 if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
44786 languageModelInfo.cTime = Date.now();
44787 return languageModelInfo.languageModel;
44789 let languageModel = parse(document);
44790 languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
44791 if (!languageModelInfo) {
44794 if (nModels === maxEntries) {
44795 let oldestTime = Number.MAX_VALUE;
44796 let oldestUri = null;
44797 for (let uri in languageModels) {
44798 let languageModelInfo = languageModels[uri];
44799 if (languageModelInfo.cTime < oldestTime) {
44801 oldestTime = languageModelInfo.cTime;
44805 delete languageModels[oldestUri];
44809 return languageModel;
44811 onDocumentRemoved(document) {
44812 let uri = document.uri;
44813 if (languageModels[uri]) {
44814 delete languageModels[uri];
44819 if (typeof cleanupInterval !== 'undefined') {
44820 clearInterval(cleanupInterval);
44821 cleanupInterval = undefined;
44822 languageModels = {};
44828 exports.getLanguageModelCache = getLanguageModelCache;
44833 /***/ (function(module, exports, __webpack_require__) {
44837 /*---------------------------------------------------------------------------------------------
44838 * Copyright (c) Microsoft Corporation. All rights reserved.
44839 * Licensed under the MIT License. See License.txt in the project root for license information.
44840 *--------------------------------------------------------------------------------------------*/
44841 Object.defineProperty(exports, "__esModule", { value: true });
44842 exports.getDocumentContext = void 0;
44843 const strings_1 = __webpack_require__(131);
44844 const requests_1 = __webpack_require__(132);
44845 function getDocumentContext(documentUri, workspaceFolders) {
44846 function getRootFolder() {
44847 for (let folder of workspaceFolders) {
44848 let folderURI = folder.uri;
44849 if (!strings_1.endsWith(folderURI, '/')) {
44850 folderURI = folderURI + '/';
44852 if (strings_1.startsWith(documentUri, folderURI)) {
44859 resolveReference: (ref, base = documentUri) => {
44860 if (ref[0] === '/') { // resolve absolute path against the current workspace folder
44861 let folderUri = getRootFolder();
44863 return folderUri + ref.substr(1);
44866 base = base.substr(0, base.lastIndexOf('/') + 1);
44867 return requests_1.resolvePath(base, ref);
44871 exports.getDocumentContext = getDocumentContext;
44876 /***/ (function(module, exports, __webpack_require__) {
44880 /*---------------------------------------------------------------------------------------------
44881 * Copyright (c) Microsoft Corporation. All rights reserved.
44882 * Licensed under the MIT License. See License.txt in the project root for license information.
44883 *--------------------------------------------------------------------------------------------*/
44884 Object.defineProperty(exports, "__esModule", { value: true });
44885 exports.endsWith = exports.startsWith = void 0;
44886 function startsWith(haystack, needle) {
44887 if (haystack.length < needle.length) {
44890 for (let i = 0; i < needle.length; i++) {
44891 if (haystack[i] !== needle[i]) {
44897 exports.startsWith = startsWith;
44899 * Determines if haystack ends with needle.
44901 function endsWith(haystack, needle) {
44902 let diff = haystack.length - needle.length;
44904 return haystack.lastIndexOf(needle) === diff;
44906 else if (diff === 0) {
44907 return haystack === needle;
44913 exports.endsWith = endsWith;
44918 /***/ (function(module, exports, __webpack_require__) {
44922 /*---------------------------------------------------------------------------------------------
44923 * Copyright (c) Microsoft Corporation. All rights reserved.
44924 * Licensed under the MIT License. See License.txt in the project root for license information.
44925 *--------------------------------------------------------------------------------------------*/
44926 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
44927 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44928 return new (P || (P = Promise))(function (resolve, reject) {
44929 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44930 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44931 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44932 step((generator = generator.apply(thisArg, _arguments || [])).next());
44935 Object.defineProperty(exports, "__esModule", { value: true });
44936 exports.joinPath = exports.normalizePath = exports.resolvePath = exports.isAbsolutePath = exports.extname = exports.basename = exports.dirname = exports.getScheme = exports.getRequestService = exports.FileType = exports.FsReadDirRequest = exports.FsStatRequest = exports.FsContentRequest = void 0;
44937 const vscode_uri_1 = __webpack_require__(87);
44938 const vscode_languageserver_1 = __webpack_require__(36);
44939 var FsContentRequest;
44940 (function (FsContentRequest) {
44941 FsContentRequest.type = new vscode_languageserver_1.RequestType('fs/content');
44942 })(FsContentRequest = exports.FsContentRequest || (exports.FsContentRequest = {}));
44944 (function (FsStatRequest) {
44945 FsStatRequest.type = new vscode_languageserver_1.RequestType('fs/stat');
44946 })(FsStatRequest = exports.FsStatRequest || (exports.FsStatRequest = {}));
44947 var FsReadDirRequest;
44948 (function (FsReadDirRequest) {
44949 FsReadDirRequest.type = new vscode_languageserver_1.RequestType('fs/readDir');
44950 })(FsReadDirRequest = exports.FsReadDirRequest || (exports.FsReadDirRequest = {}));
44952 (function (FileType) {
44954 * The file type is unknown.
44956 FileType[FileType["Unknown"] = 0] = "Unknown";
44960 FileType[FileType["File"] = 1] = "File";
44964 FileType[FileType["Directory"] = 2] = "Directory";
44966 * A symbolic link to a file.
44968 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
44969 })(FileType = exports.FileType || (exports.FileType = {}));
44970 function getRequestService(handledSchemas, connection, runtime) {
44971 const builtInHandlers = {};
44972 for (let protocol of handledSchemas) {
44973 if (protocol === 'file') {
44974 builtInHandlers[protocol] = runtime.file;
44976 else if (protocol === 'http' || protocol === 'https') {
44977 builtInHandlers[protocol] = runtime.http;
44982 return __awaiter(this, void 0, void 0, function* () {
44983 const handler = builtInHandlers[getScheme(uri)];
44985 return handler.stat(uri);
44987 const res = yield connection.sendRequest(FsStatRequest.type, uri.toString());
44991 readDirectory(uri) {
44992 const handler = builtInHandlers[getScheme(uri)];
44994 return handler.readDirectory(uri);
44996 return connection.sendRequest(FsReadDirRequest.type, uri.toString());
44998 getContent(uri, encoding) {
44999 const handler = builtInHandlers[getScheme(uri)];
45001 return handler.getContent(uri, encoding);
45003 return connection.sendRequest(FsContentRequest.type, { uri: uri.toString(), encoding });
45007 exports.getRequestService = getRequestService;
45008 function getScheme(uri) {
45009 return uri.substr(0, uri.indexOf(':'));
45011 exports.getScheme = getScheme;
45012 function dirname(uri) {
45013 const lastIndexOfSlash = uri.lastIndexOf('/');
45014 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
45016 exports.dirname = dirname;
45017 function basename(uri) {
45018 const lastIndexOfSlash = uri.lastIndexOf('/');
45019 return uri.substr(lastIndexOfSlash + 1);
45021 exports.basename = basename;
45022 const Slash = '/'.charCodeAt(0);
45023 const Dot = '.'.charCodeAt(0);
45024 function extname(uri) {
45025 for (let i = uri.length - 1; i >= 0; i--) {
45026 const ch = uri.charCodeAt(i);
45028 if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
45029 return uri.substr(i);
45035 else if (ch === Slash) {
45041 exports.extname = extname;
45042 function isAbsolutePath(path) {
45043 return path.charCodeAt(0) === Slash;
45045 exports.isAbsolutePath = isAbsolutePath;
45046 function resolvePath(uriString, path) {
45047 if (isAbsolutePath(path)) {
45048 const uri = vscode_uri_1.URI.parse(uriString);
45049 const parts = path.split('/');
45050 return uri.with({ path: normalizePath(parts) }).toString();
45052 return joinPath(uriString, path);
45054 exports.resolvePath = resolvePath;
45055 function normalizePath(parts) {
45056 const newParts = [];
45057 for (const part of parts) {
45058 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
45061 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
45065 newParts.push(part);
45068 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
45071 let res = newParts.join('/');
45072 if (parts[0].length === 0) {
45077 exports.normalizePath = normalizePath;
45078 function joinPath(uriString, ...paths) {
45079 const uri = vscode_uri_1.URI.parse(uriString);
45080 const parts = uri.path.split('/');
45081 for (let path of paths) {
45082 parts.push(...path.split('/'));
45084 return uri.with({ path: normalizePath(parts) }).toString();
45086 exports.joinPath = joinPath;
45091 /***/ (function(module, exports, __webpack_require__) {
45095 /*---------------------------------------------------------------------------------------------
45096 * Copyright (c) Microsoft Corporation. All rights reserved.
45097 * Licensed under the MIT License. See License.txt in the project root for license information.
45098 *--------------------------------------------------------------------------------------------*/
45099 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
45100 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45101 return new (P || (P = Promise))(function (resolve, reject) {
45102 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45103 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45104 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45105 step((generator = generator.apply(thisArg, _arguments || [])).next());
45108 Object.defineProperty(exports, "__esModule", { value: true });
45109 exports.fetchDataProviders = void 0;
45110 const vscode_css_languageservice_1 = __webpack_require__(88);
45111 function fetchDataProviders(dataPaths, requestService) {
45112 const providers = dataPaths.map((p) => __awaiter(this, void 0, void 0, function* () {
45114 const content = yield requestService.getContent(p);
45115 return parseCSSData(content);
45118 return vscode_css_languageservice_1.newCSSDataProvider({ version: 1 });
45121 return Promise.all(providers);
45123 exports.fetchDataProviders = fetchDataProviders;
45124 function parseCSSData(source) {
45127 rawData = JSON.parse(source);
45130 return vscode_css_languageservice_1.newCSSDataProvider({ version: 1 });
45132 return vscode_css_languageservice_1.newCSSDataProvider({
45133 version: rawData.version || 1,
45134 properties: rawData.properties || [],
45135 atDirectives: rawData.atDirectives || [],
45136 pseudoClasses: rawData.pseudoClasses || [],
45137 pseudoElements: rawData.pseudoElements || []
45144 /***/ (function(module, exports, __webpack_require__) {
45148 /*---------------------------------------------------------------------------------------------
45149 * Copyright (c) Microsoft Corporation. All rights reserved.
45150 * Licensed under the MIT License. See License.txt in the project root for license information.
45151 *--------------------------------------------------------------------------------------------*/
45152 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
45153 if (k2 === undefined) k2 = k;
45154 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
45155 }) : (function(o, m, k, k2) {
45156 if (k2 === undefined) k2 = k;
45159 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
45160 Object.defineProperty(o, "default", { enumerable: true, value: v });
45161 }) : function(o, v) {
45164 var __importStar = (this && this.__importStar) || function (mod) {
45165 if (mod && mod.__esModule) return mod;
45167 if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
45168 __setModuleDefault(result, mod);
45171 Object.defineProperty(exports, "__esModule", { value: true });
45172 exports.getNodeFSRequestService = void 0;
45173 const requests_1 = __webpack_require__(132);
45174 const vscode_uri_1 = __webpack_require__(87);
45175 const fs = __importStar(__webpack_require__(80));
45176 const vscode_css_languageservice_1 = __webpack_require__(88);
45177 function getNodeFSRequestService() {
45178 function ensureFileUri(location) {
45179 if (requests_1.getScheme(location) !== 'file') {
45180 throw new Error('fileRequestService can only handle file URLs');
45184 getContent(location, encoding) {
45185 ensureFileUri(location);
45186 return new Promise((c, e) => {
45187 const uri = vscode_uri_1.URI.parse(location);
45188 fs.readFile(uri.fsPath, encoding, (err, buf) => {
45197 ensureFileUri(location);
45198 return new Promise((c, e) => {
45199 const uri = vscode_uri_1.URI.parse(location);
45200 fs.stat(uri.fsPath, (err, stats) => {
45202 if (err.code === 'ENOENT') {
45203 return c({ type: vscode_css_languageservice_1.FileType.Unknown, ctime: -1, mtime: -1, size: -1 });
45209 let type = vscode_css_languageservice_1.FileType.Unknown;
45210 if (stats.isFile()) {
45211 type = vscode_css_languageservice_1.FileType.File;
45213 else if (stats.isDirectory()) {
45214 type = vscode_css_languageservice_1.FileType.Directory;
45216 else if (stats.isSymbolicLink()) {
45217 type = vscode_css_languageservice_1.FileType.SymbolicLink;
45221 ctime: stats.ctime.getTime(),
45222 mtime: stats.mtime.getTime(),
45228 readDirectory(location) {
45229 ensureFileUri(location);
45230 return new Promise((c, e) => {
45231 const path = vscode_uri_1.URI.parse(location).fsPath;
45232 fs.readdir(path, { withFileTypes: true }, (err, children) => {
45236 c(children.map(stat => {
45237 if (stat.isSymbolicLink()) {
45238 return [stat.name, vscode_css_languageservice_1.FileType.SymbolicLink];
45240 else if (stat.isDirectory()) {
45241 return [stat.name, vscode_css_languageservice_1.FileType.Directory];
45243 else if (stat.isFile()) {
45244 return [stat.name, vscode_css_languageservice_1.FileType.File];
45247 return [stat.name, vscode_css_languageservice_1.FileType.Unknown];
45255 exports.getNodeFSRequestService = getNodeFSRequestService;