1 (function(e, a) { for(var i in a) e[i] = a[i]; if(a.__esModule) Object.defineProperty(e, "__esModule", { value: true }); }(exports,
2 /******/ (() => { // webpackBootstrap
4 /******/ var __webpack_modules__ = ([
11 module.exports = require("path");;
27 module.exports = require("os");;
33 module.exports = require("crypto");;
39 module.exports = require("net");;
60 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
63 /*---------------------------------------------------------------------------------------------
64 * Copyright (c) Microsoft Corporation. All rights reserved.
65 * Licensed under the MIT License. See License.txt in the project root for license information.
66 *--------------------------------------------------------------------------------------------*/
67 Object.defineProperty(exports, "__esModule", ({ value: true }));
68 const node_1 = __webpack_require__(35);
69 const runner_1 = __webpack_require__(85);
70 const cssServer_1 = __webpack_require__(86);
71 const nodeFs_1 = __webpack_require__(136);
72 // Create a connection for the server.
73 const connection = node_1.createConnection();
74 console.log = connection.console.log.bind(connection.console);
75 console.error = connection.console.error.bind(connection.console);
76 process.on('unhandledRejection', (e) => {
77 connection.console.error(runner_1.formatError(`Unhandled exception`, e));
79 cssServer_1.startServer(connection, { file: nodeFs_1.getNodeFSRequestService() });
84 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
86 /* --------------------------------------------------------------------------------------------
87 * Copyright (c) Microsoft Corporation. All rights reserved.
88 * Licensed under the MIT License. See License.txt in the project root for license information.
89 * ----------------------------------------------------------------------------------------- */
92 module.exports = __webpack_require__(36);
96 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
99 /* --------------------------------------------------------------------------------------------
100 * Copyright (c) Microsoft Corporation. All rights reserved.
101 * Licensed under the MIT License. See License.txt in the project root for license information.
102 * ------------------------------------------------------------------------------------------ */
103 /// <reference path="../../typings/thenable.d.ts" />
104 function __export(m) {
105 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
107 Object.defineProperty(exports, "__esModule", ({ value: true }));
108 const Is = __webpack_require__(37);
109 const server_1 = __webpack_require__(38);
110 const fm = __webpack_require__(78);
111 const node_1 = __webpack_require__(82);
112 __export(__webpack_require__(83));
115 Files.uriToFilePath = fm.uriToFilePath;
116 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
117 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
118 Files.resolve = fm.resolve;
119 Files.resolveModulePath = fm.resolveModulePath;
120 })(Files = exports.Files || (exports.Files = {}));
121 let _shutdownReceived = false;
122 let exitTimer = undefined;
123 function setupExitTimer() {
124 const argName = '--clientProcessId';
125 function runTimer(value) {
127 let processId = parseInt(value);
128 if (!isNaN(processId)) {
129 exitTimer = setInterval(() => {
131 process.kill(processId, 0);
134 // Parent process doesn't exist anymore. Exit the server.
135 process.exit(_shutdownReceived ? 0 : 1);
144 for (let i = 2; i < process.argv.length; i++) {
145 let arg = process.argv[i];
146 if (arg === argName && i + 1 < process.argv.length) {
147 runTimer(process.argv[i + 1]);
151 let args = arg.split('=');
152 if (args[0] === argName) {
160 initialize: (params) => {
161 const processId = params.processId;
162 if (Is.number(processId) && exitTimer === undefined) {
163 // We received a parent process id. Set up a timer to periodically check
164 // if the parent is still alive.
167 process.kill(processId, 0);
170 // Parent process doesn't exist anymore. Exit the server.
171 process.exit(_shutdownReceived ? 0 : 1);
176 get shutdownReceived() {
177 return _shutdownReceived;
179 set shutdownReceived(value) {
180 _shutdownReceived = value;
186 function createConnection(arg1, arg2, arg3, arg4) {
191 if (arg1 !== void 0 && arg1.__brand === 'features') {
197 if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
205 return _createConnection(input, output, options, factories);
207 exports.createConnection = createConnection;
208 function _createConnection(input, output, options, factories) {
209 if (!input && !output && process.argv.length > 2) {
211 let pipeName = void 0;
212 let argv = process.argv.slice(2);
213 for (let i = 0; i < argv.length; i++) {
215 if (arg === '--node-ipc') {
216 input = new node_1.IPCMessageReader(process);
217 output = new node_1.IPCMessageWriter(process);
220 else if (arg === '--stdio') {
221 input = process.stdin;
222 output = process.stdout;
225 else if (arg === '--socket') {
226 port = parseInt(argv[i + 1]);
229 else if (arg === '--pipe') {
230 pipeName = argv[i + 1];
234 var args = arg.split('=');
235 if (args[0] === '--socket') {
236 port = parseInt(args[1]);
239 else if (args[0] === '--pipe') {
246 let transport = node_1.createServerSocketTransport(port);
247 input = transport[0];
248 output = transport[1];
251 let transport = node_1.createServerPipeTransport(pipeName);
252 input = transport[0];
253 output = transport[1];
256 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
258 throw new Error('Connection input stream is not set. ' + commandLineMessage);
261 throw new Error('Connection output stream is not set. ' + commandLineMessage);
263 // Backwards compatibility
264 if (Is.func(input.read) && Is.func(input.on)) {
265 let inputStream = input;
266 inputStream.on('end', () => {
267 process.exit(_shutdownReceived ? 0 : 1);
269 inputStream.on('close', () => {
270 process.exit(_shutdownReceived ? 0 : 1);
273 const connectionFactory = (logger) => {
274 return node_1.createProtocolConnection(input, output, logger, options);
276 return server_1.createConnection(connectionFactory, watchDog, factories);
278 //# sourceMappingURL=main.js.map
282 /***/ ((__unused_webpack_module, exports) => {
285 /* --------------------------------------------------------------------------------------------
286 * Copyright (c) Microsoft Corporation. All rights reserved.
287 * Licensed under the MIT License. See License.txt in the project root for license information.
288 * ------------------------------------------------------------------------------------------ */
289 Object.defineProperty(exports, "__esModule", ({ value: true }));
290 function boolean(value) {
291 return value === true || value === false;
293 exports.boolean = boolean;
294 function string(value) {
295 return typeof value === 'string' || value instanceof String;
297 exports.string = string;
298 function number(value) {
299 return typeof value === 'number' || value instanceof Number;
301 exports.number = number;
302 function error(value) {
303 return value instanceof Error;
305 exports.error = error;
306 function func(value) {
307 return typeof value === 'function';
310 function array(value) {
311 return Array.isArray(value);
313 exports.array = array;
314 function stringArray(value) {
315 return array(value) && value.every(elem => string(elem));
317 exports.stringArray = stringArray;
318 function typedArray(value, check) {
319 return Array.isArray(value) && value.every(check);
321 exports.typedArray = typedArray;
322 function thenable(value) {
323 return value && func(value.then);
325 exports.thenable = thenable;
326 //# sourceMappingURL=is.js.map
330 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
333 /* --------------------------------------------------------------------------------------------
334 * Copyright (c) Microsoft Corporation. All rights reserved.
335 * Licensed under the MIT License. See License.txt in the project root for license information.
336 * ------------------------------------------------------------------------------------------ */
337 Object.defineProperty(exports, "__esModule", ({ value: true }));
338 const vscode_languageserver_protocol_1 = __webpack_require__(39);
339 const Is = __webpack_require__(37);
340 const UUID = __webpack_require__(73);
341 const progress_1 = __webpack_require__(74);
342 const configuration_1 = __webpack_require__(75);
343 const workspaceFolders_1 = __webpack_require__(76);
344 const callHierarchy_1 = __webpack_require__(77);
345 function null2Undefined(value) {
346 if (value === null) {
352 * A manager for simple text documents
354 class TextDocuments {
356 * Create a new text document manager.
358 constructor(configuration) {
359 this._documents = Object.create(null);
360 this._configuration = configuration;
361 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
362 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
363 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
364 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
365 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
368 * An event that fires when a text document managed by this manager
369 * has been opened or the content changes.
371 get onDidChangeContent() {
372 return this._onDidChangeContent.event;
375 * An event that fires when a text document managed by this manager
379 return this._onDidOpen.event;
382 * An event that fires when a text document managed by this manager
386 return this._onWillSave.event;
389 * Sets a handler that will be called if a participant wants to provide
390 * edits during a text document save.
392 onWillSaveWaitUntil(handler) {
393 this._willSaveWaitUntil = handler;
396 * An event that fires when a text document managed by this manager
400 return this._onDidSave.event;
403 * An event that fires when a text document managed by this manager
407 return this._onDidClose.event;
410 * Returns the document for the given URI. Returns undefined if
411 * the document is not mananged by this instance.
413 * @param uri The text document's URI to retrieve.
414 * @return the text document or `undefined`.
417 return this._documents[uri];
420 * Returns all text documents managed by this instance.
422 * @return all text documents.
425 return Object.keys(this._documents).map(key => this._documents[key]);
428 * Returns the URIs of all text documents managed by this instance.
430 * @return the URI's of all text documents.
433 return Object.keys(this._documents);
436 * Listens for `low level` notification on the given connection to
437 * update the text documents managed by this instance.
439 * Please note that the connection only provides handlers not an event model. Therefore
440 * listening on a connection will overwrite the following handlers on a connection:
441 * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
442 * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
444 * Use the correspnding events on the TextDocuments instance instead.
446 * @param connection The connection to listen on.
449 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
450 connection.onDidOpenTextDocument((event) => {
451 let td = event.textDocument;
452 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
453 this._documents[td.uri] = document;
454 let toFire = Object.freeze({ document });
455 this._onDidOpen.fire(toFire);
456 this._onDidChangeContent.fire(toFire);
458 connection.onDidChangeTextDocument((event) => {
459 let td = event.textDocument;
460 let changes = event.contentChanges;
461 if (changes.length === 0) {
464 let document = this._documents[td.uri];
465 const { version } = td;
466 if (version === null || version === undefined) {
467 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
469 document = this._configuration.update(document, changes, version);
470 this._documents[td.uri] = document;
471 this._onDidChangeContent.fire(Object.freeze({ document }));
473 connection.onDidCloseTextDocument((event) => {
474 let document = this._documents[event.textDocument.uri];
476 delete this._documents[event.textDocument.uri];
477 this._onDidClose.fire(Object.freeze({ document }));
480 connection.onWillSaveTextDocument((event) => {
481 let document = this._documents[event.textDocument.uri];
483 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
486 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
487 let document = this._documents[event.textDocument.uri];
488 if (document && this._willSaveWaitUntil) {
489 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
495 connection.onDidSaveTextDocument((event) => {
496 let document = this._documents[event.textDocument.uri];
498 this._onDidSave.fire(Object.freeze({ document }));
503 exports.TextDocuments = TextDocuments;
505 * Helps tracking error message. Equal occurences of the same
506 * message are only stored once. This class is for example
507 * useful if text documents are validated in a loop and equal
508 * error message should be folded into one.
510 class ErrorMessageTracker {
512 this._messages = Object.create(null);
515 * Add a message to the tracker.
517 * @param message The message to add.
520 let count = this._messages[message];
525 this._messages[message] = count;
528 * Send all tracked messages to the connection's window.
530 * @param connection The connection established between client and server.
532 sendErrors(connection) {
533 Object.keys(this._messages).forEach(message => {
534 connection.window.showErrorMessage(message);
538 exports.ErrorMessageTracker = ErrorMessageTracker;
539 class RemoteConsoleImpl {
542 rawAttach(connection) {
543 this._rawConnection = connection;
546 this._connection = connection;
549 if (!this._connection) {
550 throw new Error('Remote is not attached to a connection yet.');
552 return this._connection;
554 fillServerCapabilities(_capabilities) {
556 initialize(_capabilities) {
559 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
562 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
565 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
568 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
570 send(type, message) {
571 if (this._rawConnection) {
572 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
576 class _RemoteWindowImpl {
580 this._connection = connection;
583 if (!this._connection) {
584 throw new Error('Remote is not attached to a connection yet.');
586 return this._connection;
588 initialize(_capabilities) {
590 fillServerCapabilities(_capabilities) {
592 showErrorMessage(message, ...actions) {
593 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
594 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
596 showWarningMessage(message, ...actions) {
597 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
598 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
600 showInformationMessage(message, ...actions) {
601 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
602 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
605 const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
606 var BulkRegistration;
607 (function (BulkRegistration) {
609 * Creates a new bulk registration.
610 * @return an empty bulk registration.
613 return new BulkRegistrationImpl();
615 BulkRegistration.create = create;
616 })(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
617 class BulkRegistrationImpl {
619 this._registrations = [];
620 this._registered = new Set();
622 add(type, registerOptions) {
623 const method = Is.string(type) ? type : type.method;
624 if (this._registered.has(method)) {
625 throw new Error(`${method} is already added to this registration`);
627 const id = UUID.generateUuid();
628 this._registrations.push({
631 registerOptions: registerOptions || {}
633 this._registered.add(method);
635 asRegistrationParams() {
637 registrations: this._registrations
641 var BulkUnregistration;
642 (function (BulkUnregistration) {
644 return new BulkUnregistrationImpl(undefined, []);
646 BulkUnregistration.create = create;
647 })(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
648 class BulkUnregistrationImpl {
649 constructor(_connection, unregistrations) {
650 this._connection = _connection;
651 this._unregistrations = new Map();
652 unregistrations.forEach(unregistration => {
653 this._unregistrations.set(unregistration.method, unregistration);
657 return !!this._connection;
660 this._connection = connection;
662 add(unregistration) {
663 this._unregistrations.set(unregistration.method, unregistration);
666 let unregistrations = [];
667 for (let unregistration of this._unregistrations.values()) {
668 unregistrations.push(unregistration);
671 unregisterations: unregistrations
673 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
674 this._connection.console.info(`Bulk unregistration failed.`);
678 const method = Is.string(arg) ? arg : arg.method;
679 const unregistration = this._unregistrations.get(method);
680 if (!unregistration) {
684 unregisterations: [unregistration]
686 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
687 this._unregistrations.delete(method);
689 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
694 class RemoteClientImpl {
696 this._connection = connection;
699 if (!this._connection) {
700 throw new Error('Remote is not attached to a connection yet.');
702 return this._connection;
704 initialize(_capabilities) {
706 fillServerCapabilities(_capabilities) {
708 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
709 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
710 return this.registerMany(typeOrRegistrations);
712 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
713 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
716 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
719 registerSingle1(unregistration, type, registerOptions) {
720 const method = Is.string(type) ? type : type.method;
721 const id = UUID.generateUuid();
723 registrations: [{ id, method, registerOptions: registerOptions || {} }]
725 if (!unregistration.isAttached) {
726 unregistration.attach(this.connection);
728 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
729 unregistration.add({ id: id, method: method });
730 return unregistration;
732 this.connection.console.info(`Registering request handler for ${method} failed.`);
733 return Promise.reject(_error);
736 registerSingle2(type, registerOptions) {
737 const method = Is.string(type) ? type : type.method;
738 const id = UUID.generateUuid();
740 registrations: [{ id, method, registerOptions: registerOptions || {} }]
742 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
743 return vscode_languageserver_protocol_1.Disposable.create(() => {
744 this.unregisterSingle(id, method);
747 this.connection.console.info(`Registering request handler for ${method} failed.`);
748 return Promise.reject(_error);
751 unregisterSingle(id, method) {
753 unregisterations: [{ id, method }]
755 return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
756 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
759 registerMany(registrations) {
760 let params = registrations.asRegistrationParams();
761 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
762 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
764 this.connection.console.info(`Bulk registration failed.`);
765 return Promise.reject(_error);
769 class _RemoteWorkspaceImpl {
773 this._connection = connection;
776 if (!this._connection) {
777 throw new Error('Remote is not attached to a connection yet.');
779 return this._connection;
781 initialize(_capabilities) {
783 fillServerCapabilities(_capabilities) {
785 applyEdit(paramOrEdit) {
786 function isApplyWorkspaceEditParams(value) {
787 return value && !!value.edit;
789 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
790 return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
793 const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
796 this._trace = vscode_languageserver_protocol_1.Trace.Off;
799 this._connection = connection;
802 if (!this._connection) {
803 throw new Error('Remote is not attached to a connection yet.');
805 return this._connection;
807 initialize(_capabilities) {
809 fillServerCapabilities(_capabilities) {
814 log(message, verbose) {
815 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
818 this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
820 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
824 class TelemetryImpl {
828 this._connection = connection;
831 if (!this._connection) {
832 throw new Error('Remote is not attached to a connection yet.');
834 return this._connection;
836 initialize(_capabilities) {
838 fillServerCapabilities(_capabilities) {
841 this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
844 class _LanguagesImpl {
848 this._connection = connection;
851 if (!this._connection) {
852 throw new Error('Remote is not attached to a connection yet.');
854 return this._connection;
856 initialize(_capabilities) {
858 fillServerCapabilities(_capabilities) {
860 attachWorkDoneProgress(params) {
861 return progress_1.attachWorkDone(this.connection, params);
863 attachPartialResultProgress(_type, params) {
864 return progress_1.attachPartialResult(this.connection, params);
867 exports._LanguagesImpl = _LanguagesImpl;
868 const LanguagesImpl = callHierarchy_1.CallHierarchyFeature(_LanguagesImpl);
869 function combineConsoleFeatures(one, two) {
870 return function (Base) {
871 return two(one(Base));
874 exports.combineConsoleFeatures = combineConsoleFeatures;
875 function combineTelemetryFeatures(one, two) {
876 return function (Base) {
877 return two(one(Base));
880 exports.combineTelemetryFeatures = combineTelemetryFeatures;
881 function combineTracerFeatures(one, two) {
882 return function (Base) {
883 return two(one(Base));
886 exports.combineTracerFeatures = combineTracerFeatures;
887 function combineClientFeatures(one, two) {
888 return function (Base) {
889 return two(one(Base));
892 exports.combineClientFeatures = combineClientFeatures;
893 function combineWindowFeatures(one, two) {
894 return function (Base) {
895 return two(one(Base));
898 exports.combineWindowFeatures = combineWindowFeatures;
899 function combineWorkspaceFeatures(one, two) {
900 return function (Base) {
901 return two(one(Base));
904 exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
905 function combineLanguagesFeatures(one, two) {
906 return function (Base) {
907 return two(one(Base));
910 exports.combineLanguagesFeatures = combineLanguagesFeatures;
911 function combineFeatures(one, two) {
912 function combine(one, two, func) {
914 return func(one, two);
925 console: combine(one.console, two.console, combineConsoleFeatures),
926 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
927 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
928 client: combine(one.client, two.client, combineClientFeatures),
929 window: combine(one.window, two.window, combineWindowFeatures),
930 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
934 exports.combineFeatures = combineFeatures;
935 function createConnection(connectionFactory, watchDog, factories) {
936 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
937 const connection = connectionFactory(logger);
938 logger.rawAttach(connection);
939 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
940 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
941 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
942 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
943 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
944 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
945 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
946 function asPromise(value) {
947 if (value instanceof Promise) {
950 else if (Is.thenable(value)) {
951 return new Promise((resolve, reject) => {
952 value.then((resolved) => resolve(resolved), (error) => reject(error));
956 return Promise.resolve(value);
959 let shutdownHandler = undefined;
960 let initializeHandler = undefined;
961 let exitHandler = undefined;
962 let protocolConnection = {
963 listen: () => connection.listen(),
964 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
965 onRequest: (type, handler) => connection.onRequest(type, handler),
966 sendNotification: (type, param) => {
967 const method = Is.string(type) ? type : type.method;
968 if (arguments.length === 1) {
969 connection.sendNotification(method);
972 connection.sendNotification(method, param);
975 onNotification: (type, handler) => connection.onNotification(type, handler),
976 onProgress: connection.onProgress,
977 sendProgress: connection.sendProgress,
978 onInitialize: (handler) => initializeHandler = handler,
979 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
980 onShutdown: (handler) => shutdownHandler = handler,
981 onExit: (handler) => exitHandler = handler,
982 get console() { return logger; },
983 get telemetry() { return telemetry; },
984 get tracer() { return tracer; },
985 get client() { return client; },
986 get window() { return remoteWindow; },
987 get workspace() { return workspace; },
988 get languages() { return languages; },
989 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
990 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
991 __textDocumentSync: undefined,
992 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
993 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
994 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
995 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
996 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
997 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
998 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
999 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
1000 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1002 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
1003 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1005 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
1006 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
1007 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1009 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
1010 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1012 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
1013 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1015 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
1016 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1018 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
1019 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1021 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
1022 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1024 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
1025 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1027 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
1028 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1030 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
1031 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1033 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
1034 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1036 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
1037 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1039 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
1040 return handler(params, cancel);
1042 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
1043 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1045 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
1046 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1048 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
1049 return handler(params, cancel);
1051 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
1052 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1054 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
1055 return handler(params, cancel);
1057 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
1058 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1060 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
1061 return handler(params, cancel);
1063 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
1064 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1066 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
1067 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1069 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
1070 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1072 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
1073 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
1075 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
1076 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
1078 dispose: () => connection.dispose()
1080 for (let remote of allRemotes) {
1081 remote.attach(protocolConnection);
1083 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
1084 watchDog.initialize(params);
1085 if (Is.string(params.trace)) {
1086 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
1088 for (let remote of allRemotes) {
1089 remote.initialize(params.capabilities);
1091 if (initializeHandler) {
1092 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
1093 return asPromise(result).then((value) => {
1094 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
1099 result = { capabilities: {} };
1101 let capabilities = result.capabilities;
1102 if (!capabilities) {
1104 result.capabilities = capabilities;
1106 if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {
1107 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1109 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
1110 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1112 for (let remote of allRemotes) {
1113 remote.fillServerCapabilities(capabilities);
1119 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
1120 for (let remote of allRemotes) {
1121 remote.fillServerCapabilities(result.capabilities);
1126 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
1127 watchDog.shutdownReceived = true;
1128 if (shutdownHandler) {
1129 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
1135 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
1142 if (watchDog.shutdownReceived) {
1150 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
1151 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
1153 return protocolConnection;
1155 exports.createConnection = createConnection;
1156 //# sourceMappingURL=server.js.map
1160 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1163 /* --------------------------------------------------------------------------------------------
1164 * Copyright (c) Microsoft Corporation. All rights reserved.
1165 * Licensed under the MIT License. See License.txt in the project root for license information.
1166 * ------------------------------------------------------------------------------------------ */
1167 function __export(m) {
1168 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1170 Object.defineProperty(exports, "__esModule", ({ value: true }));
1171 const node_1 = __webpack_require__(40);
1172 __export(__webpack_require__(40));
1173 __export(__webpack_require__(56));
1174 function createProtocolConnection(input, output, logger, options) {
1175 return node_1.createMessageConnection(input, output, logger, options);
1177 exports.createProtocolConnection = createProtocolConnection;
1178 //# sourceMappingURL=main.js.map
1182 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1184 /* --------------------------------------------------------------------------------------------
1185 * Copyright (c) Microsoft Corporation. All rights reserved.
1186 * Licensed under the MIT License. See License.txt in the project root for license information.
1187 * ----------------------------------------------------------------------------------------- */
1190 module.exports = __webpack_require__(41);
1194 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1197 function __export(m) {
1198 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1200 Object.defineProperty(exports, "__esModule", ({ value: true }));
1201 /* --------------------------------------------------------------------------------------------
1202 * Copyright (c) Microsoft Corporation. All rights reserved.
1203 * Licensed under the MIT License. See License.txt in the project root for license information.
1204 * ----------------------------------------------------------------------------------------- */
1205 const ril_1 = __webpack_require__(42);
1206 // Install the node runtime abstract.
1207 ril_1.default.install();
1208 const api_1 = __webpack_require__(46);
1209 const path = __webpack_require__(3);
1210 const os = __webpack_require__(14);
1211 const crypto_1 = __webpack_require__(15);
1212 const net_1 = __webpack_require__(16);
1213 __export(__webpack_require__(46));
1214 class IPCMessageReader extends api_1.AbstractMessageReader {
1215 constructor(process) {
1217 this.process = process;
1218 let eventEmitter = this.process;
1219 eventEmitter.on('error', (error) => this.fireError(error));
1220 eventEmitter.on('close', () => this.fireClose());
1223 this.process.on('message', callback);
1224 return api_1.Disposable.create(() => this.process.off('message', callback));
1227 exports.IPCMessageReader = IPCMessageReader;
1228 class IPCMessageWriter extends api_1.AbstractMessageWriter {
1229 constructor(process) {
1231 this.process = process;
1232 this.errorCount = 0;
1233 let eventEmitter = this.process;
1234 eventEmitter.on('error', (error) => this.fireError(error));
1235 eventEmitter.on('close', () => this.fireClose);
1239 if (typeof this.process.send === 'function') {
1240 this.process.send(msg, undefined, undefined, (error) => {
1243 this.handleError(error, msg);
1246 this.errorCount = 0;
1250 return Promise.resolve();
1253 this.handleError(error, msg);
1254 return Promise.reject(error);
1257 handleError(error, msg) {
1259 this.fireError(error, msg, this.errorCount);
1262 exports.IPCMessageWriter = IPCMessageWriter;
1263 class SocketMessageReader extends api_1.ReadableStreamMessageReader {
1264 constructor(socket, encoding = 'utf-8') {
1265 super(ril_1.default().stream.asReadableStream(socket), encoding);
1268 exports.SocketMessageReader = SocketMessageReader;
1269 class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
1270 constructor(socket, options) {
1271 super(ril_1.default().stream.asWritableStream(socket), options);
1272 this.socket = socket;
1276 this.socket.destroy();
1279 exports.SocketMessageWriter = SocketMessageWriter;
1280 class StreamMessageReader extends api_1.ReadableStreamMessageReader {
1281 constructor(readble, encoding) {
1282 super(ril_1.default().stream.asReadableStream(readble), encoding);
1285 exports.StreamMessageReader = StreamMessageReader;
1286 class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
1287 constructor(writable, options) {
1288 super(ril_1.default().stream.asWritableStream(writable), options);
1291 exports.StreamMessageWriter = StreamMessageWriter;
1292 function generateRandomPipeName() {
1293 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
1294 if (process.platform === 'win32') {
1295 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
1298 // Mac/Unix: use socket file
1299 return path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
1302 exports.generateRandomPipeName = generateRandomPipeName;
1303 function createClientPipeTransport(pipeName, encoding = 'utf-8') {
1305 const connected = new Promise((resolve, _reject) => {
1306 connectResolve = resolve;
1308 return new Promise((resolve, reject) => {
1309 let server = net_1.createServer((socket) => {
1312 new SocketMessageReader(socket, encoding),
1313 new SocketMessageWriter(socket, encoding)
1316 server.on('error', reject);
1317 server.listen(pipeName, () => {
1318 server.removeListener('error', reject);
1320 onConnected: () => { return connected; }
1325 exports.createClientPipeTransport = createClientPipeTransport;
1326 function createServerPipeTransport(pipeName, encoding = 'utf-8') {
1327 const socket = net_1.createConnection(pipeName);
1329 new SocketMessageReader(socket, encoding),
1330 new SocketMessageWriter(socket, encoding)
1333 exports.createServerPipeTransport = createServerPipeTransport;
1334 function createClientSocketTransport(port, encoding = 'utf-8') {
1336 const connected = new Promise((resolve, _reject) => {
1337 connectResolve = resolve;
1339 return new Promise((resolve, reject) => {
1340 const server = net_1.createServer((socket) => {
1343 new SocketMessageReader(socket, encoding),
1344 new SocketMessageWriter(socket, encoding)
1347 server.on('error', reject);
1348 server.listen(port, '127.0.0.1', () => {
1349 server.removeListener('error', reject);
1351 onConnected: () => { return connected; }
1356 exports.createClientSocketTransport = createClientSocketTransport;
1357 function createServerSocketTransport(port, encoding = 'utf-8') {
1358 const socket = net_1.createConnection(port, '127.0.0.1');
1360 new SocketMessageReader(socket, encoding),
1361 new SocketMessageWriter(socket, encoding)
1364 exports.createServerSocketTransport = createServerSocketTransport;
1365 function isMessageReader(value) {
1366 return value.listen !== undefined && value.read === undefined;
1368 function isMessageWriter(value) {
1369 return value.write !== undefined && value.end === undefined;
1371 function createMessageConnection(input, output, logger, options) {
1373 logger = api_1.NullLogger;
1375 const reader = isMessageReader(input) ? input : new StreamMessageReader(input);
1376 const writer = isMessageWriter(output) ? output : new StreamMessageWriter(output);
1377 if (api_1.ConnectionStrategy.is(options)) {
1378 options = { connectionStrategy: options };
1380 return api_1.createMessageConnection(reader, writer, logger, options);
1382 exports.createMessageConnection = createMessageConnection;
1383 //# sourceMappingURL=main.js.map
1387 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1390 /* --------------------------------------------------------------------------------------------
1391 * Copyright (c) Microsoft Corporation. All rights reserved.
1392 * Licensed under the MIT License. See License.txt in the project root for license information.
1393 * ------------------------------------------------------------------------------------------ */
1394 Object.defineProperty(exports, "__esModule", ({ value: true }));
1395 const ral_1 = __webpack_require__(43);
1396 const disposable_1 = __webpack_require__(44);
1397 const util_1 = __webpack_require__(45);
1398 const DefaultSize = 8192;
1399 const CR = Buffer.from('\r', 'ascii')[0];
1400 const LF = Buffer.from('\n', 'ascii')[0];
1401 const CRLF = '\r\n';
1402 class MessageBuffer {
1403 constructor(encoding = 'utf-8') {
1404 this._encoding = encoding;
1406 this.buffer = Buffer.allocUnsafe(DefaultSize);
1409 return this._encoding;
1413 if (typeof chunk === 'string') {
1414 toAppend = Buffer.from(chunk, this._encoding);
1419 if (this.buffer.length - this.index >= toAppend.length) {
1420 this.buffer.set(toAppend, this.index);
1423 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
1424 if (this.index === 0) {
1425 this.buffer = Buffer.allocUnsafe(newSize);
1426 this.buffer.set(toAppend);
1429 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
1432 this.index += toAppend.length;
1436 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
1439 // No header / body separator found (e.g CRLFCRLF)
1440 if (current + 3 >= this.index) {
1443 const result = new Map();
1444 const headers = this.buffer.toString('ascii', 0, current).split(CRLF);
1445 headers.forEach((header) => {
1446 let index = header.indexOf(':');
1448 throw new Error('Message header must separate key and value using :');
1450 let key = header.substr(0, index);
1451 let value = header.substr(index + 1).trim();
1452 result.set(key, value);
1454 let nextStart = current + 4;
1455 this.buffer = this.buffer.slice(nextStart);
1456 this.index = this.index - nextStart;
1459 tryReadBody(length) {
1460 if (this.index < length) {
1463 const result = Buffer.alloc(length);
1464 this.buffer.copy(result, 0, 0, length);
1465 const nextStart = length;
1466 this.buffer.copy(this.buffer, 0, nextStart);
1467 this.index = this.index - nextStart;
1470 get numberOfBytes() {
1474 class ReadableStreamWrapper {
1475 constructor(stream) {
1476 this.stream = stream;
1479 this.stream.on('close', listener);
1480 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
1483 this.stream.on('error', listener);
1484 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
1487 this.stream.on('end', listener);
1488 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
1491 this.stream.on('data', listener);
1492 return disposable_1.Disposable.create(() => this.stream.off('data', listener));
1495 class WritableStreamWrapper {
1496 constructor(stream) {
1497 this.stream = stream;
1500 this.stream.on('close', listener);
1501 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
1504 this.stream.on('error', listener);
1505 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
1508 this.stream.on('end', listener);
1509 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
1511 write(data, encoding) {
1512 return new Promise((resolve, reject) => {
1513 const callback = (error) => {
1514 if (error === undefined || error === null) {
1521 if (typeof data === 'string') {
1522 this.stream.write(data, encoding, callback);
1525 this.stream.write(data, callback);
1533 const _ril = Object.freeze({
1534 messageBuffer: Object.freeze({
1535 create: (encoding) => new MessageBuffer(encoding)
1537 applicationJson: Object.freeze({
1538 encoder: Object.freeze({
1539 name: 'application/json',
1540 encode: (msg, options) => {
1541 return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
1544 decoder: Object.freeze({
1545 name: 'application/json',
1546 decode: (buffer, options) => {
1547 if (buffer instanceof Buffer) {
1548 return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
1551 return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
1556 stream: Object.freeze({
1557 asReadableStream: (socket) => new ReadableStreamWrapper(socket),
1558 asWritableStream: (socket) => new WritableStreamWrapper(socket)
1561 timer: Object.freeze({
1562 setTimeout(callback, ms, ...args) {
1563 return setTimeout(callback, ms, ...args);
1565 clearTimeout(handle) {
1566 clearTimeout(handle);
1568 setImmediate(callback, ...args) {
1569 return setImmediate(callback, ...args);
1571 clearImmediate(handle) {
1572 clearImmediate(handle);
1580 function install() {
1581 ral_1.default.install(_ril);
1583 RIL.install = install;
1584 })(RIL || (RIL = {}));
1585 exports.default = RIL;
1586 //# sourceMappingURL=ril.js.map
1590 /***/ ((__unused_webpack_module, exports) => {
1593 /* --------------------------------------------------------------------------------------------
1594 * Copyright (c) Microsoft Corporation. All rights reserved.
1595 * Licensed under the MIT License. See License.txt in the project root for license information.
1596 * ------------------------------------------------------------------------------------------ */
1597 Object.defineProperty(exports, "__esModule", ({ value: true }));
1600 if (_ral === undefined) {
1601 throw new Error(`No runtime abstraction layer installed`);
1606 function install(ral) {
1607 if (ral === undefined) {
1608 throw new Error(`No runtime abstraction layer provided`);
1612 RAL.install = install;
1613 })(RAL || (RAL = {}));
1614 exports.default = RAL;
1615 //# sourceMappingURL=ral.js.map
1619 /***/ ((__unused_webpack_module, exports) => {
1622 /*---------------------------------------------------------------------------------------------
1623 * Copyright (c) Microsoft Corporation. All rights reserved.
1624 * Licensed under the MIT License. See License.txt in the project root for license information.
1625 *--------------------------------------------------------------------------------------------*/
1626 Object.defineProperty(exports, "__esModule", ({ value: true }));
1628 (function (Disposable) {
1629 function create(func) {
1634 Disposable.create = create;
1635 })(Disposable = exports.Disposable || (exports.Disposable = {}));
1636 //# sourceMappingURL=disposable.js.map
1640 /***/ ((module) => {
1642 module.exports = require("util");;
1646 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1649 /* --------------------------------------------------------------------------------------------
1650 * Copyright (c) Microsoft Corporation. All rights reserved.
1651 * Licensed under the MIT License. See License.txt in the project root for license information.
1652 * ------------------------------------------------------------------------------------------ */
1653 /// <reference path="../../typings/thenable.d.ts" />
1654 Object.defineProperty(exports, "__esModule", ({ value: true }));
1655 const messages_1 = __webpack_require__(47);
1656 exports.RequestType = messages_1.RequestType;
1657 exports.RequestType0 = messages_1.RequestType0;
1658 exports.RequestType1 = messages_1.RequestType1;
1659 exports.RequestType2 = messages_1.RequestType2;
1660 exports.RequestType3 = messages_1.RequestType3;
1661 exports.RequestType4 = messages_1.RequestType4;
1662 exports.RequestType5 = messages_1.RequestType5;
1663 exports.RequestType6 = messages_1.RequestType6;
1664 exports.RequestType7 = messages_1.RequestType7;
1665 exports.RequestType8 = messages_1.RequestType8;
1666 exports.RequestType9 = messages_1.RequestType9;
1667 exports.ResponseError = messages_1.ResponseError;
1668 exports.ErrorCodes = messages_1.ErrorCodes;
1669 exports.NotificationType = messages_1.NotificationType;
1670 exports.NotificationType0 = messages_1.NotificationType0;
1671 exports.NotificationType1 = messages_1.NotificationType1;
1672 exports.NotificationType2 = messages_1.NotificationType2;
1673 exports.NotificationType3 = messages_1.NotificationType3;
1674 exports.NotificationType4 = messages_1.NotificationType4;
1675 exports.NotificationType5 = messages_1.NotificationType5;
1676 exports.NotificationType6 = messages_1.NotificationType6;
1677 exports.NotificationType7 = messages_1.NotificationType7;
1678 exports.NotificationType8 = messages_1.NotificationType8;
1679 exports.NotificationType9 = messages_1.NotificationType9;
1680 const disposable_1 = __webpack_require__(44);
1681 exports.Disposable = disposable_1.Disposable;
1682 const events_1 = __webpack_require__(49);
1683 exports.Event = events_1.Event;
1684 exports.Emitter = events_1.Emitter;
1685 const cancellation_1 = __webpack_require__(50);
1686 exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1687 exports.CancellationToken = cancellation_1.CancellationToken;
1688 const messageReader_1 = __webpack_require__(51);
1689 exports.MessageReader = messageReader_1.MessageReader;
1690 exports.AbstractMessageReader = messageReader_1.AbstractMessageReader;
1691 exports.ReadableStreamMessageReader = messageReader_1.ReadableStreamMessageReader;
1692 const messageWriter_1 = __webpack_require__(52);
1693 exports.MessageWriter = messageWriter_1.MessageWriter;
1694 exports.AbstractMessageWriter = messageWriter_1.AbstractMessageWriter;
1695 exports.WriteableStreamMessageWriter = messageWriter_1.WriteableStreamMessageWriter;
1696 const connection_1 = __webpack_require__(54);
1697 exports.ConnectionStrategy = connection_1.ConnectionStrategy;
1698 exports.ConnectionOptions = connection_1.ConnectionOptions;
1699 exports.NullLogger = connection_1.NullLogger;
1700 exports.createMessageConnection = connection_1.createMessageConnection;
1701 exports.ProgressType = connection_1.ProgressType;
1702 exports.Trace = connection_1.Trace;
1703 exports.TraceFormat = connection_1.TraceFormat;
1704 exports.SetTraceNotification = connection_1.SetTraceNotification;
1705 exports.LogTraceNotification = connection_1.LogTraceNotification;
1706 exports.ConnectionErrors = connection_1.ConnectionErrors;
1707 exports.ConnectionError = connection_1.ConnectionError;
1708 exports.CancellationReceiverStrategy = connection_1.CancellationReceiverStrategy;
1709 exports.CancellationSenderStrategy = connection_1.CancellationSenderStrategy;
1710 exports.CancellationStrategy = connection_1.CancellationStrategy;
1711 const ral_1 = __webpack_require__(43);
1712 exports.RAL = ral_1.default;
1713 //# sourceMappingURL=api.js.map
1717 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1720 /* --------------------------------------------------------------------------------------------
1721 * Copyright (c) Microsoft Corporation. All rights reserved.
1722 * Licensed under the MIT License. See License.txt in the project root for license information.
1723 * ------------------------------------------------------------------------------------------ */
1724 Object.defineProperty(exports, "__esModule", ({ value: true }));
1725 const is = __webpack_require__(48);
1727 * Predefined error codes.
1730 (function (ErrorCodes) {
1731 // Defined by JSON RPC
1732 ErrorCodes.ParseError = -32700;
1733 ErrorCodes.InvalidRequest = -32600;
1734 ErrorCodes.MethodNotFound = -32601;
1735 ErrorCodes.InvalidParams = -32602;
1736 ErrorCodes.InternalError = -32603;
1737 ErrorCodes.serverErrorStart = -32099;
1738 ErrorCodes.serverErrorEnd = -32000;
1739 ErrorCodes.ServerNotInitialized = -32002;
1740 ErrorCodes.UnknownErrorCode = -32001;
1741 // Defined by the protocol.
1742 ErrorCodes.RequestCancelled = -32800;
1743 ErrorCodes.ContentModified = -32801;
1744 // Defined by VSCode library.
1745 ErrorCodes.MessageWriteError = 1;
1746 ErrorCodes.MessageReadError = 2;
1747 })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
1749 * An error object return in a response in case a request
1752 class ResponseError extends Error {
1753 constructor(code, message, data) {
1755 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
1757 Object.setPrototypeOf(this, ResponseError.prototype);
1762 message: this.message,
1767 exports.ResponseError = ResponseError;
1769 * An abstract implementation of a MessageType.
1771 class AbstractMessageSignature {
1772 constructor(_method, _numberOfParams) {
1773 this._method = _method;
1774 this._numberOfParams = _numberOfParams;
1777 return this._method;
1779 get numberOfParams() {
1780 return this._numberOfParams;
1783 exports.AbstractMessageSignature = AbstractMessageSignature;
1785 * Classes to type request response pairs
1787 * The type parameter RO will be removed in the next major version
1788 * of the JSON RPC library since it is a LSP concept and doesn't
1789 * belong here. For now it is tagged as default never.
1791 class RequestType0 extends AbstractMessageSignature {
1792 constructor(method) {
1796 exports.RequestType0 = RequestType0;
1797 class RequestType extends AbstractMessageSignature {
1798 constructor(method) {
1802 exports.RequestType = RequestType;
1803 class RequestType1 extends AbstractMessageSignature {
1804 constructor(method) {
1808 exports.RequestType1 = RequestType1;
1809 class RequestType2 extends AbstractMessageSignature {
1810 constructor(method) {
1814 exports.RequestType2 = RequestType2;
1815 class RequestType3 extends AbstractMessageSignature {
1816 constructor(method) {
1820 exports.RequestType3 = RequestType3;
1821 class RequestType4 extends AbstractMessageSignature {
1822 constructor(method) {
1826 exports.RequestType4 = RequestType4;
1827 class RequestType5 extends AbstractMessageSignature {
1828 constructor(method) {
1832 exports.RequestType5 = RequestType5;
1833 class RequestType6 extends AbstractMessageSignature {
1834 constructor(method) {
1838 exports.RequestType6 = RequestType6;
1839 class RequestType7 extends AbstractMessageSignature {
1840 constructor(method) {
1844 exports.RequestType7 = RequestType7;
1845 class RequestType8 extends AbstractMessageSignature {
1846 constructor(method) {
1850 exports.RequestType8 = RequestType8;
1851 class RequestType9 extends AbstractMessageSignature {
1852 constructor(method) {
1856 exports.RequestType9 = RequestType9;
1858 * The type parameter RO will be removed in the next major version
1859 * of the JSON RPC library since it is a LSP concept and doesn't
1860 * belong here. For now it is tagged as default never.
1862 class NotificationType extends AbstractMessageSignature {
1863 constructor(method) {
1868 exports.NotificationType = NotificationType;
1869 class NotificationType0 extends AbstractMessageSignature {
1870 constructor(method) {
1874 exports.NotificationType0 = NotificationType0;
1875 class NotificationType1 extends AbstractMessageSignature {
1876 constructor(method) {
1880 exports.NotificationType1 = NotificationType1;
1881 class NotificationType2 extends AbstractMessageSignature {
1882 constructor(method) {
1886 exports.NotificationType2 = NotificationType2;
1887 class NotificationType3 extends AbstractMessageSignature {
1888 constructor(method) {
1892 exports.NotificationType3 = NotificationType3;
1893 class NotificationType4 extends AbstractMessageSignature {
1894 constructor(method) {
1898 exports.NotificationType4 = NotificationType4;
1899 class NotificationType5 extends AbstractMessageSignature {
1900 constructor(method) {
1904 exports.NotificationType5 = NotificationType5;
1905 class NotificationType6 extends AbstractMessageSignature {
1906 constructor(method) {
1910 exports.NotificationType6 = NotificationType6;
1911 class NotificationType7 extends AbstractMessageSignature {
1912 constructor(method) {
1916 exports.NotificationType7 = NotificationType7;
1917 class NotificationType8 extends AbstractMessageSignature {
1918 constructor(method) {
1922 exports.NotificationType8 = NotificationType8;
1923 class NotificationType9 extends AbstractMessageSignature {
1924 constructor(method) {
1928 exports.NotificationType9 = NotificationType9;
1930 * Tests if the given message is a request message
1932 function isRequestMessage(message) {
1933 const candidate = message;
1934 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
1936 exports.isRequestMessage = isRequestMessage;
1938 * Tests if the given message is a notification message
1940 function isNotificationMessage(message) {
1941 const candidate = message;
1942 return candidate && is.string(candidate.method) && message.id === void 0;
1944 exports.isNotificationMessage = isNotificationMessage;
1946 * Tests if the given message is a response message
1948 function isResponseMessage(message) {
1949 const candidate = message;
1950 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
1952 exports.isResponseMessage = isResponseMessage;
1953 //# sourceMappingURL=messages.js.map
1957 /***/ ((__unused_webpack_module, exports) => {
1960 /* --------------------------------------------------------------------------------------------
1961 * Copyright (c) Microsoft Corporation. All rights reserved.
1962 * Licensed under the MIT License. See License.txt in the project root for license information.
1963 * ------------------------------------------------------------------------------------------ */
1964 Object.defineProperty(exports, "__esModule", ({ value: true }));
1965 function boolean(value) {
1966 return value === true || value === false;
1968 exports.boolean = boolean;
1969 function string(value) {
1970 return typeof value === 'string' || value instanceof String;
1972 exports.string = string;
1973 function number(value) {
1974 return typeof value === 'number' || value instanceof Number;
1976 exports.number = number;
1977 function error(value) {
1978 return value instanceof Error;
1980 exports.error = error;
1981 function func(value) {
1982 return typeof value === 'function';
1984 exports.func = func;
1985 function array(value) {
1986 return Array.isArray(value);
1988 exports.array = array;
1989 function stringArray(value) {
1990 return array(value) && value.every(elem => string(elem));
1992 exports.stringArray = stringArray;
1993 //# sourceMappingURL=is.js.map
1997 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2000 /* --------------------------------------------------------------------------------------------
2001 * Copyright (c) Microsoft Corporation. All rights reserved.
2002 * Licensed under the MIT License. See License.txt in the project root for license information.
2003 * ------------------------------------------------------------------------------------------ */
2004 Object.defineProperty(exports, "__esModule", ({ value: true }));
2005 const ral_1 = __webpack_require__(43);
2008 const _disposable = { dispose() { } };
2009 Event.None = function () { return _disposable; };
2010 })(Event = exports.Event || (exports.Event = {}));
2011 class CallbackList {
2012 add(callback, context = null, bucket) {
2013 if (!this._callbacks) {
2014 this._callbacks = [];
2015 this._contexts = [];
2017 this._callbacks.push(callback);
2018 this._contexts.push(context);
2019 if (Array.isArray(bucket)) {
2020 bucket.push({ dispose: () => this.remove(callback, context) });
2023 remove(callback, context = null) {
2024 if (!this._callbacks) {
2027 let foundCallbackWithDifferentContext = false;
2028 for (let i = 0, len = this._callbacks.length; i < len; i++) {
2029 if (this._callbacks[i] === callback) {
2030 if (this._contexts[i] === context) {
2031 // callback & context match => remove it
2032 this._callbacks.splice(i, 1);
2033 this._contexts.splice(i, 1);
2037 foundCallbackWithDifferentContext = true;
2041 if (foundCallbackWithDifferentContext) {
2042 throw new Error('When adding a listener with a context, you should remove it with the same context');
2046 if (!this._callbacks) {
2049 const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2050 for (let i = 0, len = callbacks.length; i < len; i++) {
2052 ret.push(callbacks[i].apply(contexts[i], args));
2055 // eslint-disable-next-line no-console
2056 ral_1.default().console.error(e);
2062 return !this._callbacks || this._callbacks.length === 0;
2065 this._callbacks = undefined;
2066 this._contexts = undefined;
2070 constructor(_options) {
2071 this._options = _options;
2074 * For the public to allow to subscribe
2075 * to events from this Emitter
2079 this._event = (listener, thisArgs, disposables) => {
2080 if (!this._callbacks) {
2081 this._callbacks = new CallbackList();
2083 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2084 this._options.onFirstListenerAdd(this);
2086 this._callbacks.add(listener, thisArgs);
2089 if (!this._callbacks) {
2090 // disposable is disposed after emitter is disposed.
2093 this._callbacks.remove(listener, thisArgs);
2094 result.dispose = Emitter._noop;
2095 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2096 this._options.onLastListenerRemove(this);
2100 if (Array.isArray(disposables)) {
2101 disposables.push(result);
2109 * To be kept private to fire an event to
2113 if (this._callbacks) {
2114 this._callbacks.invoke.call(this._callbacks, event);
2118 if (this._callbacks) {
2119 this._callbacks.dispose();
2120 this._callbacks = undefined;
2124 exports.Emitter = Emitter;
2125 Emitter._noop = function () { };
2126 //# sourceMappingURL=events.js.map
2130 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2133 /*---------------------------------------------------------------------------------------------
2134 * Copyright (c) Microsoft Corporation. All rights reserved.
2135 * Licensed under the MIT License. See License.txt in the project root for license information.
2136 *--------------------------------------------------------------------------------------------*/
2137 Object.defineProperty(exports, "__esModule", ({ value: true }));
2138 const ral_1 = __webpack_require__(43);
2139 const Is = __webpack_require__(48);
2140 const events_1 = __webpack_require__(49);
2141 var CancellationToken;
2142 (function (CancellationToken) {
2143 CancellationToken.None = Object.freeze({
2144 isCancellationRequested: false,
2145 onCancellationRequested: events_1.Event.None
2147 CancellationToken.Cancelled = Object.freeze({
2148 isCancellationRequested: true,
2149 onCancellationRequested: events_1.Event.None
2151 function is(value) {
2152 const candidate = value;
2153 return candidate && (candidate === CancellationToken.None
2154 || candidate === CancellationToken.Cancelled
2155 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
2157 CancellationToken.is = is;
2158 })(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
2159 const shortcutEvent = Object.freeze(function (callback, context) {
2160 const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0);
2161 return { dispose() { ral_1.default().timer.clearTimeout(handle); } };
2163 class MutableToken {
2165 this._isCancelled = false;
2168 if (!this._isCancelled) {
2169 this._isCancelled = true;
2170 if (this._emitter) {
2171 this._emitter.fire(undefined);
2176 get isCancellationRequested() {
2177 return this._isCancelled;
2179 get onCancellationRequested() {
2180 if (this._isCancelled) {
2181 return shortcutEvent;
2183 if (!this._emitter) {
2184 this._emitter = new events_1.Emitter();
2186 return this._emitter.event;
2189 if (this._emitter) {
2190 this._emitter.dispose();
2191 this._emitter = undefined;
2195 class CancellationTokenSource {
2198 // be lazy and create the token only when
2200 this._token = new MutableToken();
2206 // save an object by returning the default
2207 // cancelled token when cancellation happens
2208 // before someone asks for the token
2209 this._token = CancellationToken.Cancelled;
2212 this._token.cancel();
2217 // ensure to initialize with an empty token if we had none
2218 this._token = CancellationToken.None;
2220 else if (this._token instanceof MutableToken) {
2222 this._token.dispose();
2226 exports.CancellationTokenSource = CancellationTokenSource;
2227 //# sourceMappingURL=cancellation.js.map
2231 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2234 /* --------------------------------------------------------------------------------------------
2235 * Copyright (c) Microsoft Corporation. All rights reserved.
2236 * Licensed under the MIT License. See License.txt in the project root for license information.
2237 * ------------------------------------------------------------------------------------------ */
2238 Object.defineProperty(exports, "__esModule", ({ value: true }));
2239 const ral_1 = __webpack_require__(43);
2240 const Is = __webpack_require__(48);
2241 const events_1 = __webpack_require__(49);
2243 (function (MessageReader) {
2244 function is(value) {
2245 let candidate = value;
2246 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2247 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2249 MessageReader.is = is;
2250 })(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2251 class AbstractMessageReader {
2253 this.errorEmitter = new events_1.Emitter();
2254 this.closeEmitter = new events_1.Emitter();
2255 this.partialMessageEmitter = new events_1.Emitter();
2258 this.errorEmitter.dispose();
2259 this.closeEmitter.dispose();
2262 return this.errorEmitter.event;
2265 this.errorEmitter.fire(this.asError(error));
2268 return this.closeEmitter.event;
2271 this.closeEmitter.fire(undefined);
2273 get onPartialMessage() {
2274 return this.partialMessageEmitter.event;
2276 firePartialMessage(info) {
2277 this.partialMessageEmitter.fire(info);
2280 if (error instanceof Error) {
2284 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2288 exports.AbstractMessageReader = AbstractMessageReader;
2289 var ResolvedMessageReaderOptions;
2290 (function (ResolvedMessageReaderOptions) {
2291 function fromOptions(options) {
2296 const contentDecoders = new Map();
2297 let contentTypeDecoder;
2298 const contentTypeDecoders = new Map();
2299 if (options === undefined || typeof options === 'string') {
2300 charset = options !== null && options !== void 0 ? options : 'utf-8';
2303 charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8';
2304 if (options.contentDecoder !== undefined) {
2305 contentDecoder = options.contentDecoder;
2306 contentDecoders.set(contentDecoder.name, contentDecoder);
2308 if (options.contentDecoders !== undefined) {
2309 for (const decoder of options.contentDecoders) {
2310 contentDecoders.set(decoder.name, decoder);
2313 if (options.contentTypeDecoder !== undefined) {
2314 contentTypeDecoder = options.contentTypeDecoder;
2315 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
2317 if (options.contentTypeDecoders !== undefined) {
2318 for (const decoder of options.contentTypeDecoders) {
2319 contentTypeDecoders.set(decoder.name, decoder);
2323 if (contentTypeDecoder === undefined) {
2324 contentTypeDecoder = ral_1.default().applicationJson.decoder;
2325 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
2327 return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
2329 ResolvedMessageReaderOptions.fromOptions = fromOptions;
2330 })(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
2331 class ReadableStreamMessageReader extends AbstractMessageReader {
2332 constructor(readable, options) {
2334 this.readable = readable;
2335 this.options = ResolvedMessageReaderOptions.fromOptions(options);
2336 this.buffer = ral_1.default().messageBuffer.create(this.options.charset);
2337 this._partialMessageTimeout = 10000;
2338 this.nextMessageLength = -1;
2339 this.messageToken = 0;
2341 set partialMessageTimeout(timeout) {
2342 this._partialMessageTimeout = timeout;
2344 get partialMessageTimeout() {
2345 return this._partialMessageTimeout;
2348 this.nextMessageLength = -1;
2349 this.messageToken = 0;
2350 this.partialMessageTimer = undefined;
2351 this.callback = callback;
2352 const result = this.readable.onData((data) => {
2355 this.readable.onError((error) => this.fireError(error));
2356 this.readable.onClose(() => this.fireClose());
2360 this.buffer.append(data);
2362 if (this.nextMessageLength === -1) {
2363 const headers = this.buffer.tryReadHeaders();
2367 const contentLength = headers.get('Content-Length');
2368 if (!contentLength) {
2369 throw new Error('Header must provide a Content-Length property.');
2371 const length = parseInt(contentLength);
2372 if (isNaN(length)) {
2373 throw new Error('Content-Length value must be a number.');
2375 this.nextMessageLength = length;
2377 const body = this.buffer.tryReadBody(this.nextMessageLength);
2378 if (body === undefined) {
2379 /** We haven't received the full message yet. */
2380 this.setPartialMessageTimer();
2383 this.clearPartialMessageTimer();
2384 this.nextMessageLength = -1;
2386 if (this.options.contentDecoder !== undefined) {
2387 p = this.options.contentDecoder.decode(body);
2390 p = Promise.resolve(body);
2393 this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
2396 this.fireError(error);
2399 this.fireError(error);
2403 clearPartialMessageTimer() {
2404 if (this.partialMessageTimer) {
2405 ral_1.default().timer.clearTimeout(this.partialMessageTimer);
2406 this.partialMessageTimer = undefined;
2409 setPartialMessageTimer() {
2410 this.clearPartialMessageTimer();
2411 if (this._partialMessageTimeout <= 0) {
2414 this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => {
2415 this.partialMessageTimer = undefined;
2416 if (token === this.messageToken) {
2417 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2418 this.setPartialMessageTimer();
2420 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2423 exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
2424 //# sourceMappingURL=messageReader.js.map
2428 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2431 /* --------------------------------------------------------------------------------------------
2432 * Copyright (c) Microsoft Corporation. All rights reserved.
2433 * Licensed under the MIT License. See License.txt in the project root for license information.
2434 * ------------------------------------------------------------------------------------------ */
2435 Object.defineProperty(exports, "__esModule", ({ value: true }));
2436 const ral_1 = __webpack_require__(43);
2437 const Is = __webpack_require__(48);
2438 const semaphore_1 = __webpack_require__(53);
2439 const events_1 = __webpack_require__(49);
2440 const ContentLength = 'Content-Length: ';
2441 const CRLF = '\r\n';
2443 (function (MessageWriter) {
2444 function is(value) {
2445 let candidate = value;
2446 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2447 Is.func(candidate.onError) && Is.func(candidate.write);
2449 MessageWriter.is = is;
2450 })(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2451 class AbstractMessageWriter {
2453 this.errorEmitter = new events_1.Emitter();
2454 this.closeEmitter = new events_1.Emitter();
2457 this.errorEmitter.dispose();
2458 this.closeEmitter.dispose();
2461 return this.errorEmitter.event;
2463 fireError(error, message, count) {
2464 this.errorEmitter.fire([this.asError(error), message, count]);
2467 return this.closeEmitter.event;
2470 this.closeEmitter.fire(undefined);
2473 if (error instanceof Error) {
2477 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2481 exports.AbstractMessageWriter = AbstractMessageWriter;
2482 var ResolvedMessageWriterOptions;
2483 (function (ResolvedMessageWriterOptions) {
2484 function fromOptions(options) {
2486 if (options === undefined || typeof options === 'string') {
2487 return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder };
2490 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 };
2493 ResolvedMessageWriterOptions.fromOptions = fromOptions;
2494 })(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
2495 class WriteableStreamMessageWriter extends AbstractMessageWriter {
2496 constructor(writable, options) {
2498 this.writable = writable;
2499 this.options = ResolvedMessageWriterOptions.fromOptions(options);
2500 this.errorCount = 0;
2501 this.writeSemaphore = new semaphore_1.Semaphore(1);
2502 this.writable.onError((error) => this.fireError(error));
2503 this.writable.onClose(() => this.fireClose());
2506 const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
2507 if (this.options.contentEncoder !== undefined) {
2508 return this.options.contentEncoder.encode(buffer);
2514 return payload.then((buffer) => {
2516 headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
2518 return this.doWrite(msg, headers, buffer);
2520 this.fireError(error);
2524 doWrite(msg, headers, data) {
2525 return this.writeSemaphore.lock(async () => {
2527 await this.writable.write(headers.join(''), 'ascii');
2528 return this.writable.write(data);
2531 this.handleError(error, msg);
2535 handleError(error, msg) {
2537 this.fireError(error, msg, this.errorCount);
2540 exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
2541 //# sourceMappingURL=messageWriter.js.map
2545 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2548 /* --------------------------------------------------------------------------------------------
2549 * Copyright (c) Microsoft Corporation. All rights reserved.
2550 * Licensed under the MIT License. See License.txt in the project root for license information.
2551 * ------------------------------------------------------------------------------------------ */
2552 Object.defineProperty(exports, "__esModule", ({ value: true }));
2553 const ral_1 = __webpack_require__(43);
2555 constructor(capacity = 1) {
2556 if (capacity <= 0) {
2557 throw new Error('Capacity must be greater than 0');
2559 this._capacity = capacity;
2564 return new Promise((resolve, reject) => {
2565 this._waiting.push({ thunk, resolve, reject });
2570 return this._active;
2573 if (this._waiting.length === 0 || this._active === this._capacity) {
2576 ral_1.default().timer.setImmediate(() => this.doRunNext());
2579 if (this._waiting.length === 0 || this._active === this._capacity) {
2582 const next = this._waiting.shift();
2584 if (this._active > this._capacity) {
2585 throw new Error(`To many thunks active`);
2588 const result = next.thunk();
2589 if (result instanceof Promise) {
2590 result.then((value) => {
2592 next.resolve(value);
2602 next.resolve(result);
2613 exports.Semaphore = Semaphore;
2614 //# sourceMappingURL=semaphore.js.map
2618 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2621 /* --------------------------------------------------------------------------------------------
2622 * Copyright (c) Microsoft Corporation. All rights reserved.
2623 * Licensed under the MIT License. See License.txt in the project root for license information.
2624 * ------------------------------------------------------------------------------------------ */
2625 Object.defineProperty(exports, "__esModule", ({ value: true }));
2626 const ral_1 = __webpack_require__(43);
2627 const Is = __webpack_require__(48);
2628 const messages_1 = __webpack_require__(47);
2629 const linkedMap_1 = __webpack_require__(55);
2630 const events_1 = __webpack_require__(49);
2631 const cancellation_1 = __webpack_require__(50);
2632 var CancelNotification;
2633 (function (CancelNotification) {
2634 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
2635 })(CancelNotification || (CancelNotification = {}));
2636 var ProgressNotification;
2637 (function (ProgressNotification) {
2638 ProgressNotification.type = new messages_1.NotificationType('$/progress');
2639 })(ProgressNotification || (ProgressNotification = {}));
2640 class ProgressType {
2644 exports.ProgressType = ProgressType;
2645 exports.NullLogger = Object.freeze({
2653 Trace[Trace["Off"] = 0] = "Off";
2654 Trace[Trace["Messages"] = 1] = "Messages";
2655 Trace[Trace["Verbose"] = 2] = "Verbose";
2656 })(Trace = exports.Trace || (exports.Trace = {}));
2658 function fromString(value) {
2659 if (!Is.string(value)) {
2662 value = value.toLowerCase();
2667 return Trace.Messages;
2669 return Trace.Verbose;
2674 Trace.fromString = fromString;
2675 function toString(value) {
2679 case Trace.Messages:
2687 Trace.toString = toString;
2688 })(Trace = exports.Trace || (exports.Trace = {}));
2690 (function (TraceFormat) {
2691 TraceFormat["Text"] = "text";
2692 TraceFormat["JSON"] = "json";
2693 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
2694 (function (TraceFormat) {
2695 function fromString(value) {
2696 value = value.toLowerCase();
2697 if (value === 'json') {
2698 return TraceFormat.JSON;
2701 return TraceFormat.Text;
2704 TraceFormat.fromString = fromString;
2705 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
2706 var SetTraceNotification;
2707 (function (SetTraceNotification) {
2708 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
2709 })(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
2710 var LogTraceNotification;
2711 (function (LogTraceNotification) {
2712 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
2713 })(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
2714 var ConnectionErrors;
2715 (function (ConnectionErrors) {
2717 * The connection is closed.
2719 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
2721 * The connection got disposed.
2723 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
2725 * The connection is already in listening mode.
2727 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
2728 })(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
2729 class ConnectionError extends Error {
2730 constructor(code, message) {
2733 Object.setPrototypeOf(this, ConnectionError.prototype);
2736 exports.ConnectionError = ConnectionError;
2737 var ConnectionStrategy;
2738 (function (ConnectionStrategy) {
2739 function is(value) {
2740 const candidate = value;
2741 return candidate && Is.func(candidate.cancelUndispatched);
2743 ConnectionStrategy.is = is;
2744 })(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
2745 var CancellationReceiverStrategy;
2746 (function (CancellationReceiverStrategy) {
2747 CancellationReceiverStrategy.Message = Object.freeze({
2748 createCancellationTokenSource(_) {
2749 return new cancellation_1.CancellationTokenSource();
2752 function is(value) {
2753 const candidate = value;
2754 return candidate && Is.func(candidate.createCancellationTokenSource);
2756 CancellationReceiverStrategy.is = is;
2757 })(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
2758 var CancellationSenderStrategy;
2759 (function (CancellationSenderStrategy) {
2760 CancellationSenderStrategy.Message = Object.freeze({
2761 sendCancellation(conn, id) {
2762 conn.sendNotification(CancelNotification.type, { id });
2766 function is(value) {
2767 const candidate = value;
2768 return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
2770 CancellationSenderStrategy.is = is;
2771 })(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
2772 var CancellationStrategy;
2773 (function (CancellationStrategy) {
2774 CancellationStrategy.Message = Object.freeze({
2775 receiver: CancellationReceiverStrategy.Message,
2776 sender: CancellationSenderStrategy.Message
2778 function is(value) {
2779 const candidate = value;
2780 return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
2782 CancellationStrategy.is = is;
2783 })(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
2784 var ConnectionOptions;
2785 (function (ConnectionOptions) {
2786 function is(value) {
2787 const candidate = value;
2788 return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
2790 ConnectionOptions.is = is;
2791 })(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));
2792 var ConnectionState;
2793 (function (ConnectionState) {
2794 ConnectionState[ConnectionState["New"] = 1] = "New";
2795 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
2796 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
2797 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
2798 })(ConnectionState || (ConnectionState = {}));
2799 function createMessageConnection(messageReader, messageWriter, _logger, options) {
2800 const logger = _logger !== undefined ? _logger : exports.NullLogger;
2801 let sequenceNumber = 0;
2802 let notificationSquenceNumber = 0;
2803 let unknownResponseSquenceNumber = 0;
2804 const version = '2.0';
2805 let starRequestHandler = undefined;
2806 const requestHandlers = Object.create(null);
2807 let starNotificationHandler = undefined;
2808 const notificationHandlers = Object.create(null);
2809 const progressHandlers = new Map();
2811 let messageQueue = new linkedMap_1.LinkedMap();
2812 let responsePromises = Object.create(null);
2813 let requestTokens = Object.create(null);
2814 let trace = Trace.Off;
2815 let traceFormat = TraceFormat.Text;
2817 let state = ConnectionState.New;
2818 const errorEmitter = new events_1.Emitter();
2819 const closeEmitter = new events_1.Emitter();
2820 const unhandledNotificationEmitter = new events_1.Emitter();
2821 const unhandledProgressEmitter = new events_1.Emitter();
2822 const disposeEmitter = new events_1.Emitter();
2823 const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
2824 function createRequestQueueKey(id) {
2825 return 'req-' + id.toString();
2827 function createResponseQueueKey(id) {
2829 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
2832 return 'res-' + id.toString();
2835 function createNotificationQueueKey() {
2836 return 'not-' + (++notificationSquenceNumber).toString();
2838 function addMessageToQueue(queue, message) {
2839 if (messages_1.isRequestMessage(message)) {
2840 queue.set(createRequestQueueKey(message.id), message);
2842 else if (messages_1.isResponseMessage(message)) {
2843 queue.set(createResponseQueueKey(message.id), message);
2846 queue.set(createNotificationQueueKey(), message);
2849 function cancelUndispatched(_message) {
2852 function isListening() {
2853 return state === ConnectionState.Listening;
2855 function isClosed() {
2856 return state === ConnectionState.Closed;
2858 function isDisposed() {
2859 return state === ConnectionState.Disposed;
2861 function closeHandler() {
2862 if (state === ConnectionState.New || state === ConnectionState.Listening) {
2863 state = ConnectionState.Closed;
2864 closeEmitter.fire(undefined);
2866 // If the connection is disposed don't sent close events.
2868 function readErrorHandler(error) {
2869 errorEmitter.fire([error, undefined, undefined]);
2871 function writeErrorHandler(data) {
2872 errorEmitter.fire(data);
2874 messageReader.onClose(closeHandler);
2875 messageReader.onError(readErrorHandler);
2876 messageWriter.onClose(closeHandler);
2877 messageWriter.onError(writeErrorHandler);
2878 function triggerMessageQueue() {
2879 if (timer || messageQueue.size === 0) {
2882 timer = ral_1.default().timer.setImmediate(() => {
2884 processMessageQueue();
2887 function processMessageQueue() {
2888 if (messageQueue.size === 0) {
2891 const message = messageQueue.shift();
2893 if (messages_1.isRequestMessage(message)) {
2894 handleRequest(message);
2896 else if (messages_1.isNotificationMessage(message)) {
2897 handleNotification(message);
2899 else if (messages_1.isResponseMessage(message)) {
2900 handleResponse(message);
2903 handleInvalidMessage(message);
2907 triggerMessageQueue();
2910 const callback = (message) => {
2912 // We have received a cancellation message. Check if the message is still in the queue
2913 // and cancel it if allowed to do so.
2914 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
2915 const key = createRequestQueueKey(message.params.id);
2916 const toCancel = messageQueue.get(key);
2917 if (messages_1.isRequestMessage(toCancel)) {
2918 const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy;
2919 const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
2920 if (response && (response.error !== undefined || response.result !== undefined)) {
2921 messageQueue.delete(key);
2922 response.id = toCancel.id;
2923 traceSendingResponse(response, message.method, Date.now());
2924 messageWriter.write(response);
2929 addMessageToQueue(messageQueue, message);
2932 triggerMessageQueue();
2935 function handleRequest(requestMessage) {
2937 // we return here silently since we fired an event when the
2938 // connection got disposed.
2941 function reply(resultOrError, method, startTime) {
2944 id: requestMessage.id
2946 if (resultOrError instanceof messages_1.ResponseError) {
2947 message.error = resultOrError.toJson();
2950 message.result = resultOrError === undefined ? null : resultOrError;
2952 traceSendingResponse(message, method, startTime);
2953 messageWriter.write(message);
2955 function replyError(error, method, startTime) {
2958 id: requestMessage.id,
2959 error: error.toJson()
2961 traceSendingResponse(message, method, startTime);
2962 messageWriter.write(message);
2964 function replySuccess(result, method, startTime) {
2965 // The JSON RPC defines that a response must either have a result or an error
2966 // So we can't treat undefined as a valid response result.
2967 if (result === undefined) {
2972 id: requestMessage.id,
2975 traceSendingResponse(message, method, startTime);
2976 messageWriter.write(message);
2978 traceReceivedRequest(requestMessage);
2979 const element = requestHandlers[requestMessage.method];
2983 type = element.type;
2984 requestHandler = element.handler;
2986 const startTime = Date.now();
2987 if (requestHandler || starRequestHandler) {
2988 const tokenKey = String(requestMessage.id);
2989 const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
2990 requestTokens[tokenKey] = cancellationSource;
2993 if (requestMessage.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
2994 handlerResult = requestHandler
2995 ? requestHandler(cancellationSource.token)
2996 : starRequestHandler(requestMessage.method, cancellationSource.token);
2998 else if (Is.array(requestMessage.params) && (type === undefined || type.numberOfParams > 1)) {
2999 handlerResult = requestHandler
3000 ? requestHandler(...requestMessage.params, cancellationSource.token)
3001 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
3004 handlerResult = requestHandler
3005 ? requestHandler(requestMessage.params, cancellationSource.token)
3006 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
3008 const promise = handlerResult;
3009 if (!handlerResult) {
3010 delete requestTokens[tokenKey];
3011 replySuccess(handlerResult, requestMessage.method, startTime);
3013 else if (promise.then) {
3014 promise.then((resultOrError) => {
3015 delete requestTokens[tokenKey];
3016 reply(resultOrError, requestMessage.method, startTime);
3018 delete requestTokens[tokenKey];
3019 if (error instanceof messages_1.ResponseError) {
3020 replyError(error, requestMessage.method, startTime);
3022 else if (error && Is.string(error.message)) {
3023 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
3026 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
3031 delete requestTokens[tokenKey];
3032 reply(handlerResult, requestMessage.method, startTime);
3036 delete requestTokens[tokenKey];
3037 if (error instanceof messages_1.ResponseError) {
3038 reply(error, requestMessage.method, startTime);
3040 else if (error && Is.string(error.message)) {
3041 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
3044 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
3049 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
3052 function handleResponse(responseMessage) {
3054 // See handle request.
3057 if (responseMessage.id === null) {
3058 if (responseMessage.error) {
3059 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
3062 logger.error(`Received response message without id. No further error information provided.`);
3066 const key = String(responseMessage.id);
3067 const responsePromise = responsePromises[key];
3068 traceReceivedResponse(responseMessage, responsePromise);
3069 if (responsePromise) {
3070 delete responsePromises[key];
3072 if (responseMessage.error) {
3073 const error = responseMessage.error;
3074 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
3076 else if (responseMessage.result !== undefined) {
3077 responsePromise.resolve(responseMessage.result);
3080 throw new Error('Should never happen.');
3084 if (error.message) {
3085 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
3088 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
3094 function handleNotification(message) {
3096 // See handle request.
3099 let type = undefined;
3100 let notificationHandler;
3101 if (message.method === CancelNotification.type.method) {
3102 notificationHandler = (params) => {
3103 const id = params.id;
3104 const source = requestTokens[String(id)];
3111 const element = notificationHandlers[message.method];
3113 notificationHandler = element.handler;
3114 type = element.type;
3117 if (notificationHandler || starNotificationHandler) {
3119 traceReceivedNotification(message);
3120 if (message.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
3121 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
3123 else if (Is.array(message.params) && (type === undefined || type.numberOfParams > 1)) {
3124 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
3127 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
3131 if (error.message) {
3132 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
3135 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
3140 unhandledNotificationEmitter.fire(message);
3143 function handleInvalidMessage(message) {
3145 logger.error('Received empty message.');
3148 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
3149 // Test whether we find an id to reject the promise
3150 const responseMessage = message;
3151 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
3152 const key = String(responseMessage.id);
3153 const responseHandler = responsePromises[key];
3154 if (responseHandler) {
3155 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
3159 function traceSendingRequest(message) {
3160 if (trace === Trace.Off || !tracer) {
3163 if (traceFormat === TraceFormat.Text) {
3164 let data = undefined;
3165 if (trace === Trace.Verbose && message.params) {
3166 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3168 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
3171 logLSPMessage('send-request', message);
3174 function traceSendingNotification(message) {
3175 if (trace === Trace.Off || !tracer) {
3178 if (traceFormat === TraceFormat.Text) {
3179 let data = undefined;
3180 if (trace === Trace.Verbose) {
3181 if (message.params) {
3182 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3185 data = 'No parameters provided.\n\n';
3188 tracer.log(`Sending notification '${message.method}'.`, data);
3191 logLSPMessage('send-notification', message);
3194 function traceSendingResponse(message, method, startTime) {
3195 if (trace === Trace.Off || !tracer) {
3198 if (traceFormat === TraceFormat.Text) {
3199 let data = undefined;
3200 if (trace === Trace.Verbose) {
3201 if (message.error && message.error.data) {
3202 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
3205 if (message.result) {
3206 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
3208 else if (message.error === undefined) {
3209 data = 'No result returned.\n\n';
3213 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
3216 logLSPMessage('send-response', message);
3219 function traceReceivedRequest(message) {
3220 if (trace === Trace.Off || !tracer) {
3223 if (traceFormat === TraceFormat.Text) {
3224 let data = undefined;
3225 if (trace === Trace.Verbose && message.params) {
3226 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3228 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
3231 logLSPMessage('receive-request', message);
3234 function traceReceivedNotification(message) {
3235 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
3238 if (traceFormat === TraceFormat.Text) {
3239 let data = undefined;
3240 if (trace === Trace.Verbose) {
3241 if (message.params) {
3242 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
3245 data = 'No parameters provided.\n\n';
3248 tracer.log(`Received notification '${message.method}'.`, data);
3251 logLSPMessage('receive-notification', message);
3254 function traceReceivedResponse(message, responsePromise) {
3255 if (trace === Trace.Off || !tracer) {
3258 if (traceFormat === TraceFormat.Text) {
3259 let data = undefined;
3260 if (trace === Trace.Verbose) {
3261 if (message.error && message.error.data) {
3262 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
3265 if (message.result) {
3266 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
3268 else if (message.error === undefined) {
3269 data = 'No result returned.\n\n';
3273 if (responsePromise) {
3274 const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
3275 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
3278 tracer.log(`Received response ${message.id} without active response promise.`, data);
3282 logLSPMessage('receive-response', message);
3285 function logLSPMessage(type, message) {
3286 if (!tracer || trace === Trace.Off) {
3289 const lspMessage = {
3293 timestamp: Date.now()
3295 tracer.log(lspMessage);
3297 function throwIfClosedOrDisposed() {
3299 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
3302 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
3305 function throwIfListening() {
3306 if (isListening()) {
3307 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
3310 function throwIfNotListening() {
3311 if (!isListening()) {
3312 throw new Error('Call listen() first.');
3315 function undefinedToNull(param) {
3316 if (param === undefined) {
3323 function computeMessageParams(type, params) {
3325 const numberOfParams = type.numberOfParams;
3326 switch (numberOfParams) {
3331 result = undefinedToNull(params[0]);
3335 for (let i = 0; i < params.length && i < numberOfParams; i++) {
3336 result.push(undefinedToNull(params[i]));
3338 if (params.length < numberOfParams) {
3339 for (let i = params.length; i < numberOfParams; i++) {
3347 const connection = {
3348 sendNotification: (type, ...params) => {
3349 throwIfClosedOrDisposed();
3352 if (Is.string(type)) {
3354 switch (params.length) {
3356 messageParams = null;
3359 messageParams = params[0];
3362 messageParams = params;
3367 method = type.method;
3368 messageParams = computeMessageParams(type, params);
3370 const notificationMessage = {
3373 params: messageParams
3375 traceSendingNotification(notificationMessage);
3376 messageWriter.write(notificationMessage);
3378 onNotification: (type, handler) => {
3379 throwIfClosedOrDisposed();
3380 if (Is.func(type)) {
3381 starNotificationHandler = type;
3384 if (Is.string(type)) {
3385 notificationHandlers[type] = { type: undefined, handler };
3388 notificationHandlers[type.method] = { type, handler };
3392 onProgress: (_type, token, handler) => {
3393 if (progressHandlers.has(token)) {
3394 throw new Error(`Progress handler for token ${token} already registered`);
3396 progressHandlers.set(token, handler);
3399 progressHandlers.delete(token);
3403 sendProgress: (_type, token, value) => {
3404 connection.sendNotification(ProgressNotification.type, { token, value });
3406 onUnhandledProgress: unhandledProgressEmitter.event,
3407 sendRequest: (type, ...params) => {
3408 throwIfClosedOrDisposed();
3409 throwIfNotListening();
3412 let token = undefined;
3413 if (Is.string(type)) {
3415 switch (params.length) {
3417 messageParams = null;
3420 // The cancellation token is optional so it can also be undefined.
3421 if (cancellation_1.CancellationToken.is(params[0])) {
3422 messageParams = null;
3426 messageParams = undefinedToNull(params[0]);
3430 const last = params.length - 1;
3431 if (cancellation_1.CancellationToken.is(params[last])) {
3432 token = params[last];
3433 if (params.length === 2) {
3434 messageParams = undefinedToNull(params[0]);
3437 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
3441 messageParams = params.map(value => undefinedToNull(value));
3447 method = type.method;
3448 messageParams = computeMessageParams(type, params);
3449 const numberOfParams = type.numberOfParams;
3450 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
3452 const id = sequenceNumber++;
3455 disposable = token.onCancellationRequested(() => {
3456 cancellationStrategy.sender.sendCancellation(connection, id);
3459 const result = new Promise((resolve, reject) => {
3460 const requestMessage = {
3464 params: messageParams
3466 const resolveWithCleanup = (r) => {
3468 cancellationStrategy.sender.cleanup(id);
3469 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
3471 const rejectWithCleanup = (r) => {
3473 cancellationStrategy.sender.cleanup(id);
3474 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
3476 let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
3477 traceSendingRequest(requestMessage);
3479 messageWriter.write(requestMessage);
3482 // Writing the message failed. So we need to reject the promise.
3483 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
3484 responsePromise = null;
3486 if (responsePromise) {
3487 responsePromises[String(id)] = responsePromise;
3492 onRequest: (type, handler) => {
3493 throwIfClosedOrDisposed();
3494 if (Is.func(type)) {
3495 starRequestHandler = type;
3498 if (Is.string(type)) {
3499 requestHandlers[type] = { type: undefined, handler };
3502 requestHandlers[type.method] = { type, handler };
3506 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
3507 let _sendNotification = false;
3508 let _traceFormat = TraceFormat.Text;
3509 if (sendNotificationOrTraceOptions !== undefined) {
3510 if (Is.boolean(sendNotificationOrTraceOptions)) {
3511 _sendNotification = sendNotificationOrTraceOptions;
3514 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
3515 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
3519 traceFormat = _traceFormat;
3520 if (trace === Trace.Off) {
3526 if (_sendNotification && !isClosed() && !isDisposed()) {
3527 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
3530 onError: errorEmitter.event,
3531 onClose: closeEmitter.event,
3532 onUnhandledNotification: unhandledNotificationEmitter.event,
3533 onDispose: disposeEmitter.event,
3538 state = ConnectionState.Disposed;
3539 disposeEmitter.fire(undefined);
3540 const error = new Error('Connection got disposed.');
3541 Object.keys(responsePromises).forEach((key) => {
3542 responsePromises[key].reject(error);
3544 responsePromises = Object.create(null);
3545 requestTokens = Object.create(null);
3546 messageQueue = new linkedMap_1.LinkedMap();
3547 // Test for backwards compatibility
3548 if (Is.func(messageWriter.dispose)) {
3549 messageWriter.dispose();
3551 if (Is.func(messageReader.dispose)) {
3552 messageReader.dispose();
3556 throwIfClosedOrDisposed();
3558 state = ConnectionState.Listening;
3559 messageReader.listen(callback);
3562 // eslint-disable-next-line no-console
3563 ral_1.default().console.log('inspect');
3566 connection.onNotification(LogTraceNotification.type, (params) => {
3567 if (trace === Trace.Off || !tracer) {
3570 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
3572 connection.onNotification(ProgressNotification.type, (params) => {
3573 const handler = progressHandlers.get(params.token);
3575 handler(params.value);
3578 unhandledProgressEmitter.fire(params);
3583 exports.createMessageConnection = createMessageConnection;
3584 //# sourceMappingURL=connection.js.map
3588 /***/ ((__unused_webpack_module, exports) => {
3591 /*---------------------------------------------------------------------------------------------
3592 * Copyright (c) Microsoft Corporation. All rights reserved.
3593 * Licensed under the MIT License. See License.txt in the project root for license information.
3594 *--------------------------------------------------------------------------------------------*/
3595 Object.defineProperty(exports, "__esModule", ({ value: true }));
3600 Touch.AsOld = Touch.First;
3602 Touch.AsNew = Touch.Last;
3603 })(Touch = exports.Touch || (exports.Touch = {}));
3606 this[Symbol.toStringTag] = 'LinkedMap';
3607 this._map = new Map();
3608 this._head = undefined;
3609 this._tail = undefined;
3615 this._head = undefined;
3616 this._tail = undefined;
3621 return !this._head && !this._tail;
3628 return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;
3632 return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;
3635 return this._map.has(key);
3637 get(key, touch = Touch.None) {
3638 const item = this._map.get(key);
3642 if (touch !== Touch.None) {
3643 this.touch(item, touch);
3647 set(key, value, touch = Touch.None) {
3648 let item = this._map.get(key);
3651 if (touch !== Touch.None) {
3652 this.touch(item, touch);
3656 item = { key, value, next: undefined, previous: undefined };
3659 this.addItemLast(item);
3662 this.addItemFirst(item);
3665 this.addItemLast(item);
3668 this.addItemLast(item);
3671 this._map.set(key, item);
3677 return !!this.remove(key);
3680 const item = this._map.get(key);
3684 this._map.delete(key);
3685 this.removeItem(item);
3690 if (!this._head && !this._tail) {
3693 if (!this._head || !this._tail) {
3694 throw new Error('Invalid list');
3696 const item = this._head;
3697 this._map.delete(item.key);
3698 this.removeItem(item);
3702 forEach(callbackfn, thisArg) {
3703 const state = this._state;
3704 let current = this._head;
3707 callbackfn.bind(thisArg)(current.value, current.key, this);
3710 callbackfn(current.value, current.key, this);
3712 if (this._state !== state) {
3713 throw new Error(`LinkedMap got modified during iteration.`);
3715 current = current.next;
3720 const state = this._state;
3721 let current = this._head;
3723 [Symbol.iterator]() {
3727 if (map._state !== state) {
3728 throw new Error(`LinkedMap got modified during iteration.`);
3731 const result = { value: current.key, done: false };
3732 current = current.next;
3736 return { value: undefined, done: true };
3744 const state = this._state;
3745 let current = this._head;
3747 [Symbol.iterator]() {
3751 if (map._state !== state) {
3752 throw new Error(`LinkedMap got modified during iteration.`);
3755 const result = { value: current.value, done: false };
3756 current = current.next;
3760 return { value: undefined, done: true };
3768 const state = this._state;
3769 let current = this._head;
3771 [Symbol.iterator]() {
3775 if (map._state !== state) {
3776 throw new Error(`LinkedMap got modified during iteration.`);
3779 const result = { value: [current.key, current.value], done: false };
3780 current = current.next;
3784 return { value: undefined, done: true };
3790 [Symbol.iterator]() {
3791 return this.entries();
3794 if (newSize >= this.size) {
3797 if (newSize === 0) {
3801 let current = this._head;
3802 let currentSize = this.size;
3803 while (current && currentSize > newSize) {
3804 this._map.delete(current.key);
3805 current = current.next;
3808 this._head = current;
3809 this._size = currentSize;
3811 current.previous = undefined;
3815 addItemFirst(item) {
3816 // First time Insert
3817 if (!this._head && !this._tail) {
3820 else if (!this._head) {
3821 throw new Error('Invalid list');
3824 item.next = this._head;
3825 this._head.previous = item;
3831 // First time Insert
3832 if (!this._head && !this._tail) {
3835 else if (!this._tail) {
3836 throw new Error('Invalid list');
3839 item.previous = this._tail;
3840 this._tail.next = item;
3846 if (item === this._head && item === this._tail) {
3847 this._head = undefined;
3848 this._tail = undefined;
3850 else if (item === this._head) {
3851 // This can only happend if size === 1 which is handle
3852 // by the case above.
3854 throw new Error('Invalid list');
3856 item.next.previous = undefined;
3857 this._head = item.next;
3859 else if (item === this._tail) {
3860 // This can only happend if size === 1 which is handle
3861 // by the case above.
3862 if (!item.previous) {
3863 throw new Error('Invalid list');
3865 item.previous.next = undefined;
3866 this._tail = item.previous;
3869 const next = item.next;
3870 const previous = item.previous;
3871 if (!next || !previous) {
3872 throw new Error('Invalid list');
3874 next.previous = previous;
3875 previous.next = next;
3877 item.next = undefined;
3878 item.previous = undefined;
3881 touch(item, touch) {
3882 if (!this._head || !this._tail) {
3883 throw new Error('Invalid list');
3885 if ((touch !== Touch.First && touch !== Touch.Last)) {
3888 if (touch === Touch.First) {
3889 if (item === this._head) {
3892 const next = item.next;
3893 const previous = item.previous;
3895 if (item === this._tail) {
3896 // previous must be defined since item was not head but is tail
3897 // So there are more than on item in the map
3898 previous.next = undefined;
3899 this._tail = previous;
3902 // Both next and previous are not undefined since item was neither head nor tail.
3903 next.previous = previous;
3904 previous.next = next;
3906 // Insert the node at head
3907 item.previous = undefined;
3908 item.next = this._head;
3909 this._head.previous = item;
3913 else if (touch === Touch.Last) {
3914 if (item === this._tail) {
3917 const next = item.next;
3918 const previous = item.previous;
3920 if (item === this._head) {
3921 // next must be defined since item was not tail but is head
3922 // So there are more than on item in the map
3923 next.previous = undefined;
3927 // Both next and previous are not undefined since item was neither head nor tail.
3928 next.previous = previous;
3929 previous.next = next;
3931 item.next = undefined;
3932 item.previous = this._tail;
3933 this._tail.next = item;
3940 this.forEach((value, key) => {
3941 data.push([key, value]);
3947 for (const [key, value] of data) {
3948 this.set(key, value);
3952 exports.LinkedMap = LinkedMap;
3953 class LRUCache extends LinkedMap {
3954 constructor(limit, ratio = 1) {
3956 this._limit = limit;
3957 this._ratio = Math.min(Math.max(0, ratio), 1);
3963 this._limit = limit;
3970 this._ratio = Math.min(Math.max(0, ratio), 1);
3973 get(key, touch = Touch.AsNew) {
3974 return super.get(key, touch);
3977 return super.get(key, Touch.None);
3980 super.set(key, value, Touch.Last);
3985 if (this.size > this._limit) {
3986 this.trimOld(Math.round(this._limit * this._ratio));
3990 exports.LRUCache = LRUCache;
3991 //# sourceMappingURL=linkedMap.js.map
3995 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3998 /* --------------------------------------------------------------------------------------------
3999 * Copyright (c) Microsoft Corporation. All rights reserved.
4000 * Licensed under the MIT License. See License.txt in the project root for license information.
4001 * ------------------------------------------------------------------------------------------ */
4002 function __export(m) {
4003 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4005 Object.defineProperty(exports, "__esModule", ({ value: true }));
4006 __export(__webpack_require__(41));
4007 __export(__webpack_require__(57));
4008 __export(__webpack_require__(58));
4009 __export(__webpack_require__(59));
4010 var connection_1 = __webpack_require__(71);
4011 exports.createProtocolConnection = connection_1.createProtocolConnection;
4012 const st = __webpack_require__(72);
4014 (function (Proposed) {
4015 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
4016 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
4017 Proposed.SemanticTokens = st.SemanticTokens;
4018 let SemanticTokensRequest;
4019 (function (SemanticTokensRequest) {
4020 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
4021 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
4022 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
4023 let SemanticTokensEditsRequest;
4024 (function (SemanticTokensEditsRequest) {
4025 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
4026 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
4027 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
4028 let SemanticTokensRangeRequest;
4029 (function (SemanticTokensRangeRequest) {
4030 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
4031 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
4032 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
4033 })(Proposed = exports.Proposed || (exports.Proposed = {}));
4034 //# sourceMappingURL=api.js.map
4038 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4040 __webpack_require__.r(__webpack_exports__);
4041 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4042 /* harmony export */ "Position": () => /* binding */ Position,
4043 /* harmony export */ "Range": () => /* binding */ Range,
4044 /* harmony export */ "Location": () => /* binding */ Location,
4045 /* harmony export */ "LocationLink": () => /* binding */ LocationLink,
4046 /* harmony export */ "Color": () => /* binding */ Color,
4047 /* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
4048 /* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
4049 /* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
4050 /* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
4051 /* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
4052 /* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
4053 /* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
4054 /* harmony export */ "DiagnosticCode": () => /* binding */ DiagnosticCode,
4055 /* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
4056 /* harmony export */ "Command": () => /* binding */ Command,
4057 /* harmony export */ "TextEdit": () => /* binding */ TextEdit,
4058 /* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
4059 /* harmony export */ "CreateFile": () => /* binding */ CreateFile,
4060 /* harmony export */ "RenameFile": () => /* binding */ RenameFile,
4061 /* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
4062 /* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
4063 /* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
4064 /* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
4065 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
4066 /* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
4067 /* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
4068 /* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
4069 /* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
4070 /* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
4071 /* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
4072 /* harmony export */ "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
4073 /* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
4074 /* harmony export */ "CompletionList": () => /* binding */ CompletionList,
4075 /* harmony export */ "MarkedString": () => /* binding */ MarkedString,
4076 /* harmony export */ "Hover": () => /* binding */ Hover,
4077 /* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
4078 /* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
4079 /* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
4080 /* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
4081 /* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
4082 /* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
4083 /* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
4084 /* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
4085 /* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
4086 /* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
4087 /* harmony export */ "CodeAction": () => /* binding */ CodeAction,
4088 /* harmony export */ "CodeLens": () => /* binding */ CodeLens,
4089 /* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
4090 /* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
4091 /* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
4092 /* harmony export */ "EOL": () => /* binding */ EOL,
4093 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
4094 /* harmony export */ });
4095 /* --------------------------------------------------------------------------------------------
4096 * Copyright (c) Microsoft Corporation. All rights reserved.
4097 * Licensed under the MIT License. See License.txt in the project root for license information.
4098 * ------------------------------------------------------------------------------------------ */
4101 * The Position namespace provides helper functions to work with
4102 * [Position](#Position) literals.
4105 (function (Position) {
4107 * Creates a new Position literal from the given line and character.
4108 * @param line The position's line.
4109 * @param character The position's character.
4111 function create(line, character) {
4112 return { line: line, character: character };
4114 Position.create = create;
4116 * Checks whether the given liternal conforms to the [Position](#Position) interface.
4118 function is(value) {
4119 var candidate = value;
4120 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
4123 })(Position || (Position = {}));
4125 * The Range namespace provides helper functions to work with
4126 * [Range](#Range) literals.
4130 function create(one, two, three, four) {
4131 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
4132 return { start: Position.create(one, two), end: Position.create(three, four) };
4134 else if (Position.is(one) && Position.is(two)) {
4135 return { start: one, end: two };
4138 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
4141 Range.create = create;
4143 * Checks whether the given literal conforms to the [Range](#Range) interface.
4145 function is(value) {
4146 var candidate = value;
4147 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
4150 })(Range || (Range = {}));
4152 * The Location namespace provides helper functions to work with
4153 * [Location](#Location) literals.
4156 (function (Location) {
4158 * Creates a Location literal.
4159 * @param uri The location's uri.
4160 * @param range The location's range.
4162 function create(uri, range) {
4163 return { uri: uri, range: range };
4165 Location.create = create;
4167 * Checks whether the given literal conforms to the [Location](#Location) interface.
4169 function is(value) {
4170 var candidate = value;
4171 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
4174 })(Location || (Location = {}));
4176 * The LocationLink namespace provides helper functions to work with
4177 * [LocationLink](#LocationLink) literals.
4180 (function (LocationLink) {
4182 * Creates a LocationLink literal.
4183 * @param targetUri The definition's uri.
4184 * @param targetRange The full range of the definition.
4185 * @param targetSelectionRange The span of the symbol definition at the target.
4186 * @param originSelectionRange The span of the symbol being defined in the originating source file.
4188 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
4189 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
4191 LocationLink.create = create;
4193 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
4195 function is(value) {
4196 var candidate = value;
4197 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
4198 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
4199 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
4201 LocationLink.is = is;
4202 })(LocationLink || (LocationLink = {}));
4204 * The Color namespace provides helper functions to work with
4205 * [Color](#Color) literals.
4210 * Creates a new Color literal.
4212 function create(red, green, blue, alpha) {
4220 Color.create = create;
4222 * Checks whether the given literal conforms to the [Color](#Color) interface.
4224 function is(value) {
4225 var candidate = value;
4226 return Is.number(candidate.red)
4227 && Is.number(candidate.green)
4228 && Is.number(candidate.blue)
4229 && Is.number(candidate.alpha);
4232 })(Color || (Color = {}));
4234 * The ColorInformation namespace provides helper functions to work with
4235 * [ColorInformation](#ColorInformation) literals.
4237 var ColorInformation;
4238 (function (ColorInformation) {
4240 * Creates a new ColorInformation literal.
4242 function create(range, color) {
4248 ColorInformation.create = create;
4250 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
4252 function is(value) {
4253 var candidate = value;
4254 return Range.is(candidate.range) && Color.is(candidate.color);
4256 ColorInformation.is = is;
4257 })(ColorInformation || (ColorInformation = {}));
4259 * The Color namespace provides helper functions to work with
4260 * [ColorPresentation](#ColorPresentation) literals.
4262 var ColorPresentation;
4263 (function (ColorPresentation) {
4265 * Creates a new ColorInformation literal.
4267 function create(label, textEdit, additionalTextEdits) {
4271 additionalTextEdits: additionalTextEdits,
4274 ColorPresentation.create = create;
4276 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
4278 function is(value) {
4279 var candidate = value;
4280 return Is.string(candidate.label)
4281 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
4282 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
4284 ColorPresentation.is = is;
4285 })(ColorPresentation || (ColorPresentation = {}));
4287 * Enum of known range kinds
4289 var FoldingRangeKind;
4290 (function (FoldingRangeKind) {
4292 * Folding range for a comment
4294 FoldingRangeKind["Comment"] = "comment";
4296 * Folding range for a imports or includes
4298 FoldingRangeKind["Imports"] = "imports";
4300 * Folding range for a region (e.g. `#region`)
4302 FoldingRangeKind["Region"] = "region";
4303 })(FoldingRangeKind || (FoldingRangeKind = {}));
4305 * The folding range namespace provides helper functions to work with
4306 * [FoldingRange](#FoldingRange) literals.
4309 (function (FoldingRange) {
4311 * Creates a new FoldingRange literal.
4313 function create(startLine, endLine, startCharacter, endCharacter, kind) {
4315 startLine: startLine,
4318 if (Is.defined(startCharacter)) {
4319 result.startCharacter = startCharacter;
4321 if (Is.defined(endCharacter)) {
4322 result.endCharacter = endCharacter;
4324 if (Is.defined(kind)) {
4329 FoldingRange.create = create;
4331 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
4333 function is(value) {
4334 var candidate = value;
4335 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
4336 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
4337 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
4338 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
4340 FoldingRange.is = is;
4341 })(FoldingRange || (FoldingRange = {}));
4343 * The DiagnosticRelatedInformation namespace provides helper functions to work with
4344 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
4346 var DiagnosticRelatedInformation;
4347 (function (DiagnosticRelatedInformation) {
4349 * Creates a new DiagnosticRelatedInformation literal.
4351 function create(location, message) {
4357 DiagnosticRelatedInformation.create = create;
4359 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
4361 function is(value) {
4362 var candidate = value;
4363 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
4365 DiagnosticRelatedInformation.is = is;
4366 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
4368 * The diagnostic's severity.
4370 var DiagnosticSeverity;
4371 (function (DiagnosticSeverity) {
4375 DiagnosticSeverity.Error = 1;
4377 * Reports a warning.
4379 DiagnosticSeverity.Warning = 2;
4381 * Reports an information.
4383 DiagnosticSeverity.Information = 3;
4387 DiagnosticSeverity.Hint = 4;
4388 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
4390 * The diagnostic tags.
4395 (function (DiagnosticTag) {
4397 * Unused or unnecessary code.
4399 * Clients are allowed to render diagnostics with this tag faded out instead of having
4400 * an error squiggle.
4402 DiagnosticTag.Unnecessary = 1;
4404 * Deprecated or obsolete code.
4406 * Clients are allowed to rendered diagnostics with this tag strike through.
4408 DiagnosticTag.Deprecated = 2;
4409 })(DiagnosticTag || (DiagnosticTag = {}));
4411 * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
4413 * @since 3.16.0 - Proposed state
4416 (function (DiagnosticCode) {
4418 * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
4420 function is(value) {
4421 var candidate = value;
4422 return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
4424 DiagnosticCode.is = is;
4425 })(DiagnosticCode || (DiagnosticCode = {}));
4427 * The Diagnostic namespace provides helper functions to work with
4428 * [Diagnostic](#Diagnostic) literals.
4431 (function (Diagnostic) {
4433 * Creates a new Diagnostic literal.
4435 function create(range, message, severity, code, source, relatedInformation) {
4436 var result = { range: range, message: message };
4437 if (Is.defined(severity)) {
4438 result.severity = severity;
4440 if (Is.defined(code)) {
4443 if (Is.defined(source)) {
4444 result.source = source;
4446 if (Is.defined(relatedInformation)) {
4447 result.relatedInformation = relatedInformation;
4451 Diagnostic.create = create;
4453 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
4455 function is(value) {
4456 var candidate = value;
4457 return Is.defined(candidate)
4458 && Range.is(candidate.range)
4459 && Is.string(candidate.message)
4460 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
4461 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
4462 && (Is.string(candidate.source) || Is.undefined(candidate.source))
4463 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
4466 })(Diagnostic || (Diagnostic = {}));
4468 * The Command namespace provides helper functions to work with
4469 * [Command](#Command) literals.
4472 (function (Command) {
4474 * Creates a new Command literal.
4476 function create(title, command) {
4478 for (var _i = 2; _i < arguments.length; _i++) {
4479 args[_i - 2] = arguments[_i];
4481 var result = { title: title, command: command };
4482 if (Is.defined(args) && args.length > 0) {
4483 result.arguments = args;
4487 Command.create = create;
4489 * Checks whether the given literal conforms to the [Command](#Command) interface.
4491 function is(value) {
4492 var candidate = value;
4493 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
4496 })(Command || (Command = {}));
4498 * The TextEdit namespace provides helper function to create replace,
4499 * insert and delete edits more easily.
4502 (function (TextEdit) {
4504 * Creates a replace text edit.
4505 * @param range The range of text to be replaced.
4506 * @param newText The new text.
4508 function replace(range, newText) {
4509 return { range: range, newText: newText };
4511 TextEdit.replace = replace;
4513 * Creates a insert text edit.
4514 * @param position The position to insert the text at.
4515 * @param newText The text to be inserted.
4517 function insert(position, newText) {
4518 return { range: { start: position, end: position }, newText: newText };
4520 TextEdit.insert = insert;
4522 * Creates a delete text edit.
4523 * @param range The range of text to be deleted.
4525 function del(range) {
4526 return { range: range, newText: '' };
4529 function is(value) {
4530 var candidate = value;
4531 return Is.objectLiteral(candidate)
4532 && Is.string(candidate.newText)
4533 && Range.is(candidate.range);
4536 })(TextEdit || (TextEdit = {}));
4538 * The TextDocumentEdit namespace provides helper function to create
4539 * an edit that manipulates a text document.
4541 var TextDocumentEdit;
4542 (function (TextDocumentEdit) {
4544 * Creates a new `TextDocumentEdit`
4546 function create(textDocument, edits) {
4547 return { textDocument: textDocument, edits: edits };
4549 TextDocumentEdit.create = create;
4550 function is(value) {
4551 var candidate = value;
4552 return Is.defined(candidate)
4553 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
4554 && Array.isArray(candidate.edits);
4556 TextDocumentEdit.is = is;
4557 })(TextDocumentEdit || (TextDocumentEdit = {}));
4559 (function (CreateFile) {
4560 function create(uri, options) {
4565 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4566 result.options = options;
4570 CreateFile.create = create;
4571 function is(value) {
4572 var candidate = value;
4573 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
4574 (candidate.options === void 0 ||
4575 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4578 })(CreateFile || (CreateFile = {}));
4580 (function (RenameFile) {
4581 function create(oldUri, newUri, options) {
4587 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4588 result.options = options;
4592 RenameFile.create = create;
4593 function is(value) {
4594 var candidate = value;
4595 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
4596 (candidate.options === void 0 ||
4597 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4600 })(RenameFile || (RenameFile = {}));
4602 (function (DeleteFile) {
4603 function create(uri, options) {
4608 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
4609 result.options = options;
4613 DeleteFile.create = create;
4614 function is(value) {
4615 var candidate = value;
4616 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
4617 (candidate.options === void 0 ||
4618 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
4621 })(DeleteFile || (DeleteFile = {}));
4623 (function (WorkspaceEdit) {
4624 function is(value) {
4625 var candidate = value;
4627 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
4628 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
4629 if (Is.string(change.kind)) {
4630 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
4633 return TextDocumentEdit.is(change);
4637 WorkspaceEdit.is = is;
4638 })(WorkspaceEdit || (WorkspaceEdit = {}));
4639 var TextEditChangeImpl = /** @class */ (function () {
4640 function TextEditChangeImpl(edits) {
4643 TextEditChangeImpl.prototype.insert = function (position, newText) {
4644 this.edits.push(TextEdit.insert(position, newText));
4646 TextEditChangeImpl.prototype.replace = function (range, newText) {
4647 this.edits.push(TextEdit.replace(range, newText));
4649 TextEditChangeImpl.prototype.delete = function (range) {
4650 this.edits.push(TextEdit.del(range));
4652 TextEditChangeImpl.prototype.add = function (edit) {
4653 this.edits.push(edit);
4655 TextEditChangeImpl.prototype.all = function () {
4658 TextEditChangeImpl.prototype.clear = function () {
4659 this.edits.splice(0, this.edits.length);
4661 return TextEditChangeImpl;
4664 * A workspace change helps constructing changes to a workspace.
4666 var WorkspaceChange = /** @class */ (function () {
4667 function WorkspaceChange(workspaceEdit) {
4669 this._textEditChanges = Object.create(null);
4670 if (workspaceEdit) {
4671 this._workspaceEdit = workspaceEdit;
4672 if (workspaceEdit.documentChanges) {
4673 workspaceEdit.documentChanges.forEach(function (change) {
4674 if (TextDocumentEdit.is(change)) {
4675 var textEditChange = new TextEditChangeImpl(change.edits);
4676 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4680 else if (workspaceEdit.changes) {
4681 Object.keys(workspaceEdit.changes).forEach(function (key) {
4682 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4683 _this._textEditChanges[key] = textEditChange;
4688 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4690 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4691 * use to be returned from a workspace edit operation like rename.
4694 if (this._workspaceEdit === undefined) {
4695 return { documentChanges: [] };
4697 return this._workspaceEdit;
4702 WorkspaceChange.prototype.getTextEditChange = function (key) {
4703 if (VersionedTextDocumentIdentifier.is(key)) {
4704 if (!this._workspaceEdit) {
4705 this._workspaceEdit = {
4709 if (!this._workspaceEdit.documentChanges) {
4710 throw new Error('Workspace edit is not configured for document changes.');
4712 var textDocument = key;
4713 var result = this._textEditChanges[textDocument.uri];
4716 var textDocumentEdit = {
4717 textDocument: textDocument,
4720 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4721 result = new TextEditChangeImpl(edits);
4722 this._textEditChanges[textDocument.uri] = result;
4727 if (!this._workspaceEdit) {
4728 this._workspaceEdit = {
4729 changes: Object.create(null)
4732 if (!this._workspaceEdit.changes) {
4733 throw new Error('Workspace edit is not configured for normal text edit changes.');
4735 var result = this._textEditChanges[key];
4738 this._workspaceEdit.changes[key] = edits;
4739 result = new TextEditChangeImpl(edits);
4740 this._textEditChanges[key] = result;
4745 WorkspaceChange.prototype.createFile = function (uri, options) {
4746 this.checkDocumentChanges();
4747 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4749 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4750 this.checkDocumentChanges();
4751 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4753 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4754 this.checkDocumentChanges();
4755 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4757 WorkspaceChange.prototype.checkDocumentChanges = function () {
4758 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4759 throw new Error('Workspace edit is not configured for document changes.');
4762 return WorkspaceChange;
4766 * The TextDocumentIdentifier namespace provides helper functions to work with
4767 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4769 var TextDocumentIdentifier;
4770 (function (TextDocumentIdentifier) {
4772 * Creates a new TextDocumentIdentifier literal.
4773 * @param uri The document's uri.
4775 function create(uri) {
4776 return { uri: uri };
4778 TextDocumentIdentifier.create = create;
4780 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4782 function is(value) {
4783 var candidate = value;
4784 return Is.defined(candidate) && Is.string(candidate.uri);
4786 TextDocumentIdentifier.is = is;
4787 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4789 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4790 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4792 var VersionedTextDocumentIdentifier;
4793 (function (VersionedTextDocumentIdentifier) {
4795 * Creates a new VersionedTextDocumentIdentifier literal.
4796 * @param uri The document's uri.
4797 * @param uri The document's text.
4799 function create(uri, version) {
4800 return { uri: uri, version: version };
4802 VersionedTextDocumentIdentifier.create = create;
4804 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4806 function is(value) {
4807 var candidate = value;
4808 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4810 VersionedTextDocumentIdentifier.is = is;
4811 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4813 * The TextDocumentItem namespace provides helper functions to work with
4814 * [TextDocumentItem](#TextDocumentItem) literals.
4816 var TextDocumentItem;
4817 (function (TextDocumentItem) {
4819 * Creates a new TextDocumentItem literal.
4820 * @param uri The document's uri.
4821 * @param languageId The document's language identifier.
4822 * @param version The document's version number.
4823 * @param text The document's text.
4825 function create(uri, languageId, version, text) {
4826 return { uri: uri, languageId: languageId, version: version, text: text };
4828 TextDocumentItem.create = create;
4830 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4832 function is(value) {
4833 var candidate = value;
4834 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4836 TextDocumentItem.is = is;
4837 })(TextDocumentItem || (TextDocumentItem = {}));
4839 * Describes the content type that a client supports in various
4840 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4842 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4843 * are reserved for internal usage.
4846 (function (MarkupKind) {
4848 * Plain text is supported as a content format
4850 MarkupKind.PlainText = 'plaintext';
4852 * Markdown is supported as a content format
4854 MarkupKind.Markdown = 'markdown';
4855 })(MarkupKind || (MarkupKind = {}));
4856 (function (MarkupKind) {
4858 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4860 function is(value) {
4861 var candidate = value;
4862 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4865 })(MarkupKind || (MarkupKind = {}));
4867 (function (MarkupContent) {
4869 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4871 function is(value) {
4872 var candidate = value;
4873 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4875 MarkupContent.is = is;
4876 })(MarkupContent || (MarkupContent = {}));
4878 * The kind of a completion entry.
4880 var CompletionItemKind;
4881 (function (CompletionItemKind) {
4882 CompletionItemKind.Text = 1;
4883 CompletionItemKind.Method = 2;
4884 CompletionItemKind.Function = 3;
4885 CompletionItemKind.Constructor = 4;
4886 CompletionItemKind.Field = 5;
4887 CompletionItemKind.Variable = 6;
4888 CompletionItemKind.Class = 7;
4889 CompletionItemKind.Interface = 8;
4890 CompletionItemKind.Module = 9;
4891 CompletionItemKind.Property = 10;
4892 CompletionItemKind.Unit = 11;
4893 CompletionItemKind.Value = 12;
4894 CompletionItemKind.Enum = 13;
4895 CompletionItemKind.Keyword = 14;
4896 CompletionItemKind.Snippet = 15;
4897 CompletionItemKind.Color = 16;
4898 CompletionItemKind.File = 17;
4899 CompletionItemKind.Reference = 18;
4900 CompletionItemKind.Folder = 19;
4901 CompletionItemKind.EnumMember = 20;
4902 CompletionItemKind.Constant = 21;
4903 CompletionItemKind.Struct = 22;
4904 CompletionItemKind.Event = 23;
4905 CompletionItemKind.Operator = 24;
4906 CompletionItemKind.TypeParameter = 25;
4907 })(CompletionItemKind || (CompletionItemKind = {}));
4909 * Defines whether the insert text in a completion item should be interpreted as
4910 * plain text or a snippet.
4912 var InsertTextFormat;
4913 (function (InsertTextFormat) {
4915 * The primary text to be inserted is treated as a plain string.
4917 InsertTextFormat.PlainText = 1;
4919 * The primary text to be inserted is treated as a snippet.
4921 * A snippet can define tab stops and placeholders with `$1`, `$2`
4922 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4923 * the end of the snippet. Placeholders with equal identifiers are linked,
4924 * that is typing in one will update others too.
4926 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
4928 InsertTextFormat.Snippet = 2;
4929 })(InsertTextFormat || (InsertTextFormat = {}));
4931 * Completion item tags are extra annotations that tweak the rendering of a completion
4936 var CompletionItemTag;
4937 (function (CompletionItemTag) {
4939 * Render a completion as obsolete, usually using a strike-out.
4941 CompletionItemTag.Deprecated = 1;
4942 })(CompletionItemTag || (CompletionItemTag = {}));
4944 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
4946 * @since 3.16.0 - Proposed state
4948 var InsertReplaceEdit;
4949 (function (InsertReplaceEdit) {
4951 * Creates a new insert / replace edit
4953 function create(newText, insert, replace) {
4954 return { newText: newText, insert: insert, replace: replace };
4956 InsertReplaceEdit.create = create;
4958 * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
4960 function is(value) {
4961 var candidate = value;
4962 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
4964 InsertReplaceEdit.is = is;
4965 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
4967 * The CompletionItem namespace provides functions to deal with
4971 (function (CompletionItem) {
4973 * Create a completion item and seed it with a label.
4974 * @param label The completion item's label
4976 function create(label) {
4977 return { label: label };
4979 CompletionItem.create = create;
4980 })(CompletionItem || (CompletionItem = {}));
4982 * The CompletionList namespace provides functions to deal with
4986 (function (CompletionList) {
4988 * Creates a new completion list.
4990 * @param items The completion items.
4991 * @param isIncomplete The list is not complete.
4993 function create(items, isIncomplete) {
4994 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4996 CompletionList.create = create;
4997 })(CompletionList || (CompletionList = {}));
4999 (function (MarkedString) {
5001 * Creates a marked string from plain text.
5003 * @param plainText The plain text.
5005 function fromPlainText(plainText) {
5006 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
5008 MarkedString.fromPlainText = fromPlainText;
5010 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
5012 function is(value) {
5013 var candidate = value;
5014 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
5016 MarkedString.is = is;
5017 })(MarkedString || (MarkedString = {}));
5021 * Checks whether the given value conforms to the [Hover](#Hover) interface.
5023 function is(value) {
5024 var candidate = value;
5025 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
5026 MarkedString.is(candidate.contents) ||
5027 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
5030 })(Hover || (Hover = {}));
5032 * The ParameterInformation namespace provides helper functions to work with
5033 * [ParameterInformation](#ParameterInformation) literals.
5035 var ParameterInformation;
5036 (function (ParameterInformation) {
5038 * Creates a new parameter information literal.
5040 * @param label A label string.
5041 * @param documentation A doc string.
5043 function create(label, documentation) {
5044 return documentation ? { label: label, documentation: documentation } : { label: label };
5046 ParameterInformation.create = create;
5047 })(ParameterInformation || (ParameterInformation = {}));
5049 * The SignatureInformation namespace provides helper functions to work with
5050 * [SignatureInformation](#SignatureInformation) literals.
5052 var SignatureInformation;
5053 (function (SignatureInformation) {
5054 function create(label, documentation) {
5055 var parameters = [];
5056 for (var _i = 2; _i < arguments.length; _i++) {
5057 parameters[_i - 2] = arguments[_i];
5059 var result = { label: label };
5060 if (Is.defined(documentation)) {
5061 result.documentation = documentation;
5063 if (Is.defined(parameters)) {
5064 result.parameters = parameters;
5067 result.parameters = [];
5071 SignatureInformation.create = create;
5072 })(SignatureInformation || (SignatureInformation = {}));
5074 * A document highlight kind.
5076 var DocumentHighlightKind;
5077 (function (DocumentHighlightKind) {
5079 * A textual occurrence.
5081 DocumentHighlightKind.Text = 1;
5083 * Read-access of a symbol, like reading a variable.
5085 DocumentHighlightKind.Read = 2;
5087 * Write-access of a symbol, like writing to a variable.
5089 DocumentHighlightKind.Write = 3;
5090 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
5092 * DocumentHighlight namespace to provide helper functions to work with
5093 * [DocumentHighlight](#DocumentHighlight) literals.
5095 var DocumentHighlight;
5096 (function (DocumentHighlight) {
5098 * Create a DocumentHighlight object.
5099 * @param range The range the highlight applies to.
5101 function create(range, kind) {
5102 var result = { range: range };
5103 if (Is.number(kind)) {
5108 DocumentHighlight.create = create;
5109 })(DocumentHighlight || (DocumentHighlight = {}));
5114 (function (SymbolKind) {
5115 SymbolKind.File = 1;
5116 SymbolKind.Module = 2;
5117 SymbolKind.Namespace = 3;
5118 SymbolKind.Package = 4;
5119 SymbolKind.Class = 5;
5120 SymbolKind.Method = 6;
5121 SymbolKind.Property = 7;
5122 SymbolKind.Field = 8;
5123 SymbolKind.Constructor = 9;
5124 SymbolKind.Enum = 10;
5125 SymbolKind.Interface = 11;
5126 SymbolKind.Function = 12;
5127 SymbolKind.Variable = 13;
5128 SymbolKind.Constant = 14;
5129 SymbolKind.String = 15;
5130 SymbolKind.Number = 16;
5131 SymbolKind.Boolean = 17;
5132 SymbolKind.Array = 18;
5133 SymbolKind.Object = 19;
5134 SymbolKind.Key = 20;
5135 SymbolKind.Null = 21;
5136 SymbolKind.EnumMember = 22;
5137 SymbolKind.Struct = 23;
5138 SymbolKind.Event = 24;
5139 SymbolKind.Operator = 25;
5140 SymbolKind.TypeParameter = 26;
5141 })(SymbolKind || (SymbolKind = {}));
5143 * Symbol tags are extra annotations that tweak the rendering of a symbol.
5147 (function (SymbolTag) {
5149 * Render a symbol as obsolete, usually using a strike-out.
5151 SymbolTag.Deprecated = 1;
5152 })(SymbolTag || (SymbolTag = {}));
5153 var SymbolInformation;
5154 (function (SymbolInformation) {
5156 * Creates a new symbol information literal.
5158 * @param name The name of the symbol.
5159 * @param kind The kind of the symbol.
5160 * @param range The range of the location of the symbol.
5161 * @param uri The resource of the location of symbol, defaults to the current document.
5162 * @param containerName The name of the symbol containing the symbol.
5164 function create(name, kind, range, uri, containerName) {
5168 location: { uri: uri, range: range }
5170 if (containerName) {
5171 result.containerName = containerName;
5175 SymbolInformation.create = create;
5176 })(SymbolInformation || (SymbolInformation = {}));
5178 (function (DocumentSymbol) {
5180 * Creates a new symbol information literal.
5182 * @param name The name of the symbol.
5183 * @param detail The detail of the symbol.
5184 * @param kind The kind of the symbol.
5185 * @param range The range of the symbol.
5186 * @param selectionRange The selectionRange of the symbol.
5187 * @param children Children of the symbol.
5189 function create(name, detail, kind, range, selectionRange, children) {
5195 selectionRange: selectionRange
5197 if (children !== void 0) {
5198 result.children = children;
5202 DocumentSymbol.create = create;
5204 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
5206 function is(value) {
5207 var candidate = value;
5209 Is.string(candidate.name) && Is.number(candidate.kind) &&
5210 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
5211 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
5212 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
5213 (candidate.children === void 0 || Array.isArray(candidate.children)) &&
5214 (candidate.tags === void 0 || Array.isArray(candidate.tags));
5216 DocumentSymbol.is = is;
5217 })(DocumentSymbol || (DocumentSymbol = {}));
5219 * A set of predefined code action kinds
5222 (function (CodeActionKind) {
5226 CodeActionKind.Empty = '';
5228 * Base kind for quickfix actions: 'quickfix'
5230 CodeActionKind.QuickFix = 'quickfix';
5232 * Base kind for refactoring actions: 'refactor'
5234 CodeActionKind.Refactor = 'refactor';
5236 * Base kind for refactoring extraction actions: 'refactor.extract'
5238 * Example extract actions:
5241 * - Extract function
5242 * - Extract variable
5243 * - Extract interface from class
5246 CodeActionKind.RefactorExtract = 'refactor.extract';
5248 * Base kind for refactoring inline actions: 'refactor.inline'
5250 * Example inline actions:
5257 CodeActionKind.RefactorInline = 'refactor.inline';
5259 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
5261 * Example rewrite actions:
5263 * - Convert JavaScript function to class
5264 * - Add or remove parameter
5265 * - Encapsulate field
5266 * - Make method static
5267 * - Move method to base class
5270 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
5272 * Base kind for source actions: `source`
5274 * Source code actions apply to the entire file.
5276 CodeActionKind.Source = 'source';
5278 * Base kind for an organize imports source action: `source.organizeImports`
5280 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
5282 * Base kind for auto-fix source actions: `source.fixAll`.
5284 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
5285 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
5289 CodeActionKind.SourceFixAll = 'source.fixAll';
5290 })(CodeActionKind || (CodeActionKind = {}));
5292 * The CodeActionContext namespace provides helper functions to work with
5293 * [CodeActionContext](#CodeActionContext) literals.
5295 var CodeActionContext;
5296 (function (CodeActionContext) {
5298 * Creates a new CodeActionContext literal.
5300 function create(diagnostics, only) {
5301 var result = { diagnostics: diagnostics };
5302 if (only !== void 0 && only !== null) {
5307 CodeActionContext.create = create;
5309 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
5311 function is(value) {
5312 var candidate = value;
5313 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
5315 CodeActionContext.is = is;
5316 })(CodeActionContext || (CodeActionContext = {}));
5318 (function (CodeAction) {
5319 function create(title, commandOrEdit, kind) {
5320 var result = { title: title };
5321 if (Command.is(commandOrEdit)) {
5322 result.command = commandOrEdit;
5325 result.edit = commandOrEdit;
5327 if (kind !== void 0) {
5332 CodeAction.create = create;
5333 function is(value) {
5334 var candidate = value;
5335 return candidate && Is.string(candidate.title) &&
5336 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
5337 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
5338 (candidate.edit !== void 0 || candidate.command !== void 0) &&
5339 (candidate.command === void 0 || Command.is(candidate.command)) &&
5340 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
5341 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
5344 })(CodeAction || (CodeAction = {}));
5346 * The CodeLens namespace provides helper functions to work with
5347 * [CodeLens](#CodeLens) literals.
5350 (function (CodeLens) {
5352 * Creates a new CodeLens literal.
5354 function create(range, data) {
5355 var result = { range: range };
5356 if (Is.defined(data)) {
5361 CodeLens.create = create;
5363 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
5365 function is(value) {
5366 var candidate = value;
5367 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
5370 })(CodeLens || (CodeLens = {}));
5372 * The FormattingOptions namespace provides helper functions to work with
5373 * [FormattingOptions](#FormattingOptions) literals.
5375 var FormattingOptions;
5376 (function (FormattingOptions) {
5378 * Creates a new FormattingOptions literal.
5380 function create(tabSize, insertSpaces) {
5381 return { tabSize: tabSize, insertSpaces: insertSpaces };
5383 FormattingOptions.create = create;
5385 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
5387 function is(value) {
5388 var candidate = value;
5389 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
5391 FormattingOptions.is = is;
5392 })(FormattingOptions || (FormattingOptions = {}));
5394 * The DocumentLink namespace provides helper functions to work with
5395 * [DocumentLink](#DocumentLink) literals.
5398 (function (DocumentLink) {
5400 * Creates a new DocumentLink literal.
5402 function create(range, target, data) {
5403 return { range: range, target: target, data: data };
5405 DocumentLink.create = create;
5407 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
5409 function is(value) {
5410 var candidate = value;
5411 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
5413 DocumentLink.is = is;
5414 })(DocumentLink || (DocumentLink = {}));
5416 * The SelectionRange namespace provides helper function to work with
5417 * SelectionRange literals.
5420 (function (SelectionRange) {
5422 * Creates a new SelectionRange
5423 * @param range the range.
5424 * @param parent an optional parent.
5426 function create(range, parent) {
5427 return { range: range, parent: parent };
5429 SelectionRange.create = create;
5430 function is(value) {
5431 var candidate = value;
5432 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
5434 SelectionRange.is = is;
5435 })(SelectionRange || (SelectionRange = {}));
5436 var EOL = ['\n', '\r\n', '\r'];
5438 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
5441 (function (TextDocument) {
5443 * Creates a new ITextDocument literal from the given uri and content.
5444 * @param uri The document's uri.
5445 * @param languageId The document's language Id.
5446 * @param content The document's content.
5448 function create(uri, languageId, version, content) {
5449 return new FullTextDocument(uri, languageId, version, content);
5451 TextDocument.create = create;
5453 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
5455 function is(value) {
5456 var candidate = value;
5457 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
5458 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
5460 TextDocument.is = is;
5461 function applyEdits(document, edits) {
5462 var text = document.getText();
5463 var sortedEdits = mergeSort(edits, function (a, b) {
5464 var diff = a.range.start.line - b.range.start.line;
5466 return a.range.start.character - b.range.start.character;
5470 var lastModifiedOffset = text.length;
5471 for (var i = sortedEdits.length - 1; i >= 0; i--) {
5472 var e = sortedEdits[i];
5473 var startOffset = document.offsetAt(e.range.start);
5474 var endOffset = document.offsetAt(e.range.end);
5475 if (endOffset <= lastModifiedOffset) {
5476 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
5479 throw new Error('Overlapping edit');
5481 lastModifiedOffset = startOffset;
5485 TextDocument.applyEdits = applyEdits;
5486 function mergeSort(data, compare) {
5487 if (data.length <= 1) {
5491 var p = (data.length / 2) | 0;
5492 var left = data.slice(0, p);
5493 var right = data.slice(p);
5494 mergeSort(left, compare);
5495 mergeSort(right, compare);
5499 while (leftIdx < left.length && rightIdx < right.length) {
5500 var ret = compare(left[leftIdx], right[rightIdx]);
5502 // smaller_equal -> take left to preserve order
5503 data[i++] = left[leftIdx++];
5506 // greater -> take right
5507 data[i++] = right[rightIdx++];
5510 while (leftIdx < left.length) {
5511 data[i++] = left[leftIdx++];
5513 while (rightIdx < right.length) {
5514 data[i++] = right[rightIdx++];
5518 })(TextDocument || (TextDocument = {}));
5519 var FullTextDocument = /** @class */ (function () {
5520 function FullTextDocument(uri, languageId, version, content) {
5522 this._languageId = languageId;
5523 this._version = version;
5524 this._content = content;
5525 this._lineOffsets = undefined;
5527 Object.defineProperty(FullTextDocument.prototype, "uri", {
5534 Object.defineProperty(FullTextDocument.prototype, "languageId", {
5536 return this._languageId;
5541 Object.defineProperty(FullTextDocument.prototype, "version", {
5543 return this._version;
5548 FullTextDocument.prototype.getText = function (range) {
5550 var start = this.offsetAt(range.start);
5551 var end = this.offsetAt(range.end);
5552 return this._content.substring(start, end);
5554 return this._content;
5556 FullTextDocument.prototype.update = function (event, version) {
5557 this._content = event.text;
5558 this._version = version;
5559 this._lineOffsets = undefined;
5561 FullTextDocument.prototype.getLineOffsets = function () {
5562 if (this._lineOffsets === undefined) {
5563 var lineOffsets = [];
5564 var text = this._content;
5565 var isLineStart = true;
5566 for (var i = 0; i < text.length; i++) {
5568 lineOffsets.push(i);
5569 isLineStart = false;
5571 var ch = text.charAt(i);
5572 isLineStart = (ch === '\r' || ch === '\n');
5573 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
5577 if (isLineStart && text.length > 0) {
5578 lineOffsets.push(text.length);
5580 this._lineOffsets = lineOffsets;
5582 return this._lineOffsets;
5584 FullTextDocument.prototype.positionAt = function (offset) {
5585 offset = Math.max(Math.min(offset, this._content.length), 0);
5586 var lineOffsets = this.getLineOffsets();
5587 var low = 0, high = lineOffsets.length;
5589 return Position.create(0, offset);
5591 while (low < high) {
5592 var mid = Math.floor((low + high) / 2);
5593 if (lineOffsets[mid] > offset) {
5600 // low is the least x for which the line offset is larger than the current offset
5601 // or array.length if no line offset is larger than the current offset
5603 return Position.create(line, offset - lineOffsets[line]);
5605 FullTextDocument.prototype.offsetAt = function (position) {
5606 var lineOffsets = this.getLineOffsets();
5607 if (position.line >= lineOffsets.length) {
5608 return this._content.length;
5610 else if (position.line < 0) {
5613 var lineOffset = lineOffsets[position.line];
5614 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
5615 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
5617 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
5619 return this.getLineOffsets().length;
5624 return FullTextDocument;
5628 var toString = Object.prototype.toString;
5629 function defined(value) {
5630 return typeof value !== 'undefined';
5632 Is.defined = defined;
5633 function undefined(value) {
5634 return typeof value === 'undefined';
5636 Is.undefined = undefined;
5637 function boolean(value) {
5638 return value === true || value === false;
5640 Is.boolean = boolean;
5641 function string(value) {
5642 return toString.call(value) === '[object String]';
5645 function number(value) {
5646 return toString.call(value) === '[object Number]';
5649 function func(value) {
5650 return toString.call(value) === '[object Function]';
5653 function objectLiteral(value) {
5654 // Strictly speaking class instances pass this check as well. Since the LSP
5655 // doesn't use classes we ignore this for now. If we do we need to add something
5656 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5657 return value !== null && typeof value === 'object';
5659 Is.objectLiteral = objectLiteral;
5660 function typedArray(value, check) {
5661 return Array.isArray(value) && value.every(check);
5663 Is.typedArray = typedArray;
5664 })(Is || (Is = {}));
5669 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5672 /* --------------------------------------------------------------------------------------------
5673 * Copyright (c) Microsoft Corporation. All rights reserved.
5674 * Licensed under the MIT License. See License.txt in the project root for license information.
5675 * ------------------------------------------------------------------------------------------ */
5676 Object.defineProperty(exports, "__esModule", ({ value: true }));
5677 const vscode_jsonrpc_1 = __webpack_require__(41);
5678 class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5679 constructor(method) {
5683 exports.ProtocolRequestType0 = ProtocolRequestType0;
5684 class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5685 constructor(method) {
5689 exports.ProtocolRequestType = ProtocolRequestType;
5690 class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5691 constructor(method) {
5695 exports.ProtocolNotificationType = ProtocolNotificationType;
5696 class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5697 constructor(method) {
5701 exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5702 //# sourceMappingURL=messages.js.map
5706 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5709 /* --------------------------------------------------------------------------------------------
5710 * Copyright (c) Microsoft Corporation. All rights reserved.
5711 * Licensed under the MIT License. See License.txt in the project root for license information.
5712 * ------------------------------------------------------------------------------------------ */
5713 Object.defineProperty(exports, "__esModule", ({ value: true }));
5714 const Is = __webpack_require__(60);
5715 const vscode_jsonrpc_1 = __webpack_require__(41);
5716 const messages_1 = __webpack_require__(58);
5717 const protocol_implementation_1 = __webpack_require__(61);
5718 exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
5719 const protocol_typeDefinition_1 = __webpack_require__(62);
5720 exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
5721 const protocol_workspaceFolders_1 = __webpack_require__(63);
5722 exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
5723 exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
5724 const protocol_configuration_1 = __webpack_require__(64);
5725 exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
5726 const protocol_colorProvider_1 = __webpack_require__(65);
5727 exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
5728 exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
5729 const protocol_foldingRange_1 = __webpack_require__(66);
5730 exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
5731 const protocol_declaration_1 = __webpack_require__(67);
5732 exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
5733 const protocol_selectionRange_1 = __webpack_require__(68);
5734 exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
5735 const protocol_progress_1 = __webpack_require__(69);
5736 exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
5737 exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
5738 exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
5739 const protocol_callHierarchy_1 = __webpack_require__(70);
5740 exports.CallHierarchyIncomingCallsRequest = protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest;
5741 exports.CallHierarchyOutgoingCallsRequest = protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest;
5742 exports.CallHierarchyPrepareRequest = protocol_callHierarchy_1.CallHierarchyPrepareRequest;
5743 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
5744 let __noDynamicImport;
5746 * The DocumentFilter namespace provides helper functions to work with
5747 * [DocumentFilter](#DocumentFilter) literals.
5750 (function (DocumentFilter) {
5751 function is(value) {
5752 const candidate = value;
5753 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5755 DocumentFilter.is = is;
5756 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5758 * The DocumentSelector namespace provides helper functions to work with
5759 * [DocumentSelector](#DocumentSelector)s.
5761 var DocumentSelector;
5762 (function (DocumentSelector) {
5763 function is(value) {
5764 if (!Array.isArray(value)) {
5767 for (let elem of value) {
5768 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5774 DocumentSelector.is = is;
5775 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5777 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5778 * handler on the client side.
5780 var RegistrationRequest;
5781 (function (RegistrationRequest) {
5782 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5783 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5785 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5786 * handler on the client side.
5788 var UnregistrationRequest;
5789 (function (UnregistrationRequest) {
5790 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5791 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5792 var ResourceOperationKind;
5793 (function (ResourceOperationKind) {
5795 * Supports creating new files and folders.
5797 ResourceOperationKind.Create = 'create';
5799 * Supports renaming existing files and folders.
5801 ResourceOperationKind.Rename = 'rename';
5803 * Supports deleting existing files and folders.
5805 ResourceOperationKind.Delete = 'delete';
5806 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5807 var FailureHandlingKind;
5808 (function (FailureHandlingKind) {
5810 * Applying the workspace change is simply aborted if one of the changes provided
5811 * fails. All operations executed before the failing operation stay executed.
5813 FailureHandlingKind.Abort = 'abort';
5815 * All operations are executed transactional. That means they either all
5816 * succeed or no changes at all are applied to the workspace.
5818 FailureHandlingKind.Transactional = 'transactional';
5820 * If the workspace edit contains only textual file changes they are executed transactional.
5821 * If resource changes (create, rename or delete file) are part of the change the failure
5822 * handling startegy is abort.
5824 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5826 * The client tries to undo the operations already executed. But there is no
5827 * guarantee that this is succeeding.
5829 FailureHandlingKind.Undo = 'undo';
5830 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5832 * The StaticRegistrationOptions namespace provides helper functions to work with
5833 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5835 var StaticRegistrationOptions;
5836 (function (StaticRegistrationOptions) {
5837 function hasId(value) {
5838 const candidate = value;
5839 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5841 StaticRegistrationOptions.hasId = hasId;
5842 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5844 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5845 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5847 var TextDocumentRegistrationOptions;
5848 (function (TextDocumentRegistrationOptions) {
5849 function is(value) {
5850 const candidate = value;
5851 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5853 TextDocumentRegistrationOptions.is = is;
5854 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5856 * The WorkDoneProgressOptions namespace provides helper functions to work with
5857 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5859 var WorkDoneProgressOptions;
5860 (function (WorkDoneProgressOptions) {
5861 function is(value) {
5862 const candidate = value;
5863 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5865 WorkDoneProgressOptions.is = is;
5866 function hasWorkDoneProgress(value) {
5867 const candidate = value;
5868 return candidate && Is.boolean(candidate.workDoneProgress);
5870 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5871 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5873 * The initialize request is sent from the client to the server.
5874 * It is sent once as the request after starting up the server.
5875 * The requests parameter is of type [InitializeParams](#InitializeParams)
5876 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5879 var InitializeRequest;
5880 (function (InitializeRequest) {
5881 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5882 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5884 * Known error codes for an `InitializeError`;
5886 var InitializeError;
5887 (function (InitializeError) {
5889 * If the protocol version provided by the client can't be handled by the server.
5890 * @deprecated This initialize error got replaced by client capabilities. There is
5891 * no version handshake in version 3.0x
5893 InitializeError.unknownProtocolVersion = 1;
5894 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5896 * The intialized notification is sent from the client to the
5897 * server after the client is fully initialized and the server
5898 * is allowed to send requests from the server to the client.
5900 var InitializedNotification;
5901 (function (InitializedNotification) {
5902 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
5903 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5904 //---- Shutdown Method ----
5906 * A shutdown request is sent from the client to the server.
5907 * It is sent once when the client decides to shutdown the
5908 * server. The only notification that is sent after a shutdown request
5909 * is the exit event.
5911 var ShutdownRequest;
5912 (function (ShutdownRequest) {
5913 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
5914 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5915 //---- Exit Notification ----
5917 * The exit event is sent from the client to the server to
5918 * ask the server to exit its process.
5920 var ExitNotification;
5921 (function (ExitNotification) {
5922 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
5923 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5925 * The configuration change notification is sent from the client to the server
5926 * when the client's configuration has changed. The notification contains
5927 * the changed configuration as defined by the language client.
5929 var DidChangeConfigurationNotification;
5930 (function (DidChangeConfigurationNotification) {
5931 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
5932 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5933 //---- Message show and log notifications ----
5938 (function (MessageType) {
5942 MessageType.Error = 1;
5944 * A warning message.
5946 MessageType.Warning = 2;
5948 * An information message.
5950 MessageType.Info = 3;
5954 MessageType.Log = 4;
5955 })(MessageType = exports.MessageType || (exports.MessageType = {}));
5957 * The show message notification is sent from a server to a client to ask
5958 * the client to display a particular message in the user interface.
5960 var ShowMessageNotification;
5961 (function (ShowMessageNotification) {
5962 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
5963 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5965 * The show message request is sent from the server to the client to show a message
5966 * and a set of options actions to the user.
5968 var ShowMessageRequest;
5969 (function (ShowMessageRequest) {
5970 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
5971 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5973 * The log message notification is sent from the server to the client to ask
5974 * the client to log a particular message.
5976 var LogMessageNotification;
5977 (function (LogMessageNotification) {
5978 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
5979 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5980 //---- Telemetry notification
5982 * The telemetry event notification is sent from the server to the client to ask
5983 * the client to log telemetry data.
5985 var TelemetryEventNotification;
5986 (function (TelemetryEventNotification) {
5987 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
5988 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5990 * Defines how the host (editor) should sync
5991 * document changes to the language server.
5993 var TextDocumentSyncKind;
5994 (function (TextDocumentSyncKind) {
5996 * Documents should not be synced at all.
5998 TextDocumentSyncKind.None = 0;
6000 * Documents are synced by always sending the full content
6003 TextDocumentSyncKind.Full = 1;
6005 * Documents are synced by sending the full content on open.
6006 * After that only incremental updates to the document are
6009 TextDocumentSyncKind.Incremental = 2;
6010 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
6012 * The document open notification is sent from the client to the server to signal
6013 * newly opened text documents. The document's truth is now managed by the client
6014 * and the server must not try to read the document's truth using the document's
6015 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
6016 * mean that its content is presented in an editor. An open notification must not
6017 * be sent more than once without a corresponding close notification send before.
6018 * This means open and close notification must be balanced and the max open count
6021 var DidOpenTextDocumentNotification;
6022 (function (DidOpenTextDocumentNotification) {
6023 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
6024 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
6025 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
6027 * The document change notification is sent from the client to the server to signal
6028 * changes to a text document.
6030 var DidChangeTextDocumentNotification;
6031 (function (DidChangeTextDocumentNotification) {
6032 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
6033 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
6034 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
6036 * The document close notification is sent from the client to the server when
6037 * the document got closed in the client. The document's truth now exists where
6038 * the document's uri points to (e.g. if the document's uri is a file uri the
6039 * truth now exists on disk). As with the open notification the close notification
6040 * is about managing the document's content. Receiving a close notification
6041 * doesn't mean that the document was open in an editor before. A close
6042 * notification requires a previous open notification to be sent.
6044 var DidCloseTextDocumentNotification;
6045 (function (DidCloseTextDocumentNotification) {
6046 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
6047 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
6048 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
6050 * The document save notification is sent from the client to the server when
6051 * the document got saved in the client.
6053 var DidSaveTextDocumentNotification;
6054 (function (DidSaveTextDocumentNotification) {
6055 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
6056 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
6057 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
6059 * Represents reasons why a text document is saved.
6061 var TextDocumentSaveReason;
6062 (function (TextDocumentSaveReason) {
6064 * Manually triggered, e.g. by the user pressing save, by starting debugging,
6065 * or by an API call.
6067 TextDocumentSaveReason.Manual = 1;
6069 * Automatic after a delay.
6071 TextDocumentSaveReason.AfterDelay = 2;
6073 * When the editor lost focus.
6075 TextDocumentSaveReason.FocusOut = 3;
6076 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
6078 * A document will save notification is sent from the client to the server before
6079 * the document is actually saved.
6081 var WillSaveTextDocumentNotification;
6082 (function (WillSaveTextDocumentNotification) {
6083 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
6084 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
6085 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
6087 * A document will save request is sent from the client to the server before
6088 * the document is actually saved. The request can return an array of TextEdits
6089 * which will be applied to the text document before it is saved. Please note that
6090 * clients might drop results if computing the text edits took too long or if a
6091 * server constantly fails on this request. This is done to keep the save fast and
6094 var WillSaveTextDocumentWaitUntilRequest;
6095 (function (WillSaveTextDocumentWaitUntilRequest) {
6096 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
6097 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
6098 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
6100 * The watched files notification is sent from the client to the server when
6101 * the client detects changes to file watched by the language client.
6103 var DidChangeWatchedFilesNotification;
6104 (function (DidChangeWatchedFilesNotification) {
6105 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
6106 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
6108 * The file event type
6111 (function (FileChangeType) {
6113 * The file got created.
6115 FileChangeType.Created = 1;
6117 * The file got changed.
6119 FileChangeType.Changed = 2;
6121 * The file got deleted.
6123 FileChangeType.Deleted = 3;
6124 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
6126 (function (WatchKind) {
6128 * Interested in create events.
6130 WatchKind.Create = 1;
6132 * Interested in change events
6134 WatchKind.Change = 2;
6136 * Interested in delete events
6138 WatchKind.Delete = 4;
6139 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
6141 * Diagnostics notification are sent from the server to the client to signal
6142 * results of validation runs.
6144 var PublishDiagnosticsNotification;
6145 (function (PublishDiagnosticsNotification) {
6146 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
6147 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
6149 * How a completion was triggered
6151 var CompletionTriggerKind;
6152 (function (CompletionTriggerKind) {
6154 * Completion was triggered by typing an identifier (24x7 code
6155 * complete), manual invocation (e.g Ctrl+Space) or via API.
6157 CompletionTriggerKind.Invoked = 1;
6159 * Completion was triggered by a trigger character specified by
6160 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
6162 CompletionTriggerKind.TriggerCharacter = 2;
6164 * Completion was re-triggered as current completion list is incomplete
6166 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
6167 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
6169 * Request to request completion at a given text document position. The request's
6170 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
6171 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
6172 * or a Thenable that resolves to such.
6174 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
6175 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
6176 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
6177 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
6179 var CompletionRequest;
6180 (function (CompletionRequest) {
6181 CompletionRequest.method = 'textDocument/completion';
6182 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
6183 /** @deprecated Use CompletionRequest.type */
6184 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6185 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
6187 * Request to resolve additional information for a given completion item.The request's
6188 * parameter is of type [CompletionItem](#CompletionItem) the response
6189 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
6191 var CompletionResolveRequest;
6192 (function (CompletionResolveRequest) {
6193 CompletionResolveRequest.method = 'completionItem/resolve';
6194 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
6195 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
6197 * Request to request hover information at a given text document position. The request's
6198 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
6199 * type [Hover](#Hover) or a Thenable that resolves to such.
6202 (function (HoverRequest) {
6203 HoverRequest.method = 'textDocument/hover';
6204 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
6205 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
6207 * How a signature help was triggered.
6211 var SignatureHelpTriggerKind;
6212 (function (SignatureHelpTriggerKind) {
6214 * Signature help was invoked manually by the user or by a command.
6216 SignatureHelpTriggerKind.Invoked = 1;
6218 * Signature help was triggered by a trigger character.
6220 SignatureHelpTriggerKind.TriggerCharacter = 2;
6222 * Signature help was triggered by the cursor moving or by the document content changing.
6224 SignatureHelpTriggerKind.ContentChange = 3;
6225 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
6226 var SignatureHelpRequest;
6227 (function (SignatureHelpRequest) {
6228 SignatureHelpRequest.method = 'textDocument/signatureHelp';
6229 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
6230 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
6232 * A request to resolve the definition location of a symbol at a given text
6233 * document position. The request's parameter is of type [TextDocumentPosition]
6234 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
6235 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
6238 var DefinitionRequest;
6239 (function (DefinitionRequest) {
6240 DefinitionRequest.method = 'textDocument/definition';
6241 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
6242 /** @deprecated Use DefinitionRequest.type */
6243 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6244 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
6246 * A request to resolve project-wide references for the symbol denoted
6247 * by the given text document position. The request's parameter is of
6248 * type [ReferenceParams](#ReferenceParams) the response is of type
6249 * [Location[]](#Location) or a Thenable that resolves to such.
6251 var ReferencesRequest;
6252 (function (ReferencesRequest) {
6253 ReferencesRequest.method = 'textDocument/references';
6254 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
6255 /** @deprecated Use ReferencesRequest.type */
6256 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6257 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
6259 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
6260 * text document position. The request's parameter is of type [TextDocumentPosition]
6261 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
6262 * (#DocumentHighlight) or a Thenable that resolves to such.
6264 var DocumentHighlightRequest;
6265 (function (DocumentHighlightRequest) {
6266 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
6267 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
6268 /** @deprecated Use DocumentHighlightRequest.type */
6269 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6270 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
6272 * A request to list all symbols found in a given text document. The request's
6273 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
6274 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
6275 * that resolves to such.
6277 var DocumentSymbolRequest;
6278 (function (DocumentSymbolRequest) {
6279 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
6280 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
6281 /** @deprecated Use DocumentSymbolRequest.type */
6282 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6283 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
6285 * A request to provide commands for the given text document and range.
6287 var CodeActionRequest;
6288 (function (CodeActionRequest) {
6289 CodeActionRequest.method = 'textDocument/codeAction';
6290 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
6291 /** @deprecated Use CodeActionRequest.type */
6292 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6293 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
6295 * A request to list project-wide symbols matching the query string given
6296 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
6297 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
6300 var WorkspaceSymbolRequest;
6301 (function (WorkspaceSymbolRequest) {
6302 WorkspaceSymbolRequest.method = 'workspace/symbol';
6303 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
6304 /** @deprecated Use WorkspaceSymbolRequest.type */
6305 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6306 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
6308 * A request to provide code lens for the given text document.
6310 var CodeLensRequest;
6311 (function (CodeLensRequest) {
6312 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
6313 /** @deprecated Use CodeLensRequest.type */
6314 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6315 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
6317 * A request to resolve a command for a given code lens.
6319 var CodeLensResolveRequest;
6320 (function (CodeLensResolveRequest) {
6321 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
6322 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
6324 * A request to provide document links
6326 var DocumentLinkRequest;
6327 (function (DocumentLinkRequest) {
6328 DocumentLinkRequest.method = 'textDocument/documentLink';
6329 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
6330 /** @deprecated Use DocumentLinkRequest.type */
6331 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6332 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
6334 * Request to resolve additional information for a given document link. The request's
6335 * parameter is of type [DocumentLink](#DocumentLink) the response
6336 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
6338 var DocumentLinkResolveRequest;
6339 (function (DocumentLinkResolveRequest) {
6340 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
6341 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
6343 * A request to to format a whole document.
6345 var DocumentFormattingRequest;
6346 (function (DocumentFormattingRequest) {
6347 DocumentFormattingRequest.method = 'textDocument/formatting';
6348 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
6349 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
6351 * A request to to format a range in a document.
6353 var DocumentRangeFormattingRequest;
6354 (function (DocumentRangeFormattingRequest) {
6355 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
6356 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
6357 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
6359 * A request to format a document on type.
6361 var DocumentOnTypeFormattingRequest;
6362 (function (DocumentOnTypeFormattingRequest) {
6363 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
6364 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
6365 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
6367 * A request to rename a symbol.
6370 (function (RenameRequest) {
6371 RenameRequest.method = 'textDocument/rename';
6372 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
6373 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
6375 * A request to test and perform the setup necessary for a rename.
6377 var PrepareRenameRequest;
6378 (function (PrepareRenameRequest) {
6379 PrepareRenameRequest.method = 'textDocument/prepareRename';
6380 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
6381 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
6383 * A request send from the client to the server to execute a command. The request might return
6384 * a workspace edit which the client will apply to the workspace.
6386 var ExecuteCommandRequest;
6387 (function (ExecuteCommandRequest) {
6388 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
6389 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
6391 * A request sent from the server to the client to modified certain resources.
6393 var ApplyWorkspaceEditRequest;
6394 (function (ApplyWorkspaceEditRequest) {
6395 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
6396 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
6397 //# sourceMappingURL=protocol.js.map
6401 /***/ ((__unused_webpack_module, exports) => {
6403 /* --------------------------------------------------------------------------------------------
6404 * Copyright (c) Microsoft Corporation. All rights reserved.
6405 * Licensed under the MIT License. See License.txt in the project root for license information.
6406 * ------------------------------------------------------------------------------------------ */
6408 Object.defineProperty(exports, "__esModule", ({ value: true }));
6409 function boolean(value) {
6410 return value === true || value === false;
6412 exports.boolean = boolean;
6413 function string(value) {
6414 return typeof value === 'string' || value instanceof String;
6416 exports.string = string;
6417 function number(value) {
6418 return typeof value === 'number' || value instanceof Number;
6420 exports.number = number;
6421 function error(value) {
6422 return value instanceof Error;
6424 exports.error = error;
6425 function func(value) {
6426 return typeof value === 'function';
6428 exports.func = func;
6429 function array(value) {
6430 return Array.isArray(value);
6432 exports.array = array;
6433 function stringArray(value) {
6434 return array(value) && value.every(elem => string(elem));
6436 exports.stringArray = stringArray;
6437 function typedArray(value, check) {
6438 return Array.isArray(value) && value.every(check);
6440 exports.typedArray = typedArray;
6441 function objectLiteral(value) {
6442 // Strictly speaking class instances pass this check as well. Since the LSP
6443 // doesn't use classes we ignore this for now. If we do we need to add something
6444 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
6445 return value !== null && typeof value === 'object';
6447 exports.objectLiteral = objectLiteral;
6448 //# sourceMappingURL=is.js.map
6452 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6455 /* --------------------------------------------------------------------------------------------
6456 * Copyright (c) Microsoft Corporation. All rights reserved.
6457 * Licensed under the MIT License. See License.txt in the project root for license information.
6458 * ------------------------------------------------------------------------------------------ */
6459 Object.defineProperty(exports, "__esModule", ({ value: true }));
6460 const vscode_jsonrpc_1 = __webpack_require__(41);
6461 const messages_1 = __webpack_require__(58);
6462 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6463 let __noDynamicImport;
6465 * A request to resolve the implementation locations of a symbol at a given text
6466 * document position. The request's parameter is of type [TextDocumentPositioParams]
6467 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6468 * Thenable that resolves to such.
6470 var ImplementationRequest;
6471 (function (ImplementationRequest) {
6472 ImplementationRequest.method = 'textDocument/implementation';
6473 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
6474 /** @deprecated Use ImplementationRequest.type */
6475 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6476 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
6477 //# sourceMappingURL=protocol.implementation.js.map
6481 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6484 /* --------------------------------------------------------------------------------------------
6485 * Copyright (c) Microsoft Corporation. All rights reserved.
6486 * Licensed under the MIT License. See License.txt in the project root for license information.
6487 * ------------------------------------------------------------------------------------------ */
6488 Object.defineProperty(exports, "__esModule", ({ value: true }));
6489 const vscode_jsonrpc_1 = __webpack_require__(41);
6490 const messages_1 = __webpack_require__(58);
6491 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6492 let __noDynamicImport;
6494 * A request to resolve the type definition locations of a symbol at a given text
6495 * document position. The request's parameter is of type [TextDocumentPositioParams]
6496 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6497 * Thenable that resolves to such.
6499 var TypeDefinitionRequest;
6500 (function (TypeDefinitionRequest) {
6501 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
6502 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
6503 /** @deprecated Use TypeDefinitionRequest.type */
6504 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6505 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
6506 //# sourceMappingURL=protocol.typeDefinition.js.map
6510 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6513 /* --------------------------------------------------------------------------------------------
6514 * Copyright (c) Microsoft Corporation. All rights reserved.
6515 * Licensed under the MIT License. See License.txt in the project root for license information.
6516 * ------------------------------------------------------------------------------------------ */
6517 Object.defineProperty(exports, "__esModule", ({ value: true }));
6518 const messages_1 = __webpack_require__(58);
6520 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
6522 var WorkspaceFoldersRequest;
6523 (function (WorkspaceFoldersRequest) {
6524 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
6525 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
6527 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
6528 * folder configuration changes.
6530 var DidChangeWorkspaceFoldersNotification;
6531 (function (DidChangeWorkspaceFoldersNotification) {
6532 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
6533 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
6534 //# sourceMappingURL=protocol.workspaceFolders.js.map
6538 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6541 /* --------------------------------------------------------------------------------------------
6542 * Copyright (c) Microsoft Corporation. All rights reserved.
6543 * Licensed under the MIT License. See License.txt in the project root for license information.
6544 * ------------------------------------------------------------------------------------------ */
6545 Object.defineProperty(exports, "__esModule", ({ value: true }));
6546 const messages_1 = __webpack_require__(58);
6548 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
6549 * configuration setting.
6551 * This pull model replaces the old push model were the client signaled configuration change via an
6552 * event. If the server still needs to react to configuration changes (since the server caches the
6553 * result of `workspace/configuration` requests) the server should register for an empty configuration
6554 * change event and empty the cache if such an event is received.
6556 var ConfigurationRequest;
6557 (function (ConfigurationRequest) {
6558 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
6559 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
6560 //# sourceMappingURL=protocol.configuration.js.map
6564 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6567 /* --------------------------------------------------------------------------------------------
6568 * Copyright (c) Microsoft Corporation. All rights reserved.
6569 * Licensed under the MIT License. See License.txt in the project root for license information.
6570 * ------------------------------------------------------------------------------------------ */
6571 Object.defineProperty(exports, "__esModule", ({ value: true }));
6572 const vscode_jsonrpc_1 = __webpack_require__(41);
6573 const messages_1 = __webpack_require__(58);
6575 * A request to list all color symbols found in a given text document. The request's
6576 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
6577 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6578 * that resolves to such.
6580 var DocumentColorRequest;
6581 (function (DocumentColorRequest) {
6582 DocumentColorRequest.method = 'textDocument/documentColor';
6583 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
6584 /** @deprecated Use DocumentColorRequest.type */
6585 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6586 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
6588 * A request to list all presentation for a color. The request's
6589 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
6590 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6591 * that resolves to such.
6593 var ColorPresentationRequest;
6594 (function (ColorPresentationRequest) {
6595 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
6596 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
6597 //# sourceMappingURL=protocol.colorProvider.js.map
6601 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6604 /*---------------------------------------------------------------------------------------------
6605 * Copyright (c) Microsoft Corporation. All rights reserved.
6606 * Licensed under the MIT License. See License.txt in the project root for license information.
6607 *--------------------------------------------------------------------------------------------*/
6608 Object.defineProperty(exports, "__esModule", ({ value: true }));
6609 const vscode_jsonrpc_1 = __webpack_require__(41);
6610 const messages_1 = __webpack_require__(58);
6612 * Enum of known range kinds
6614 var FoldingRangeKind;
6615 (function (FoldingRangeKind) {
6617 * Folding range for a comment
6619 FoldingRangeKind["Comment"] = "comment";
6621 * Folding range for a imports or includes
6623 FoldingRangeKind["Imports"] = "imports";
6625 * Folding range for a region (e.g. `#region`)
6627 FoldingRangeKind["Region"] = "region";
6628 })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
6630 * A request to provide folding ranges in a document. The request's
6631 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
6632 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
6633 * that resolves to such.
6635 var FoldingRangeRequest;
6636 (function (FoldingRangeRequest) {
6637 FoldingRangeRequest.method = 'textDocument/foldingRange';
6638 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
6639 /** @deprecated Use FoldingRangeRequest.type */
6640 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6641 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
6642 //# sourceMappingURL=protocol.foldingRange.js.map
6646 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6649 /* --------------------------------------------------------------------------------------------
6650 * Copyright (c) Microsoft Corporation. All rights reserved.
6651 * Licensed under the MIT License. See License.txt in the project root for license information.
6652 * ------------------------------------------------------------------------------------------ */
6653 Object.defineProperty(exports, "__esModule", ({ value: true }));
6654 const vscode_jsonrpc_1 = __webpack_require__(41);
6655 const messages_1 = __webpack_require__(58);
6656 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6657 let __noDynamicImport;
6659 * A request to resolve the type definition locations of a symbol at a given text
6660 * document position. The request's parameter is of type [TextDocumentPositioParams]
6661 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6662 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6665 var DeclarationRequest;
6666 (function (DeclarationRequest) {
6667 DeclarationRequest.method = 'textDocument/declaration';
6668 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6669 /** @deprecated Use DeclarationRequest.type */
6670 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6671 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6672 //# sourceMappingURL=protocol.declaration.js.map
6676 /***/ ((__unused_webpack_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 provide selection ranges in a document. The request's
6688 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6689 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6690 * that resolves to such.
6692 var SelectionRangeRequest;
6693 (function (SelectionRangeRequest) {
6694 SelectionRangeRequest.method = 'textDocument/selectionRange';
6695 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6696 /** @deprecated Use SelectionRangeRequest.type */
6697 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6698 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6699 //# sourceMappingURL=protocol.selectionRange.js.map
6703 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6706 /* --------------------------------------------------------------------------------------------
6707 * Copyright (c) Microsoft Corporation. All rights reserved.
6708 * Licensed under the MIT License. See License.txt in the project root for license information.
6709 * ------------------------------------------------------------------------------------------ */
6710 Object.defineProperty(exports, "__esModule", ({ value: true }));
6711 const vscode_jsonrpc_1 = __webpack_require__(41);
6712 const messages_1 = __webpack_require__(58);
6713 var WorkDoneProgress;
6714 (function (WorkDoneProgress) {
6715 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6716 })(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6718 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6719 * reporting from the server.
6721 var WorkDoneProgressCreateRequest;
6722 (function (WorkDoneProgressCreateRequest) {
6723 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6724 })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6726 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6727 * initiated on the server side.
6729 var WorkDoneProgressCancelNotification;
6730 (function (WorkDoneProgressCancelNotification) {
6731 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6732 })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6733 //# sourceMappingURL=protocol.progress.js.map
6737 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6740 /* --------------------------------------------------------------------------------------------
6741 * Copyright (c) TypeFox and others. All rights reserved.
6742 * Licensed under the MIT License. See License.txt in the project root for license information.
6743 * ------------------------------------------------------------------------------------------ */
6744 Object.defineProperty(exports, "__esModule", ({ value: true }));
6745 const messages_1 = __webpack_require__(58);
6747 * A request to result a `CallHierarchyItem` in a document at a given position.
6748 * Can be used as an input to a incoming or outgoing call hierarchy.
6752 var CallHierarchyPrepareRequest;
6753 (function (CallHierarchyPrepareRequest) {
6754 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6755 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6756 })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6758 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6762 var CallHierarchyIncomingCallsRequest;
6763 (function (CallHierarchyIncomingCallsRequest) {
6764 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6765 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6766 })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6768 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6772 var CallHierarchyOutgoingCallsRequest;
6773 (function (CallHierarchyOutgoingCallsRequest) {
6774 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6775 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6776 })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6777 //# sourceMappingURL=protocol.callHierarchy.js.map
6781 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6784 /* --------------------------------------------------------------------------------------------
6785 * Copyright (c) Microsoft Corporation. All rights reserved.
6786 * Licensed under the MIT License. See License.txt in the project root for license information.
6787 * ------------------------------------------------------------------------------------------ */
6788 Object.defineProperty(exports, "__esModule", ({ value: true }));
6789 const vscode_jsonrpc_1 = __webpack_require__(41);
6790 function createProtocolConnection(input, output, logger, options) {
6791 if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
6792 options = { connectionStrategy: options };
6794 return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
6796 exports.createProtocolConnection = createProtocolConnection;
6797 //# sourceMappingURL=connection.js.map
6801 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6804 /* --------------------------------------------------------------------------------------------
6805 * Copyright (c) Microsoft Corporation. All rights reserved.
6806 * Licensed under the MIT License. See License.txt in the project root for license information.
6807 * ------------------------------------------------------------------------------------------ */
6808 Object.defineProperty(exports, "__esModule", ({ value: true }));
6809 const messages_1 = __webpack_require__(58);
6811 * A set of predefined token types. This set is not fixed
6812 * an clients can specify additional token types via the
6813 * corresponding client capabilities.
6815 * @since 3.16.0 - Proposed state
6817 var SemanticTokenTypes;
6818 (function (SemanticTokenTypes) {
6819 SemanticTokenTypes["namespace"] = "namespace";
6820 SemanticTokenTypes["type"] = "type";
6821 SemanticTokenTypes["class"] = "class";
6822 SemanticTokenTypes["enum"] = "enum";
6823 SemanticTokenTypes["interface"] = "interface";
6824 SemanticTokenTypes["struct"] = "struct";
6825 SemanticTokenTypes["typeParameter"] = "typeParameter";
6826 SemanticTokenTypes["parameter"] = "parameter";
6827 SemanticTokenTypes["variable"] = "variable";
6828 SemanticTokenTypes["property"] = "property";
6829 SemanticTokenTypes["enumMember"] = "enumMember";
6830 SemanticTokenTypes["event"] = "event";
6831 SemanticTokenTypes["function"] = "function";
6832 SemanticTokenTypes["member"] = "member";
6833 SemanticTokenTypes["macro"] = "macro";
6834 SemanticTokenTypes["keyword"] = "keyword";
6835 SemanticTokenTypes["modifier"] = "modifier";
6836 SemanticTokenTypes["comment"] = "comment";
6837 SemanticTokenTypes["string"] = "string";
6838 SemanticTokenTypes["number"] = "number";
6839 SemanticTokenTypes["regexp"] = "regexp";
6840 SemanticTokenTypes["operator"] = "operator";
6841 })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6843 * A set of predefined token modifiers. This set is not fixed
6844 * an clients can specify additional token types via the
6845 * corresponding client capabilities.
6847 * @since 3.16.0 - Proposed state
6849 var SemanticTokenModifiers;
6850 (function (SemanticTokenModifiers) {
6851 SemanticTokenModifiers["declaration"] = "declaration";
6852 SemanticTokenModifiers["definition"] = "definition";
6853 SemanticTokenModifiers["readonly"] = "readonly";
6854 SemanticTokenModifiers["static"] = "static";
6855 SemanticTokenModifiers["deprecated"] = "deprecated";
6856 SemanticTokenModifiers["abstract"] = "abstract";
6857 SemanticTokenModifiers["async"] = "async";
6858 SemanticTokenModifiers["modification"] = "modification";
6859 SemanticTokenModifiers["documentation"] = "documentation";
6860 SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
6861 })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6863 * @since 3.16.0 - Proposed state
6866 (function (SemanticTokens) {
6867 function is(value) {
6868 const candidate = value;
6869 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6870 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6872 SemanticTokens.is = is;
6873 })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6875 * @since 3.16.0 - Proposed state
6877 var SemanticTokensRequest;
6878 (function (SemanticTokensRequest) {
6879 SemanticTokensRequest.method = 'textDocument/semanticTokens';
6880 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
6881 })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
6883 * @since 3.16.0 - Proposed state
6885 var SemanticTokensEditsRequest;
6886 (function (SemanticTokensEditsRequest) {
6887 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
6888 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
6889 })(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
6891 * @since 3.16.0 - Proposed state
6893 var SemanticTokensRangeRequest;
6894 (function (SemanticTokensRangeRequest) {
6895 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
6896 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
6897 })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
6898 //# sourceMappingURL=protocol.semanticTokens.proposed.js.map
6902 /***/ ((__unused_webpack_module, exports) => {
6905 /*---------------------------------------------------------------------------------------------
6906 * Copyright (c) Microsoft Corporation. All rights reserved.
6907 * Licensed under the MIT License. See License.txt in the project root for license information.
6908 *--------------------------------------------------------------------------------------------*/
6909 Object.defineProperty(exports, "__esModule", ({ value: true }));
6911 constructor(_value) {
6912 this._value = _value;
6919 return this.asHex() === other.asHex();
6922 class V4UUID extends ValueUUID {
6925 V4UUID._randomHex(),
6926 V4UUID._randomHex(),
6927 V4UUID._randomHex(),
6928 V4UUID._randomHex(),
6929 V4UUID._randomHex(),
6930 V4UUID._randomHex(),
6931 V4UUID._randomHex(),
6932 V4UUID._randomHex(),
6934 V4UUID._randomHex(),
6935 V4UUID._randomHex(),
6936 V4UUID._randomHex(),
6937 V4UUID._randomHex(),
6940 V4UUID._randomHex(),
6941 V4UUID._randomHex(),
6942 V4UUID._randomHex(),
6944 V4UUID._oneOf(V4UUID._timeHighBits),
6945 V4UUID._randomHex(),
6946 V4UUID._randomHex(),
6947 V4UUID._randomHex(),
6949 V4UUID._randomHex(),
6950 V4UUID._randomHex(),
6951 V4UUID._randomHex(),
6952 V4UUID._randomHex(),
6953 V4UUID._randomHex(),
6954 V4UUID._randomHex(),
6955 V4UUID._randomHex(),
6956 V4UUID._randomHex(),
6957 V4UUID._randomHex(),
6958 V4UUID._randomHex(),
6959 V4UUID._randomHex(),
6960 V4UUID._randomHex(),
6963 static _oneOf(array) {
6964 return array[Math.floor(array.length * Math.random())];
6966 static _randomHex() {
6967 return V4UUID._oneOf(V4UUID._chars);
6970 V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
6971 V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
6973 * An empty UUID that contains only zeros.
6975 exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
6977 return new V4UUID();
6980 const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6981 function isUUID(value) {
6982 return _UUIDPattern.test(value);
6984 exports.isUUID = isUUID;
6986 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
6987 * @param value A uuid string.
6989 function parse(value) {
6990 if (!isUUID(value)) {
6991 throw new Error('invalid uuid');
6993 return new ValueUUID(value);
6995 exports.parse = parse;
6996 function generateUuid() {
6997 return v4().asHex();
6999 exports.generateUuid = generateUuid;
7000 //# sourceMappingURL=uuid.js.map
7004 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7007 /* --------------------------------------------------------------------------------------------
7008 * Copyright (c) Microsoft Corporation. All rights reserved.
7009 * Licensed under the MIT License. See License.txt in the project root for license information.
7010 * ------------------------------------------------------------------------------------------ */
7011 Object.defineProperty(exports, "__esModule", ({ value: true }));
7012 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7013 const uuid_1 = __webpack_require__(73);
7014 class WorkDoneProgressReporterImpl {
7015 constructor(_connection, _token) {
7016 this._connection = _connection;
7017 this._token = _token;
7018 WorkDoneProgressReporterImpl.Instances.set(this._token, this);
7020 begin(title, percentage, message, cancellable) {
7028 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
7030 report(arg0, arg1) {
7034 if (typeof arg0 === 'number') {
7035 param.percentage = arg0;
7036 if (arg1 !== undefined) {
7037 param.message = arg1;
7041 param.message = arg0;
7043 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
7046 WorkDoneProgressReporterImpl.Instances.delete(this._token);
7047 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
7050 WorkDoneProgressReporterImpl.Instances = new Map();
7051 class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {
7052 constructor(connection, token) {
7053 super(connection, token);
7054 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
7057 return this._source.token;
7060 this._source.dispose();
7064 this._source.cancel();
7067 class NullProgressReporter {
7077 class NullProgressServerReporter extends NullProgressReporter {
7080 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
7083 return this._source.token;
7086 this._source.dispose();
7089 this._source.cancel();
7092 function attachWorkDone(connection, params) {
7093 if (params === undefined || params.workDoneToken === undefined) {
7094 return new NullProgressReporter();
7096 const token = params.workDoneToken;
7097 delete params.workDoneToken;
7098 return new WorkDoneProgressReporterImpl(connection, token);
7100 exports.attachWorkDone = attachWorkDone;
7101 exports.ProgressFeature = (Base) => {
7102 return class extends Base {
7105 this._progressSupported = false;
7107 initialize(capabilities) {
7109 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
7110 this._progressSupported = true;
7111 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
7112 let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
7113 if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
7119 attachWorkDoneProgress(token) {
7120 if (token === undefined) {
7121 return new NullProgressReporter();
7124 return new WorkDoneProgressReporterImpl(this.connection, token);
7127 createWorkDoneProgress() {
7128 if (this._progressSupported) {
7129 const token = uuid_1.generateUuid();
7130 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
7131 const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
7136 return Promise.resolve(new NullProgressServerReporter());
7142 (function (ResultProgress) {
7143 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
7144 })(ResultProgress || (ResultProgress = {}));
7145 class ResultProgressReporterImpl {
7146 constructor(_connection, _token) {
7147 this._connection = _connection;
7148 this._token = _token;
7151 this._connection.sendProgress(ResultProgress.type, this._token, data);
7154 function attachPartialResult(connection, params) {
7155 if (params === undefined || params.partialResultToken === undefined) {
7158 const token = params.partialResultToken;
7159 delete params.partialResultToken;
7160 return new ResultProgressReporterImpl(connection, token);
7162 exports.attachPartialResult = attachPartialResult;
7163 //# sourceMappingURL=progress.js.map
7167 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7169 /* --------------------------------------------------------------------------------------------
7170 * Copyright (c) Microsoft Corporation. All rights reserved.
7171 * Licensed under the MIT License. See License.txt in the project root for license information.
7172 * ------------------------------------------------------------------------------------------ */
7174 Object.defineProperty(exports, "__esModule", ({ value: true }));
7175 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7176 const Is = __webpack_require__(37);
7177 exports.ConfigurationFeature = (Base) => {
7178 return class extends Base {
7179 getConfiguration(arg) {
7181 return this._getConfiguration({});
7183 else if (Is.string(arg)) {
7184 return this._getConfiguration({ section: arg });
7187 return this._getConfiguration(arg);
7190 _getConfiguration(arg) {
7192 items: Array.isArray(arg) ? arg : [arg]
7194 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
7195 return Array.isArray(arg) ? result : result[0];
7200 //# sourceMappingURL=configuration.js.map
7204 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7206 /* --------------------------------------------------------------------------------------------
7207 * Copyright (c) Microsoft Corporation. All rights reserved.
7208 * Licensed under the MIT License. See License.txt in the project root for license information.
7209 * ------------------------------------------------------------------------------------------ */
7211 Object.defineProperty(exports, "__esModule", ({ value: true }));
7212 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7213 exports.WorkspaceFoldersFeature = (Base) => {
7214 return class extends Base {
7215 initialize(capabilities) {
7216 let workspaceCapabilities = capabilities.workspace;
7217 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
7218 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
7219 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
7220 this._onDidChangeWorkspaceFolders.fire(params.event);
7224 getWorkspaceFolders() {
7225 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
7227 get onDidChangeWorkspaceFolders() {
7228 if (!this._onDidChangeWorkspaceFolders) {
7229 throw new Error('Client doesn\'t support sending workspace folder change events.');
7231 if (!this._unregistration) {
7232 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
7234 return this._onDidChangeWorkspaceFolders.event;
7238 //# sourceMappingURL=workspaceFolders.js.map
7242 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7244 /* --------------------------------------------------------------------------------------------
7245 * Copyright (c) Microsoft Corporation. All rights reserved.
7246 * Licensed under the MIT License. See License.txt in the project root for license information.
7247 * ------------------------------------------------------------------------------------------ */
7249 Object.defineProperty(exports, "__esModule", ({ value: true }));
7250 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7251 exports.CallHierarchyFeature = (Base) => {
7252 return class extends Base {
7253 get callHierarchy() {
7255 onPrepare: (handler) => {
7256 this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
7257 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
7260 onIncomingCalls: (handler) => {
7261 const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
7262 this.connection.onRequest(type, (params, cancel) => {
7263 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7266 onOutgoingCalls: (handler) => {
7267 const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
7268 this.connection.onRequest(type, (params, cancel) => {
7269 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7276 //# sourceMappingURL=callHierarchy.js.map
7280 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7283 /* --------------------------------------------------------------------------------------------
7284 * Copyright (c) Microsoft Corporation. All rights reserved.
7285 * Licensed under the MIT License. See License.txt in the project root for license information.
7286 * ------------------------------------------------------------------------------------------ */
7287 Object.defineProperty(exports, "__esModule", ({ value: true }));
7288 const url = __webpack_require__(79);
7289 const path = __webpack_require__(3);
7290 const fs = __webpack_require__(80);
7291 const child_process_1 = __webpack_require__(81);
7293 * @deprecated Use the `vscode-uri` npm module which provides a more
7294 * complete implementation of handling VS Code URIs.
7296 function uriToFilePath(uri) {
7297 let parsed = url.parse(uri);
7298 if (parsed.protocol !== 'file:' || !parsed.path) {
7301 let segments = parsed.path.split('/');
7302 for (var i = 0, len = segments.length; i < len; i++) {
7303 segments[i] = decodeURIComponent(segments[i]);
7305 if (process.platform === 'win32' && segments.length > 1) {
7306 let first = segments[0];
7307 let second = segments[1];
7308 // Do we have a drive letter and we started with a / which is the
7309 // case if the first segement is empty (see split above)
7310 if (first.length === 0 && second.length > 1 && second[1] === ':') {
7311 // Remove first slash
7315 return path.normalize(segments.join('/'));
7317 exports.uriToFilePath = uriToFilePath;
7318 function isWindows() {
7319 return process.platform === 'win32';
7321 function resolve(moduleName, nodePath, cwd, tracer) {
7322 const nodePathKey = 'NODE_PATH';
7325 'p.on(\'message\',function(m){',
7329 'else if(m.c===\'rs\'){',
7331 'var r=require.resolve(m.a);',
7332 'p.send({c:\'r\',s:true,r:r});',
7335 'p.send({c:\'r\',s:false});',
7340 return new Promise((resolve, reject) => {
7341 let env = process.env;
7342 let newEnv = Object.create(null);
7343 Object.keys(env).forEach(key => newEnv[key] = env[key]);
7344 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
7345 if (newEnv[nodePathKey]) {
7346 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
7349 newEnv[nodePathKey] = nodePath;
7352 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
7355 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
7357 let cp = child_process_1.fork('', [], {
7360 execArgv: ['-e', app]
7362 if (cp.pid === void 0) {
7363 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
7366 cp.on('error', (error) => {
7369 cp.on('message', (message) => {
7370 if (message.c === 'r') {
7371 cp.send({ c: 'e' });
7376 reject(new Error(`Failed to resolve module: ${moduleName}`));
7391 exports.resolve = resolve;
7393 * Resolve the global npm package path.
7394 * @deprecated Since this depends on the used package manager and their version the best is that servers
7395 * implement this themselves since they know best what kind of package managers to support.
7396 * @param tracer the tracer to use
7398 function resolveGlobalNodePath(tracer) {
7399 let npmCommand = 'npm';
7400 const env = Object.create(null);
7401 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
7402 env['NO_UPDATE_NOTIFIER'] = 'true';
7408 npmCommand = 'npm.cmd';
7409 options.shell = true;
7411 let handler = () => { };
7413 process.on('SIGPIPE', handler);
7414 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
7417 tracer(`'npm config get prefix' didn't return a value.`);
7421 let prefix = stdout.trim();
7423 tracer(`'npm config get prefix' value is: ${prefix}`);
7425 if (prefix.length > 0) {
7427 return path.join(prefix, 'node_modules');
7430 return path.join(prefix, 'lib', 'node_modules');
7439 process.removeListener('SIGPIPE', handler);
7442 exports.resolveGlobalNodePath = resolveGlobalNodePath;
7444 * Resolve the global yarn pakage path.
7445 * @deprecated Since this depends on the used package manager and their version the best is that servers
7446 * implement this themselves since they know best what kind of package managers to support.
7447 * @param tracer the tracer to use
7449 function resolveGlobalYarnPath(tracer) {
7450 let yarnCommand = 'yarn';
7455 yarnCommand = 'yarn.cmd';
7456 options.shell = true;
7458 let handler = () => { };
7460 process.on('SIGPIPE', handler);
7461 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
7462 let stdout = results.stdout;
7465 tracer(`'yarn global dir' didn't return a value.`);
7466 if (results.stderr) {
7467 tracer(results.stderr);
7472 let lines = stdout.trim().split(/\r?\n/);
7473 for (let line of lines) {
7475 let yarn = JSON.parse(line);
7476 if (yarn.type === 'log') {
7477 return path.join(yarn.data, 'node_modules');
7481 // Do nothing. Ignore the line
7490 process.removeListener('SIGPIPE', handler);
7493 exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
7495 (function (FileSystem) {
7496 let _isCaseSensitive = undefined;
7497 function isCaseSensitive() {
7498 if (_isCaseSensitive !== void 0) {
7499 return _isCaseSensitive;
7501 if (process.platform === 'win32') {
7502 _isCaseSensitive = false;
7505 // convert current file name to upper case / lower case and check if file exists
7506 // (guards against cases when name is already all uppercase or lowercase)
7507 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
7509 return _isCaseSensitive;
7511 FileSystem.isCaseSensitive = isCaseSensitive;
7512 function isParent(parent, child) {
7513 if (isCaseSensitive()) {
7514 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
7517 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
7520 FileSystem.isParent = isParent;
7521 })(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
7522 function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
7524 if (!path.isAbsolute(nodePath)) {
7525 nodePath = path.join(workspaceRoot, nodePath);
7527 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
7528 if (FileSystem.isParent(nodePath, value)) {
7532 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
7534 }).then(undefined, (_error) => {
7535 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
7539 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
7542 exports.resolveModulePath = resolveModulePath;
7543 //# sourceMappingURL=files.js.map
7547 /***/ ((module) => {
7549 module.exports = require("url");;
7553 /***/ ((module) => {
7555 module.exports = require("fs");;
7559 /***/ ((module) => {
7561 module.exports = require("child_process");;
7565 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7567 /* --------------------------------------------------------------------------------------------
7568 * Copyright (c) Microsoft Corporation. All rights reserved.
7569 * Licensed under the MIT License. See License.txt in the project root for license information.
7570 * ----------------------------------------------------------------------------------------- */
7573 module.exports = __webpack_require__(39);
7577 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7580 /* --------------------------------------------------------------------------------------------
7581 * Copyright (c) Microsoft Corporation. All rights reserved.
7582 * Licensed under the MIT License. See License.txt in the project root for license information.
7583 * ------------------------------------------------------------------------------------------ */
7584 function __export(m) {
7585 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
7587 Object.defineProperty(exports, "__esModule", ({ value: true }));
7588 const st = __webpack_require__(84);
7589 __export(__webpack_require__(39));
7590 __export(__webpack_require__(38));
7591 var ProposedFeatures;
7592 (function (ProposedFeatures) {
7593 ProposedFeatures.all = {
7594 __brand: 'features',
7595 languages: st.SemanticTokensFeature
7597 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
7598 })(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
7599 //# sourceMappingURL=api.js.map
7603 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7606 /* --------------------------------------------------------------------------------------------
7607 * Copyright (c) Microsoft Corporation. All rights reserved.
7608 * Licensed under the MIT License. See License.txt in the project root for license information.
7609 * ------------------------------------------------------------------------------------------ */
7610 Object.defineProperty(exports, "__esModule", ({ value: true }));
7611 const vscode_languageserver_protocol_1 = __webpack_require__(39);
7612 exports.SemanticTokensFeature = (Base) => {
7613 return class extends Base {
7614 get semanticTokens() {
7617 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
7618 this.connection.onRequest(type, (params, cancel) => {
7619 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7622 onEdits: (handler) => {
7623 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
7624 this.connection.onRequest(type, (params, cancel) => {
7625 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7628 onRange: (handler) => {
7629 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
7630 this.connection.onRequest(type, (params, cancel) => {
7631 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7638 class SemanticTokensBuilder {
7640 this._prevData = undefined;
7644 this._id = Date.now();
7650 push(line, char, length, tokenType, tokenModifiers) {
7651 let pushLine = line;
7652 let pushChar = char;
7653 if (this._dataLen > 0) {
7654 pushLine -= this._prevLine;
7655 if (pushLine === 0) {
7656 pushChar -= this._prevChar;
7659 this._data[this._dataLen++] = pushLine;
7660 this._data[this._dataLen++] = pushChar;
7661 this._data[this._dataLen++] = length;
7662 this._data[this._dataLen++] = tokenType;
7663 this._data[this._dataLen++] = tokenModifiers;
7664 this._prevLine = line;
7665 this._prevChar = char;
7668 return this._id.toString();
7670 previousResult(id) {
7671 if (this.id === id) {
7672 this._prevData = this._data;
7677 this._prevData = undefined;
7684 return this._prevData !== undefined;
7687 if (this._prevData !== undefined) {
7688 const prevDataLength = this._prevData.length;
7689 const dataLength = this._data.length;
7691 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
7694 if (startIndex < dataLength && startIndex < prevDataLength) {
7697 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
7700 const newData = this._data.slice(startIndex, dataLength - endIndex);
7704 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
7709 else if (startIndex < dataLength) {
7710 return { resultId: this.id, edits: [
7711 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
7714 else if (startIndex < prevDataLength) {
7715 return { resultId: this.id, edits: [
7716 { start: startIndex, deleteCount: prevDataLength - startIndex }
7720 return { resultId: this.id, edits: [] };
7724 return this.build();
7728 exports.SemanticTokensBuilder = SemanticTokensBuilder;
7729 //# sourceMappingURL=semanticTokens.proposed.js.map
7733 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7736 /*---------------------------------------------------------------------------------------------
7737 * Copyright (c) Microsoft Corporation. All rights reserved.
7738 * Licensed under the MIT License. See License.txt in the project root for license information.
7739 *--------------------------------------------------------------------------------------------*/
7740 Object.defineProperty(exports, "__esModule", ({ value: true }));
7741 exports.runSafeAsync = exports.formatError = void 0;
7742 const vscode_languageserver_1 = __webpack_require__(36);
7743 function formatError(message, err) {
7744 if (err instanceof Error) {
7746 return `${message}: ${error.message}\n${error.stack}`;
7748 else if (typeof err === 'string') {
7749 return `${message}: ${err}`;
7752 return `${message}: ${err.toString()}`;
7756 exports.formatError = formatError;
7757 function runSafeAsync(func, errorVal, errorMessage, token) {
7758 return new Promise((resolve) => {
7759 setImmediate(() => {
7760 if (token.isCancellationRequested) {
7761 resolve(cancelValue());
7763 return func().then(result => {
7764 if (token.isCancellationRequested) {
7765 resolve(cancelValue());
7772 console.error(formatError(errorMessage, e));
7778 exports.runSafeAsync = runSafeAsync;
7779 function cancelValue() {
7780 return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.RequestCancelled, 'Request cancelled');
7786 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7789 /*---------------------------------------------------------------------------------------------
7790 * Copyright (c) Microsoft Corporation. All rights reserved.
7791 * Licensed under the MIT License. See License.txt in the project root for license information.
7792 *--------------------------------------------------------------------------------------------*/
7793 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7794 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7795 return new (P || (P = Promise))(function (resolve, reject) {
7796 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7797 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7798 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7799 step((generator = generator.apply(thisArg, _arguments || [])).next());
7802 Object.defineProperty(exports, "__esModule", ({ value: true }));
7803 exports.startServer = void 0;
7804 const vscode_languageserver_1 = __webpack_require__(36);
7805 const vscode_uri_1 = __webpack_require__(87);
7806 const vscode_css_languageservice_1 = __webpack_require__(88);
7807 const languageModelCache_1 = __webpack_require__(131);
7808 const runner_1 = __webpack_require__(85);
7809 const documentContext_1 = __webpack_require__(132);
7810 const customData_1 = __webpack_require__(135);
7811 const requests_1 = __webpack_require__(134);
7812 var CustomDataChangedNotification;
7813 (function (CustomDataChangedNotification) {
7814 CustomDataChangedNotification.type = new vscode_languageserver_1.NotificationType('css/customDataChanged');
7815 })(CustomDataChangedNotification || (CustomDataChangedNotification = {}));
7816 function startServer(connection, runtime) {
7817 // Create a text document manager.
7818 const documents = new vscode_languageserver_1.TextDocuments(vscode_css_languageservice_1.TextDocument);
7819 // Make the text document manager listen on the connection
7820 // for open, change and close text document events
7821 documents.listen(connection);
7822 const stylesheets = languageModelCache_1.getLanguageModelCache(10, 60, document => getLanguageService(document).parseStylesheet(document));
7823 documents.onDidClose(e => {
7824 stylesheets.onDocumentRemoved(e.document);
7826 connection.onShutdown(() => {
7827 stylesheets.dispose();
7829 let scopedSettingsSupport = false;
7830 let foldingRangeLimit = Number.MAX_VALUE;
7831 let workspaceFolders;
7832 let dataProvidersReady = Promise.resolve();
7833 const languageServices = {};
7834 const notReady = () => Promise.reject('Not Ready');
7835 let requestService = { getContent: notReady, stat: notReady, readDirectory: notReady };
7836 // After the server has started the client sends an initialize request. The server receives
7837 // in the passed params the rootPath of the workspace plus the client capabilities.
7838 connection.onInitialize((params) => {
7840 workspaceFolders = params.workspaceFolders;
7841 if (!Array.isArray(workspaceFolders)) {
7842 workspaceFolders = [];
7843 if (params.rootPath) {
7844 workspaceFolders.push({ name: '', uri: vscode_uri_1.URI.file(params.rootPath).toString() });
7847 requestService = requests_1.getRequestService(((_a = params.initializationOptions) === null || _a === void 0 ? void 0 : _a.handledSchemas) || ['file'], connection, runtime);
7848 function getClientCapability(name, def) {
7849 const keys = name.split('.');
7850 let c = params.capabilities;
7851 for (let i = 0; c && i < keys.length; i++) {
7852 if (!c.hasOwnProperty(keys[i])) {
7859 const snippetSupport = !!getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
7860 scopedSettingsSupport = !!getClientCapability('workspace.configuration', false);
7861 foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
7862 languageServices.css = vscode_css_languageservice_1.getCSSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7863 languageServices.scss = vscode_css_languageservice_1.getSCSSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7864 languageServices.less = vscode_css_languageservice_1.getLESSLanguageService({ fileSystemProvider: requestService, clientCapabilities: params.capabilities });
7865 const capabilities = {
7866 textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
7867 completionProvider: snippetSupport ? { resolveProvider: false, triggerCharacters: ['/', '-'] } : undefined,
7868 hoverProvider: true,
7869 documentSymbolProvider: true,
7870 referencesProvider: true,
7871 definitionProvider: true,
7872 documentHighlightProvider: true,
7873 documentLinkProvider: {
7874 resolveProvider: false
7876 codeActionProvider: true,
7877 renameProvider: true,
7879 foldingRangeProvider: true,
7880 selectionRangeProvider: true
7882 return { capabilities };
7884 function getLanguageService(document) {
7885 let service = languageServices[document.languageId];
7887 connection.console.log('Document type is ' + document.languageId + ', using css instead.');
7888 service = languageServices['css'];
7892 let documentSettings = {};
7893 // remove document settings on close
7894 documents.onDidClose(e => {
7895 delete documentSettings[e.document.uri];
7897 function getDocumentSettings(textDocument) {
7898 if (scopedSettingsSupport) {
7899 let promise = documentSettings[textDocument.uri];
7901 const configRequestParam = { items: [{ scopeUri: textDocument.uri, section: textDocument.languageId }] };
7902 promise = connection.sendRequest(vscode_languageserver_1.ConfigurationRequest.type, configRequestParam).then(s => s[0]);
7903 documentSettings[textDocument.uri] = promise;
7907 return Promise.resolve(undefined);
7909 // The settings have changed. Is send on server activation as well.
7910 connection.onDidChangeConfiguration(change => {
7911 updateConfiguration(change.settings);
7913 function updateConfiguration(settings) {
7914 for (const languageId in languageServices) {
7915 languageServices[languageId].configure(settings[languageId]);
7917 // reset all document settings
7918 documentSettings = {};
7919 // Revalidate any open text documents
7920 documents.all().forEach(triggerValidation);
7922 const pendingValidationRequests = {};
7923 const validationDelayMs = 500;
7924 // The content of a text document has changed. This event is emitted
7925 // when the text document first opened or when its content has changed.
7926 documents.onDidChangeContent(change => {
7927 triggerValidation(change.document);
7929 // a document has closed: clear all diagnostics
7930 documents.onDidClose(event => {
7931 cleanPendingValidation(event.document);
7932 connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
7934 function cleanPendingValidation(textDocument) {
7935 const request = pendingValidationRequests[textDocument.uri];
7937 clearTimeout(request);
7938 delete pendingValidationRequests[textDocument.uri];
7941 function triggerValidation(textDocument) {
7942 cleanPendingValidation(textDocument);
7943 pendingValidationRequests[textDocument.uri] = setTimeout(() => {
7944 delete pendingValidationRequests[textDocument.uri];
7945 validateTextDocument(textDocument);
7946 }, validationDelayMs);
7948 function validateTextDocument(textDocument) {
7949 const settingsPromise = getDocumentSettings(textDocument);
7950 Promise.all([settingsPromise, dataProvidersReady]).then(([settings]) => __awaiter(this, void 0, void 0, function* () {
7951 const stylesheet = stylesheets.get(textDocument);
7952 const diagnostics = getLanguageService(textDocument).doValidation(textDocument, stylesheet, settings);
7953 // Send the computed diagnostics to VSCode.
7954 connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
7956 connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, e));
7959 function updateDataProviders(dataPaths) {
7960 dataProvidersReady = customData_1.fetchDataProviders(dataPaths, requestService).then(customDataProviders => {
7961 for (const lang in languageServices) {
7962 languageServices[lang].setDataProviders(true, customDataProviders);
7966 connection.onCompletion((textDocumentPosition, token) => {
7967 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
7968 const document = documents.get(textDocumentPosition.textDocument.uri);
7970 yield dataProvidersReady;
7971 const styleSheet = stylesheets.get(document);
7972 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
7973 return getLanguageService(document).doComplete2(document, textDocumentPosition.position, styleSheet, documentContext);
7976 }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
7978 connection.onHover((textDocumentPosition, token) => {
7979 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
7980 const document = documents.get(textDocumentPosition.textDocument.uri);
7982 yield dataProvidersReady;
7983 const styleSheet = stylesheets.get(document);
7984 return getLanguageService(document).doHover(document, textDocumentPosition.position, styleSheet);
7987 }), null, `Error while computing hover for ${textDocumentPosition.textDocument.uri}`, token);
7989 connection.onDocumentSymbol((documentSymbolParams, token) => {
7990 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
7991 const document = documents.get(documentSymbolParams.textDocument.uri);
7993 yield dataProvidersReady;
7994 const stylesheet = stylesheets.get(document);
7995 return getLanguageService(document).findDocumentSymbols(document, stylesheet);
7998 }), [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
8000 connection.onDefinition((documentDefinitionParams, token) => {
8001 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8002 const document = documents.get(documentDefinitionParams.textDocument.uri);
8004 yield dataProvidersReady;
8005 const stylesheet = stylesheets.get(document);
8006 return getLanguageService(document).findDefinition(document, documentDefinitionParams.position, stylesheet);
8009 }), null, `Error while computing definitions for ${documentDefinitionParams.textDocument.uri}`, token);
8011 connection.onDocumentHighlight((documentHighlightParams, token) => {
8012 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8013 const document = documents.get(documentHighlightParams.textDocument.uri);
8015 yield dataProvidersReady;
8016 const stylesheet = stylesheets.get(document);
8017 return getLanguageService(document).findDocumentHighlights(document, documentHighlightParams.position, stylesheet);
8020 }), [], `Error while computing document highlights for ${documentHighlightParams.textDocument.uri}`, token);
8022 connection.onDocumentLinks((documentLinkParams, token) => __awaiter(this, void 0, void 0, function* () {
8023 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8024 const document = documents.get(documentLinkParams.textDocument.uri);
8026 yield dataProvidersReady;
8027 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
8028 const stylesheet = stylesheets.get(document);
8029 return getLanguageService(document).findDocumentLinks2(document, stylesheet, documentContext);
8032 }), [], `Error while computing document links for ${documentLinkParams.textDocument.uri}`, token);
8034 connection.onReferences((referenceParams, token) => {
8035 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8036 const document = documents.get(referenceParams.textDocument.uri);
8038 yield dataProvidersReady;
8039 const stylesheet = stylesheets.get(document);
8040 return getLanguageService(document).findReferences(document, referenceParams.position, stylesheet);
8043 }), [], `Error while computing references for ${referenceParams.textDocument.uri}`, token);
8045 connection.onCodeAction((codeActionParams, token) => {
8046 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8047 const document = documents.get(codeActionParams.textDocument.uri);
8049 yield dataProvidersReady;
8050 const stylesheet = stylesheets.get(document);
8051 return getLanguageService(document).doCodeActions(document, codeActionParams.range, codeActionParams.context, stylesheet);
8054 }), [], `Error while computing code actions for ${codeActionParams.textDocument.uri}`, token);
8056 connection.onDocumentColor((params, token) => {
8057 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8058 const document = documents.get(params.textDocument.uri);
8060 yield dataProvidersReady;
8061 const stylesheet = stylesheets.get(document);
8062 return getLanguageService(document).findDocumentColors(document, stylesheet);
8065 }), [], `Error while computing document colors for ${params.textDocument.uri}`, token);
8067 connection.onColorPresentation((params, token) => {
8068 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8069 const document = documents.get(params.textDocument.uri);
8071 yield dataProvidersReady;
8072 const stylesheet = stylesheets.get(document);
8073 return getLanguageService(document).getColorPresentations(document, stylesheet, params.color, params.range);
8076 }), [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
8078 connection.onRenameRequest((renameParameters, token) => {
8079 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8080 const document = documents.get(renameParameters.textDocument.uri);
8082 yield dataProvidersReady;
8083 const stylesheet = stylesheets.get(document);
8084 return getLanguageService(document).doRename(document, renameParameters.position, renameParameters.newName, stylesheet);
8087 }), null, `Error while computing renames for ${renameParameters.textDocument.uri}`, token);
8089 connection.onFoldingRanges((params, token) => {
8090 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8091 const document = documents.get(params.textDocument.uri);
8093 yield dataProvidersReady;
8094 return getLanguageService(document).getFoldingRanges(document, { rangeLimit: foldingRangeLimit });
8097 }), null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
8099 connection.onSelectionRanges((params, token) => {
8100 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
8101 const document = documents.get(params.textDocument.uri);
8102 const positions = params.positions;
8104 yield dataProvidersReady;
8105 const stylesheet = stylesheets.get(document);
8106 return getLanguageService(document).getSelectionRanges(document, positions, stylesheet);
8109 }), [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
8111 connection.onNotification(CustomDataChangedNotification.type, updateDataProviders);
8112 // Listen on the connection
8113 connection.listen();
8115 exports.startServer = startServer;
8120 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8122 __webpack_require__.r(__webpack_exports__);
8123 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8124 /* harmony export */ "URI": () => /* binding */ URI,
8125 /* harmony export */ "uriToFsPath": () => /* binding */ uriToFsPath
8126 /* harmony export */ });
8127 /*---------------------------------------------------------------------------------------------
8128 * Copyright (c) Microsoft Corporation. All rights reserved.
8129 * Licensed under the MIT License. See License.txt in the project root for license information.
8130 *--------------------------------------------------------------------------------------------*/
8132 var __extends = (undefined && undefined.__extends) || (function () {
8133 var extendStatics = function (d, b) {
8134 extendStatics = Object.setPrototypeOf ||
8135 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8136 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8137 return extendStatics(d, b);
8139 return function (d, b) {
8140 extendStatics(d, b);
8141 function __() { this.constructor = d; }
8142 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8147 if (typeof process === 'object') {
8148 isWindows = process.platform === 'win32';
8150 else if (typeof navigator === 'object') {
8151 var userAgent = navigator.userAgent;
8152 isWindows = userAgent.indexOf('Windows') >= 0;
8154 function isHighSurrogate(charCode) {
8155 return (0xD800 <= charCode && charCode <= 0xDBFF);
8157 function isLowSurrogate(charCode) {
8158 return (0xDC00 <= charCode && charCode <= 0xDFFF);
8160 function isLowerAsciiHex(code) {
8161 return code >= 97 /* a */ && code <= 102 /* f */;
8163 function isLowerAsciiLetter(code) {
8164 return code >= 97 /* a */ && code <= 122 /* z */;
8166 function isUpperAsciiLetter(code) {
8167 return code >= 65 /* A */ && code <= 90 /* Z */;
8169 function isAsciiLetter(code) {
8170 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
8173 var _schemePattern = /^\w[\w\d+.-]*$/;
8174 var _singleSlashStart = /^\//;
8175 var _doubleSlashStart = /^\/\//;
8176 function _validateUri(ret, _strict) {
8177 // scheme, must be set
8178 if (!ret.scheme && _strict) {
8179 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
8181 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
8182 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
8183 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
8184 throw new Error('[UriError]: Scheme contains illegal characters.');
8186 // path, http://tools.ietf.org/html/rfc3986#section-3.3
8187 // If a URI contains an authority component, then the path component
8188 // must either be empty or begin with a slash ("/") character. If a URI
8189 // does not contain an authority component, then the path cannot begin
8190 // with two slash characters ("//").
8192 if (ret.authority) {
8193 if (!_singleSlashStart.test(ret.path)) {
8194 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');
8198 if (_doubleSlashStart.test(ret.path)) {
8199 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
8204 // for a while we allowed uris *without* schemes and this is the migration
8205 // for them, e.g. an uri without scheme and without strict-mode warns and falls
8206 // back to the file-scheme. that should cause the least carnage and still be a
8208 function _schemeFix(scheme, _strict) {
8209 if (!scheme && !_strict) {
8214 // implements a bit of https://tools.ietf.org/html/rfc3986#section-5
8215 function _referenceResolution(scheme, path) {
8216 // the slash-character is our 'default base' as we don't
8217 // support constructing URIs relative to other URIs. This
8218 // also means that we alter and potentially break paths.
8219 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
8227 else if (path[0] !== _slash) {
8228 path = _slash + path;
8236 var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
8238 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
8239 * This class is a simple parser which creates the basic component parts
8240 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
8244 * foo://example.com:8042/over/there?name=ferret#nose
8245 * \_/ \______________/\_________/ \_________/ \__/
8247 * scheme authority path query fragment
8248 * | _____________________|__
8250 * urn:example:animal:ferret:nose
8253 var URI = /** @class */ (function () {
8257 function URI(schemeOrData, authority, path, query, fragment, _strict) {
8258 if (_strict === void 0) { _strict = false; }
8259 if (typeof schemeOrData === 'object') {
8260 this.scheme = schemeOrData.scheme || _empty;
8261 this.authority = schemeOrData.authority || _empty;
8262 this.path = schemeOrData.path || _empty;
8263 this.query = schemeOrData.query || _empty;
8264 this.fragment = schemeOrData.fragment || _empty;
8265 // no validation because it's this URI
8266 // that creates uri components.
8267 // _validateUri(this);
8270 this.scheme = _schemeFix(schemeOrData, _strict);
8271 this.authority = authority || _empty;
8272 this.path = _referenceResolution(this.scheme, path || _empty);
8273 this.query = query || _empty;
8274 this.fragment = fragment || _empty;
8275 _validateUri(this, _strict);
8278 URI.isUri = function (thing) {
8279 if (thing instanceof URI) {
8285 return typeof thing.authority === 'string'
8286 && typeof thing.fragment === 'string'
8287 && typeof thing.path === 'string'
8288 && typeof thing.query === 'string'
8289 && typeof thing.scheme === 'string'
8290 && typeof thing.fsPath === 'function'
8291 && typeof thing.with === 'function'
8292 && typeof thing.toString === 'function';
8294 Object.defineProperty(URI.prototype, "fsPath", {
8295 // ---- filesystem path -----------------------
8297 * Returns a string representing the corresponding file system path of this URI.
8298 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
8299 * platform specific path separator.
8301 * * Will *not* validate the path for invalid characters and semantics.
8302 * * Will *not* look at the scheme of this URI.
8303 * * The result shall *not* be used for display purposes but for accessing a file on disk.
8306 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
8307 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
8310 const u = URI.parse('file://server/c$/folder/file.txt')
8311 u.authority === 'server'
8312 u.path === '/shares/c$/file.txt'
8313 u.fsPath === '\\server\c$\folder\file.txt'
8316 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
8317 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
8318 * with URIs that represent files on disk (`file` scheme).
8321 // if (this.scheme !== 'file') {
8322 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
8324 return uriToFsPath(this, false);
8329 // ---- modify to new -------------------------
8330 URI.prototype.with = function (change) {
8334 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
8335 if (scheme === undefined) {
8336 scheme = this.scheme;
8338 else if (scheme === null) {
8341 if (authority === undefined) {
8342 authority = this.authority;
8344 else if (authority === null) {
8347 if (path === undefined) {
8350 else if (path === null) {
8353 if (query === undefined) {
8356 else if (query === null) {
8359 if (fragment === undefined) {
8360 fragment = this.fragment;
8362 else if (fragment === null) {
8365 if (scheme === this.scheme
8366 && authority === this.authority
8367 && path === this.path
8368 && query === this.query
8369 && fragment === this.fragment) {
8372 return new _URI(scheme, authority, path, query, fragment);
8374 // ---- parse & validate ------------------------
8376 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
8377 * `file:///usr/home`, or `scheme:with/path`.
8379 * @param value A string which represents an URI (see `URI#toString`).
8381 URI.parse = function (value, _strict) {
8382 if (_strict === void 0) { _strict = false; }
8383 var match = _regexp.exec(value);
8385 return new _URI(_empty, _empty, _empty, _empty, _empty);
8387 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
8390 * Creates a new URI from a file system path, e.g. `c:\my\files`,
8391 * `/usr/home`, or `\\server\share\some\path`.
8393 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
8394 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
8395 * `URI.parse('file://' + path)` because the path might contain characters that are
8396 * interpreted (# and ?). See the following sample:
8398 const good = URI.file('/coding/c#/project1');
8399 good.scheme === 'file';
8400 good.path === '/coding/c#/project1';
8401 good.fragment === '';
8402 const bad = URI.parse('file://' + '/coding/c#/project1');
8403 bad.scheme === 'file';
8404 bad.path === '/coding/c'; // path is now broken
8405 bad.fragment === '/project1';
8408 * @param path A file system path (see `URI#fsPath`)
8410 URI.file = function (path) {
8411 var authority = _empty;
8412 // normalize to fwd-slashes on windows,
8413 // on other systems bwd-slashes are valid
8414 // filename character, eg /f\oo/ba\r.txt
8416 path = path.replace(/\\/g, _slash);
8418 // check for authority as used in UNC shares
8419 // or use the path as given
8420 if (path[0] === _slash && path[1] === _slash) {
8421 var idx = path.indexOf(_slash, 2);
8423 authority = path.substring(2);
8427 authority = path.substring(2, idx);
8428 path = path.substring(idx) || _slash;
8431 return new _URI('file', authority, path, _empty, _empty);
8433 URI.from = function (components) {
8434 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
8437 // * Join a URI path with path fragments and normalizes the resulting path.
8439 // * @param uri The input URI.
8440 // * @param pathFragment The path fragment to add to the URI path.
8441 // * @returns The resulting URI.
8443 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
8445 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
8447 // let newPath: string;
8448 // if (isWindows && uri.scheme === 'file') {
8449 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
8451 // newPath = paths.posix.join(uri.path, ...pathFragment);
8453 // return uri.with({ path: newPath });
8455 // ---- printing/externalize ---------------------------
8457 * Creates a string representation for this URI. It's guaranteed that calling
8458 * `URI.parse` with the result of this function creates an URI which is equal
8461 * * The result shall *not* be used for display purposes but for externalization or transport.
8462 * * The result will be encoded using the percentage encoding and encoding happens mostly
8463 * ignore the scheme-specific encoding rules.
8465 * @param skipEncoding Do not encode the result, default is `false`
8467 URI.prototype.toString = function (skipEncoding) {
8468 if (skipEncoding === void 0) { skipEncoding = false; }
8469 return _asFormatted(this, skipEncoding);
8471 URI.prototype.toJSON = function () {
8474 URI.revive = function (data) {
8478 else if (data instanceof URI) {
8482 var result = new _URI(data);
8483 result._formatted = data.external;
8484 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
8491 var _pathSepMarker = isWindows ? 1 : undefined;
8492 // eslint-disable-next-line @typescript-eslint/class-name-casing
8493 var _URI = /** @class */ (function (_super) {
8494 __extends(_URI, _super);
8496 var _this = _super !== null && _super.apply(this, arguments) || this;
8497 _this._formatted = null;
8498 _this._fsPath = null;
8501 Object.defineProperty(_URI.prototype, "fsPath", {
8503 if (!this._fsPath) {
8504 this._fsPath = uriToFsPath(this, false);
8506 return this._fsPath;
8511 _URI.prototype.toString = function (skipEncoding) {
8512 if (skipEncoding === void 0) { skipEncoding = false; }
8513 if (!skipEncoding) {
8514 if (!this._formatted) {
8515 this._formatted = _asFormatted(this, false);
8517 return this._formatted;
8520 // we don't cache that
8521 return _asFormatted(this, true);
8524 _URI.prototype.toJSON = function () {
8530 res.fsPath = this._fsPath;
8531 res._sep = _pathSepMarker;
8533 if (this._formatted) {
8534 res.external = this._formatted;
8538 res.path = this.path;
8541 res.scheme = this.scheme;
8543 if (this.authority) {
8544 res.authority = this.authority;
8547 res.query = this.query;
8549 if (this.fragment) {
8550 res.fragment = this.fragment;
8556 // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
8557 var encodeTable = (_a = {},
8558 _a[58 /* Colon */] = '%3A',
8559 _a[47 /* Slash */] = '%2F',
8560 _a[63 /* QuestionMark */] = '%3F',
8561 _a[35 /* Hash */] = '%23',
8562 _a[91 /* OpenSquareBracket */] = '%5B',
8563 _a[93 /* CloseSquareBracket */] = '%5D',
8564 _a[64 /* AtSign */] = '%40',
8565 _a[33 /* ExclamationMark */] = '%21',
8566 _a[36 /* DollarSign */] = '%24',
8567 _a[38 /* Ampersand */] = '%26',
8568 _a[39 /* SingleQuote */] = '%27',
8569 _a[40 /* OpenParen */] = '%28',
8570 _a[41 /* CloseParen */] = '%29',
8571 _a[42 /* Asterisk */] = '%2A',
8572 _a[43 /* Plus */] = '%2B',
8573 _a[44 /* Comma */] = '%2C',
8574 _a[59 /* Semicolon */] = '%3B',
8575 _a[61 /* Equals */] = '%3D',
8576 _a[32 /* Space */] = '%20',
8578 function encodeURIComponentFast(uriComponent, allowSlash) {
8579 var res = undefined;
8580 var nativeEncodePos = -1;
8581 for (var pos = 0; pos < uriComponent.length; pos++) {
8582 var code = uriComponent.charCodeAt(pos);
8583 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
8584 if ((code >= 97 /* a */ && code <= 122 /* z */)
8585 || (code >= 65 /* A */ && code <= 90 /* Z */)
8586 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
8587 || code === 45 /* Dash */
8588 || code === 46 /* Period */
8589 || code === 95 /* Underline */
8590 || code === 126 /* Tilde */
8591 || (allowSlash && code === 47 /* Slash */)) {
8592 // check if we are delaying native encode
8593 if (nativeEncodePos !== -1) {
8594 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
8595 nativeEncodePos = -1;
8597 // check if we write into a new string (by default we try to return the param)
8598 if (res !== undefined) {
8599 res += uriComponent.charAt(pos);
8603 // encoding needed, we need to allocate a new string
8604 if (res === undefined) {
8605 res = uriComponent.substr(0, pos);
8607 // check with default table first
8608 var escaped = encodeTable[code];
8609 if (escaped !== undefined) {
8610 // check if we are delaying native encode
8611 if (nativeEncodePos !== -1) {
8612 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
8613 nativeEncodePos = -1;
8615 // append escaped variant to result
8618 else if (nativeEncodePos === -1) {
8619 // use native encode only when needed
8620 nativeEncodePos = pos;
8624 if (nativeEncodePos !== -1) {
8625 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
8627 return res !== undefined ? res : uriComponent;
8629 function encodeURIComponentMinimal(path) {
8630 var res = undefined;
8631 for (var pos = 0; pos < path.length; pos++) {
8632 var code = path.charCodeAt(pos);
8633 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
8634 if (res === undefined) {
8635 res = path.substr(0, pos);
8637 res += encodeTable[code];
8640 if (res !== undefined) {
8645 return res !== undefined ? res : path;
8648 * Compute `fsPath` for the given uri
8650 function uriToFsPath(uri, keepDriveLetterCasing) {
8652 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
8653 // unc path: file://shares/c$/far/boo
8654 value = "//" + uri.authority + uri.path;
8656 else if (uri.path.charCodeAt(0) === 47 /* Slash */
8657 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
8658 && uri.path.charCodeAt(2) === 58 /* Colon */) {
8659 if (!keepDriveLetterCasing) {
8660 // windows drive letter: file:///c:/far/boo
8661 value = uri.path[1].toLowerCase() + uri.path.substr(2);
8664 value = uri.path.substr(1);
8672 value = value.replace(/\//g, '\\');
8677 * Create the external version of a uri
8679 function _asFormatted(uri, skipEncoding) {
8680 var encoder = !skipEncoding
8681 ? encodeURIComponentFast
8682 : encodeURIComponentMinimal;
8684 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
8689 if (authority || scheme === 'file') {
8694 var idx = authority.indexOf('@');
8697 var userinfo = authority.substr(0, idx);
8698 authority = authority.substr(idx + 1);
8699 idx = userinfo.indexOf(':');
8701 res += encoder(userinfo, false);
8704 // <user>:<pass>@<auth>
8705 res += encoder(userinfo.substr(0, idx), false);
8707 res += encoder(userinfo.substr(idx + 1), false);
8711 authority = authority.toLowerCase();
8712 idx = authority.indexOf(':');
8714 res += encoder(authority, false);
8718 res += encoder(authority.substr(0, idx), false);
8719 res += authority.substr(idx);
8723 // lower-case windows drive letters in /C:/fff or C:/fff
8724 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
8725 var code = path.charCodeAt(1);
8726 if (code >= 65 /* A */ && code <= 90 /* Z */) {
8727 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
8730 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
8731 var code = path.charCodeAt(0);
8732 if (code >= 65 /* A */ && code <= 90 /* Z */) {
8733 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
8736 // encode the rest of the path
8737 res += encoder(path, true);
8741 res += encoder(query, false);
8745 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
8750 function decodeURIComponentGraceful(str) {
8752 return decodeURIComponent(str);
8755 if (str.length > 3) {
8756 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
8763 var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
8764 function percentDecode(str) {
8765 if (!str.match(_rEncodedAsHex)) {
8768 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
8774 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8776 __webpack_require__.r(__webpack_exports__);
8777 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8778 /* harmony export */ "ClientCapabilities": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ClientCapabilities,
8779 /* harmony export */ "CodeAction": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeAction,
8780 /* harmony export */ "CodeActionContext": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionContext,
8781 /* harmony export */ "CodeActionKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionKind,
8782 /* harmony export */ "CodeLens": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeLens,
8783 /* harmony export */ "Color": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Color,
8784 /* harmony export */ "ColorInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorInformation,
8785 /* harmony export */ "ColorPresentation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorPresentation,
8786 /* harmony export */ "Command": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Command,
8787 /* harmony export */ "CompletionItem": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItem,
8788 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemKind,
8789 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemTag,
8790 /* harmony export */ "CompletionList": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionList,
8791 /* harmony export */ "CreateFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CreateFile,
8792 /* harmony export */ "DeleteFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DeleteFile,
8793 /* harmony export */ "Diagnostic": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Diagnostic,
8794 /* harmony export */ "DiagnosticCode": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticCode,
8795 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticRelatedInformation,
8796 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticSeverity,
8797 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticTag,
8798 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlight,
8799 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlightKind,
8800 /* harmony export */ "DocumentLink": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentLink,
8801 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentSymbol,
8802 /* harmony export */ "EOL": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.EOL,
8803 /* harmony export */ "FileType": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FileType,
8804 /* harmony export */ "FoldingRange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRange,
8805 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRangeKind,
8806 /* harmony export */ "FormattingOptions": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FormattingOptions,
8807 /* harmony export */ "Hover": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Hover,
8808 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertReplaceEdit,
8809 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertTextFormat,
8810 /* harmony export */ "Location": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Location,
8811 /* harmony export */ "LocationLink": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.LocationLink,
8812 /* harmony export */ "MarkedString": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkedString,
8813 /* harmony export */ "MarkupContent": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupContent,
8814 /* harmony export */ "MarkupKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupKind,
8815 /* harmony export */ "ParameterInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ParameterInformation,
8816 /* harmony export */ "Position": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Position,
8817 /* harmony export */ "Range": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Range,
8818 /* harmony export */ "RenameFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.RenameFile,
8819 /* harmony export */ "SelectionRange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SelectionRange,
8820 /* harmony export */ "SignatureInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SignatureInformation,
8821 /* harmony export */ "SymbolInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolInformation,
8822 /* harmony export */ "SymbolKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolKind,
8823 /* harmony export */ "SymbolTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolTag,
8824 /* harmony export */ "TextDocument": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocument,
8825 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentEdit,
8826 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentIdentifier,
8827 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentItem,
8828 /* harmony export */ "TextEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextEdit,
8829 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.VersionedTextDocumentIdentifier,
8830 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceChange,
8831 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceEdit,
8832 /* harmony export */ "getDefaultCSSDataProvider": () => /* binding */ getDefaultCSSDataProvider,
8833 /* harmony export */ "newCSSDataProvider": () => /* binding */ newCSSDataProvider,
8834 /* harmony export */ "getCSSLanguageService": () => /* binding */ getCSSLanguageService,
8835 /* harmony export */ "getSCSSLanguageService": () => /* binding */ getSCSSLanguageService,
8836 /* harmony export */ "getLESSLanguageService": () => /* binding */ getLESSLanguageService
8837 /* harmony export */ });
8838 /* harmony import */ var _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89);
8839 /* harmony import */ var _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(102);
8840 /* harmony import */ var _services_cssHover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(110);
8841 /* harmony import */ var _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(112);
8842 /* harmony import */ var _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(113);
8843 /* harmony import */ var _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(115);
8844 /* harmony import */ var _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(118);
8845 /* harmony import */ var _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(121);
8846 /* harmony import */ var _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(122);
8847 /* harmony import */ var _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(124);
8848 /* harmony import */ var _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(125);
8849 /* harmony import */ var _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(126);
8850 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(128);
8851 /* harmony import */ var _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(129);
8852 /* harmony import */ var _services_scssNavigation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(130);
8853 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(127);
8854 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(105);
8855 /*---------------------------------------------------------------------------------------------
8856 * Copyright (c) Microsoft Corporation. All rights reserved.
8857 * Licensed under the MIT License. See License.txt in the project root for license information.
8858 *--------------------------------------------------------------------------------------------*/
8877 function getDefaultCSSDataProvider() {
8878 return newCSSDataProvider(_data_webCustomData__WEBPACK_IMPORTED_MODULE_15__.cssData);
8880 function newCSSDataProvider(data) {
8881 return new _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__.CSSDataProvider(data);
8883 function createFacade(parser, completion, hover, navigation, codeActions, validation, cssDataManager) {
8885 configure: function (settings) {
8886 validation.configure(settings);
8887 completion.configure(settings);
8889 setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
8890 doValidation: validation.doValidation.bind(validation),
8891 parseStylesheet: parser.parseStylesheet.bind(parser),
8892 doComplete: completion.doComplete.bind(completion),
8893 doComplete2: completion.doComplete2.bind(completion),
8894 setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
8895 doHover: hover.doHover.bind(hover),
8896 findDefinition: navigation.findDefinition.bind(navigation),
8897 findReferences: navigation.findReferences.bind(navigation),
8898 findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
8899 findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
8900 findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
8901 findDocumentSymbols: navigation.findDocumentSymbols.bind(navigation),
8902 doCodeActions: codeActions.doCodeActions.bind(codeActions),
8903 doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
8904 findColorSymbols: function (d, s) { return navigation.findDocumentColors(d, s).map(function (s) { return s.range; }); },
8905 findDocumentColors: navigation.findDocumentColors.bind(navigation),
8906 getColorPresentations: navigation.getColorPresentations.bind(navigation),
8907 doRename: navigation.doRename.bind(navigation),
8908 getFoldingRanges: _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__.getFoldingRanges,
8909 getSelectionRanges: _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__.getSelectionRanges
8912 var defaultLanguageServiceOptions = {};
8913 function getCSSLanguageService(options) {
8914 if (options === void 0) { options = defaultLanguageServiceOptions; }
8915 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
8916 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);
8918 function getSCSSLanguageService(options) {
8919 if (options === void 0) { options = defaultLanguageServiceOptions; }
8920 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
8921 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);
8923 function getLESSLanguageService(options) {
8924 if (options === void 0) { options = defaultLanguageServiceOptions; }
8925 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
8926 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);
8932 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8934 __webpack_require__.r(__webpack_exports__);
8935 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8936 /* harmony export */ "Parser": () => /* binding */ Parser
8937 /* harmony export */ });
8938 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
8939 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
8940 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93);
8941 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97);
8942 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101);
8943 /*---------------------------------------------------------------------------------------------
8944 * Copyright (c) Microsoft Corporation. All rights reserved.
8945 * Licensed under the MIT License. See License.txt in the project root for license information.
8946 *--------------------------------------------------------------------------------------------*/
8948 var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
8949 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
8950 for (var r = Array(s), k = 0, i = 0; i < il; i++)
8951 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
8961 /// A parser for the css core specification. See for reference:
8962 /// https://www.w3.org/TR/CSS21/grammar.html
8963 /// http://www.w3.org/TR/CSS21/syndata.html#tokenization
8965 var Parser = /** @class */ (function () {
8966 function Parser(scnr) {
8967 if (scnr === void 0) { scnr = new _cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner(); }
8968 this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i;
8969 this.scanner = scnr;
8970 this.token = { type: _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF, offset: -1, len: 0, text: '' };
8971 this.prevToken = undefined;
8973 Parser.prototype.peekIdent = function (text) {
8974 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
8976 Parser.prototype.peekKeyword = function (text) {
8977 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
8979 Parser.prototype.peekDelim = function (text) {
8980 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim === this.token.type && text === this.token.text;
8982 Parser.prototype.peek = function (type) {
8983 return type === this.token.type;
8985 Parser.prototype.peekRegExp = function (type, regEx) {
8986 if (type !== this.token.type) {
8989 return regEx.test(this.token.text);
8991 Parser.prototype.hasWhitespace = function () {
8992 return !!this.prevToken && (this.prevToken.offset + this.prevToken.len !== this.token.offset);
8994 Parser.prototype.consumeToken = function () {
8995 this.prevToken = this.token;
8996 this.token = this.scanner.scan();
8998 Parser.prototype.mark = function () {
9000 prev: this.prevToken,
9002 pos: this.scanner.pos()
9005 Parser.prototype.restoreAtMark = function (mark) {
9006 this.prevToken = mark.prev;
9007 this.token = mark.curr;
9008 this.scanner.goBackTo(mark.pos);
9010 Parser.prototype.try = function (func) {
9011 var pos = this.mark();
9014 this.restoreAtMark(pos);
9019 Parser.prototype.acceptOneKeyword = function (keywords) {
9020 if (_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword === this.token.type) {
9021 for (var _i = 0, keywords_1 = keywords; _i < keywords_1.length; _i++) {
9022 var keyword = keywords_1[_i];
9023 if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) {
9024 this.consumeToken();
9031 Parser.prototype.accept = function (type) {
9032 if (type === this.token.type) {
9033 this.consumeToken();
9038 Parser.prototype.acceptIdent = function (text) {
9039 if (this.peekIdent(text)) {
9040 this.consumeToken();
9045 Parser.prototype.acceptKeyword = function (text) {
9046 if (this.peekKeyword(text)) {
9047 this.consumeToken();
9052 Parser.prototype.acceptDelim = function (text) {
9053 if (this.peekDelim(text)) {
9054 this.consumeToken();
9059 Parser.prototype.acceptRegexp = function (regEx) {
9060 if (regEx.test(this.token.text)) {
9061 this.consumeToken();
9066 Parser.prototype._parseRegexp = function (regEx) {
9067 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Identifier);
9068 do { } while (this.acceptRegexp(regEx));
9069 return this.finish(node);
9071 Parser.prototype.acceptUnquotedString = function () {
9072 var pos = this.scanner.pos();
9073 this.scanner.goBackTo(this.token.offset);
9074 var unquoted = this.scanner.scanUnquotedString();
9076 this.token = unquoted;
9077 this.consumeToken();
9080 this.scanner.goBackTo(pos);
9083 Parser.prototype.resync = function (resyncTokens, resyncStopTokens) {
9085 if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) {
9086 this.consumeToken();
9089 else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) {
9093 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) {
9096 this.token = this.scanner.scan();
9100 Parser.prototype.createNode = function (nodeType) {
9101 return new _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node(this.token.offset, this.token.len, nodeType);
9103 Parser.prototype.create = function (ctor) {
9104 return new ctor(this.token.offset, this.token.len);
9106 Parser.prototype.finish = function (node, error, resyncTokens, resyncStopTokens) {
9107 // parseNumeric misuses error for boolean flagging (however the real error mustn't be a false)
9108 // + nodelist offsets mustn't be modified, because there is a offset hack in rulesets for smartselection
9109 if (!(node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Nodelist)) {
9111 this.markError(node, error, resyncTokens, resyncStopTokens);
9113 // set the node end position
9114 if (this.prevToken) {
9115 // length with more elements belonging together
9116 var prevEnd = this.prevToken.offset + this.prevToken.len;
9117 node.length = prevEnd > node.offset ? prevEnd - node.offset : 0; // offset is taken from current token, end from previous: Use 0 for empty nodes
9122 Parser.prototype.markError = function (node, error, resyncTokens, resyncStopTokens) {
9123 if (this.token !== this.lastErrorToken) { // do not report twice on the same token
9124 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));
9125 this.lastErrorToken = this.token;
9127 if (resyncTokens || resyncStopTokens) {
9128 this.resync(resyncTokens, resyncStopTokens);
9131 Parser.prototype.parseStylesheet = function (textDocument) {
9132 var versionId = textDocument.version;
9133 var text = textDocument.getText();
9134 var textProvider = function (offset, length) {
9135 if (textDocument.version !== versionId) {
9136 throw new Error('Underlying model has changed, AST is no longer valid');
9138 return text.substr(offset, length);
9140 return this.internalParse(text, this._parseStylesheet, textProvider);
9142 Parser.prototype.internalParse = function (input, parseFunc, textProvider) {
9143 this.scanner.setSource(input);
9144 this.token = this.scanner.scan();
9145 var node = parseFunc.bind(this)();
9148 node.textProvider = textProvider;
9151 node.textProvider = function (offset, length) { return input.substr(offset, length); };
9156 Parser.prototype._parseStylesheet = function () {
9157 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Stylesheet);
9158 while (node.addChild(this._parseStylesheetStart())) {
9159 // Parse statements only valid at the beginning of stylesheets.
9161 var inRecovery = false;
9163 var hasMatch = false;
9166 var statement = this._parseStylesheetStatement();
9168 node.addChild(statement);
9171 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) && this._needsSemicolonAfter(statement) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9172 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
9175 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)) {
9176 // accept empty statements
9181 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF)) {
9185 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9186 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownAtRule);
9189 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RuleOrSelectorExpected);
9193 this.consumeToken();
9194 } while (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF));
9195 return this.finish(node);
9197 Parser.prototype._parseStylesheetStart = function () {
9198 return this._parseCharset();
9200 Parser.prototype._parseStylesheetStatement = function (isNested) {
9201 if (isNested === void 0) { isNested = false; }
9202 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9203 return this._parseStylesheetAtStatement(isNested);
9205 return this._parseRuleset(isNested);
9207 Parser.prototype._parseStylesheetAtStatement = function (isNested) {
9208 if (isNested === void 0) { isNested = false; }
9209 return this._parseImport()
9210 || this._parseMedia(isNested)
9211 || this._parsePage()
9212 || this._parseFontFace()
9213 || this._parseKeyframe()
9214 || this._parseSupports(isNested)
9215 || this._parseViewPort()
9216 || this._parseNamespace()
9217 || this._parseDocument()
9218 || this._parseUnknownAtRule();
9220 Parser.prototype._tryParseRuleset = function (isNested) {
9221 var mark = this.mark();
9222 if (this._parseSelector(isNested)) {
9223 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma) && this._parseSelector(isNested)) {
9226 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
9227 this.restoreAtMark(mark);
9228 return this._parseRuleset(isNested);
9231 this.restoreAtMark(mark);
9234 Parser.prototype._parseRuleset = function (isNested) {
9235 if (isNested === void 0) { isNested = false; }
9236 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.RuleSet);
9237 var selectors = node.getSelectors();
9238 if (!selectors.addChild(this._parseSelector(isNested))) {
9241 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
9242 if (!selectors.addChild(this._parseSelector(isNested))) {
9243 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SelectorExpected);
9246 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9248 Parser.prototype._parseRuleSetDeclarationAtStatement = function () {
9249 return this._parseAtApply()
9250 || this._parseUnknownAtRule();
9252 Parser.prototype._parseRuleSetDeclaration = function () {
9253 // https://www.w3.org/TR/css-syntax-3/#consume-a-list-of-declarations0
9254 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9255 return this._parseRuleSetDeclarationAtStatement();
9257 return this._tryParseCustomPropertyDeclaration()
9258 || this._parseDeclaration();
9261 * Parses declarations like:
9262 * @apply --my-theme;
9264 * Follows https://tabatkins.github.io/specs/css-apply-rule/#using
9266 Parser.prototype._parseAtApply = function () {
9267 if (!this.peekKeyword('@apply')) {
9270 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.AtApplyRule);
9271 this.consumeToken();
9272 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Variable]))) {
9273 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
9275 return this.finish(node);
9277 Parser.prototype._needsSemicolonAfter = function (node) {
9278 switch (node.type) {
9279 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Keyframe:
9280 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ViewPort:
9281 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Media:
9282 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Ruleset:
9283 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Namespace:
9284 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.If:
9285 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.For:
9286 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Each:
9287 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.While:
9288 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinDeclaration:
9289 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.FunctionDeclaration:
9290 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinContentDeclaration:
9292 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ExtendsReference:
9293 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinContentReference:
9294 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ReturnStatement:
9295 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MediaQuery:
9296 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Debug:
9297 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Import:
9298 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.AtApplyRule:
9299 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.CustomPropertyDeclaration:
9301 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.VariableDeclaration:
9302 return node.needsSemicolon;
9303 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinReference:
9304 return !node.getContent();
9305 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Declaration:
9306 return !node.getNestedProperties();
9310 Parser.prototype._parseDeclarations = function (parseDeclaration) {
9311 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Declarations);
9312 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
9315 var decl = parseDeclaration();
9316 while (node.addChild(decl)) {
9317 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR)) {
9320 if (this._needsSemicolonAfter(decl) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9321 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]);
9323 // We accepted semicolon token. Link it to declaration.
9324 if (decl && this.prevToken && this.prevToken.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon) {
9325 decl.semicolonPosition = this.prevToken.offset;
9327 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9328 // accept empty statements
9330 decl = parseDeclaration();
9332 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR)) {
9333 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]);
9335 return this.finish(node);
9337 Parser.prototype._parseBody = function (node, parseDeclaration) {
9338 if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
9339 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]);
9341 return this.finish(node);
9343 Parser.prototype._parseSelector = function (isNested) {
9344 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Selector);
9345 var hasContent = false;
9347 // nested selectors can start with a combinator
9348 hasContent = node.addChild(this._parseCombinator());
9350 while (node.addChild(this._parseSimpleSelector())) {
9352 node.addChild(this._parseCombinator()); // optional
9354 return hasContent ? this.finish(node) : null;
9356 Parser.prototype._parseDeclaration = function (resyncStopTokens) {
9357 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Declaration);
9358 if (!node.setProperty(this._parseProperty())) {
9361 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9362 var stopTokens = resyncStopTokens ? __spreadArrays(resyncStopTokens, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]) : [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon];
9363 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon], stopTokens);
9365 if (this.prevToken) {
9366 node.colonPosition = this.prevToken.offset;
9368 if (!node.setValue(this._parseExpr())) {
9369 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PropertyValueExpected);
9371 node.addChild(this._parsePrio());
9372 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9373 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9375 return this.finish(node);
9377 Parser.prototype._tryParseCustomPropertyDeclaration = function () {
9378 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^--/)) {
9381 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.CustomPropertyDeclaration);
9382 if (!node.setProperty(this._parseProperty())) {
9385 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9386 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon]);
9388 if (this.prevToken) {
9389 node.colonPosition = this.prevToken.offset;
9391 var mark = this.mark();
9392 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
9393 // try to parse it as nested declaration
9394 var propertySet = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.CustomPropertySet);
9395 var declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));
9396 if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) {
9397 propertySet.addChild(this._parsePrio());
9398 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9399 this.finish(propertySet);
9400 node.setPropertySet(propertySet);
9401 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9402 return this.finish(node);
9405 this.restoreAtMark(mark);
9407 // try tp parse as expression
9408 var expression = this._parseExpr();
9409 if (expression && !expression.isErroneous(true)) {
9411 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9412 node.setValue(expression);
9413 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
9414 return this.finish(node);
9417 this.restoreAtMark(mark);
9418 node.addChild(this._parseCustomPropertyValue());
9419 node.addChild(this._parsePrio());
9420 if ((0,_utils_objects__WEBPACK_IMPORTED_MODULE_4__.isDefined)(node.colonPosition) && this.token.offset === node.colonPosition + 1) {
9421 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PropertyValueExpected);
9423 return this.finish(node);
9426 * Parse custom property values.
9428 * Based on https://www.w3.org/TR/css-variables/#syntax
9430 * This code is somewhat unusual, as the allowed syntax is incredibly broad,
9431 * parsing almost any sequence of tokens, save for a small set of exceptions.
9432 * Unbalanced delimitors, invalid tokens, and declaration
9433 * terminators like semicolons and !important directives (when not inside
9436 Parser.prototype._parseCustomPropertyValue = function () {
9437 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9438 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
9440 var parensDepth = 0;
9441 var bracketsDepth = 0;
9442 done: while (true) {
9443 switch (this.token.type) {
9444 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon:
9445 // A semicolon only ends things if we're not inside a delimitor.
9450 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation:
9451 // An exclamation ends the value if we're not inside delims.
9456 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
9459 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR:
9461 if (curlyDepth < 0) {
9462 // The property value has been terminated without a semicolon, and
9463 // this is the last declaration in the ruleset.
9464 if (parensDepth === 0 && bracketsDepth === 0) {
9467 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftCurlyExpected);
9470 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL:
9473 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR:
9475 if (parensDepth < 0) {
9476 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected);
9479 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL:
9482 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR:
9484 if (bracketsDepth < 0) {
9485 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftSquareBracketExpected);
9488 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString: // fall through
9490 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF:
9491 // We shouldn't have reached the end of input, something is
9493 var error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightCurlyExpected;
9494 if (bracketsDepth > 0) {
9495 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected;
9497 else if (parensDepth > 0) {
9498 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected;
9500 return this.finish(node, error);
9502 this.consumeToken();
9504 return this.finish(node);
9506 Parser.prototype._tryToParseDeclaration = function () {
9507 var mark = this.mark();
9508 if (this._parseProperty() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9509 // looks like a declaration, go ahead
9510 this.restoreAtMark(mark);
9511 return this._parseDeclaration();
9513 this.restoreAtMark(mark);
9516 Parser.prototype._parseProperty = function () {
9517 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Property);
9518 var mark = this.mark();
9519 if (this.acceptDelim('*') || this.acceptDelim('_')) {
9520 // support for IE 5.x, 6 and 7 star hack: see http://en.wikipedia.org/wiki/CSS_filter#Star_hack
9521 if (this.hasWhitespace()) {
9522 this.restoreAtMark(mark);
9526 if (node.setIdentifier(this._parsePropertyIdentifier())) {
9527 return this.finish(node);
9531 Parser.prototype._parsePropertyIdentifier = function () {
9532 return this._parseIdent();
9534 Parser.prototype._parseCharset = function () {
9535 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Charset)) {
9538 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9539 this.consumeToken(); // charset
9540 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String)) {
9541 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
9543 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9544 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
9546 return this.finish(node);
9548 Parser.prototype._parseImport = function () {
9549 if (!this.peekKeyword('@import')) {
9552 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Import);
9553 this.consumeToken(); // @import
9554 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
9555 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.URIOrStringExpected);
9557 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF)) {
9558 node.setMedialist(this._parseMediaQueryList());
9560 return this.finish(node);
9562 Parser.prototype._parseNamespace = function () {
9563 // http://www.w3.org/TR/css3-namespace/
9564 // namespace : NAMESPACE_SYM S* [IDENT S*]? [STRING|URI] S* ';' S*
9565 if (!this.peekKeyword('@namespace')) {
9568 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Namespace);
9569 this.consumeToken(); // @namespace
9570 if (!node.addChild(this._parseURILiteral())) { // url literal also starts with ident
9571 node.addChild(this._parseIdent()); // optional prefix
9572 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
9573 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.URIExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]);
9576 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9577 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
9579 return this.finish(node);
9581 Parser.prototype._parseFontFace = function () {
9582 if (!this.peekKeyword('@font-face')) {
9585 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.FontFace);
9586 this.consumeToken(); // @font-face
9587 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9589 Parser.prototype._parseViewPort = function () {
9590 if (!this.peekKeyword('@-ms-viewport') &&
9591 !this.peekKeyword('@-o-viewport') &&
9592 !this.peekKeyword('@viewport')) {
9595 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ViewPort);
9596 this.consumeToken(); // @-ms-viewport
9597 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9599 Parser.prototype._parseKeyframe = function () {
9600 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword, this.keyframeRegex)) {
9603 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Keyframe);
9604 var atNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9605 this.consumeToken(); // atkeyword
9606 node.setKeyword(this.finish(atNode));
9607 if (atNode.matches('@-ms-keyframes')) { // -ms-keyframes never existed
9608 this.markError(atNode, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownKeyword);
9610 if (!node.setIdentifier(this._parseKeyframeIdent())) {
9611 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR]);
9613 return this._parseBody(node, this._parseKeyframeSelector.bind(this));
9615 Parser.prototype._parseKeyframeIdent = function () {
9616 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Keyframe]);
9618 Parser.prototype._parseKeyframeSelector = function () {
9619 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.KeyframeSelector);
9620 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
9623 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
9624 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
9625 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PercentageExpected);
9628 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9630 Parser.prototype._tryParseKeyframeSelector = function () {
9631 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.KeyframeSelector);
9632 var pos = this.mark();
9633 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
9636 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
9637 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
9638 this.restoreAtMark(pos);
9642 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
9643 this.restoreAtMark(pos);
9646 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9648 Parser.prototype._parseSupports = function (isNested) {
9649 if (isNested === void 0) { isNested = false; }
9650 // SUPPORTS_SYM S* supports_condition '{' S* ruleset* '}' S*
9651 if (!this.peekKeyword('@supports')) {
9654 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Supports);
9655 this.consumeToken(); // @supports
9656 node.addChild(this._parseSupportsCondition());
9657 return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested));
9659 Parser.prototype._parseSupportsDeclaration = function (isNested) {
9660 if (isNested === void 0) { isNested = false; }
9662 // if nested, the body can contain rulesets, but also declarations
9663 return this._tryParseRuleset(true)
9664 || this._tryToParseDeclaration()
9665 || this._parseStylesheetStatement(true);
9667 return this._parseStylesheetStatement(false);
9669 Parser.prototype._parseSupportsCondition = function () {
9670 // supports_condition : supports_negation | supports_conjunction | supports_disjunction | supports_condition_in_parens ;
9671 // supports_condition_in_parens: ( '(' S* supports_condition S* ')' ) | supports_declaration_condition | general_enclosed ;
9672 // supports_negation: NOT S+ supports_condition_in_parens ;
9673 // supports_conjunction: supports_condition_in_parens ( S+ AND S+ supports_condition_in_parens )+;
9674 // supports_disjunction: supports_condition_in_parens ( S+ OR S+ supports_condition_in_parens )+;
9675 // supports_declaration_condition: '(' S* declaration ')';
9676 // general_enclosed: ( FUNCTION | '(' ) ( any | unused )* ')' ;
9677 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SupportsCondition);
9678 if (this.acceptIdent('not')) {
9679 node.addChild(this._parseSupportsConditionInParens());
9682 node.addChild(this._parseSupportsConditionInParens());
9683 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^(and|or)$/i)) {
9684 var text = this.token.text.toLowerCase();
9685 while (this.acceptIdent(text)) {
9686 node.addChild(this._parseSupportsConditionInParens());
9690 return this.finish(node);
9692 Parser.prototype._parseSupportsConditionInParens = function () {
9693 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SupportsCondition);
9694 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
9695 if (this.prevToken) {
9696 node.lParent = this.prevToken.offset;
9698 if (!node.addChild(this._tryToParseDeclaration())) {
9699 if (!this._parseSupportsCondition()) {
9700 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ConditionExpected);
9703 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
9704 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR], []);
9706 if (this.prevToken) {
9707 node.rParent = this.prevToken.offset;
9709 return this.finish(node);
9711 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
9712 var pos = this.mark();
9713 this.consumeToken();
9714 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
9715 var openParentCount = 1;
9716 while (this.token.type !== _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF && openParentCount !== 0) {
9717 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL) {
9720 else if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR) {
9723 this.consumeToken();
9725 return this.finish(node);
9728 this.restoreAtMark(pos);
9731 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL]);
9733 Parser.prototype._parseMediaDeclaration = function (isNested) {
9734 if (isNested === void 0) { isNested = false; }
9736 // if nested, the body can contain rulesets, but also declarations
9737 return this._tryParseRuleset(true)
9738 || this._tryToParseDeclaration()
9739 || this._parseStylesheetStatement(true);
9741 return this._parseStylesheetStatement(false);
9743 Parser.prototype._parseMedia = function (isNested) {
9744 if (isNested === void 0) { isNested = false; }
9745 // MEDIA_SYM S* media_query_list '{' S* ruleset* '}' S*
9746 // media_query_list : S* [media_query [ ',' S* media_query ]* ]?
9747 if (!this.peekKeyword('@media')) {
9750 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Media);
9751 this.consumeToken(); // @media
9752 if (!node.addChild(this._parseMediaQueryList())) {
9753 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
9755 return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested));
9757 Parser.prototype._parseMediaQueryList = function () {
9758 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Medialist);
9759 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]))) {
9760 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
9762 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
9763 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]))) {
9764 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
9767 return this.finish(node);
9769 Parser.prototype._parseMediaQuery = function (resyncStopToken) {
9770 // http://www.w3.org/TR/css3-mediaqueries/
9771 // media_query : [ONLY | NOT]? S* IDENT S* [ AND S* expression ]* | expression [ AND S* expression ]*
9772 // expression : '(' S* IDENT S* [ ':' S* expr ]? ')' S*
9773 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.MediaQuery);
9774 var parseExpression = true;
9775 var hasContent = false;
9776 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
9777 if (this.acceptIdent('only') || this.acceptIdent('not')) {
9780 if (!node.addChild(this._parseIdent())) {
9784 parseExpression = this.acceptIdent('and');
9786 while (parseExpression) {
9787 // Allow short-circuting for other language constructs.
9788 if (node.addChild(this._parseMediaContentStart())) {
9789 parseExpression = this.acceptIdent('and');
9792 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
9794 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected, [], resyncStopToken);
9798 if (!node.addChild(this._parseMediaFeatureName())) {
9799 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected, [], resyncStopToken);
9801 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9802 if (!node.addChild(this._parseExpr())) {
9803 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.TermExpected, [], resyncStopToken);
9806 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
9807 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected, [], resyncStopToken);
9809 parseExpression = this.acceptIdent('and');
9811 return this.finish(node);
9813 Parser.prototype._parseMediaContentStart = function () {
9816 Parser.prototype._parseMediaFeatureName = function () {
9817 return this._parseIdent();
9819 Parser.prototype._parseMedium = function () {
9820 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9821 if (node.addChild(this._parseIdent())) {
9822 return this.finish(node);
9828 Parser.prototype._parsePageDeclaration = function () {
9829 return this._parsePageMarginBox() || this._parseRuleSetDeclaration();
9831 Parser.prototype._parsePage = function () {
9832 // http://www.w3.org/TR/css3-page/
9833 // page_rule : PAGE_SYM S* page_selector_list '{' S* page_body '}' S*
9834 // page_body : /* Can be empty */ declaration? [ ';' S* page_body ]? | page_margin_box page_body
9835 if (!this.peekKeyword('@page')) {
9838 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Page);
9839 this.consumeToken();
9840 if (node.addChild(this._parsePageSelector())) {
9841 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
9842 if (!node.addChild(this._parsePageSelector())) {
9843 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
9847 return this._parseBody(node, this._parsePageDeclaration.bind(this));
9849 Parser.prototype._parsePageMarginBox = function () {
9850 // page_margin_box : margin_sym S* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
9851 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9854 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.PageBoxMarginBox);
9855 if (!this.acceptOneKeyword(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__.pageBoxDirectives)) {
9856 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownAtRule, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]);
9858 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
9860 Parser.prototype._parsePageSelector = function () {
9861 // page_selector : pseudo_page+ | IDENT pseudo_page*
9862 // pseudo_page : ':' [ "left" | "right" | "first" | "blank" ];
9863 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9866 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9867 node.addChild(this._parseIdent()); // optional ident
9868 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
9869 if (!node.addChild(this._parseIdent())) { // optional ident
9870 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
9873 return this.finish(node);
9875 Parser.prototype._parseDocument = function () {
9876 // -moz-document is experimental but has been pushed to css4
9877 if (!this.peekKeyword('@-moz-document')) {
9880 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Document);
9881 this.consumeToken(); // @-moz-document
9882 this.resync([], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]); // ignore all the rules
9883 return this._parseBody(node, this._parseStylesheetStatement.bind(this));
9885 // https://www.w3.org/TR/css-syntax-3/#consume-an-at-rule
9886 Parser.prototype._parseUnknownAtRule = function () {
9887 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9890 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.UnknownAtRule);
9891 node.addChild(this._parseUnknownAtRuleName());
9892 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
9893 var curlyLCount = 0;
9895 var parensDepth = 0;
9896 var bracketsDepth = 0;
9897 done: while (true) {
9898 switch (this.token.type) {
9899 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon:
9904 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF:
9905 if (curlyDepth > 0) {
9906 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightCurlyExpected);
9908 else if (bracketsDepth > 0) {
9909 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
9911 else if (parensDepth > 0) {
9912 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
9915 return this.finish(node);
9917 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
9921 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR:
9923 // End of at-rule, consume CurlyR and return node
9924 if (curlyLCount > 0 && curlyDepth === 0) {
9925 this.consumeToken();
9926 if (bracketsDepth > 0) {
9927 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
9929 else if (parensDepth > 0) {
9930 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
9934 if (curlyDepth < 0) {
9935 // The property value has been terminated without a semicolon, and
9936 // this is the last declaration in the ruleset.
9937 if (parensDepth === 0 && bracketsDepth === 0) {
9940 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftCurlyExpected);
9943 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL:
9946 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR:
9948 if (parensDepth < 0) {
9949 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected);
9952 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL:
9955 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR:
9957 if (bracketsDepth < 0) {
9958 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftSquareBracketExpected);
9962 this.consumeToken();
9966 Parser.prototype._parseUnknownAtRuleName = function () {
9967 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9968 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9969 return this.finish(node);
9973 Parser.prototype._parseOperator = function () {
9974 // these are operators for binary expressions
9975 if (this.peekDelim('/') ||
9976 this.peekDelim('*') ||
9977 this.peekDelim('+') ||
9978 this.peekDelim('-') ||
9979 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Dashmatch) ||
9980 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Includes) ||
9981 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SubstringOperator) ||
9982 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.PrefixOperator) ||
9983 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SuffixOperator) ||
9984 this.peekDelim('=')) { // doesn't stick to the standard here
9985 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Operator);
9986 this.consumeToken();
9987 return this.finish(node);
9993 Parser.prototype._parseUnaryOperator = function () {
9994 if (!this.peekDelim('+') && !this.peekDelim('-')) {
9997 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
9998 this.consumeToken();
9999 return this.finish(node);
10001 Parser.prototype._parseCombinator = function () {
10002 if (this.peekDelim('>')) {
10003 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10004 this.consumeToken();
10005 var mark = this.mark();
10006 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10007 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10008 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorShadowPiercingDescendant;
10009 return this.finish(node);
10011 this.restoreAtMark(mark);
10013 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorParent;
10014 return this.finish(node);
10016 else if (this.peekDelim('+')) {
10017 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10018 this.consumeToken();
10019 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorSibling;
10020 return this.finish(node);
10022 else if (this.peekDelim('~')) {
10023 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10024 this.consumeToken();
10025 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorAllSiblings;
10026 return this.finish(node);
10028 else if (this.peekDelim('/')) {
10029 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10030 this.consumeToken();
10031 var mark = this.mark();
10032 if (!this.hasWhitespace() && this.acceptIdent('deep') && !this.hasWhitespace() && this.acceptDelim('/')) {
10033 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorShadowPiercingDescendant;
10034 return this.finish(node);
10036 this.restoreAtMark(mark);
10040 Parser.prototype._parseSimpleSelector = function () {
10042 // : element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+ ;
10043 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SimpleSelector);
10045 if (node.addChild(this._parseElementName())) {
10048 while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) {
10051 return c > 0 ? this.finish(node) : null;
10053 Parser.prototype._parseSimpleSelectorBody = function () {
10054 return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib();
10056 Parser.prototype._parseSelectorIdent = function () {
10057 return this._parseIdent();
10059 Parser.prototype._parseHash = function () {
10060 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Hash) && !this.peekDelim('#')) {
10063 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.IdentifierSelector);
10064 if (this.acceptDelim('#')) {
10065 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10066 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10070 this.consumeToken(); // TokenType.Hash
10072 return this.finish(node);
10074 Parser.prototype._parseClass = function () {
10075 // class: '.' IDENT ;
10076 if (!this.peekDelim('.')) {
10079 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ClassSelector);
10080 this.consumeToken(); // '.'
10081 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10082 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10084 return this.finish(node);
10086 Parser.prototype._parseElementName = function () {
10087 // element_name: (ns? '|')? IDENT | '*';
10088 var pos = this.mark();
10089 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ElementNameSelector);
10090 node.addChild(this._parseNamespacePrefix());
10091 if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim('*')) {
10092 this.restoreAtMark(pos);
10095 return this.finish(node);
10097 Parser.prototype._parseNamespacePrefix = function () {
10098 var pos = this.mark();
10099 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.NamespacePrefix);
10100 if (!node.addChild(this._parseIdent()) && !this.acceptDelim('*')) {
10103 if (!this.acceptDelim('|')) {
10104 this.restoreAtMark(pos);
10107 return this.finish(node);
10109 Parser.prototype._parseAttrib = function () {
10110 // attrib : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
10111 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL)) {
10114 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.AttributeSelector);
10115 this.consumeToken(); // BracketL
10116 // Optional attrib namespace
10117 node.setNamespacePrefix(this._parseNamespacePrefix());
10118 if (!node.setIdentifier(this._parseIdent())) {
10119 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10121 if (node.setOperator(this._parseOperator())) {
10122 node.setValue(this._parseBinaryExpr());
10123 this.acceptIdent('i'); // case insensitive matching
10125 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR)) {
10126 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
10128 return this.finish(node);
10130 Parser.prototype._parsePseudo = function () {
10132 // pseudo: ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]
10133 var node = this._tryParsePseudoIdentifier();
10135 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10136 var tryAsSelector = function () {
10137 var selectors = _this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10138 if (!selectors.addChild(_this._parseSelector(false))) {
10141 while (_this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma) && selectors.addChild(_this._parseSelector(false))) {
10144 if (_this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10145 return _this.finish(selectors);
10149 node.addChild(this.try(tryAsSelector) || this._parseBinaryExpr());
10150 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10151 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10154 return this.finish(node);
10158 Parser.prototype._tryParsePseudoIdentifier = function () {
10159 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10162 var pos = this.mark();
10163 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.PseudoSelector);
10164 this.consumeToken(); // Colon
10165 if (this.hasWhitespace()) {
10166 this.restoreAtMark(pos);
10169 // optional, support ::
10170 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon) && this.hasWhitespace()) {
10171 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10173 if (!node.addChild(this._parseIdent())) {
10174 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10178 Parser.prototype._tryParsePrio = function () {
10179 var mark = this.mark();
10180 var prio = this._parsePrio();
10184 this.restoreAtMark(mark);
10187 Parser.prototype._parsePrio = function () {
10188 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation)) {
10191 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Prio);
10192 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation) && this.acceptIdent('important')) {
10193 return this.finish(node);
10197 Parser.prototype._parseExpr = function (stopOnComma) {
10198 if (stopOnComma === void 0) { stopOnComma = false; }
10199 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Expression);
10200 if (!node.addChild(this._parseBinaryExpr())) {
10204 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) { // optional
10206 return this.finish(node);
10208 this.consumeToken();
10210 if (!node.addChild(this._parseBinaryExpr())) {
10214 return this.finish(node);
10216 Parser.prototype._parseNamedLine = function () {
10217 // https://www.w3.org/TR/css-grid-1/#named-lines
10218 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL)) {
10221 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.GridLine);
10222 this.consumeToken();
10223 while (node.addChild(this._parseIdent())) {
10226 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR)) {
10227 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
10229 return this.finish(node);
10231 Parser.prototype._parseBinaryExpr = function (preparsedLeft, preparsedOper) {
10232 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.BinaryExpression);
10233 if (!node.setLeft((preparsedLeft || this._parseTerm()))) {
10236 if (!node.setOperator(preparsedOper || this._parseOperator())) {
10237 return this.finish(node);
10239 if (!node.setRight(this._parseTerm())) {
10240 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.TermExpected);
10242 // things needed for multiple binary expressions
10243 node = this.finish(node);
10244 var operator = this._parseOperator();
10246 node = this._parseBinaryExpr(node, operator);
10248 return this.finish(node);
10250 Parser.prototype._parseTerm = function () {
10251 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Term);
10252 node.setOperator(this._parseUnaryOperator()); // optional
10253 if (node.setExpression(this._parseTermExpression())) {
10254 return this.finish(node);
10258 Parser.prototype._parseTermExpression = function () {
10259 return this._parseURILiteral() || // url before function
10260 this._parseFunction() || // function before ident
10261 this._parseIdent() ||
10262 this._parseStringLiteral() ||
10263 this._parseNumeric() ||
10264 this._parseHexColor() ||
10265 this._parseOperation() ||
10266 this._parseNamedLine();
10268 Parser.prototype._parseOperation = function () {
10269 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10272 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10273 this.consumeToken(); // ParenthesisL
10274 node.addChild(this._parseExpr());
10275 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10276 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10278 return this.finish(node);
10280 Parser.prototype._parseNumeric = function () {
10281 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Num) ||
10282 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage) ||
10283 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Resolution) ||
10284 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Length) ||
10285 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EMS) ||
10286 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EXS) ||
10287 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Angle) ||
10288 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Time) ||
10289 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Dimension) ||
10290 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Freq)) {
10291 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NumericValue);
10292 this.consumeToken();
10293 return this.finish(node);
10297 Parser.prototype._parseStringLiteral = function () {
10298 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString)) {
10301 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.StringLiteral);
10302 this.consumeToken();
10303 return this.finish(node);
10305 Parser.prototype._parseURILiteral = function () {
10306 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^url(-prefix)?$/i)) {
10309 var pos = this.mark();
10310 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.URILiteral);
10311 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident);
10312 if (this.hasWhitespace() || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10313 this.restoreAtMark(pos);
10316 this.scanner.inURL = true;
10317 this.consumeToken(); // consume ()
10318 node.addChild(this._parseURLArgument()); // argument is optional
10319 this.scanner.inURL = false;
10320 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10321 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10323 return this.finish(node);
10325 Parser.prototype._parseURLArgument = function () {
10326 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10327 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString) && !this.acceptUnquotedString()) {
10330 return this.finish(node);
10332 Parser.prototype._parseIdent = function (referenceTypes) {
10333 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
10336 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Identifier);
10337 if (referenceTypes) {
10338 node.referenceTypes = referenceTypes;
10340 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^--/);
10341 this.consumeToken();
10342 return this.finish(node);
10344 Parser.prototype._parseFunction = function () {
10345 var pos = this.mark();
10346 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Function);
10347 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
10350 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10351 this.restoreAtMark(pos);
10354 if (node.getArguments().addChild(this._parseFunctionArgument())) {
10355 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10356 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10359 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
10360 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ExpressionExpected);
10364 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10365 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10367 return this.finish(node);
10369 Parser.prototype._parseFunctionIdentifier = function () {
10370 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
10373 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Identifier);
10374 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Function];
10375 if (this.acceptIdent('progid')) {
10376 // support for IE7 specific filters: 'progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)'
10377 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10378 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident) && this.acceptDelim('.')) {
10382 return this.finish(node);
10384 this.consumeToken();
10385 return this.finish(node);
10387 Parser.prototype._parseFunctionArgument = function () {
10388 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.FunctionArgument);
10389 if (node.setValue(this._parseExpr(true))) {
10390 return this.finish(node);
10394 Parser.prototype._parseHexColor = function () {
10395 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)) {
10396 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.HexColorValue);
10397 this.consumeToken();
10398 return this.finish(node);
10411 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10413 __webpack_require__.r(__webpack_exports__);
10414 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10415 /* harmony export */ "TokenType": () => /* binding */ TokenType,
10416 /* harmony export */ "MultiLineStream": () => /* binding */ MultiLineStream,
10417 /* harmony export */ "Scanner": () => /* binding */ Scanner
10418 /* harmony export */ });
10419 /*---------------------------------------------------------------------------------------------
10420 * Copyright (c) Microsoft Corporation. All rights reserved.
10421 * Licensed under the MIT License. See License.txt in the project root for license information.
10422 *--------------------------------------------------------------------------------------------*/
10425 (function (TokenType) {
10426 TokenType[TokenType["Ident"] = 0] = "Ident";
10427 TokenType[TokenType["AtKeyword"] = 1] = "AtKeyword";
10428 TokenType[TokenType["String"] = 2] = "String";
10429 TokenType[TokenType["BadString"] = 3] = "BadString";
10430 TokenType[TokenType["UnquotedString"] = 4] = "UnquotedString";
10431 TokenType[TokenType["Hash"] = 5] = "Hash";
10432 TokenType[TokenType["Num"] = 6] = "Num";
10433 TokenType[TokenType["Percentage"] = 7] = "Percentage";
10434 TokenType[TokenType["Dimension"] = 8] = "Dimension";
10435 TokenType[TokenType["UnicodeRange"] = 9] = "UnicodeRange";
10436 TokenType[TokenType["CDO"] = 10] = "CDO";
10437 TokenType[TokenType["CDC"] = 11] = "CDC";
10438 TokenType[TokenType["Colon"] = 12] = "Colon";
10439 TokenType[TokenType["SemiColon"] = 13] = "SemiColon";
10440 TokenType[TokenType["CurlyL"] = 14] = "CurlyL";
10441 TokenType[TokenType["CurlyR"] = 15] = "CurlyR";
10442 TokenType[TokenType["ParenthesisL"] = 16] = "ParenthesisL";
10443 TokenType[TokenType["ParenthesisR"] = 17] = "ParenthesisR";
10444 TokenType[TokenType["BracketL"] = 18] = "BracketL";
10445 TokenType[TokenType["BracketR"] = 19] = "BracketR";
10446 TokenType[TokenType["Whitespace"] = 20] = "Whitespace";
10447 TokenType[TokenType["Includes"] = 21] = "Includes";
10448 TokenType[TokenType["Dashmatch"] = 22] = "Dashmatch";
10449 TokenType[TokenType["SubstringOperator"] = 23] = "SubstringOperator";
10450 TokenType[TokenType["PrefixOperator"] = 24] = "PrefixOperator";
10451 TokenType[TokenType["SuffixOperator"] = 25] = "SuffixOperator";
10452 TokenType[TokenType["Delim"] = 26] = "Delim";
10453 TokenType[TokenType["EMS"] = 27] = "EMS";
10454 TokenType[TokenType["EXS"] = 28] = "EXS";
10455 TokenType[TokenType["Length"] = 29] = "Length";
10456 TokenType[TokenType["Angle"] = 30] = "Angle";
10457 TokenType[TokenType["Time"] = 31] = "Time";
10458 TokenType[TokenType["Freq"] = 32] = "Freq";
10459 TokenType[TokenType["Exclamation"] = 33] = "Exclamation";
10460 TokenType[TokenType["Resolution"] = 34] = "Resolution";
10461 TokenType[TokenType["Comma"] = 35] = "Comma";
10462 TokenType[TokenType["Charset"] = 36] = "Charset";
10463 TokenType[TokenType["EscapedJavaScript"] = 37] = "EscapedJavaScript";
10464 TokenType[TokenType["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript";
10465 TokenType[TokenType["Comment"] = 39] = "Comment";
10466 TokenType[TokenType["SingleLineComment"] = 40] = "SingleLineComment";
10467 TokenType[TokenType["EOF"] = 41] = "EOF";
10468 TokenType[TokenType["CustomToken"] = 42] = "CustomToken";
10469 })(TokenType || (TokenType = {}));
10470 var MultiLineStream = /** @class */ (function () {
10471 function MultiLineStream(source) {
10472 this.source = source;
10473 this.len = source.length;
10476 MultiLineStream.prototype.substring = function (from, to) {
10477 if (to === void 0) { to = this.position; }
10478 return this.source.substring(from, to);
10480 MultiLineStream.prototype.eos = function () {
10481 return this.len <= this.position;
10483 MultiLineStream.prototype.pos = function () {
10484 return this.position;
10486 MultiLineStream.prototype.goBackTo = function (pos) {
10487 this.position = pos;
10489 MultiLineStream.prototype.goBack = function (n) {
10490 this.position -= n;
10492 MultiLineStream.prototype.advance = function (n) {
10493 this.position += n;
10495 MultiLineStream.prototype.nextChar = function () {
10496 return this.source.charCodeAt(this.position++) || 0;
10498 MultiLineStream.prototype.peekChar = function (n) {
10499 if (n === void 0) { n = 0; }
10500 return this.source.charCodeAt(this.position + n) || 0;
10502 MultiLineStream.prototype.lookbackChar = function (n) {
10503 if (n === void 0) { n = 0; }
10504 return this.source.charCodeAt(this.position - n) || 0;
10506 MultiLineStream.prototype.advanceIfChar = function (ch) {
10507 if (ch === this.source.charCodeAt(this.position)) {
10513 MultiLineStream.prototype.advanceIfChars = function (ch) {
10514 if (this.position + ch.length > this.source.length) {
10518 for (; i < ch.length; i++) {
10519 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
10526 MultiLineStream.prototype.advanceWhileChar = function (condition) {
10527 var posNow = this.position;
10528 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
10531 return this.position - posNow;
10533 return MultiLineStream;
10536 var _a = 'a'.charCodeAt(0);
10537 var _f = 'f'.charCodeAt(0);
10538 var _z = 'z'.charCodeAt(0);
10539 var _A = 'A'.charCodeAt(0);
10540 var _F = 'F'.charCodeAt(0);
10541 var _Z = 'Z'.charCodeAt(0);
10542 var _0 = '0'.charCodeAt(0);
10543 var _9 = '9'.charCodeAt(0);
10544 var _TLD = '~'.charCodeAt(0);
10545 var _HAT = '^'.charCodeAt(0);
10546 var _EQS = '='.charCodeAt(0);
10547 var _PIP = '|'.charCodeAt(0);
10548 var _MIN = '-'.charCodeAt(0);
10549 var _USC = '_'.charCodeAt(0);
10550 var _PRC = '%'.charCodeAt(0);
10551 var _MUL = '*'.charCodeAt(0);
10552 var _LPA = '('.charCodeAt(0);
10553 var _RPA = ')'.charCodeAt(0);
10554 var _LAN = '<'.charCodeAt(0);
10555 var _RAN = '>'.charCodeAt(0);
10556 var _ATS = '@'.charCodeAt(0);
10557 var _HSH = '#'.charCodeAt(0);
10558 var _DLR = '$'.charCodeAt(0);
10559 var _BSL = '\\'.charCodeAt(0);
10560 var _FSL = '/'.charCodeAt(0);
10561 var _NWL = '\n'.charCodeAt(0);
10562 var _CAR = '\r'.charCodeAt(0);
10563 var _LFD = '\f'.charCodeAt(0);
10564 var _DQO = '"'.charCodeAt(0);
10565 var _SQO = '\''.charCodeAt(0);
10566 var _WSP = ' '.charCodeAt(0);
10567 var _TAB = '\t'.charCodeAt(0);
10568 var _SEM = ';'.charCodeAt(0);
10569 var _COL = ':'.charCodeAt(0);
10570 var _CUL = '{'.charCodeAt(0);
10571 var _CUR = '}'.charCodeAt(0);
10572 var _BRL = '['.charCodeAt(0);
10573 var _BRR = ']'.charCodeAt(0);
10574 var _CMA = ','.charCodeAt(0);
10575 var _DOT = '.'.charCodeAt(0);
10576 var _BNG = '!'.charCodeAt(0);
10577 var staticTokenTable = {};
10578 staticTokenTable[_SEM] = TokenType.SemiColon;
10579 staticTokenTable[_COL] = TokenType.Colon;
10580 staticTokenTable[_CUL] = TokenType.CurlyL;
10581 staticTokenTable[_CUR] = TokenType.CurlyR;
10582 staticTokenTable[_BRR] = TokenType.BracketR;
10583 staticTokenTable[_BRL] = TokenType.BracketL;
10584 staticTokenTable[_LPA] = TokenType.ParenthesisL;
10585 staticTokenTable[_RPA] = TokenType.ParenthesisR;
10586 staticTokenTable[_CMA] = TokenType.Comma;
10587 var staticUnitTable = {};
10588 staticUnitTable['em'] = TokenType.EMS;
10589 staticUnitTable['ex'] = TokenType.EXS;
10590 staticUnitTable['px'] = TokenType.Length;
10591 staticUnitTable['cm'] = TokenType.Length;
10592 staticUnitTable['mm'] = TokenType.Length;
10593 staticUnitTable['in'] = TokenType.Length;
10594 staticUnitTable['pt'] = TokenType.Length;
10595 staticUnitTable['pc'] = TokenType.Length;
10596 staticUnitTable['deg'] = TokenType.Angle;
10597 staticUnitTable['rad'] = TokenType.Angle;
10598 staticUnitTable['grad'] = TokenType.Angle;
10599 staticUnitTable['ms'] = TokenType.Time;
10600 staticUnitTable['s'] = TokenType.Time;
10601 staticUnitTable['hz'] = TokenType.Freq;
10602 staticUnitTable['khz'] = TokenType.Freq;
10603 staticUnitTable['%'] = TokenType.Percentage;
10604 staticUnitTable['fr'] = TokenType.Percentage;
10605 staticUnitTable['dpi'] = TokenType.Resolution;
10606 staticUnitTable['dpcm'] = TokenType.Resolution;
10607 var Scanner = /** @class */ (function () {
10608 function Scanner() {
10609 this.stream = new MultiLineStream('');
10610 this.ignoreComment = true;
10611 this.ignoreWhitespace = true;
10612 this.inURL = false;
10614 Scanner.prototype.setSource = function (input) {
10615 this.stream = new MultiLineStream(input);
10617 Scanner.prototype.finishToken = function (offset, type, text) {
10620 len: this.stream.pos() - offset,
10622 text: text || this.stream.substring(offset)
10625 Scanner.prototype.substring = function (offset, len) {
10626 return this.stream.substring(offset, offset + len);
10628 Scanner.prototype.pos = function () {
10629 return this.stream.pos();
10631 Scanner.prototype.goBackTo = function (pos) {
10632 this.stream.goBackTo(pos);
10634 Scanner.prototype.scanUnquotedString = function () {
10635 var offset = this.stream.pos();
10637 if (this._unquotedString(content)) {
10638 return this.finishToken(offset, TokenType.UnquotedString, content.join(''));
10642 Scanner.prototype.scan = function () {
10643 // processes all whitespaces and comments
10644 var triviaToken = this.trivia();
10645 if (triviaToken !== null) {
10646 return triviaToken;
10648 var offset = this.stream.pos();
10649 // End of file/input
10650 if (this.stream.eos()) {
10651 return this.finishToken(offset, TokenType.EOF);
10653 return this.scanNext(offset);
10655 Scanner.prototype.scanNext = function (offset) {
10657 if (this.stream.advanceIfChars([_LAN, _BNG, _MIN, _MIN])) {
10658 return this.finishToken(offset, TokenType.CDO);
10661 if (this.stream.advanceIfChars([_MIN, _MIN, _RAN])) {
10662 return this.finishToken(offset, TokenType.CDC);
10665 if (this.ident(content)) {
10666 return this.finishToken(offset, TokenType.Ident, content.join(''));
10669 if (this.stream.advanceIfChar(_ATS)) {
10671 if (this._name(content)) {
10672 var keywordText = content.join('');
10673 if (keywordText === '@charset') {
10674 return this.finishToken(offset, TokenType.Charset, keywordText);
10676 return this.finishToken(offset, TokenType.AtKeyword, keywordText);
10679 return this.finishToken(offset, TokenType.Delim);
10683 if (this.stream.advanceIfChar(_HSH)) {
10685 if (this._name(content)) {
10686 return this.finishToken(offset, TokenType.Hash, content.join(''));
10689 return this.finishToken(offset, TokenType.Delim);
10693 if (this.stream.advanceIfChar(_BNG)) {
10694 return this.finishToken(offset, TokenType.Exclamation);
10697 if (this._number()) {
10698 var pos = this.stream.pos();
10699 content = [this.stream.substring(offset, pos)];
10700 if (this.stream.advanceIfChar(_PRC)) {
10702 return this.finishToken(offset, TokenType.Percentage);
10704 else if (this.ident(content)) {
10705 var dim = this.stream.substring(pos).toLowerCase();
10706 var tokenType_1 = staticUnitTable[dim];
10707 if (typeof tokenType_1 !== 'undefined') {
10708 // Known dimension 43px
10709 return this.finishToken(offset, tokenType_1, content.join(''));
10712 // Unknown dimension 43ft
10713 return this.finishToken(offset, TokenType.Dimension, content.join(''));
10716 return this.finishToken(offset, TokenType.Num);
10718 // String, BadString
10720 var tokenType = this._string(content);
10721 if (tokenType !== null) {
10722 return this.finishToken(offset, tokenType, content.join(''));
10724 // single character tokens
10725 tokenType = staticTokenTable[this.stream.peekChar()];
10726 if (typeof tokenType !== 'undefined') {
10727 this.stream.advance(1);
10728 return this.finishToken(offset, tokenType);
10731 if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS) {
10732 this.stream.advance(2);
10733 return this.finishToken(offset, TokenType.Includes);
10736 if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS) {
10737 this.stream.advance(2);
10738 return this.finishToken(offset, TokenType.Dashmatch);
10740 // Substring operator *=
10741 if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS) {
10742 this.stream.advance(2);
10743 return this.finishToken(offset, TokenType.SubstringOperator);
10745 // Substring operator ^=
10746 if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS) {
10747 this.stream.advance(2);
10748 return this.finishToken(offset, TokenType.PrefixOperator);
10750 // Substring operator $=
10751 if (this.stream.peekChar(0) === _DLR && this.stream.peekChar(1) === _EQS) {
10752 this.stream.advance(2);
10753 return this.finishToken(offset, TokenType.SuffixOperator);
10756 this.stream.nextChar();
10757 return this.finishToken(offset, TokenType.Delim);
10759 Scanner.prototype.trivia = function () {
10761 var offset = this.stream.pos();
10762 if (this._whitespace()) {
10763 if (!this.ignoreWhitespace) {
10764 return this.finishToken(offset, TokenType.Whitespace);
10767 else if (this.comment()) {
10768 if (!this.ignoreComment) {
10769 return this.finishToken(offset, TokenType.Comment);
10777 Scanner.prototype.comment = function () {
10778 if (this.stream.advanceIfChars([_FSL, _MUL])) {
10779 var success_1 = false, hot_1 = false;
10780 this.stream.advanceWhileChar(function (ch) {
10781 if (hot_1 && ch === _FSL) {
10785 hot_1 = ch === _MUL;
10789 this.stream.advance(1);
10795 Scanner.prototype._number = function () {
10797 if (this.stream.peekChar() === _DOT) {
10800 ch = this.stream.peekChar(npeek);
10801 if (ch >= _0 && ch <= _9) {
10802 this.stream.advance(npeek + 1);
10803 this.stream.advanceWhileChar(function (ch) {
10804 return ch >= _0 && ch <= _9 || npeek === 0 && ch === _DOT;
10810 Scanner.prototype._newline = function (result) {
10811 var ch = this.stream.peekChar();
10816 this.stream.advance(1);
10817 result.push(String.fromCharCode(ch));
10818 if (ch === _CAR && this.stream.advanceIfChar(_NWL)) {
10825 Scanner.prototype._escape = function (result, includeNewLines) {
10826 var ch = this.stream.peekChar();
10828 this.stream.advance(1);
10829 ch = this.stream.peekChar();
10830 var hexNumCount = 0;
10831 while (hexNumCount < 6 && (ch >= _0 && ch <= _9 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) {
10832 this.stream.advance(1);
10833 ch = this.stream.peekChar();
10836 if (hexNumCount > 0) {
10838 var hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16);
10840 result.push(String.fromCharCode(hexVal));
10846 // optional whitespace or new line, not part of result text
10847 if (ch === _WSP || ch === _TAB) {
10848 this.stream.advance(1);
10855 if (ch !== _CAR && ch !== _LFD && ch !== _NWL) {
10856 this.stream.advance(1);
10857 result.push(String.fromCharCode(ch));
10860 else if (includeNewLines) {
10861 return this._newline(result);
10866 Scanner.prototype._stringChar = function (closeQuote, result) {
10867 // not closeQuote, not backslash, not newline
10868 var ch = this.stream.peekChar();
10869 if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR && ch !== _LFD && ch !== _NWL) {
10870 this.stream.advance(1);
10871 result.push(String.fromCharCode(ch));
10876 Scanner.prototype._string = function (result) {
10877 if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) {
10878 var closeQuote = this.stream.nextChar();
10879 result.push(String.fromCharCode(closeQuote));
10880 while (this._stringChar(closeQuote, result) || this._escape(result, true)) {
10883 if (this.stream.peekChar() === closeQuote) {
10884 this.stream.nextChar();
10885 result.push(String.fromCharCode(closeQuote));
10886 return TokenType.String;
10889 return TokenType.BadString;
10894 Scanner.prototype._unquotedChar = function (result) {
10895 // not closeQuote, not backslash, not newline
10896 var ch = this.stream.peekChar();
10897 if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL && ch !== _LFD && ch !== _CAR) {
10898 this.stream.advance(1);
10899 result.push(String.fromCharCode(ch));
10904 Scanner.prototype._unquotedString = function (result) {
10905 var hasContent = false;
10906 while (this._unquotedChar(result) || this._escape(result)) {
10911 Scanner.prototype._whitespace = function () {
10912 var n = this.stream.advanceWhileChar(function (ch) {
10913 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
10917 Scanner.prototype._name = function (result) {
10918 var matched = false;
10919 while (this._identChar(result) || this._escape(result)) {
10924 Scanner.prototype.ident = function (result) {
10925 var pos = this.stream.pos();
10926 var hasMinus = this._minus(result);
10927 if (hasMinus && this._minus(result) /* -- */) {
10928 if (this._identFirstChar(result) || this._escape(result)) {
10929 while (this._identChar(result) || this._escape(result)) {
10935 else if (this._identFirstChar(result) || this._escape(result)) {
10936 while (this._identChar(result) || this._escape(result)) {
10941 this.stream.goBackTo(pos);
10944 Scanner.prototype._identFirstChar = function (result) {
10945 var ch = this.stream.peekChar();
10946 if (ch === _USC || // _
10947 ch >= _a && ch <= _z || // a-z
10948 ch >= _A && ch <= _Z || // A-Z
10949 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
10950 this.stream.advance(1);
10951 result.push(String.fromCharCode(ch));
10956 Scanner.prototype._minus = function (result) {
10957 var ch = this.stream.peekChar();
10959 this.stream.advance(1);
10960 result.push(String.fromCharCode(ch));
10965 Scanner.prototype._identChar = function (result) {
10966 var ch = this.stream.peekChar();
10967 if (ch === _USC || // _
10968 ch === _MIN || // -
10969 ch >= _a && ch <= _z || // a-z
10970 ch >= _A && ch <= _Z || // A-Z
10971 ch >= _0 && ch <= _9 || // 0/9
10972 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
10973 this.stream.advance(1);
10974 result.push(String.fromCharCode(ch));
10986 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10988 __webpack_require__.r(__webpack_exports__);
10989 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10990 /* harmony export */ "NodeType": () => /* binding */ NodeType,
10991 /* harmony export */ "ReferenceType": () => /* binding */ ReferenceType,
10992 /* harmony export */ "getNodeAtOffset": () => /* binding */ getNodeAtOffset,
10993 /* harmony export */ "getNodePath": () => /* binding */ getNodePath,
10994 /* harmony export */ "getParentDeclaration": () => /* binding */ getParentDeclaration,
10995 /* harmony export */ "Node": () => /* binding */ Node,
10996 /* harmony export */ "Nodelist": () => /* binding */ Nodelist,
10997 /* harmony export */ "Identifier": () => /* binding */ Identifier,
10998 /* harmony export */ "Stylesheet": () => /* binding */ Stylesheet,
10999 /* harmony export */ "Declarations": () => /* binding */ Declarations,
11000 /* harmony export */ "BodyDeclaration": () => /* binding */ BodyDeclaration,
11001 /* harmony export */ "RuleSet": () => /* binding */ RuleSet,
11002 /* harmony export */ "Selector": () => /* binding */ Selector,
11003 /* harmony export */ "SimpleSelector": () => /* binding */ SimpleSelector,
11004 /* harmony export */ "AtApplyRule": () => /* binding */ AtApplyRule,
11005 /* harmony export */ "AbstractDeclaration": () => /* binding */ AbstractDeclaration,
11006 /* harmony export */ "CustomPropertyDeclaration": () => /* binding */ CustomPropertyDeclaration,
11007 /* harmony export */ "CustomPropertySet": () => /* binding */ CustomPropertySet,
11008 /* harmony export */ "Declaration": () => /* binding */ Declaration,
11009 /* harmony export */ "Property": () => /* binding */ Property,
11010 /* harmony export */ "Invocation": () => /* binding */ Invocation,
11011 /* harmony export */ "Function": () => /* binding */ Function,
11012 /* harmony export */ "FunctionParameter": () => /* binding */ FunctionParameter,
11013 /* harmony export */ "FunctionArgument": () => /* binding */ FunctionArgument,
11014 /* harmony export */ "IfStatement": () => /* binding */ IfStatement,
11015 /* harmony export */ "ForStatement": () => /* binding */ ForStatement,
11016 /* harmony export */ "EachStatement": () => /* binding */ EachStatement,
11017 /* harmony export */ "WhileStatement": () => /* binding */ WhileStatement,
11018 /* harmony export */ "ElseStatement": () => /* binding */ ElseStatement,
11019 /* harmony export */ "FunctionDeclaration": () => /* binding */ FunctionDeclaration,
11020 /* harmony export */ "ViewPort": () => /* binding */ ViewPort,
11021 /* harmony export */ "FontFace": () => /* binding */ FontFace,
11022 /* harmony export */ "NestedProperties": () => /* binding */ NestedProperties,
11023 /* harmony export */ "Keyframe": () => /* binding */ Keyframe,
11024 /* harmony export */ "KeyframeSelector": () => /* binding */ KeyframeSelector,
11025 /* harmony export */ "Import": () => /* binding */ Import,
11026 /* harmony export */ "Use": () => /* binding */ Use,
11027 /* harmony export */ "ModuleConfiguration": () => /* binding */ ModuleConfiguration,
11028 /* harmony export */ "Forward": () => /* binding */ Forward,
11029 /* harmony export */ "ForwardVisibility": () => /* binding */ ForwardVisibility,
11030 /* harmony export */ "Namespace": () => /* binding */ Namespace,
11031 /* harmony export */ "Media": () => /* binding */ Media,
11032 /* harmony export */ "Supports": () => /* binding */ Supports,
11033 /* harmony export */ "Document": () => /* binding */ Document,
11034 /* harmony export */ "Medialist": () => /* binding */ Medialist,
11035 /* harmony export */ "MediaQuery": () => /* binding */ MediaQuery,
11036 /* harmony export */ "SupportsCondition": () => /* binding */ SupportsCondition,
11037 /* harmony export */ "Page": () => /* binding */ Page,
11038 /* harmony export */ "PageBoxMarginBox": () => /* binding */ PageBoxMarginBox,
11039 /* harmony export */ "Expression": () => /* binding */ Expression,
11040 /* harmony export */ "BinaryExpression": () => /* binding */ BinaryExpression,
11041 /* harmony export */ "Term": () => /* binding */ Term,
11042 /* harmony export */ "AttributeSelector": () => /* binding */ AttributeSelector,
11043 /* harmony export */ "Operator": () => /* binding */ Operator,
11044 /* harmony export */ "HexColorValue": () => /* binding */ HexColorValue,
11045 /* harmony export */ "NumericValue": () => /* binding */ NumericValue,
11046 /* harmony export */ "VariableDeclaration": () => /* binding */ VariableDeclaration,
11047 /* harmony export */ "Interpolation": () => /* binding */ Interpolation,
11048 /* harmony export */ "Variable": () => /* binding */ Variable,
11049 /* harmony export */ "ExtendsReference": () => /* binding */ ExtendsReference,
11050 /* harmony export */ "MixinContentReference": () => /* binding */ MixinContentReference,
11051 /* harmony export */ "MixinContentDeclaration": () => /* binding */ MixinContentDeclaration,
11052 /* harmony export */ "MixinReference": () => /* binding */ MixinReference,
11053 /* harmony export */ "MixinDeclaration": () => /* binding */ MixinDeclaration,
11054 /* harmony export */ "UnknownAtRule": () => /* binding */ UnknownAtRule,
11055 /* harmony export */ "ListEntry": () => /* binding */ ListEntry,
11056 /* harmony export */ "LessGuard": () => /* binding */ LessGuard,
11057 /* harmony export */ "GuardCondition": () => /* binding */ GuardCondition,
11058 /* harmony export */ "Module": () => /* binding */ Module,
11059 /* harmony export */ "Level": () => /* binding */ Level,
11060 /* harmony export */ "Marker": () => /* binding */ Marker,
11061 /* harmony export */ "ParseErrorCollector": () => /* binding */ ParseErrorCollector
11062 /* harmony export */ });
11063 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
11064 /*---------------------------------------------------------------------------------------------
11065 * Copyright (c) Microsoft Corporation. All rights reserved.
11066 * Licensed under the MIT License. See License.txt in the project root for license information.
11067 *--------------------------------------------------------------------------------------------*/
11069 var __extends = (undefined && undefined.__extends) || (function () {
11070 var extendStatics = function (d, b) {
11071 extendStatics = Object.setPrototypeOf ||
11072 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11073 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11074 return extendStatics(d, b);
11076 return function (d, b) {
11077 extendStatics(d, b);
11078 function __() { this.constructor = d; }
11079 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11084 /// Nodes for the css 2.1 specification. See for reference:
11085 /// http://www.w3.org/TR/CSS21/grammar.html#grammar
11088 (function (NodeType) {
11089 NodeType[NodeType["Undefined"] = 0] = "Undefined";
11090 NodeType[NodeType["Identifier"] = 1] = "Identifier";
11091 NodeType[NodeType["Stylesheet"] = 2] = "Stylesheet";
11092 NodeType[NodeType["Ruleset"] = 3] = "Ruleset";
11093 NodeType[NodeType["Selector"] = 4] = "Selector";
11094 NodeType[NodeType["SimpleSelector"] = 5] = "SimpleSelector";
11095 NodeType[NodeType["SelectorInterpolation"] = 6] = "SelectorInterpolation";
11096 NodeType[NodeType["SelectorCombinator"] = 7] = "SelectorCombinator";
11097 NodeType[NodeType["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent";
11098 NodeType[NodeType["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling";
11099 NodeType[NodeType["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings";
11100 NodeType[NodeType["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant";
11101 NodeType[NodeType["Page"] = 12] = "Page";
11102 NodeType[NodeType["PageBoxMarginBox"] = 13] = "PageBoxMarginBox";
11103 NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
11104 NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
11105 NodeType[NodeType["ElementNameSelector"] = 16] = "ElementNameSelector";
11106 NodeType[NodeType["PseudoSelector"] = 17] = "PseudoSelector";
11107 NodeType[NodeType["AttributeSelector"] = 18] = "AttributeSelector";
11108 NodeType[NodeType["Declaration"] = 19] = "Declaration";
11109 NodeType[NodeType["Declarations"] = 20] = "Declarations";
11110 NodeType[NodeType["Property"] = 21] = "Property";
11111 NodeType[NodeType["Expression"] = 22] = "Expression";
11112 NodeType[NodeType["BinaryExpression"] = 23] = "BinaryExpression";
11113 NodeType[NodeType["Term"] = 24] = "Term";
11114 NodeType[NodeType["Operator"] = 25] = "Operator";
11115 NodeType[NodeType["Value"] = 26] = "Value";
11116 NodeType[NodeType["StringLiteral"] = 27] = "StringLiteral";
11117 NodeType[NodeType["URILiteral"] = 28] = "URILiteral";
11118 NodeType[NodeType["EscapedValue"] = 29] = "EscapedValue";
11119 NodeType[NodeType["Function"] = 30] = "Function";
11120 NodeType[NodeType["NumericValue"] = 31] = "NumericValue";
11121 NodeType[NodeType["HexColorValue"] = 32] = "HexColorValue";
11122 NodeType[NodeType["MixinDeclaration"] = 33] = "MixinDeclaration";
11123 NodeType[NodeType["MixinReference"] = 34] = "MixinReference";
11124 NodeType[NodeType["VariableName"] = 35] = "VariableName";
11125 NodeType[NodeType["VariableDeclaration"] = 36] = "VariableDeclaration";
11126 NodeType[NodeType["Prio"] = 37] = "Prio";
11127 NodeType[NodeType["Interpolation"] = 38] = "Interpolation";
11128 NodeType[NodeType["NestedProperties"] = 39] = "NestedProperties";
11129 NodeType[NodeType["ExtendsReference"] = 40] = "ExtendsReference";
11130 NodeType[NodeType["SelectorPlaceholder"] = 41] = "SelectorPlaceholder";
11131 NodeType[NodeType["Debug"] = 42] = "Debug";
11132 NodeType[NodeType["If"] = 43] = "If";
11133 NodeType[NodeType["Else"] = 44] = "Else";
11134 NodeType[NodeType["For"] = 45] = "For";
11135 NodeType[NodeType["Each"] = 46] = "Each";
11136 NodeType[NodeType["While"] = 47] = "While";
11137 NodeType[NodeType["MixinContentReference"] = 48] = "MixinContentReference";
11138 NodeType[NodeType["MixinContentDeclaration"] = 49] = "MixinContentDeclaration";
11139 NodeType[NodeType["Media"] = 50] = "Media";
11140 NodeType[NodeType["Keyframe"] = 51] = "Keyframe";
11141 NodeType[NodeType["FontFace"] = 52] = "FontFace";
11142 NodeType[NodeType["Import"] = 53] = "Import";
11143 NodeType[NodeType["Namespace"] = 54] = "Namespace";
11144 NodeType[NodeType["Invocation"] = 55] = "Invocation";
11145 NodeType[NodeType["FunctionDeclaration"] = 56] = "FunctionDeclaration";
11146 NodeType[NodeType["ReturnStatement"] = 57] = "ReturnStatement";
11147 NodeType[NodeType["MediaQuery"] = 58] = "MediaQuery";
11148 NodeType[NodeType["FunctionParameter"] = 59] = "FunctionParameter";
11149 NodeType[NodeType["FunctionArgument"] = 60] = "FunctionArgument";
11150 NodeType[NodeType["KeyframeSelector"] = 61] = "KeyframeSelector";
11151 NodeType[NodeType["ViewPort"] = 62] = "ViewPort";
11152 NodeType[NodeType["Document"] = 63] = "Document";
11153 NodeType[NodeType["AtApplyRule"] = 64] = "AtApplyRule";
11154 NodeType[NodeType["CustomPropertyDeclaration"] = 65] = "CustomPropertyDeclaration";
11155 NodeType[NodeType["CustomPropertySet"] = 66] = "CustomPropertySet";
11156 NodeType[NodeType["ListEntry"] = 67] = "ListEntry";
11157 NodeType[NodeType["Supports"] = 68] = "Supports";
11158 NodeType[NodeType["SupportsCondition"] = 69] = "SupportsCondition";
11159 NodeType[NodeType["NamespacePrefix"] = 70] = "NamespacePrefix";
11160 NodeType[NodeType["GridLine"] = 71] = "GridLine";
11161 NodeType[NodeType["Plugin"] = 72] = "Plugin";
11162 NodeType[NodeType["UnknownAtRule"] = 73] = "UnknownAtRule";
11163 NodeType[NodeType["Use"] = 74] = "Use";
11164 NodeType[NodeType["ModuleConfiguration"] = 75] = "ModuleConfiguration";
11165 NodeType[NodeType["Forward"] = 76] = "Forward";
11166 NodeType[NodeType["ForwardVisibility"] = 77] = "ForwardVisibility";
11167 NodeType[NodeType["Module"] = 78] = "Module";
11168 })(NodeType || (NodeType = {}));
11170 (function (ReferenceType) {
11171 ReferenceType[ReferenceType["Mixin"] = 0] = "Mixin";
11172 ReferenceType[ReferenceType["Rule"] = 1] = "Rule";
11173 ReferenceType[ReferenceType["Variable"] = 2] = "Variable";
11174 ReferenceType[ReferenceType["Function"] = 3] = "Function";
11175 ReferenceType[ReferenceType["Keyframe"] = 4] = "Keyframe";
11176 ReferenceType[ReferenceType["Unknown"] = 5] = "Unknown";
11177 ReferenceType[ReferenceType["Module"] = 6] = "Module";
11178 ReferenceType[ReferenceType["Forward"] = 7] = "Forward";
11179 ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
11180 })(ReferenceType || (ReferenceType = {}));
11181 function getNodeAtOffset(node, offset) {
11182 var candidate = null;
11183 if (!node || offset < node.offset || offset > node.end) {
11186 // Find the shortest node at the position
11187 node.accept(function (node) {
11188 if (node.offset === -1 && node.length === -1) {
11191 if (node.offset <= offset && node.end >= offset) {
11195 else if (node.length <= candidate.length) {
11204 function getNodePath(node, offset) {
11205 var candidate = getNodeAtOffset(node, offset);
11207 while (candidate) {
11208 path.unshift(candidate);
11209 candidate = candidate.parent;
11213 function getParentDeclaration(node) {
11214 var decl = node.findParent(NodeType.Declaration);
11215 var value = decl && decl.getValue();
11216 if (value && value.encloses(node)) {
11221 var Node = /** @class */ (function () {
11222 function Node(offset, len, nodeType) {
11223 if (offset === void 0) { offset = -1; }
11224 if (len === void 0) { len = -1; }
11225 this.parent = null;
11226 this.offset = offset;
11229 this.nodeType = nodeType;
11232 Object.defineProperty(Node.prototype, "end", {
11233 get: function () { return this.offset + this.length; },
11237 Object.defineProperty(Node.prototype, "type", {
11239 return this.nodeType || NodeType.Undefined;
11241 set: function (type) {
11242 this.nodeType = type;
11247 Node.prototype.getTextProvider = function () {
11249 while (node && !node.textProvider) {
11250 node = node.parent;
11253 return node.textProvider;
11255 return function () { return 'unknown'; };
11257 Node.prototype.getText = function () {
11258 return this.getTextProvider()(this.offset, this.length);
11260 Node.prototype.matches = function (str) {
11261 return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
11263 Node.prototype.startsWith = function (str) {
11264 return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
11266 Node.prototype.endsWith = function (str) {
11267 return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
11269 Node.prototype.accept = function (visitor) {
11270 if (visitor(this) && this.children) {
11271 for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
11272 var child = _a[_i];
11273 child.accept(visitor);
11277 Node.prototype.acceptVisitor = function (visitor) {
11278 this.accept(visitor.visitNode.bind(visitor));
11280 Node.prototype.adoptChild = function (node, index) {
11281 if (index === void 0) { index = -1; }
11282 if (node.parent && node.parent.children) {
11283 var idx = node.parent.children.indexOf(node);
11285 node.parent.children.splice(idx, 1);
11288 node.parent = this;
11289 var children = this.children;
11291 children = this.children = [];
11293 if (index !== -1) {
11294 children.splice(index, 0, node);
11297 children.push(node);
11301 Node.prototype.attachTo = function (parent, index) {
11302 if (index === void 0) { index = -1; }
11304 parent.adoptChild(this, index);
11308 Node.prototype.collectIssues = function (results) {
11310 results.push.apply(results, this.issues);
11313 Node.prototype.addIssue = function (issue) {
11314 if (!this.issues) {
11317 this.issues.push(issue);
11319 Node.prototype.hasIssue = function (rule) {
11320 return Array.isArray(this.issues) && this.issues.some(function (i) { return i.getRule() === rule; });
11322 Node.prototype.isErroneous = function (recursive) {
11323 if (recursive === void 0) { recursive = false; }
11324 if (this.issues && this.issues.length > 0) {
11327 return recursive && Array.isArray(this.children) && this.children.some(function (c) { return c.isErroneous(true); });
11329 Node.prototype.setNode = function (field, node, index) {
11330 if (index === void 0) { index = -1; }
11332 node.attachTo(this, index);
11333 this[field] = node;
11338 Node.prototype.addChild = function (node) {
11340 if (!this.children) {
11341 this.children = [];
11343 node.attachTo(this);
11344 this.updateOffsetAndLength(node);
11349 Node.prototype.updateOffsetAndLength = function (node) {
11350 if (node.offset < this.offset || this.offset === -1) {
11351 this.offset = node.offset;
11353 var nodeEnd = node.end;
11354 if ((nodeEnd > this.end) || this.length === -1) {
11355 this.length = nodeEnd - this.offset;
11358 Node.prototype.hasChildren = function () {
11359 return !!this.children && this.children.length > 0;
11361 Node.prototype.getChildren = function () {
11362 return this.children ? this.children.slice(0) : [];
11364 Node.prototype.getChild = function (index) {
11365 if (this.children && index < this.children.length) {
11366 return this.children[index];
11370 Node.prototype.addChildren = function (nodes) {
11371 for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
11372 var node = nodes_1[_i];
11373 this.addChild(node);
11376 Node.prototype.findFirstChildBeforeOffset = function (offset) {
11377 if (this.children) {
11378 var current = null;
11379 for (var i = this.children.length - 1; i >= 0; i--) {
11380 // iterate until we find a child that has a start offset smaller than the input offset
11381 current = this.children[i];
11382 if (current.offset <= offset) {
11389 Node.prototype.findChildAtOffset = function (offset, goDeep) {
11390 var current = this.findFirstChildBeforeOffset(offset);
11391 if (current && current.end >= offset) {
11393 return current.findChildAtOffset(offset, true) || current;
11399 Node.prototype.encloses = function (candidate) {
11400 return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
11402 Node.prototype.getParent = function () {
11403 var result = this.parent;
11404 while (result instanceof Nodelist) {
11405 result = result.parent;
11409 Node.prototype.findParent = function (type) {
11411 while (result && result.type !== type) {
11412 result = result.parent;
11416 Node.prototype.findAParent = function () {
11418 for (var _i = 0; _i < arguments.length; _i++) {
11419 types[_i] = arguments[_i];
11422 while (result && !types.some(function (t) { return result.type === t; })) {
11423 result = result.parent;
11427 Node.prototype.setData = function (key, value) {
11428 if (!this.options) {
11431 this.options[key] = value;
11433 Node.prototype.getData = function (key) {
11434 if (!this.options || !this.options.hasOwnProperty(key)) {
11437 return this.options[key];
11442 var Nodelist = /** @class */ (function (_super) {
11443 __extends(Nodelist, _super);
11444 function Nodelist(parent, index) {
11445 if (index === void 0) { index = -1; }
11446 var _this = _super.call(this, -1, -1) || this;
11447 _this.attachTo(parent, index);
11455 var Identifier = /** @class */ (function (_super) {
11456 __extends(Identifier, _super);
11457 function Identifier(offset, length) {
11458 var _this = _super.call(this, offset, length) || this;
11459 _this.isCustomProperty = false;
11462 Object.defineProperty(Identifier.prototype, "type", {
11464 return NodeType.Identifier;
11469 Identifier.prototype.containsInterpolation = function () {
11470 return this.hasChildren();
11475 var Stylesheet = /** @class */ (function (_super) {
11476 __extends(Stylesheet, _super);
11477 function Stylesheet(offset, length) {
11478 return _super.call(this, offset, length) || this;
11480 Object.defineProperty(Stylesheet.prototype, "type", {
11482 return NodeType.Stylesheet;
11490 var Declarations = /** @class */ (function (_super) {
11491 __extends(Declarations, _super);
11492 function Declarations(offset, length) {
11493 return _super.call(this, offset, length) || this;
11495 Object.defineProperty(Declarations.prototype, "type", {
11497 return NodeType.Declarations;
11502 return Declarations;
11505 var BodyDeclaration = /** @class */ (function (_super) {
11506 __extends(BodyDeclaration, _super);
11507 function BodyDeclaration(offset, length) {
11508 return _super.call(this, offset, length) || this;
11510 BodyDeclaration.prototype.getDeclarations = function () {
11511 return this.declarations;
11513 BodyDeclaration.prototype.setDeclarations = function (decls) {
11514 return this.setNode('declarations', decls);
11516 return BodyDeclaration;
11519 var RuleSet = /** @class */ (function (_super) {
11520 __extends(RuleSet, _super);
11521 function RuleSet(offset, length) {
11522 return _super.call(this, offset, length) || this;
11524 Object.defineProperty(RuleSet.prototype, "type", {
11526 return NodeType.Ruleset;
11531 RuleSet.prototype.getSelectors = function () {
11532 if (!this.selectors) {
11533 this.selectors = new Nodelist(this);
11535 return this.selectors;
11537 RuleSet.prototype.isNested = function () {
11538 return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null;
11541 }(BodyDeclaration));
11543 var Selector = /** @class */ (function (_super) {
11544 __extends(Selector, _super);
11545 function Selector(offset, length) {
11546 return _super.call(this, offset, length) || this;
11548 Object.defineProperty(Selector.prototype, "type", {
11550 return NodeType.Selector;
11558 var SimpleSelector = /** @class */ (function (_super) {
11559 __extends(SimpleSelector, _super);
11560 function SimpleSelector(offset, length) {
11561 return _super.call(this, offset, length) || this;
11563 Object.defineProperty(SimpleSelector.prototype, "type", {
11565 return NodeType.SimpleSelector;
11570 return SimpleSelector;
11573 var AtApplyRule = /** @class */ (function (_super) {
11574 __extends(AtApplyRule, _super);
11575 function AtApplyRule(offset, length) {
11576 return _super.call(this, offset, length) || this;
11578 Object.defineProperty(AtApplyRule.prototype, "type", {
11580 return NodeType.AtApplyRule;
11585 AtApplyRule.prototype.setIdentifier = function (node) {
11586 return this.setNode('identifier', node, 0);
11588 AtApplyRule.prototype.getIdentifier = function () {
11589 return this.identifier;
11591 AtApplyRule.prototype.getName = function () {
11592 return this.identifier ? this.identifier.getText() : '';
11594 return AtApplyRule;
11597 var AbstractDeclaration = /** @class */ (function (_super) {
11598 __extends(AbstractDeclaration, _super);
11599 function AbstractDeclaration(offset, length) {
11600 return _super.call(this, offset, length) || this;
11602 return AbstractDeclaration;
11605 var CustomPropertyDeclaration = /** @class */ (function (_super) {
11606 __extends(CustomPropertyDeclaration, _super);
11607 function CustomPropertyDeclaration(offset, length) {
11608 return _super.call(this, offset, length) || this;
11610 Object.defineProperty(CustomPropertyDeclaration.prototype, "type", {
11612 return NodeType.CustomPropertyDeclaration;
11617 CustomPropertyDeclaration.prototype.setProperty = function (node) {
11618 return this.setNode('property', node);
11620 CustomPropertyDeclaration.prototype.getProperty = function () {
11621 return this.property;
11623 CustomPropertyDeclaration.prototype.setValue = function (value) {
11624 return this.setNode('value', value);
11626 CustomPropertyDeclaration.prototype.getValue = function () {
11629 CustomPropertyDeclaration.prototype.setPropertySet = function (value) {
11630 return this.setNode('propertySet', value);
11632 CustomPropertyDeclaration.prototype.getPropertySet = function () {
11633 return this.propertySet;
11635 return CustomPropertyDeclaration;
11636 }(AbstractDeclaration));
11638 var CustomPropertySet = /** @class */ (function (_super) {
11639 __extends(CustomPropertySet, _super);
11640 function CustomPropertySet(offset, length) {
11641 return _super.call(this, offset, length) || this;
11643 Object.defineProperty(CustomPropertySet.prototype, "type", {
11645 return NodeType.CustomPropertySet;
11650 return CustomPropertySet;
11651 }(BodyDeclaration));
11653 var Declaration = /** @class */ (function (_super) {
11654 __extends(Declaration, _super);
11655 function Declaration(offset, length) {
11656 var _this = _super.call(this, offset, length) || this;
11657 _this.property = null;
11660 Object.defineProperty(Declaration.prototype, "type", {
11662 return NodeType.Declaration;
11667 Declaration.prototype.setProperty = function (node) {
11668 return this.setNode('property', node);
11670 Declaration.prototype.getProperty = function () {
11671 return this.property;
11673 Declaration.prototype.getFullPropertyName = function () {
11674 var propertyName = this.property ? this.property.getName() : 'unknown';
11675 if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
11676 var parentDecl = this.parent.getParent().getParent();
11677 if (parentDecl instanceof Declaration) {
11678 return parentDecl.getFullPropertyName() + propertyName;
11681 return propertyName;
11683 Declaration.prototype.getNonPrefixedPropertyName = function () {
11684 var propertyName = this.getFullPropertyName();
11685 if (propertyName && propertyName.charAt(0) === '-') {
11686 var vendorPrefixEnd = propertyName.indexOf('-', 1);
11687 if (vendorPrefixEnd !== -1) {
11688 return propertyName.substring(vendorPrefixEnd + 1);
11691 return propertyName;
11693 Declaration.prototype.setValue = function (value) {
11694 return this.setNode('value', value);
11696 Declaration.prototype.getValue = function () {
11699 Declaration.prototype.setNestedProperties = function (value) {
11700 return this.setNode('nestedProperties', value);
11702 Declaration.prototype.getNestedProperties = function () {
11703 return this.nestedProperties;
11705 return Declaration;
11706 }(AbstractDeclaration));
11708 var Property = /** @class */ (function (_super) {
11709 __extends(Property, _super);
11710 function Property(offset, length) {
11711 return _super.call(this, offset, length) || this;
11713 Object.defineProperty(Property.prototype, "type", {
11715 return NodeType.Property;
11720 Property.prototype.setIdentifier = function (value) {
11721 return this.setNode('identifier', value);
11723 Property.prototype.getIdentifier = function () {
11724 return this.identifier;
11726 Property.prototype.getName = function () {
11727 return (0,_utils_strings__WEBPACK_IMPORTED_MODULE_0__.trim)(this.getText(), /[_\+]+$/); /* +_: less merge */
11729 Property.prototype.isCustomProperty = function () {
11730 return !!this.identifier && this.identifier.isCustomProperty;
11735 var Invocation = /** @class */ (function (_super) {
11736 __extends(Invocation, _super);
11737 function Invocation(offset, length) {
11738 return _super.call(this, offset, length) || this;
11740 Object.defineProperty(Invocation.prototype, "type", {
11742 return NodeType.Invocation;
11747 Invocation.prototype.getArguments = function () {
11748 if (!this.arguments) {
11749 this.arguments = new Nodelist(this);
11751 return this.arguments;
11756 var Function = /** @class */ (function (_super) {
11757 __extends(Function, _super);
11758 function Function(offset, length) {
11759 return _super.call(this, offset, length) || this;
11761 Object.defineProperty(Function.prototype, "type", {
11763 return NodeType.Function;
11768 Function.prototype.setIdentifier = function (node) {
11769 return this.setNode('identifier', node, 0);
11771 Function.prototype.getIdentifier = function () {
11772 return this.identifier;
11774 Function.prototype.getName = function () {
11775 return this.identifier ? this.identifier.getText() : '';
11780 var FunctionParameter = /** @class */ (function (_super) {
11781 __extends(FunctionParameter, _super);
11782 function FunctionParameter(offset, length) {
11783 return _super.call(this, offset, length) || this;
11785 Object.defineProperty(FunctionParameter.prototype, "type", {
11787 return NodeType.FunctionParameter;
11792 FunctionParameter.prototype.setIdentifier = function (node) {
11793 return this.setNode('identifier', node, 0);
11795 FunctionParameter.prototype.getIdentifier = function () {
11796 return this.identifier;
11798 FunctionParameter.prototype.getName = function () {
11799 return this.identifier ? this.identifier.getText() : '';
11801 FunctionParameter.prototype.setDefaultValue = function (node) {
11802 return this.setNode('defaultValue', node, 0);
11804 FunctionParameter.prototype.getDefaultValue = function () {
11805 return this.defaultValue;
11807 return FunctionParameter;
11810 var FunctionArgument = /** @class */ (function (_super) {
11811 __extends(FunctionArgument, _super);
11812 function FunctionArgument(offset, length) {
11813 return _super.call(this, offset, length) || this;
11815 Object.defineProperty(FunctionArgument.prototype, "type", {
11817 return NodeType.FunctionArgument;
11822 FunctionArgument.prototype.setIdentifier = function (node) {
11823 return this.setNode('identifier', node, 0);
11825 FunctionArgument.prototype.getIdentifier = function () {
11826 return this.identifier;
11828 FunctionArgument.prototype.getName = function () {
11829 return this.identifier ? this.identifier.getText() : '';
11831 FunctionArgument.prototype.setValue = function (node) {
11832 return this.setNode('value', node, 0);
11834 FunctionArgument.prototype.getValue = function () {
11837 return FunctionArgument;
11840 var IfStatement = /** @class */ (function (_super) {
11841 __extends(IfStatement, _super);
11842 function IfStatement(offset, length) {
11843 return _super.call(this, offset, length) || this;
11845 Object.defineProperty(IfStatement.prototype, "type", {
11847 return NodeType.If;
11852 IfStatement.prototype.setExpression = function (node) {
11853 return this.setNode('expression', node, 0);
11855 IfStatement.prototype.setElseClause = function (elseClause) {
11856 return this.setNode('elseClause', elseClause);
11858 return IfStatement;
11859 }(BodyDeclaration));
11861 var ForStatement = /** @class */ (function (_super) {
11862 __extends(ForStatement, _super);
11863 function ForStatement(offset, length) {
11864 return _super.call(this, offset, length) || this;
11866 Object.defineProperty(ForStatement.prototype, "type", {
11868 return NodeType.For;
11873 ForStatement.prototype.setVariable = function (node) {
11874 return this.setNode('variable', node, 0);
11876 return ForStatement;
11877 }(BodyDeclaration));
11879 var EachStatement = /** @class */ (function (_super) {
11880 __extends(EachStatement, _super);
11881 function EachStatement(offset, length) {
11882 return _super.call(this, offset, length) || this;
11884 Object.defineProperty(EachStatement.prototype, "type", {
11886 return NodeType.Each;
11891 EachStatement.prototype.getVariables = function () {
11892 if (!this.variables) {
11893 this.variables = new Nodelist(this);
11895 return this.variables;
11897 return EachStatement;
11898 }(BodyDeclaration));
11900 var WhileStatement = /** @class */ (function (_super) {
11901 __extends(WhileStatement, _super);
11902 function WhileStatement(offset, length) {
11903 return _super.call(this, offset, length) || this;
11905 Object.defineProperty(WhileStatement.prototype, "type", {
11907 return NodeType.While;
11912 return WhileStatement;
11913 }(BodyDeclaration));
11915 var ElseStatement = /** @class */ (function (_super) {
11916 __extends(ElseStatement, _super);
11917 function ElseStatement(offset, length) {
11918 return _super.call(this, offset, length) || this;
11920 Object.defineProperty(ElseStatement.prototype, "type", {
11922 return NodeType.Else;
11927 return ElseStatement;
11928 }(BodyDeclaration));
11930 var FunctionDeclaration = /** @class */ (function (_super) {
11931 __extends(FunctionDeclaration, _super);
11932 function FunctionDeclaration(offset, length) {
11933 return _super.call(this, offset, length) || this;
11935 Object.defineProperty(FunctionDeclaration.prototype, "type", {
11937 return NodeType.FunctionDeclaration;
11942 FunctionDeclaration.prototype.setIdentifier = function (node) {
11943 return this.setNode('identifier', node, 0);
11945 FunctionDeclaration.prototype.getIdentifier = function () {
11946 return this.identifier;
11948 FunctionDeclaration.prototype.getName = function () {
11949 return this.identifier ? this.identifier.getText() : '';
11951 FunctionDeclaration.prototype.getParameters = function () {
11952 if (!this.parameters) {
11953 this.parameters = new Nodelist(this);
11955 return this.parameters;
11957 return FunctionDeclaration;
11958 }(BodyDeclaration));
11960 var ViewPort = /** @class */ (function (_super) {
11961 __extends(ViewPort, _super);
11962 function ViewPort(offset, length) {
11963 return _super.call(this, offset, length) || this;
11965 Object.defineProperty(ViewPort.prototype, "type", {
11967 return NodeType.ViewPort;
11973 }(BodyDeclaration));
11975 var FontFace = /** @class */ (function (_super) {
11976 __extends(FontFace, _super);
11977 function FontFace(offset, length) {
11978 return _super.call(this, offset, length) || this;
11980 Object.defineProperty(FontFace.prototype, "type", {
11982 return NodeType.FontFace;
11988 }(BodyDeclaration));
11990 var NestedProperties = /** @class */ (function (_super) {
11991 __extends(NestedProperties, _super);
11992 function NestedProperties(offset, length) {
11993 return _super.call(this, offset, length) || this;
11995 Object.defineProperty(NestedProperties.prototype, "type", {
11997 return NodeType.NestedProperties;
12002 return NestedProperties;
12003 }(BodyDeclaration));
12005 var Keyframe = /** @class */ (function (_super) {
12006 __extends(Keyframe, _super);
12007 function Keyframe(offset, length) {
12008 return _super.call(this, offset, length) || this;
12010 Object.defineProperty(Keyframe.prototype, "type", {
12012 return NodeType.Keyframe;
12017 Keyframe.prototype.setKeyword = function (keyword) {
12018 return this.setNode('keyword', keyword, 0);
12020 Keyframe.prototype.getKeyword = function () {
12021 return this.keyword;
12023 Keyframe.prototype.setIdentifier = function (node) {
12024 return this.setNode('identifier', node, 0);
12026 Keyframe.prototype.getIdentifier = function () {
12027 return this.identifier;
12029 Keyframe.prototype.getName = function () {
12030 return this.identifier ? this.identifier.getText() : '';
12033 }(BodyDeclaration));
12035 var KeyframeSelector = /** @class */ (function (_super) {
12036 __extends(KeyframeSelector, _super);
12037 function KeyframeSelector(offset, length) {
12038 return _super.call(this, offset, length) || this;
12040 Object.defineProperty(KeyframeSelector.prototype, "type", {
12042 return NodeType.KeyframeSelector;
12047 return KeyframeSelector;
12048 }(BodyDeclaration));
12050 var Import = /** @class */ (function (_super) {
12051 __extends(Import, _super);
12052 function Import(offset, length) {
12053 return _super.call(this, offset, length) || this;
12055 Object.defineProperty(Import.prototype, "type", {
12057 return NodeType.Import;
12062 Import.prototype.setMedialist = function (node) {
12064 node.attachTo(this);
12072 var Use = /** @class */ (function (_super) {
12073 __extends(Use, _super);
12075 return _super !== null && _super.apply(this, arguments) || this;
12077 Object.defineProperty(Use.prototype, "type", {
12079 return NodeType.Use;
12084 Use.prototype.getParameters = function () {
12085 if (!this.parameters) {
12086 this.parameters = new Nodelist(this);
12088 return this.parameters;
12090 Use.prototype.setIdentifier = function (node) {
12091 return this.setNode('identifier', node, 0);
12093 Use.prototype.getIdentifier = function () {
12094 return this.identifier;
12099 var ModuleConfiguration = /** @class */ (function (_super) {
12100 __extends(ModuleConfiguration, _super);
12101 function ModuleConfiguration() {
12102 return _super !== null && _super.apply(this, arguments) || this;
12104 Object.defineProperty(ModuleConfiguration.prototype, "type", {
12106 return NodeType.ModuleConfiguration;
12111 ModuleConfiguration.prototype.setIdentifier = function (node) {
12112 return this.setNode('identifier', node, 0);
12114 ModuleConfiguration.prototype.getIdentifier = function () {
12115 return this.identifier;
12117 ModuleConfiguration.prototype.getName = function () {
12118 return this.identifier ? this.identifier.getText() : '';
12120 ModuleConfiguration.prototype.setValue = function (node) {
12121 return this.setNode('value', node, 0);
12123 ModuleConfiguration.prototype.getValue = function () {
12126 return ModuleConfiguration;
12129 var Forward = /** @class */ (function (_super) {
12130 __extends(Forward, _super);
12131 function Forward() {
12132 return _super !== null && _super.apply(this, arguments) || this;
12134 Object.defineProperty(Forward.prototype, "type", {
12136 return NodeType.Forward;
12141 Forward.prototype.setIdentifier = function (node) {
12142 return this.setNode('identifier', node, 0);
12144 Forward.prototype.getIdentifier = function () {
12145 return this.identifier;
12150 var ForwardVisibility = /** @class */ (function (_super) {
12151 __extends(ForwardVisibility, _super);
12152 function ForwardVisibility() {
12153 return _super !== null && _super.apply(this, arguments) || this;
12155 Object.defineProperty(ForwardVisibility.prototype, "type", {
12157 return NodeType.ForwardVisibility;
12162 ForwardVisibility.prototype.setIdentifier = function (node) {
12163 return this.setNode('identifier', node, 0);
12165 ForwardVisibility.prototype.getIdentifier = function () {
12166 return this.identifier;
12168 return ForwardVisibility;
12171 var Namespace = /** @class */ (function (_super) {
12172 __extends(Namespace, _super);
12173 function Namespace(offset, length) {
12174 return _super.call(this, offset, length) || this;
12176 Object.defineProperty(Namespace.prototype, "type", {
12178 return NodeType.Namespace;
12186 var Media = /** @class */ (function (_super) {
12187 __extends(Media, _super);
12188 function Media(offset, length) {
12189 return _super.call(this, offset, length) || this;
12191 Object.defineProperty(Media.prototype, "type", {
12193 return NodeType.Media;
12199 }(BodyDeclaration));
12201 var Supports = /** @class */ (function (_super) {
12202 __extends(Supports, _super);
12203 function Supports(offset, length) {
12204 return _super.call(this, offset, length) || this;
12206 Object.defineProperty(Supports.prototype, "type", {
12208 return NodeType.Supports;
12214 }(BodyDeclaration));
12216 var Document = /** @class */ (function (_super) {
12217 __extends(Document, _super);
12218 function Document(offset, length) {
12219 return _super.call(this, offset, length) || this;
12221 Object.defineProperty(Document.prototype, "type", {
12223 return NodeType.Document;
12229 }(BodyDeclaration));
12231 var Medialist = /** @class */ (function (_super) {
12232 __extends(Medialist, _super);
12233 function Medialist(offset, length) {
12234 return _super.call(this, offset, length) || this;
12236 Medialist.prototype.getMediums = function () {
12237 if (!this.mediums) {
12238 this.mediums = new Nodelist(this);
12240 return this.mediums;
12245 var MediaQuery = /** @class */ (function (_super) {
12246 __extends(MediaQuery, _super);
12247 function MediaQuery(offset, length) {
12248 return _super.call(this, offset, length) || this;
12250 Object.defineProperty(MediaQuery.prototype, "type", {
12252 return NodeType.MediaQuery;
12260 var SupportsCondition = /** @class */ (function (_super) {
12261 __extends(SupportsCondition, _super);
12262 function SupportsCondition(offset, length) {
12263 return _super.call(this, offset, length) || this;
12265 Object.defineProperty(SupportsCondition.prototype, "type", {
12267 return NodeType.SupportsCondition;
12272 return SupportsCondition;
12275 var Page = /** @class */ (function (_super) {
12276 __extends(Page, _super);
12277 function Page(offset, length) {
12278 return _super.call(this, offset, length) || this;
12280 Object.defineProperty(Page.prototype, "type", {
12282 return NodeType.Page;
12288 }(BodyDeclaration));
12290 var PageBoxMarginBox = /** @class */ (function (_super) {
12291 __extends(PageBoxMarginBox, _super);
12292 function PageBoxMarginBox(offset, length) {
12293 return _super.call(this, offset, length) || this;
12295 Object.defineProperty(PageBoxMarginBox.prototype, "type", {
12297 return NodeType.PageBoxMarginBox;
12302 return PageBoxMarginBox;
12303 }(BodyDeclaration));
12305 var Expression = /** @class */ (function (_super) {
12306 __extends(Expression, _super);
12307 function Expression(offset, length) {
12308 return _super.call(this, offset, length) || this;
12310 Object.defineProperty(Expression.prototype, "type", {
12312 return NodeType.Expression;
12320 var BinaryExpression = /** @class */ (function (_super) {
12321 __extends(BinaryExpression, _super);
12322 function BinaryExpression(offset, length) {
12323 return _super.call(this, offset, length) || this;
12325 Object.defineProperty(BinaryExpression.prototype, "type", {
12327 return NodeType.BinaryExpression;
12332 BinaryExpression.prototype.setLeft = function (left) {
12333 return this.setNode('left', left);
12335 BinaryExpression.prototype.getLeft = function () {
12338 BinaryExpression.prototype.setRight = function (right) {
12339 return this.setNode('right', right);
12341 BinaryExpression.prototype.getRight = function () {
12344 BinaryExpression.prototype.setOperator = function (value) {
12345 return this.setNode('operator', value);
12347 BinaryExpression.prototype.getOperator = function () {
12348 return this.operator;
12350 return BinaryExpression;
12353 var Term = /** @class */ (function (_super) {
12354 __extends(Term, _super);
12355 function Term(offset, length) {
12356 return _super.call(this, offset, length) || this;
12358 Object.defineProperty(Term.prototype, "type", {
12360 return NodeType.Term;
12365 Term.prototype.setOperator = function (value) {
12366 return this.setNode('operator', value);
12368 Term.prototype.getOperator = function () {
12369 return this.operator;
12371 Term.prototype.setExpression = function (value) {
12372 return this.setNode('expression', value);
12374 Term.prototype.getExpression = function () {
12375 return this.expression;
12380 var AttributeSelector = /** @class */ (function (_super) {
12381 __extends(AttributeSelector, _super);
12382 function AttributeSelector(offset, length) {
12383 return _super.call(this, offset, length) || this;
12385 Object.defineProperty(AttributeSelector.prototype, "type", {
12387 return NodeType.AttributeSelector;
12392 AttributeSelector.prototype.setNamespacePrefix = function (value) {
12393 return this.setNode('namespacePrefix', value);
12395 AttributeSelector.prototype.getNamespacePrefix = function () {
12396 return this.namespacePrefix;
12398 AttributeSelector.prototype.setIdentifier = function (value) {
12399 return this.setNode('identifier', value);
12401 AttributeSelector.prototype.getIdentifier = function () {
12402 return this.identifier;
12404 AttributeSelector.prototype.setOperator = function (operator) {
12405 return this.setNode('operator', operator);
12407 AttributeSelector.prototype.getOperator = function () {
12408 return this.operator;
12410 AttributeSelector.prototype.setValue = function (value) {
12411 return this.setNode('value', value);
12413 AttributeSelector.prototype.getValue = function () {
12416 return AttributeSelector;
12419 var Operator = /** @class */ (function (_super) {
12420 __extends(Operator, _super);
12421 function Operator(offset, length) {
12422 return _super.call(this, offset, length) || this;
12424 Object.defineProperty(Operator.prototype, "type", {
12426 return NodeType.Operator;
12434 var HexColorValue = /** @class */ (function (_super) {
12435 __extends(HexColorValue, _super);
12436 function HexColorValue(offset, length) {
12437 return _super.call(this, offset, length) || this;
12439 Object.defineProperty(HexColorValue.prototype, "type", {
12441 return NodeType.HexColorValue;
12446 return HexColorValue;
12449 var _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
12450 var NumericValue = /** @class */ (function (_super) {
12451 __extends(NumericValue, _super);
12452 function NumericValue(offset, length) {
12453 return _super.call(this, offset, length) || this;
12455 Object.defineProperty(NumericValue.prototype, "type", {
12457 return NodeType.NumericValue;
12462 NumericValue.prototype.getValue = function () {
12463 var raw = this.getText();
12466 for (var i = 0, len = raw.length; i < len; i++) {
12467 code = raw.charCodeAt(i);
12468 if (!(_0 <= code && code <= _9 || code === _dot)) {
12474 value: raw.substring(0, unitIdx),
12475 unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
12478 return NumericValue;
12481 var VariableDeclaration = /** @class */ (function (_super) {
12482 __extends(VariableDeclaration, _super);
12483 function VariableDeclaration(offset, length) {
12484 var _this = _super.call(this, offset, length) || this;
12485 _this.variable = null;
12486 _this.value = null;
12487 _this.needsSemicolon = true;
12490 Object.defineProperty(VariableDeclaration.prototype, "type", {
12492 return NodeType.VariableDeclaration;
12497 VariableDeclaration.prototype.setVariable = function (node) {
12499 node.attachTo(this);
12500 this.variable = node;
12505 VariableDeclaration.prototype.getVariable = function () {
12506 return this.variable;
12508 VariableDeclaration.prototype.getName = function () {
12509 return this.variable ? this.variable.getName() : '';
12511 VariableDeclaration.prototype.setValue = function (node) {
12513 node.attachTo(this);
12519 VariableDeclaration.prototype.getValue = function () {
12522 return VariableDeclaration;
12523 }(AbstractDeclaration));
12525 var Interpolation = /** @class */ (function (_super) {
12526 __extends(Interpolation, _super);
12527 // private _interpolations: void; // workaround for https://github.com/Microsoft/TypeScript/issues/18276
12528 function Interpolation(offset, length) {
12529 return _super.call(this, offset, length) || this;
12531 Object.defineProperty(Interpolation.prototype, "type", {
12533 return NodeType.Interpolation;
12538 return Interpolation;
12541 var Variable = /** @class */ (function (_super) {
12542 __extends(Variable, _super);
12543 function Variable(offset, length) {
12544 return _super.call(this, offset, length) || this;
12546 Object.defineProperty(Variable.prototype, "type", {
12548 return NodeType.VariableName;
12553 Variable.prototype.getName = function () {
12554 return this.getText();
12559 var ExtendsReference = /** @class */ (function (_super) {
12560 __extends(ExtendsReference, _super);
12561 function ExtendsReference(offset, length) {
12562 return _super.call(this, offset, length) || this;
12564 Object.defineProperty(ExtendsReference.prototype, "type", {
12566 return NodeType.ExtendsReference;
12571 ExtendsReference.prototype.getSelectors = function () {
12572 if (!this.selectors) {
12573 this.selectors = new Nodelist(this);
12575 return this.selectors;
12577 return ExtendsReference;
12580 var MixinContentReference = /** @class */ (function (_super) {
12581 __extends(MixinContentReference, _super);
12582 function MixinContentReference(offset, length) {
12583 return _super.call(this, offset, length) || this;
12585 Object.defineProperty(MixinContentReference.prototype, "type", {
12587 return NodeType.MixinContentReference;
12592 MixinContentReference.prototype.getArguments = function () {
12593 if (!this.arguments) {
12594 this.arguments = new Nodelist(this);
12596 return this.arguments;
12598 return MixinContentReference;
12601 var MixinContentDeclaration = /** @class */ (function (_super) {
12602 __extends(MixinContentDeclaration, _super);
12603 function MixinContentDeclaration(offset, length) {
12604 return _super.call(this, offset, length) || this;
12606 Object.defineProperty(MixinContentDeclaration.prototype, "type", {
12608 return NodeType.MixinContentReference;
12613 MixinContentDeclaration.prototype.getParameters = function () {
12614 if (!this.parameters) {
12615 this.parameters = new Nodelist(this);
12617 return this.parameters;
12619 return MixinContentDeclaration;
12620 }(BodyDeclaration));
12622 var MixinReference = /** @class */ (function (_super) {
12623 __extends(MixinReference, _super);
12624 function MixinReference(offset, length) {
12625 return _super.call(this, offset, length) || this;
12627 Object.defineProperty(MixinReference.prototype, "type", {
12629 return NodeType.MixinReference;
12634 MixinReference.prototype.getNamespaces = function () {
12635 if (!this.namespaces) {
12636 this.namespaces = new Nodelist(this);
12638 return this.namespaces;
12640 MixinReference.prototype.setIdentifier = function (node) {
12641 return this.setNode('identifier', node, 0);
12643 MixinReference.prototype.getIdentifier = function () {
12644 return this.identifier;
12646 MixinReference.prototype.getName = function () {
12647 return this.identifier ? this.identifier.getText() : '';
12649 MixinReference.prototype.getArguments = function () {
12650 if (!this.arguments) {
12651 this.arguments = new Nodelist(this);
12653 return this.arguments;
12655 MixinReference.prototype.setContent = function (node) {
12656 return this.setNode('content', node);
12658 MixinReference.prototype.getContent = function () {
12659 return this.content;
12661 return MixinReference;
12664 var MixinDeclaration = /** @class */ (function (_super) {
12665 __extends(MixinDeclaration, _super);
12666 function MixinDeclaration(offset, length) {
12667 return _super.call(this, offset, length) || this;
12669 Object.defineProperty(MixinDeclaration.prototype, "type", {
12671 return NodeType.MixinDeclaration;
12676 MixinDeclaration.prototype.setIdentifier = function (node) {
12677 return this.setNode('identifier', node, 0);
12679 MixinDeclaration.prototype.getIdentifier = function () {
12680 return this.identifier;
12682 MixinDeclaration.prototype.getName = function () {
12683 return this.identifier ? this.identifier.getText() : '';
12685 MixinDeclaration.prototype.getParameters = function () {
12686 if (!this.parameters) {
12687 this.parameters = new Nodelist(this);
12689 return this.parameters;
12691 MixinDeclaration.prototype.setGuard = function (node) {
12693 node.attachTo(this);
12698 return MixinDeclaration;
12699 }(BodyDeclaration));
12701 var UnknownAtRule = /** @class */ (function (_super) {
12702 __extends(UnknownAtRule, _super);
12703 function UnknownAtRule(offset, length) {
12704 return _super.call(this, offset, length) || this;
12706 Object.defineProperty(UnknownAtRule.prototype, "type", {
12708 return NodeType.UnknownAtRule;
12713 UnknownAtRule.prototype.setAtRuleName = function (atRuleName) {
12714 this.atRuleName = atRuleName;
12716 UnknownAtRule.prototype.getAtRuleName = function () {
12717 return this.atRuleName;
12719 return UnknownAtRule;
12720 }(BodyDeclaration));
12722 var ListEntry = /** @class */ (function (_super) {
12723 __extends(ListEntry, _super);
12724 function ListEntry() {
12725 return _super !== null && _super.apply(this, arguments) || this;
12727 Object.defineProperty(ListEntry.prototype, "type", {
12729 return NodeType.ListEntry;
12734 ListEntry.prototype.setKey = function (node) {
12735 return this.setNode('key', node, 0);
12737 ListEntry.prototype.setValue = function (node) {
12738 return this.setNode('value', node, 1);
12743 var LessGuard = /** @class */ (function (_super) {
12744 __extends(LessGuard, _super);
12745 function LessGuard() {
12746 return _super !== null && _super.apply(this, arguments) || this;
12748 LessGuard.prototype.getConditions = function () {
12749 if (!this.conditions) {
12750 this.conditions = new Nodelist(this);
12752 return this.conditions;
12757 var GuardCondition = /** @class */ (function (_super) {
12758 __extends(GuardCondition, _super);
12759 function GuardCondition() {
12760 return _super !== null && _super.apply(this, arguments) || this;
12762 GuardCondition.prototype.setVariable = function (node) {
12763 return this.setNode('variable', node);
12765 return GuardCondition;
12768 var Module = /** @class */ (function (_super) {
12769 __extends(Module, _super);
12770 function Module() {
12771 return _super !== null && _super.apply(this, arguments) || this;
12773 Object.defineProperty(Module.prototype, "type", {
12775 return NodeType.Module;
12780 Module.prototype.setIdentifier = function (node) {
12781 return this.setNode('identifier', node, 0);
12783 Module.prototype.getIdentifier = function () {
12784 return this.identifier;
12790 (function (Level) {
12791 Level[Level["Ignore"] = 1] = "Ignore";
12792 Level[Level["Warning"] = 2] = "Warning";
12793 Level[Level["Error"] = 4] = "Error";
12794 })(Level || (Level = {}));
12795 var Marker = /** @class */ (function () {
12796 function Marker(node, rule, level, message, offset, length) {
12797 if (offset === void 0) { offset = node.offset; }
12798 if (length === void 0) { length = node.length; }
12801 this.level = level;
12802 this.message = message || rule.message;
12803 this.offset = offset;
12804 this.length = length;
12806 Marker.prototype.getRule = function () {
12809 Marker.prototype.getLevel = function () {
12812 Marker.prototype.getOffset = function () {
12813 return this.offset;
12815 Marker.prototype.getLength = function () {
12816 return this.length;
12818 Marker.prototype.getNode = function () {
12821 Marker.prototype.getMessage = function () {
12822 return this.message;
12828 export class DefaultVisitor implements IVisitor {
12830 public visitNode(node:Node):boolean {
12831 switch (node.type) {
12832 case NodeType.Stylesheet:
12833 return this.visitStylesheet(<Stylesheet> node);
12834 case NodeType.FontFace:
12835 return this.visitFontFace(<FontFace> node);
12836 case NodeType.Ruleset:
12837 return this.visitRuleSet(<RuleSet> node);
12838 case NodeType.Selector:
12839 return this.visitSelector(<Selector> node);
12840 case NodeType.SimpleSelector:
12841 return this.visitSimpleSelector(<SimpleSelector> node);
12842 case NodeType.Declaration:
12843 return this.visitDeclaration(<Declaration> node);
12844 case NodeType.Function:
12845 return this.visitFunction(<Function> node);
12846 case NodeType.FunctionDeclaration:
12847 return this.visitFunctionDeclaration(<FunctionDeclaration> node);
12848 case NodeType.FunctionParameter:
12849 return this.visitFunctionParameter(<FunctionParameter> node);
12850 case NodeType.FunctionArgument:
12851 return this.visitFunctionArgument(<FunctionArgument> node);
12852 case NodeType.Term:
12853 return this.visitTerm(<Term> node);
12854 case NodeType.Declaration:
12855 return this.visitExpression(<Expression> node);
12856 case NodeType.NumericValue:
12857 return this.visitNumericValue(<NumericValue> node);
12858 case NodeType.Page:
12859 return this.visitPage(<Page> node);
12860 case NodeType.PageBoxMarginBox:
12861 return this.visitPageBoxMarginBox(<PageBoxMarginBox> node);
12862 case NodeType.Property:
12863 return this.visitProperty(<Property> node);
12864 case NodeType.NumericValue:
12865 return this.visitNodelist(<Nodelist> node);
12866 case NodeType.Import:
12867 return this.visitImport(<Import> node);
12868 case NodeType.Namespace:
12869 return this.visitNamespace(<Namespace> node);
12870 case NodeType.Keyframe:
12871 return this.visitKeyframe(<Keyframe> node);
12872 case NodeType.KeyframeSelector:
12873 return this.visitKeyframeSelector(<KeyframeSelector> node);
12874 case NodeType.MixinDeclaration:
12875 return this.visitMixinDeclaration(<MixinDeclaration> node);
12876 case NodeType.MixinReference:
12877 return this.visitMixinReference(<MixinReference> node);
12878 case NodeType.Variable:
12879 return this.visitVariable(<Variable> node);
12880 case NodeType.VariableDeclaration:
12881 return this.visitVariableDeclaration(<VariableDeclaration> node);
12883 return this.visitUnknownNode(node);
12886 public visitFontFace(node:FontFace):boolean {
12890 public visitKeyframe(node:Keyframe):boolean {
12894 public visitKeyframeSelector(node:KeyframeSelector):boolean {
12898 public visitStylesheet(node:Stylesheet):boolean {
12902 public visitProperty(Node:Property):boolean {
12906 public visitRuleSet(node:RuleSet):boolean {
12910 public visitSelector(node:Selector):boolean {
12914 public visitSimpleSelector(node:SimpleSelector):boolean {
12918 public visitDeclaration(node:Declaration):boolean {
12922 public visitFunction(node:Function):boolean {
12926 public visitFunctionDeclaration(node:FunctionDeclaration):boolean {
12930 public visitInvocation(node:Invocation):boolean {
12934 public visitTerm(node:Term):boolean {
12938 public visitImport(node:Import):boolean {
12942 public visitNamespace(node:Namespace):boolean {
12946 public visitExpression(node:Expression):boolean {
12950 public visitNumericValue(node:NumericValue):boolean {
12954 public visitPage(node:Page):boolean {
12958 public visitPageBoxMarginBox(node:PageBoxMarginBox):boolean {
12962 public visitNodelist(node:Nodelist):boolean {
12966 public visitVariableDeclaration(node:VariableDeclaration):boolean {
12970 public visitVariable(node:Variable):boolean {
12974 public visitMixinDeclaration(node:MixinDeclaration):boolean {
12978 public visitMixinReference(node:MixinReference):boolean {
12982 public visitUnknownNode(node:Node):boolean {
12987 var ParseErrorCollector = /** @class */ (function () {
12988 function ParseErrorCollector() {
12991 ParseErrorCollector.entries = function (node) {
12992 var visitor = new ParseErrorCollector();
12993 node.acceptVisitor(visitor);
12994 return visitor.entries;
12996 ParseErrorCollector.prototype.visitNode = function (node) {
12997 if (node.isErroneous()) {
12998 node.collectIssues(this.entries);
13002 return ParseErrorCollector;
13009 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13011 __webpack_require__.r(__webpack_exports__);
13012 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13013 /* harmony export */ "startsWith": () => /* binding */ startsWith,
13014 /* harmony export */ "endsWith": () => /* binding */ endsWith,
13015 /* harmony export */ "difference": () => /* binding */ difference,
13016 /* harmony export */ "getLimitedString": () => /* binding */ getLimitedString,
13017 /* harmony export */ "trim": () => /* binding */ trim
13018 /* harmony export */ });
13019 /*---------------------------------------------------------------------------------------------
13020 * Copyright (c) Microsoft Corporation. All rights reserved.
13021 * Licensed under the MIT License. See License.txt in the project root for license information.
13022 *--------------------------------------------------------------------------------------------*/
13024 function startsWith(haystack, needle) {
13025 if (haystack.length < needle.length) {
13028 for (var i = 0; i < needle.length; i++) {
13029 if (haystack[i] !== needle[i]) {
13036 * Determines if haystack ends with needle.
13038 function endsWith(haystack, needle) {
13039 var diff = haystack.length - needle.length;
13041 return haystack.lastIndexOf(needle) === diff;
13043 else if (diff === 0) {
13044 return haystack === needle;
13051 * Computes the difference score for two strings. More similar strings have a higher score.
13052 * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
13053 * Strings that have a large length difference will get a bad default score 0.
13054 * Complexity - both time and space O(first.length * second.length)
13055 * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
13057 * @param first a string
13058 * @param second a string
13060 function difference(first, second, maxLenDelta) {
13061 if (maxLenDelta === void 0) { maxLenDelta = 4; }
13062 var lengthDifference = Math.abs(first.length - second.length);
13063 // We only compute score if length of the currentWord and length of entry.name are similar.
13064 if (lengthDifference > maxLenDelta) {
13067 // Initialize LCS (largest common subsequence) matrix.
13069 var zeroArray = [];
13071 for (i = 0; i < second.length + 1; ++i) {
13074 for (i = 0; i < first.length + 1; ++i) {
13075 LCS.push(zeroArray);
13077 for (i = 1; i < first.length + 1; ++i) {
13078 for (j = 1; j < second.length + 1; ++j) {
13079 if (first[i - 1] === second[j - 1]) {
13080 LCS[i][j] = LCS[i - 1][j - 1] + 1;
13083 LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
13087 return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
13090 * Limit of string length.
13092 function getLimitedString(str, ellipsis) {
13093 if (ellipsis === void 0) { ellipsis = true; }
13097 if (str.length < 140) {
13100 return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
13103 * Limit of string length.
13105 function trim(str, regexp) {
13106 var m = regexp.exec(str);
13107 if (m && m[0].length) {
13108 return str.substr(0, str.length - m[0].length);
13116 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13118 __webpack_require__.r(__webpack_exports__);
13119 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13120 /* harmony export */ "CSSIssueType": () => /* binding */ CSSIssueType,
13121 /* harmony export */ "ParseError": () => /* binding */ ParseError
13122 /* harmony export */ });
13123 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
13124 /*---------------------------------------------------------------------------------------------
13125 * Copyright (c) Microsoft Corporation. All rights reserved.
13126 * Licensed under the MIT License. See License.txt in the project root for license information.
13127 *--------------------------------------------------------------------------------------------*/
13130 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
13131 var CSSIssueType = /** @class */ (function () {
13132 function CSSIssueType(id, message) {
13134 this.message = message;
13136 return CSSIssueType;
13140 NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
13141 ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
13142 RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
13143 DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
13144 ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
13145 SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
13146 TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
13147 ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
13148 OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
13149 IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
13150 PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
13151 URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
13152 URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
13153 VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
13154 VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
13155 PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
13156 LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
13157 RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
13158 LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
13159 RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
13160 LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
13161 RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
13162 CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
13163 PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
13164 UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
13165 UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
13166 SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
13167 StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
13168 WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
13169 MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
13170 IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
13171 WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
13172 IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
13178 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13181 /* --------------------------------------------------------------------------------------------
13182 * Copyright (c) Microsoft Corporation. All rights reserved.
13183 * Licensed under the MIT License. See License.txt in the project root for license information.
13184 * ------------------------------------------------------------------------------------------ */
13185 Object.defineProperty(exports, "__esModule", ({ value: true }));
13186 exports.config = exports.loadMessageBundle = void 0;
13187 var path = __webpack_require__(3);
13188 var fs = __webpack_require__(80);
13189 var ral_1 = __webpack_require__(95);
13190 var common_1 = __webpack_require__(96);
13191 var common_2 = __webpack_require__(96);
13192 Object.defineProperty(exports, "MessageFormat", ({ enumerable: true, get: function () { return common_2.MessageFormat; } }));
13193 Object.defineProperty(exports, "BundleFormat", ({ enumerable: true, get: function () { return common_2.BundleFormat; } }));
13194 var toString = Object.prototype.toString;
13195 function isNumber(value) {
13196 return toString.call(value) === '[object Number]';
13198 function isString(value) {
13199 return toString.call(value) === '[object String]';
13201 function isBoolean(value) {
13202 return value === true || value === false;
13204 function readJsonFileSync(filename) {
13205 return JSON.parse(fs.readFileSync(filename, 'utf8'));
13207 var resolvedBundles;
13209 function initializeSettings() {
13210 options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: common_1.MessageFormat.bundle };
13211 if (isString(process.env.VSCODE_NLS_CONFIG)) {
13213 var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG);
13214 var language = void 0;
13215 if (vscodeOptions_1.availableLanguages) {
13216 var value = vscodeOptions_1.availableLanguages['*'];
13217 if (isString(value)) {
13221 if (isString(vscodeOptions_1.locale)) {
13222 options.locale = vscodeOptions_1.locale.toLowerCase();
13224 if (language === undefined) {
13225 options.language = options.locale;
13227 else if (language !== 'en') {
13228 options.language = language;
13230 if (isBoolean(vscodeOptions_1._languagePackSupport)) {
13231 options.languagePackSupport = vscodeOptions_1._languagePackSupport;
13233 if (isString(vscodeOptions_1._cacheRoot)) {
13234 options.cacheRoot = vscodeOptions_1._cacheRoot;
13236 if (isString(vscodeOptions_1._languagePackId)) {
13237 options.languagePackId = vscodeOptions_1._languagePackId;
13239 if (isString(vscodeOptions_1._translationsConfigFile)) {
13240 options.translationsConfigFile = vscodeOptions_1._translationsConfigFile;
13242 options.translationsConfig = readJsonFileSync(options.translationsConfigFile);
13245 // We can't read the translation config file. Mark the cache as corrupted.
13246 if (vscodeOptions_1._corruptedFile) {
13247 var dirname = path.dirname(vscodeOptions_1._corruptedFile);
13248 fs.exists(dirname, function (exists) {
13250 fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) {
13251 console.error(err);
13263 common_1.setPseudo(options.locale === 'pseudo');
13264 resolvedBundles = Object.create(null);
13266 initializeSettings();
13267 function supportsLanguagePack() {
13268 return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined
13269 && options.translationsConfig !== undefined;
13271 function createScopedLocalizeFunction(messages) {
13272 return function (key, message) {
13274 for (var _i = 2; _i < arguments.length; _i++) {
13275 args[_i - 2] = arguments[_i];
13277 if (isNumber(key)) {
13278 if (key >= messages.length) {
13279 console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);
13282 return common_1.format(messages[key], args);
13285 if (isString(message)) {
13286 console.warn("Message " + message + " didn't get externalized correctly.");
13287 return common_1.format(message, args);
13290 console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);
13295 function resolveLanguage(file) {
13296 var resolvedLanguage;
13297 if (options.cacheLanguageResolution && resolvedLanguage) {
13298 resolvedLanguage = resolvedLanguage;
13301 if (common_1.isPseudo || !options.language) {
13302 resolvedLanguage = '.nls.json';
13305 var locale = options.language;
13307 var candidate = '.nls.' + locale + '.json';
13308 if (fs.existsSync(file + candidate)) {
13309 resolvedLanguage = candidate;
13313 var index = locale.lastIndexOf('-');
13315 locale = locale.substring(0, index);
13318 resolvedLanguage = '.nls.json';
13324 if (options.cacheLanguageResolution) {
13325 resolvedLanguage = resolvedLanguage;
13328 return file + resolvedLanguage;
13330 function findInTheBoxBundle(root) {
13331 var language = options.language;
13333 var candidate = path.join(root, "nls.bundle." + language + ".json");
13334 if (fs.existsSync(candidate)) {
13338 var index = language.lastIndexOf('-');
13340 language = language.substring(0, index);
13343 language = undefined;
13347 // Test if we can reslove the default bundle.
13348 if (language === undefined) {
13349 var candidate = path.join(root, 'nls.bundle.json');
13350 if (fs.existsSync(candidate)) {
13356 function mkdir(directory) {
13358 fs.mkdirSync(directory);
13361 if (err.code === 'EEXIST') {
13364 else if (err.code === 'ENOENT') {
13365 var parent = path.dirname(directory);
13366 if (parent !== directory) {
13368 fs.mkdirSync(directory);
13376 function createDefaultNlsBundle(folder) {
13377 var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));
13378 var result = Object.create(null);
13379 for (var module_1 in metaData) {
13380 var entry = metaData[module_1];
13381 result[module_1] = entry.messages;
13385 function createNLSBundle(header, metaDataPath) {
13386 var languagePackLocation = options.translationsConfig[header.id];
13387 if (!languagePackLocation) {
13390 var languagePack = readJsonFileSync(languagePackLocation).contents;
13391 var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));
13392 var result = Object.create(null);
13393 for (var module_2 in metaData) {
13394 var entry = metaData[module_2];
13395 var translations = languagePack[header.outDir + "/" + module_2];
13396 if (translations) {
13397 var resultMessages = [];
13398 for (var i = 0; i < entry.keys.length; i++) {
13399 var messageKey = entry.keys[i];
13400 var key = isString(messageKey) ? messageKey : messageKey.key;
13401 var translatedMessage = translations[key];
13402 if (translatedMessage === undefined) {
13403 translatedMessage = entry.messages[i];
13405 resultMessages.push(translatedMessage);
13407 result[module_2] = resultMessages;
13410 result[module_2] = entry.messages;
13415 function touch(file) {
13416 var d = new Date();
13417 fs.utimes(file, d, d, function () {
13418 // Do nothing. Ignore
13421 function cacheBundle(key, bundle) {
13422 resolvedBundles[key] = bundle;
13425 function loadNlsBundleOrCreateFromI18n(header, bundlePath) {
13427 var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");
13428 var useMemoryOnly = false;
13429 var writeBundle = false;
13431 result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));
13436 if (err.code === 'ENOENT') {
13437 writeBundle = true;
13439 else if (err instanceof SyntaxError) {
13440 // We have a syntax error. So no valid JSON. Use
13441 console.log("Syntax error parsing message bundle: " + err.message + ".");
13442 fs.unlink(bundle, function (err) {
13444 console.error("Deleting corrupted bundle " + bundle + " failed.");
13447 useMemoryOnly = true;
13453 result = createNLSBundle(header, bundlePath);
13454 if (!result || useMemoryOnly) {
13459 fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });
13462 if (err.code === 'EEXIST') {
13470 function loadDefaultNlsBundle(bundlePath) {
13472 return createDefaultNlsBundle(bundlePath);
13475 console.log("Generating default bundle from meta data failed.", err);
13479 function loadNlsBundle(header, bundlePath) {
13481 // Core decided to use a language pack. Do the same in the extension
13482 if (supportsLanguagePack()) {
13484 result = loadNlsBundleOrCreateFromI18n(header, bundlePath);
13487 console.log("Load or create bundle failed ", err);
13491 // No language pack found, but core is running in language pack mode
13492 // Don't try to use old in the box bundles since the might be stale
13493 // Fall right back to the default bundle.
13494 if (options.languagePackSupport) {
13495 return loadDefaultNlsBundle(bundlePath);
13497 var candidate = findInTheBoxBundle(bundlePath);
13500 return readJsonFileSync(candidate);
13503 console.log("Loading in the box message bundle failed.", err);
13506 result = loadDefaultNlsBundle(bundlePath);
13510 function tryFindMetaDataHeaderFile(file) {
13512 var dirname = path.dirname(file);
13514 result = path.join(dirname, 'nls.metadata.header.json');
13515 if (fs.existsSync(result)) {
13518 var parent = path.dirname(dirname);
13519 if (parent === dirname) {
13520 result = undefined;
13529 function loadMessageBundle(file) {
13531 // No file. We are in dev mode. Return the default
13532 // localize function.
13533 return common_1.localize;
13535 // Remove extension since we load json files.
13536 var ext = path.extname(file);
13538 file = file.substr(0, file.length - ext.length);
13540 if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.bundle) {
13541 var headerFile = tryFindMetaDataHeaderFile(file);
13543 var bundlePath = path.dirname(headerFile);
13544 var bundle = resolvedBundles[bundlePath];
13545 if (bundle === undefined) {
13547 var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));
13549 var nlsBundle = loadNlsBundle(header, bundlePath);
13550 bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);
13553 console.error('Failed to load nls bundle', err);
13554 bundle = cacheBundle(bundlePath, null);
13558 console.error('Failed to read header file', err);
13559 bundle = cacheBundle(bundlePath, null);
13563 var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');
13564 var messages = bundle.nlsBundle[module_3];
13565 if (messages === undefined) {
13566 console.error("Messages for file " + file + " not found. See console for details.");
13567 return function () {
13568 return 'Messages not found.';
13571 return createScopedLocalizeFunction(messages);
13575 if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.file) {
13576 // Try to load a single file bundle
13578 var json = readJsonFileSync(resolveLanguage(file));
13579 if (Array.isArray(json)) {
13580 return createScopedLocalizeFunction(json);
13583 if (common_1.isDefined(json.messages) && common_1.isDefined(json.keys)) {
13584 return createScopedLocalizeFunction(json.messages);
13587 console.error("String bundle '" + file + "' uses an unsupported format.");
13588 return function () {
13589 return 'File bundle has unsupported format. See console for details';
13595 if (err.code !== 'ENOENT') {
13596 console.error('Failed to load single file bundle', err);
13600 console.error("Failed to load message bundle for file " + file);
13601 return function () {
13602 return 'Failed to load message bundle. See console for details.';
13605 exports.loadMessageBundle = loadMessageBundle;
13606 function config(opts) {
13608 if (isString(opts.locale)) {
13609 options.locale = opts.locale.toLowerCase();
13610 options.language = options.locale;
13611 resolvedBundles = Object.create(null);
13613 if (opts.messageFormat !== undefined) {
13614 options.messageFormat = opts.messageFormat;
13616 if (opts.bundleFormat === common_1.BundleFormat.standalone && options.languagePackSupport === true) {
13617 options.languagePackSupport = false;
13620 common_1.setPseudo(options.locale === 'pseudo');
13621 return loadMessageBundle;
13623 exports.config = config;
13624 ral_1.default.install(Object.freeze({
13625 loadMessageBundle: loadMessageBundle,
13628 //# sourceMappingURL=main.js.map
13632 /***/ ((__unused_webpack_module, exports) => {
13635 Object.defineProperty(exports, "__esModule", ({ value: true }));
13638 if (_ral === undefined) {
13639 throw new Error("No runtime abstraction layer installed");
13644 function install(ral) {
13645 if (ral === undefined) {
13646 throw new Error("No runtime abstraction layer provided");
13650 RAL.install = install;
13651 })(RAL || (RAL = {}));
13652 exports.default = RAL;
13653 //# sourceMappingURL=ral.js.map
13657 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13660 /* --------------------------------------------------------------------------------------------
13661 * Copyright (c) Microsoft Corporation. All rights reserved.
13662 * Licensed under the MIT License. See License.txt in the project root for license information.
13663 * ------------------------------------------------------------------------------------------ */
13664 Object.defineProperty(exports, "__esModule", ({ value: true }));
13665 exports.config = exports.loadMessageBundle = exports.localize = exports.format = exports.setPseudo = exports.isPseudo = exports.isDefined = exports.BundleFormat = exports.MessageFormat = void 0;
13666 var ral_1 = __webpack_require__(95);
13668 (function (MessageFormat) {
13669 MessageFormat["file"] = "file";
13670 MessageFormat["bundle"] = "bundle";
13671 MessageFormat["both"] = "both";
13672 })(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));
13674 (function (BundleFormat) {
13675 // the nls.bundle format
13676 BundleFormat["standalone"] = "standalone";
13677 BundleFormat["languagePack"] = "languagePack";
13678 })(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));
13680 (function (LocalizeInfo) {
13681 function is(value) {
13682 var candidate = value;
13683 return candidate && isDefined(candidate.key) && isDefined(candidate.comment);
13685 LocalizeInfo.is = is;
13686 })(LocalizeInfo || (LocalizeInfo = {}));
13687 function isDefined(value) {
13688 return typeof value !== 'undefined';
13690 exports.isDefined = isDefined;
13691 exports.isPseudo = false;
13692 function setPseudo(pseudo) {
13693 exports.isPseudo = pseudo;
13695 exports.setPseudo = setPseudo;
13696 function format(message, args) {
13698 if (exports.isPseudo) {
13699 // FF3B and FF3D is the Unicode zenkaku representation for [ and ]
13700 message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
13702 if (args.length === 0) {
13706 result = message.replace(/\{(\d+)\}/g, function (match, rest) {
13707 var index = rest[0];
13708 var arg = args[index];
13709 var replacement = match;
13710 if (typeof arg === 'string') {
13713 else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {
13714 replacement = String(arg);
13716 return replacement;
13721 exports.format = format;
13722 function localize(_key, message) {
13724 for (var _i = 2; _i < arguments.length; _i++) {
13725 args[_i - 2] = arguments[_i];
13727 return format(message, args);
13729 exports.localize = localize;
13730 function loadMessageBundle(file) {
13731 return ral_1.default().loadMessageBundle(file);
13733 exports.loadMessageBundle = loadMessageBundle;
13734 function config(opts) {
13735 return ral_1.default().config(opts);
13737 exports.config = config;
13738 //# sourceMappingURL=common.js.map
13742 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13744 __webpack_require__.r(__webpack_exports__);
13745 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13746 /* harmony export */ "browserNames": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.browserNames,
13747 /* harmony export */ "getBrowserLabel": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.getBrowserLabel,
13748 /* harmony export */ "getEntryDescription": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.getEntryDescription,
13749 /* harmony export */ "textToMarkedString": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.textToMarkedString,
13750 /* harmony export */ "colorFrom256RGB": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFrom256RGB,
13751 /* harmony export */ "colorFromHSL": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFromHSL,
13752 /* harmony export */ "colorFromHex": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFromHex,
13753 /* harmony export */ "colorFunctions": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFunctions,
13754 /* harmony export */ "colorKeywords": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorKeywords,
13755 /* harmony export */ "colors": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colors,
13756 /* harmony export */ "getColorValue": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.getColorValue,
13757 /* harmony export */ "hexDigit": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.hexDigit,
13758 /* harmony export */ "hslFromColor": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.hslFromColor,
13759 /* harmony export */ "isColorConstructor": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.isColorConstructor,
13760 /* harmony export */ "isColorValue": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.isColorValue,
13761 /* harmony export */ "basicShapeFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions,
13762 /* harmony export */ "boxKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.boxKeywords,
13763 /* harmony export */ "cssWideKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords,
13764 /* harmony export */ "geometryBoxKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords,
13765 /* harmony export */ "html5Tags": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.html5Tags,
13766 /* harmony export */ "imageFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.imageFunctions,
13767 /* harmony export */ "lineStyleKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords,
13768 /* harmony export */ "lineWidthKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.lineWidthKeywords,
13769 /* harmony export */ "pageBoxDirectives": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.pageBoxDirectives,
13770 /* harmony export */ "positionKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.positionKeywords,
13771 /* harmony export */ "repeatStyleKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords,
13772 /* harmony export */ "svgElements": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.svgElements,
13773 /* harmony export */ "transitionTimingFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions,
13774 /* harmony export */ "units": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.units
13775 /* harmony export */ });
13776 /* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98);
13777 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99);
13778 /* harmony import */ var _builtinData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100);
13779 /*---------------------------------------------------------------------------------------------
13780 * Copyright (c) Microsoft Corporation. All rights reserved.
13781 * Licensed under the MIT License. See License.txt in the project root for license information.
13782 *--------------------------------------------------------------------------------------------*/
13791 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13793 __webpack_require__.r(__webpack_exports__);
13794 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13795 /* harmony export */ "browserNames": () => /* binding */ browserNames,
13796 /* harmony export */ "getEntryDescription": () => /* binding */ getEntryDescription,
13797 /* harmony export */ "textToMarkedString": () => /* binding */ textToMarkedString,
13798 /* harmony export */ "getBrowserLabel": () => /* binding */ getBrowserLabel
13799 /* harmony export */ });
13800 /*---------------------------------------------------------------------------------------------
13801 * Copyright (c) Microsoft Corporation. All rights reserved.
13802 * Licensed under the MIT License. See License.txt in the project root for license information.
13803 *--------------------------------------------------------------------------------------------*/
13805 var browserNames = {
13813 function getEntryStatus(status) {
13815 case 'experimental':
13816 return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
13817 case 'nonstandard':
13818 return '🚨️ Property is nonstandard. Avoid using it.\n\n';
13820 return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
13825 function getEntryDescription(entry, doesSupportMarkdown) {
13827 if (doesSupportMarkdown) {
13830 value: getEntryMarkdownDescription(entry)
13836 value: getEntryStringDescription(entry)
13839 if (result.value === '') {
13844 function textToMarkedString(text) {
13845 text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
13846 return text.replace(/</g, '<').replace(/>/g, '>');
13848 function getEntryStringDescription(entry) {
13849 if (!entry.description || entry.description === '') {
13852 if (typeof entry.description !== 'string') {
13853 return entry.description.value;
13856 if (entry.status) {
13857 result += getEntryStatus(entry.status);
13859 result += entry.description;
13860 var browserLabel = getBrowserLabel(entry.browsers);
13861 if (browserLabel) {
13862 result += '\n(' + browserLabel + ')';
13864 if ('syntax' in entry) {
13865 result += "\n\nSyntax: " + entry.syntax;
13867 if (entry.references && entry.references.length > 0) {
13869 result += entry.references.map(function (r) {
13870 return r.name + ": " + r.url;
13875 function getEntryMarkdownDescription(entry) {
13876 if (!entry.description || entry.description === '') {
13880 if (entry.status) {
13881 result += getEntryStatus(entry.status);
13883 var description = typeof entry.description === 'string' ? entry.description : entry.description.value;
13884 result += textToMarkedString(description);
13885 var browserLabel = getBrowserLabel(entry.browsers);
13886 if (browserLabel) {
13887 result += '\n\n(' + textToMarkedString(browserLabel) + ')';
13889 if ('syntax' in entry && entry.syntax) {
13890 result += "\n\nSyntax: " + textToMarkedString(entry.syntax);
13892 if (entry.references && entry.references.length > 0) {
13894 result += entry.references.map(function (r) {
13895 return "[" + r.name + "](" + r.url + ")";
13901 * Input is like `["E12","FF49","C47","IE","O"]`
13902 * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
13904 function getBrowserLabel(browsers) {
13905 if (browsers === void 0) { browsers = []; }
13906 if (browsers.length === 0) {
13910 .map(function (b) {
13912 var matches = b.match(/([A-Z]+)(\d+)?/);
13913 var name = matches[1];
13914 var version = matches[2];
13915 if (name in browserNames) {
13916 result += browserNames[name];
13919 result += ' ' + version;
13929 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13931 __webpack_require__.r(__webpack_exports__);
13932 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13933 /* harmony export */ "colorFunctions": () => /* binding */ colorFunctions,
13934 /* harmony export */ "colors": () => /* binding */ colors,
13935 /* harmony export */ "colorKeywords": () => /* binding */ colorKeywords,
13936 /* harmony export */ "isColorConstructor": () => /* binding */ isColorConstructor,
13937 /* harmony export */ "isColorValue": () => /* binding */ isColorValue,
13938 /* harmony export */ "hexDigit": () => /* binding */ hexDigit,
13939 /* harmony export */ "colorFromHex": () => /* binding */ colorFromHex,
13940 /* harmony export */ "colorFrom256RGB": () => /* binding */ colorFrom256RGB,
13941 /* harmony export */ "colorFromHSL": () => /* binding */ colorFromHSL,
13942 /* harmony export */ "hslFromColor": () => /* binding */ hslFromColor,
13943 /* harmony export */ "getColorValue": () => /* binding */ getColorValue
13944 /* harmony export */ });
13945 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
13946 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
13947 /*---------------------------------------------------------------------------------------------
13948 * Copyright (c) Microsoft Corporation. All rights reserved.
13949 * Licensed under the MIT License. See License.txt in the project root for license information.
13950 *--------------------------------------------------------------------------------------------*/
13953 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
13954 var colorFunctions = [
13955 { func: 'rgb($red, $green, $blue)', desc: localize('css.builtin.rgb', 'Creates a Color from red, green, and blue values.') },
13956 { func: 'rgba($red, $green, $blue, $alpha)', desc: localize('css.builtin.rgba', 'Creates a Color from red, green, blue, and alpha values.') },
13957 { func: 'hsl($hue, $saturation, $lightness)', desc: localize('css.builtin.hsl', 'Creates a Color from hue, saturation, and lightness values.') },
13958 { func: 'hsla($hue, $saturation, $lightness, $alpha)', desc: localize('css.builtin.hsla', 'Creates a Color from hue, saturation, lightness, and alpha values.') }
13961 aliceblue: '#f0f8ff',
13962 antiquewhite: '#faebd7',
13964 aquamarine: '#7fffd4',
13969 blanchedalmond: '#ffebcd',
13971 blueviolet: '#8a2be2',
13973 burlywood: '#deb887',
13974 cadetblue: '#5f9ea0',
13975 chartreuse: '#7fff00',
13976 chocolate: '#d2691e',
13978 cornflowerblue: '#6495ed',
13979 cornsilk: '#fff8dc',
13980 crimson: '#dc143c',
13982 darkblue: '#00008b',
13983 darkcyan: '#008b8b',
13984 darkgoldenrod: '#b8860b',
13985 darkgray: '#a9a9a9',
13986 darkgrey: '#a9a9a9',
13987 darkgreen: '#006400',
13988 darkkhaki: '#bdb76b',
13989 darkmagenta: '#8b008b',
13990 darkolivegreen: '#556b2f',
13991 darkorange: '#ff8c00',
13992 darkorchid: '#9932cc',
13993 darkred: '#8b0000',
13994 darksalmon: '#e9967a',
13995 darkseagreen: '#8fbc8f',
13996 darkslateblue: '#483d8b',
13997 darkslategray: '#2f4f4f',
13998 darkslategrey: '#2f4f4f',
13999 darkturquoise: '#00ced1',
14000 darkviolet: '#9400d3',
14001 deeppink: '#ff1493',
14002 deepskyblue: '#00bfff',
14003 dimgray: '#696969',
14004 dimgrey: '#696969',
14005 dodgerblue: '#1e90ff',
14006 firebrick: '#b22222',
14007 floralwhite: '#fffaf0',
14008 forestgreen: '#228b22',
14009 fuchsia: '#ff00ff',
14010 gainsboro: '#dcdcdc',
14011 ghostwhite: '#f8f8ff',
14013 goldenrod: '#daa520',
14017 greenyellow: '#adff2f',
14018 honeydew: '#f0fff0',
14019 hotpink: '#ff69b4',
14020 indianred: '#cd5c5c',
14024 lavender: '#e6e6fa',
14025 lavenderblush: '#fff0f5',
14026 lawngreen: '#7cfc00',
14027 lemonchiffon: '#fffacd',
14028 lightblue: '#add8e6',
14029 lightcoral: '#f08080',
14030 lightcyan: '#e0ffff',
14031 lightgoldenrodyellow: '#fafad2',
14032 lightgray: '#d3d3d3',
14033 lightgrey: '#d3d3d3',
14034 lightgreen: '#90ee90',
14035 lightpink: '#ffb6c1',
14036 lightsalmon: '#ffa07a',
14037 lightseagreen: '#20b2aa',
14038 lightskyblue: '#87cefa',
14039 lightslategray: '#778899',
14040 lightslategrey: '#778899',
14041 lightsteelblue: '#b0c4de',
14042 lightyellow: '#ffffe0',
14044 limegreen: '#32cd32',
14046 magenta: '#ff00ff',
14048 mediumaquamarine: '#66cdaa',
14049 mediumblue: '#0000cd',
14050 mediumorchid: '#ba55d3',
14051 mediumpurple: '#9370d8',
14052 mediumseagreen: '#3cb371',
14053 mediumslateblue: '#7b68ee',
14054 mediumspringgreen: '#00fa9a',
14055 mediumturquoise: '#48d1cc',
14056 mediumvioletred: '#c71585',
14057 midnightblue: '#191970',
14058 mintcream: '#f5fffa',
14059 mistyrose: '#ffe4e1',
14060 moccasin: '#ffe4b5',
14061 navajowhite: '#ffdead',
14063 oldlace: '#fdf5e6',
14065 olivedrab: '#6b8e23',
14067 orangered: '#ff4500',
14069 palegoldenrod: '#eee8aa',
14070 palegreen: '#98fb98',
14071 paleturquoise: '#afeeee',
14072 palevioletred: '#d87093',
14073 papayawhip: '#ffefd5',
14074 peachpuff: '#ffdab9',
14078 powderblue: '#b0e0e6',
14081 rebeccapurple: '#663399',
14082 rosybrown: '#bc8f8f',
14083 royalblue: '#4169e1',
14084 saddlebrown: '#8b4513',
14086 sandybrown: '#f4a460',
14087 seagreen: '#2e8b57',
14088 seashell: '#fff5ee',
14091 skyblue: '#87ceeb',
14092 slateblue: '#6a5acd',
14093 slategray: '#708090',
14094 slategrey: '#708090',
14096 springgreen: '#00ff7f',
14097 steelblue: '#4682b4',
14100 thistle: '#d8bfd8',
14102 turquoise: '#40e0d0',
14106 whitesmoke: '#f5f5f5',
14108 yellowgreen: '#9acd32'
14110 var colorKeywords = {
14111 '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.',
14112 'transparent': 'Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value.',
14114 function getNumericValue(node, factor) {
14115 var val = node.getText();
14116 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);
14121 var result = parseFloat(m[1]) / factor;
14122 if (result >= 0 && result <= 1) {
14128 function getAngle(node) {
14129 var val = node.getText();
14130 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);
14132 return parseFloat(val) % 360;
14136 function isColorConstructor(node) {
14137 var name = node.getName();
14141 return /^(rgb|rgba|hsl|hsla)$/gi.test(name);
14144 * Returns true if the node is a color value - either
14145 * defined a hex number, as rgb or rgba function, or
14148 function isColorValue(node) {
14149 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.HexColorValue) {
14152 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Function) {
14153 return isColorConstructor(node);
14155 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Identifier) {
14156 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
14159 var candidateColor = node.getText().toLowerCase();
14160 if (candidateColor === 'none') {
14163 if (colors[candidateColor]) {
14175 function hexDigit(charCode) {
14176 if (charCode < Digit0) {
14179 if (charCode <= Digit9) {
14180 return charCode - Digit0;
14182 if (charCode < a) {
14183 charCode += (a - A);
14185 if (charCode >= a && charCode <= f) {
14186 return charCode - a + 10;
14190 function colorFromHex(text) {
14191 if (text[0] !== '#') {
14194 switch (text.length) {
14197 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
14198 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
14199 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
14204 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
14205 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
14206 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
14207 alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
14211 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
14212 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
14213 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
14218 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
14219 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
14220 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
14221 alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
14226 function colorFrom256RGB(red, green, blue, alpha) {
14227 if (alpha === void 0) { alpha = 1.0; }
14230 green: green / 255.0,
14231 blue: blue / 255.0,
14235 function colorFromHSL(hue, sat, light, alpha) {
14236 if (alpha === void 0) { alpha = 1.0; }
14239 return { red: light, green: light, blue: light, alpha: alpha };
14242 var hueToRgb = function (t1, t2, hue) {
14250 return (t2 - t1) * hue + t1;
14256 return (t2 - t1) * (4 - hue) + t1;
14260 var t2 = light <= 0.5 ? (light * (sat + 1)) : (light + sat - (light * sat));
14261 var t1 = light * 2 - t2;
14262 return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha: alpha };
14265 function hslFromColor(rgba) {
14267 var g = rgba.green;
14269 var a = rgba.alpha;
14270 var max = Math.max(r, g, b);
14271 var min = Math.min(r, g, b);
14274 var l = (min + max) / 2;
14275 var chroma = max - min;
14277 s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
14280 h = (g - b) / chroma + (g < b ? 6 : 0);
14283 h = (b - r) / chroma + 2;
14286 h = (r - g) / chroma + 4;
14292 return { h: h, s: s, l: l, a: a };
14294 function getColorValue(node) {
14295 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.HexColorValue) {
14296 var text = node.getText();
14297 return colorFromHex(text);
14299 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Function) {
14300 var functionNode = node;
14301 var name = functionNode.getName();
14302 var colorValues = functionNode.getArguments().getChildren();
14303 if (!name || colorValues.length < 3 || colorValues.length > 4) {
14307 var alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1;
14308 if (name === 'rgb' || name === 'rgba') {
14310 red: getNumericValue(colorValues[0], 255.0),
14311 green: getNumericValue(colorValues[1], 255.0),
14312 blue: getNumericValue(colorValues[2], 255.0),
14316 else if (name === 'hsl' || name === 'hsla') {
14317 var h = getAngle(colorValues[0]);
14318 var s = getNumericValue(colorValues[1], 100.0);
14319 var l = getNumericValue(colorValues[2], 100.0);
14320 return colorFromHSL(h, s, l, alpha);
14324 // parse error on numeric value
14328 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Identifier) {
14329 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
14332 var term = node.parent;
14333 if (term && term.parent && term.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.BinaryExpression) {
14334 var expression = term.parent;
14335 if (expression.parent && expression.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ListEntry && expression.parent.key === expression) {
14339 var candidateColor = node.getText().toLowerCase();
14340 if (candidateColor === 'none') {
14343 var colorHex = colors[candidateColor];
14345 return colorFromHex(colorHex);
14354 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14356 __webpack_require__.r(__webpack_exports__);
14357 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14358 /* harmony export */ "positionKeywords": () => /* binding */ positionKeywords,
14359 /* harmony export */ "repeatStyleKeywords": () => /* binding */ repeatStyleKeywords,
14360 /* harmony export */ "lineStyleKeywords": () => /* binding */ lineStyleKeywords,
14361 /* harmony export */ "lineWidthKeywords": () => /* binding */ lineWidthKeywords,
14362 /* harmony export */ "boxKeywords": () => /* binding */ boxKeywords,
14363 /* harmony export */ "geometryBoxKeywords": () => /* binding */ geometryBoxKeywords,
14364 /* harmony export */ "cssWideKeywords": () => /* binding */ cssWideKeywords,
14365 /* harmony export */ "imageFunctions": () => /* binding */ imageFunctions,
14366 /* harmony export */ "transitionTimingFunctions": () => /* binding */ transitionTimingFunctions,
14367 /* harmony export */ "basicShapeFunctions": () => /* binding */ basicShapeFunctions,
14368 /* harmony export */ "units": () => /* binding */ units,
14369 /* harmony export */ "html5Tags": () => /* binding */ html5Tags,
14370 /* harmony export */ "svgElements": () => /* binding */ svgElements,
14371 /* harmony export */ "pageBoxDirectives": () => /* binding */ pageBoxDirectives
14372 /* harmony export */ });
14373 /*---------------------------------------------------------------------------------------------
14374 * Copyright (c) Microsoft Corporation. All rights reserved.
14375 * Licensed under the MIT License. See License.txt in the project root for license information.
14376 *--------------------------------------------------------------------------------------------*/
14378 var positionKeywords = {
14379 '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.',
14380 '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.',
14381 '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.',
14382 '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.',
14383 '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.'
14385 var repeatStyleKeywords = {
14386 'no-repeat': 'Placed once and not repeated in this direction.',
14387 'repeat': 'Repeated in this direction as often as needed to cover the background painting area.',
14388 'repeat-x': 'Computes to ‘repeat no-repeat’.',
14389 'repeat-y': 'Computes to ‘no-repeat repeat’.',
14390 '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.',
14391 '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.'
14393 var lineStyleKeywords = {
14394 'dashed': 'A series of square-ended dashes.',
14395 'dotted': 'A series of round dots.',
14396 'double': 'Two parallel solid lines with some space between them.',
14397 'groove': 'Looks as if it were carved in the canvas.',
14398 'hidden': 'Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.',
14399 'inset': 'Looks as if the content on the inside of the border is sunken into the canvas.',
14400 'none': 'No border. Color and width are ignored.',
14401 'outset': 'Looks as if the content on the inside of the border is coming out of the canvas.',
14402 'ridge': 'Looks as if it were coming out of the canvas.',
14403 'solid': 'A single line segment.'
14405 var lineWidthKeywords = ['medium', 'thick', 'thin'];
14406 var boxKeywords = {
14407 'border-box': 'The background is painted within (clipped to) the border box.',
14408 'content-box': 'The background is painted within (clipped to) the content box.',
14409 'padding-box': 'The background is painted within (clipped to) the padding box.'
14411 var geometryBoxKeywords = {
14412 'margin-box': 'Uses the margin box as reference box.',
14413 'fill-box': 'Uses the object bounding box as reference box.',
14414 'stroke-box': 'Uses the stroke bounding box as reference box.',
14415 'view-box': 'Uses the nearest SVG viewport as reference box.'
14417 var cssWideKeywords = {
14418 'initial': 'Represents the value specified as the property’s initial value.',
14419 'inherit': 'Represents the computed value of the property on the element’s parent.',
14420 'unset': 'Acts as either `inherit` or `initial`, depending on whether the property is inherited or not.'
14422 var imageFunctions = {
14423 'url()': 'Reference an image file by URL',
14424 'image()': 'Provide image fallbacks and annotations.',
14425 '-webkit-image-set()': 'Provide multiple resolutions. Remember to use unprefixed image-set() in addition.',
14426 'image-set()': 'Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.',
14427 '-moz-element()': 'Use an element in the document as an image. Remember to use unprefixed element() in addition.',
14428 'element()': 'Use an element in the document as an image.',
14429 'cross-fade()': 'Indicates the two images to be combined and how far along in the transition the combination is.',
14430 '-webkit-gradient()': 'Deprecated. Use modern linear-gradient() or radial-gradient() instead.',
14431 '-webkit-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14432 '-moz-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14433 '-o-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
14434 'linear-gradient()': 'A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.',
14435 '-webkit-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14436 '-moz-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14437 '-o-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
14438 '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.',
14439 '-webkit-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
14440 '-moz-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
14441 'radial-gradient()': 'Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.',
14442 '-webkit-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
14443 '-moz-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
14444 '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.'
14446 var transitionTimingFunctions = {
14447 'ease': 'Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).',
14448 'ease-in': 'Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).',
14449 'ease-in-out': 'Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).',
14450 'ease-out': 'Equivalent to cubic-bezier(0, 0, 0.58, 1.0).',
14451 'linear': 'Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).',
14452 'step-end': 'Equivalent to steps(1, end).',
14453 'step-start': 'Equivalent to steps(1, start).',
14454 '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”.',
14455 'cubic-bezier()': 'Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).',
14456 'cubic-bezier(0.6, -0.28, 0.735, 0.045)': 'Ease-in Back. Overshoots.',
14457 'cubic-bezier(0.68, -0.55, 0.265, 1.55)': 'Ease-in-out Back. Overshoots.',
14458 'cubic-bezier(0.175, 0.885, 0.32, 1.275)': 'Ease-out Back. Overshoots.',
14459 'cubic-bezier(0.6, 0.04, 0.98, 0.335)': 'Ease-in Circular. Based on half circle.',
14460 'cubic-bezier(0.785, 0.135, 0.15, 0.86)': 'Ease-in-out Circular. Based on half circle.',
14461 'cubic-bezier(0.075, 0.82, 0.165, 1)': 'Ease-out Circular. Based on half circle.',
14462 'cubic-bezier(0.55, 0.055, 0.675, 0.19)': 'Ease-in Cubic. Based on power of three.',
14463 'cubic-bezier(0.645, 0.045, 0.355, 1)': 'Ease-in-out Cubic. Based on power of three.',
14464 'cubic-bezier(0.215, 0.610, 0.355, 1)': 'Ease-out Cubic. Based on power of three.',
14465 'cubic-bezier(0.95, 0.05, 0.795, 0.035)': 'Ease-in Exponential. Based on two to the power ten.',
14466 'cubic-bezier(1, 0, 0, 1)': 'Ease-in-out Exponential. Based on two to the power ten.',
14467 'cubic-bezier(0.19, 1, 0.22, 1)': 'Ease-out Exponential. Based on two to the power ten.',
14468 'cubic-bezier(0.47, 0, 0.745, 0.715)': 'Ease-in Sine.',
14469 'cubic-bezier(0.445, 0.05, 0.55, 0.95)': 'Ease-in-out Sine.',
14470 'cubic-bezier(0.39, 0.575, 0.565, 1)': 'Ease-out Sine.',
14471 'cubic-bezier(0.55, 0.085, 0.68, 0.53)': 'Ease-in Quadratic. Based on power of two.',
14472 'cubic-bezier(0.455, 0.03, 0.515, 0.955)': 'Ease-in-out Quadratic. Based on power of two.',
14473 'cubic-bezier(0.25, 0.46, 0.45, 0.94)': 'Ease-out Quadratic. Based on power of two.',
14474 'cubic-bezier(0.895, 0.03, 0.685, 0.22)': 'Ease-in Quartic. Based on power of four.',
14475 'cubic-bezier(0.77, 0, 0.175, 1)': 'Ease-in-out Quartic. Based on power of four.',
14476 'cubic-bezier(0.165, 0.84, 0.44, 1)': 'Ease-out Quartic. Based on power of four.',
14477 'cubic-bezier(0.755, 0.05, 0.855, 0.06)': 'Ease-in Quintic. Based on power of five.',
14478 'cubic-bezier(0.86, 0, 0.07, 1)': 'Ease-in-out Quintic. Based on power of five.',
14479 'cubic-bezier(0.23, 1, 0.320, 1)': 'Ease-out Quintic. Based on power of five.'
14481 var basicShapeFunctions = {
14482 'circle()': 'Defines a circle.',
14483 'ellipse()': 'Defines an ellipse.',
14484 'inset()': 'Defines an inset rectangle.',
14485 'polygon()': 'Defines a polygon.'
14488 'length': ['em', 'rem', 'ex', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vw', 'vh', 'vmin', 'vmax'],
14489 'angle': ['deg', 'rad', 'grad', 'turn'],
14490 'time': ['ms', 's'],
14491 'frequency': ['Hz', 'kHz'],
14492 'resolution': ['dpi', 'dpcm', 'dppx'],
14493 'percentage': ['%', 'fr']
14495 var html5Tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption',
14496 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer',
14497 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',
14498 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q',
14499 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td',
14500 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'const', 'video', 'wbr'];
14501 var svgElements = ['circle', 'clipPath', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting',
14502 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology',
14503 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'hatch', 'hatchpath', 'image', 'line', 'linearGradient',
14504 'marker', 'mask', 'mesh', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'solidcolor', 'stop', 'svg', 'switch',
14505 'symbol', 'text', 'textPath', 'tspan', 'use', 'view'];
14506 var pageBoxDirectives = [
14507 '@bottom-center', '@bottom-left', '@bottom-left-corner', '@bottom-right', '@bottom-right-corner',
14508 '@left-bottom', '@left-middle', '@left-top', '@right-bottom', '@right-middle', '@right-top',
14509 '@top-center', '@top-left', '@top-left-corner', '@top-right', '@top-right-corner'
14515 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14517 __webpack_require__.r(__webpack_exports__);
14518 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14519 /* harmony export */ "values": () => /* binding */ values,
14520 /* harmony export */ "isDefined": () => /* binding */ isDefined
14521 /* harmony export */ });
14522 /*---------------------------------------------------------------------------------------------
14523 * Copyright (c) Microsoft Corporation. All rights reserved.
14524 * Licensed under the MIT License. See License.txt in the project root for license information.
14525 *--------------------------------------------------------------------------------------------*/
14527 function values(obj) {
14528 return Object.keys(obj).map(function (key) { return obj[key]; });
14530 function isDefined(obj) {
14531 return typeof obj !== 'undefined';
14537 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14539 __webpack_require__.r(__webpack_exports__);
14540 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14541 /* harmony export */ "CSSCompletion": () => /* binding */ CSSCompletion
14542 /* harmony export */ });
14543 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
14544 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(103);
14545 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
14546 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(92);
14547 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(105);
14548 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94);
14549 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(101);
14550 /* harmony import */ var _pathCompletion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(108);
14551 /*---------------------------------------------------------------------------------------------
14552 * Copyright (c) Microsoft Corporation. All rights reserved.
14553 * Licensed under the MIT License. See License.txt in the project root for license information.
14554 *--------------------------------------------------------------------------------------------*/
14556 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
14557 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14558 return new (P || (P = Promise))(function (resolve, reject) {
14559 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14560 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
14561 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14562 step((generator = generator.apply(thisArg, _arguments || [])).next());
14565 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
14566 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
14567 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14568 function verb(n) { return function (v) { return step([n, v]); }; }
14569 function step(op) {
14570 if (f) throw new TypeError("Generator is already executing.");
14572 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;
14573 if (y = 0, t) op = [op[0] & 2, t.value];
14575 case 0: case 1: t = op; break;
14576 case 4: _.label++; return { value: op[1], done: false };
14577 case 5: _.label++; y = op[1]; op = [0]; continue;
14578 case 7: op = _.ops.pop(); _.trys.pop(); continue;
14580 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
14581 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
14582 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
14583 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
14584 if (t[2]) _.ops.pop();
14585 _.trys.pop(); continue;
14587 op = body.call(thisArg, _);
14588 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
14589 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
14600 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();
14601 var SnippetFormat = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.InsertTextFormat.Snippet;
14603 (function (SortTexts) {
14604 // char code 32, comes before everything
14605 SortTexts["Enums"] = " ";
14606 SortTexts["Normal"] = "d";
14607 SortTexts["VendorPrefixed"] = "x";
14608 SortTexts["Term"] = "y";
14609 SortTexts["Variable"] = "z";
14610 })(SortTexts || (SortTexts = {}));
14611 var CSSCompletion = /** @class */ (function () {
14612 function CSSCompletion(variablePrefix, lsOptions, cssDataManager) {
14613 if (variablePrefix === void 0) { variablePrefix = null; }
14614 this.variablePrefix = variablePrefix;
14615 this.lsOptions = lsOptions;
14616 this.cssDataManager = cssDataManager;
14617 this.completionParticipants = [];
14619 CSSCompletion.prototype.configure = function (settings) {
14620 this.settings = settings;
14622 CSSCompletion.prototype.getSymbolContext = function () {
14623 if (!this.symbolContext) {
14624 this.symbolContext = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__.Symbols(this.styleSheet);
14626 return this.symbolContext;
14628 CSSCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
14629 this.completionParticipants = registeredCompletionParticipants || [];
14631 CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext) {
14632 return __awaiter(this, void 0, void 0, function () {
14633 var participant, contributedParticipants, result, pathCompletionResult;
14634 return __generator(this, function (_a) {
14635 switch (_a.label) {
14637 if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
14638 return [2 /*return*/, this.doComplete(document, position, styleSheet)];
14640 participant = new _pathCompletion__WEBPACK_IMPORTED_MODULE_5__.PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);
14641 contributedParticipants = this.completionParticipants;
14642 this.completionParticipants = [participant].concat(contributedParticipants);
14643 result = this.doComplete(document, position, styleSheet);
14646 _a.trys.push([1, , 3, 4]);
14647 return [4 /*yield*/, participant.computeCompletions(document, documentContext)];
14649 pathCompletionResult = _a.sent();
14650 return [2 /*return*/, {
14651 isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
14652 items: pathCompletionResult.items.concat(result.items)
14655 this.completionParticipants = contributedParticipants;
14656 return [7 /*endfinally*/];
14657 case 4: return [2 /*return*/];
14662 CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
14663 this.offset = document.offsetAt(position);
14664 this.position = position;
14665 this.currentWord = getCurrentWord(document, this.offset);
14666 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Position.create(this.position.line, this.position.character - this.currentWord.length), this.position);
14667 this.textDocument = document;
14668 this.styleSheet = styleSheet;
14670 var result = { isIncomplete: false, items: [] };
14671 this.nodePath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(this.styleSheet, this.offset);
14672 for (var i = this.nodePath.length - 1; i >= 0; i--) {
14673 var node = this.nodePath[i];
14674 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Property) {
14675 this.getCompletionsForDeclarationProperty(node.getParent(), result);
14677 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Expression) {
14678 if (node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Interpolation) {
14679 this.getVariableProposals(null, result);
14682 this.getCompletionsForExpression(node, result);
14685 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
14686 var parentRef = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Ruleset);
14688 if (parentRef.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference) {
14689 this.getCompletionsForExtendsReference(parentRef, node, result);
14692 var parentRuleSet = parentRef;
14693 this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result);
14697 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument) {
14698 this.getCompletionsForFunctionArgument(node, node.getParent(), result);
14700 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declarations) {
14701 this.getCompletionsForDeclarations(node, result);
14703 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.VariableDeclaration) {
14704 this.getCompletionsForVariableDeclaration(node, result);
14706 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
14707 this.getCompletionsForRuleSet(node, result);
14709 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Interpolation) {
14710 this.getCompletionsForInterpolation(node, result);
14712 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionDeclaration) {
14713 this.getCompletionsForFunctionDeclaration(node, result);
14715 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.MixinReference) {
14716 this.getCompletionsForMixinReference(node, result);
14718 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Function) {
14719 this.getCompletionsForFunctionArgument(null, node, result);
14721 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Supports) {
14722 this.getCompletionsForSupports(node, result);
14724 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
14725 this.getCompletionsForSupportsCondition(node, result);
14727 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ExtendsReference) {
14728 this.getCompletionsForExtendsReference(node, null, result);
14730 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.URILiteral) {
14731 this.getCompletionForUriLiteralValue(node, result);
14733 else if (node.parent === null) {
14734 this.getCompletionForTopLevel(result);
14736 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.StringLiteral && this.isImportPathParent(node.parent.type)) {
14737 this.getCompletionForImportPath(node, result);
14738 // } else if (node instanceof nodes.Variable) {
14739 // this.getCompletionsForVariableDeclaration()
14744 if (result.items.length > 0 || this.offset > node.offset) {
14745 return this.finalize(result);
14748 this.getCompletionsForStylesheet(result);
14749 if (result.items.length === 0) {
14750 if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) {
14751 this.getVariableProposals(null, result);
14754 return this.finalize(result);
14757 // don't hold on any state, clear symbolContext
14758 this.position = null;
14759 this.currentWord = null;
14760 this.textDocument = null;
14761 this.styleSheet = null;
14762 this.symbolContext = null;
14763 this.defaultReplaceRange = null;
14764 this.nodePath = null;
14767 CSSCompletion.prototype.isImportPathParent = function (type) {
14768 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Import;
14770 CSSCompletion.prototype.finalize = function (result) {
14773 CSSCompletion.prototype.findInNodePath = function () {
14775 for (var _i = 0; _i < arguments.length; _i++) {
14776 types[_i] = arguments[_i];
14778 for (var i = this.nodePath.length - 1; i >= 0; i--) {
14779 var node = this.nodePath[i];
14780 if (types.indexOf(node.type) !== -1) {
14786 CSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
14787 return this.getPropertyProposals(declaration, result);
14789 CSSCompletion.prototype.getPropertyProposals = function (declaration, result) {
14791 var triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled;
14792 var completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled;
14793 var properties = this.cssDataManager.getProperties();
14794 properties.forEach(function (entry) {
14797 var retrigger = false;
14799 range = _this.getCompletionRange(declaration.getProperty());
14800 insertText = entry.name;
14801 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition)) {
14802 insertText += ': ';
14807 range = _this.getCompletionRange(null);
14808 insertText = entry.name + ': ';
14811 // Empty .selector { | } case
14812 if (!declaration && completePropertyWithSemicolon) {
14813 insertText += '$0;';
14815 // Cases such as .selector { p; } or .selector { p:; }
14816 if (declaration && !declaration.semicolonPosition) {
14817 if (completePropertyWithSemicolon && _this.offset >= _this.textDocument.offsetAt(range.end)) {
14818 insertText += '$0;';
14823 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
14824 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemTag.Deprecated] : [],
14825 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(range, insertText),
14826 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.InsertTextFormat.Snippet,
14827 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Property
14829 if (!entry.restrictions) {
14832 if (triggerPropertyValueCompletion && retrigger) {
14835 command: 'editor.action.triggerSuggest'
14838 var relevance = typeof entry.relevance === 'number' ? Math.min(Math.max(entry.relevance, 0), 99) : 50;
14839 var sortTextSuffix = (255 - relevance).toString(16);
14840 var sortTextPrefix = _utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(entry.name, '-') ? SortTexts.VendorPrefixed : SortTexts.Normal;
14841 item.sortText = sortTextPrefix + '_' + sortTextSuffix;
14842 result.items.push(item);
14844 this.completionParticipants.forEach(function (participant) {
14845 if (participant.onCssProperty) {
14846 participant.onCssProperty({
14847 propertyName: _this.currentWord,
14848 range: _this.defaultReplaceRange
14854 Object.defineProperty(CSSCompletion.prototype, "isTriggerPropertyValueCompletionEnabled", {
14856 if (!this.settings ||
14857 !this.settings.completion ||
14858 this.settings.completion.triggerPropertyValueCompletion === undefined) {
14861 return this.settings.completion.triggerPropertyValueCompletion;
14866 Object.defineProperty(CSSCompletion.prototype, "isCompletePropertyWithSemicolonEnabled", {
14868 if (!this.settings ||
14869 !this.settings.completion ||
14870 this.settings.completion.completePropertyWithSemicolon === undefined) {
14873 return this.settings.completion.completePropertyWithSemicolon;
14878 CSSCompletion.prototype.getCompletionsForDeclarationValue = function (node, result) {
14880 var propertyName = node.getFullPropertyName();
14881 var entry = this.cssDataManager.getProperty(propertyName);
14882 var existingNode = node.getValue() || null;
14883 while (existingNode && existingNode.hasChildren()) {
14884 existingNode = existingNode.findChildAtOffset(this.offset, false);
14886 this.completionParticipants.forEach(function (participant) {
14887 if (participant.onCssPropertyValue) {
14888 participant.onCssPropertyValue({
14889 propertyName: propertyName,
14890 propertyValue: _this.currentWord,
14891 range: _this.getCompletionRange(existingNode)
14896 if (entry.restrictions) {
14897 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
14898 var restriction = _a[_i];
14899 switch (restriction) {
14901 this.getColorProposals(entry, existingNode, result);
14904 this.getPositionProposals(entry, existingNode, result);
14907 this.getRepeatStyleProposals(entry, existingNode, result);
14910 this.getLineStyleProposals(entry, existingNode, result);
14913 this.getLineWidthProposals(entry, existingNode, result);
14915 case 'geometry-box':
14916 this.getGeometryBoxProposals(entry, existingNode, result);
14919 this.getBoxProposals(entry, existingNode, result);
14922 this.getImageProposals(entry, existingNode, result);
14924 case 'timing-function':
14925 this.getTimingFunctionProposals(entry, existingNode, result);
14928 this.getBasicShapeProposals(entry, existingNode, result);
14933 this.getValueEnumProposals(entry, existingNode, result);
14934 this.getCSSWideKeywordProposals(entry, existingNode, result);
14935 this.getUnitProposals(entry, existingNode, result);
14938 var existingValues = collectValues(this.styleSheet, node);
14939 for (var _b = 0, _c = existingValues.getEntries(); _b < _c.length; _b++) {
14940 var existingValue = _c[_b];
14941 result.items.push({
14942 label: existingValue,
14943 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), existingValue),
14944 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
14948 this.getVariableProposals(existingNode, result);
14949 this.getTermProposals(entry, existingNode, result);
14952 CSSCompletion.prototype.getValueEnumProposals = function (entry, existingNode, result) {
14953 if (entry.values) {
14954 for (var _i = 0, _a = entry.values; _i < _a.length; _i++) {
14955 var value = _a[_i];
14956 var insertString = value.name;
14957 var insertTextFormat = void 0;
14958 if (_utils_strings__WEBPACK_IMPORTED_MODULE_7__.endsWith(insertString, ')')) {
14959 var from = insertString.lastIndexOf('(');
14961 insertString = insertString.substr(0, from) + '($1)';
14962 insertTextFormat = SnippetFormat;
14965 var sortText = SortTexts.Enums;
14966 if (_utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(value.name, '-')) {
14967 sortText += SortTexts.VendorPrefixed;
14971 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(value, this.doesSupportMarkdown()),
14972 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemTag.Deprecated] : [],
14973 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertString),
14974 sortText: sortText,
14975 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value,
14976 insertTextFormat: insertTextFormat
14978 result.items.push(item);
14983 CSSCompletion.prototype.getCSSWideKeywordProposals = function (entry, existingNode, result) {
14984 for (var keywords in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords) {
14985 result.items.push({
14987 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords[keywords],
14988 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), keywords),
14989 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
14994 CSSCompletion.prototype.getCompletionsForInterpolation = function (node, result) {
14995 if (this.offset >= node.offset + 2) {
14996 this.getVariableProposals(null, result);
15000 CSSCompletion.prototype.getVariableProposals = function (existingNode, result) {
15001 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15002 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
15003 var symbol = symbols_1[_i];
15004 var insertText = _utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(symbol.name, '--') ? "var(" + symbol.name + ")" : symbol.name;
15005 var completionItem = {
15006 label: symbol.name,
15007 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_7__.getLimitedString(symbol.value) : symbol.value,
15008 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15009 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Variable,
15010 sortText: SortTexts.Variable
15012 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15013 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Color;
15015 if (symbol.node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionParameter) {
15016 var mixinNode = (symbol.node.getParent());
15017 if (mixinNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration) {
15018 completionItem.detail = localize('completion.argument', 'argument from \'{0}\'', mixinNode.getName());
15021 result.items.push(completionItem);
15025 CSSCompletion.prototype.getVariableProposalsForCSSVarFunction = function (result) {
15026 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15027 symbols = symbols.filter(function (symbol) {
15028 return _utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(symbol.name, '--');
15030 for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
15031 var symbol = symbols_2[_i];
15032 var completionItem = {
15033 label: symbol.name,
15034 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_7__.getLimitedString(symbol.value) : symbol.value,
15035 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(null), symbol.name),
15036 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Variable
15038 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15039 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Color;
15041 result.items.push(completionItem);
15045 CSSCompletion.prototype.getUnitProposals = function (entry, existingNode, result) {
15046 var currentWord = '0';
15047 if (this.currentWord.length > 0) {
15048 var numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
15050 currentWord = numMatch[0];
15051 result.isIncomplete = currentWord.length === this.currentWord.length;
15054 else if (this.currentWord.length === 0) {
15055 result.isIncomplete = true;
15057 if (existingNode && existingNode.parent && existingNode.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
15058 existingNode = existingNode.getParent(); // include the unary operator
15060 if (entry.restrictions) {
15061 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
15062 var restriction = _a[_i];
15063 var units = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.units[restriction];
15065 for (var _b = 0, units_1 = units; _b < units_1.length; _b++) {
15066 var unit = units_1[_b];
15067 var insertText = currentWord + unit;
15068 result.items.push({
15070 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15071 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Unit
15079 CSSCompletion.prototype.getCompletionRange = function (existingNode) {
15080 if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) {
15081 var end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position;
15082 var start = this.textDocument.positionAt(existingNode.offset);
15083 if (start.line === end.line) {
15084 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(start, end); // multi line edits are not allowed
15087 return this.defaultReplaceRange;
15089 CSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
15090 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors) {
15091 result.items.push({
15093 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors[color],
15094 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15095 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Color
15098 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorKeywords) {
15099 result.items.push({
15101 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorKeywords[color],
15102 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15103 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15106 var colorValues = new Set();
15107 this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset));
15108 for (var _i = 0, _a = colorValues.getEntries(); _i < _a.length; _i++) {
15109 var color = _a[_i];
15110 result.items.push({
15112 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15113 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Color
15116 var _loop_1 = function (p) {
15118 var replaceFunction = function (_match, p1) { return '${' + tabStop++ + ':' + p1 + '}'; };
15119 var insertText = p.func.replace(/\[?\$(\w+)\]?/g, replaceFunction);
15120 result.items.push({
15121 label: p.func.substr(0, p.func.indexOf('(')),
15123 documentation: p.desc,
15124 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this_1.getCompletionRange(existingNode), insertText),
15125 insertTextFormat: SnippetFormat,
15126 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function
15130 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorFunctions; _b < _c.length; _b++) {
15136 CSSCompletion.prototype.getPositionProposals = function (entry, existingNode, result) {
15137 for (var position in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.positionKeywords) {
15138 result.items.push({
15140 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.positionKeywords[position],
15141 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), position),
15142 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15147 CSSCompletion.prototype.getRepeatStyleProposals = function (entry, existingNode, result) {
15148 for (var repeat in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords) {
15149 result.items.push({
15151 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords[repeat],
15152 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), repeat),
15153 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15158 CSSCompletion.prototype.getLineStyleProposals = function (entry, existingNode, result) {
15159 for (var lineStyle in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords) {
15160 result.items.push({
15162 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords[lineStyle],
15163 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), lineStyle),
15164 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15169 CSSCompletion.prototype.getLineWidthProposals = function (entry, existingNode, result) {
15170 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineWidthKeywords; _i < _a.length; _i++) {
15171 var lineWidth = _a[_i];
15172 result.items.push({
15174 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), lineWidth),
15175 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15180 CSSCompletion.prototype.getGeometryBoxProposals = function (entry, existingNode, result) {
15181 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords) {
15182 result.items.push({
15184 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords[box],
15185 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), box),
15186 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15191 CSSCompletion.prototype.getBoxProposals = function (entry, existingNode, result) {
15192 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.boxKeywords) {
15193 result.items.push({
15195 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.boxKeywords[box],
15196 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), box),
15197 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Value
15202 CSSCompletion.prototype.getImageProposals = function (entry, existingNode, result) {
15203 for (var image in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.imageFunctions) {
15204 var insertText = moveCursorInsideParenthesis(image);
15205 result.items.push({
15207 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.imageFunctions[image],
15208 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15209 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15210 insertTextFormat: image !== insertText ? SnippetFormat : void 0
15215 CSSCompletion.prototype.getTimingFunctionProposals = function (entry, existingNode, result) {
15216 for (var timing in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions) {
15217 var insertText = moveCursorInsideParenthesis(timing);
15218 result.items.push({
15220 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions[timing],
15221 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15222 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15223 insertTextFormat: timing !== insertText ? SnippetFormat : void 0
15228 CSSCompletion.prototype.getBasicShapeProposals = function (entry, existingNode, result) {
15229 for (var shape in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions) {
15230 var insertText = moveCursorInsideParenthesis(shape);
15231 result.items.push({
15233 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions[shape],
15234 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15235 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15236 insertTextFormat: shape !== insertText ? SnippetFormat : void 0
15241 CSSCompletion.prototype.getCompletionsForStylesheet = function (result) {
15242 var node = this.styleSheet.findFirstChildBeforeOffset(this.offset);
15244 return this.getCompletionForTopLevel(result);
15246 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
15247 return this.getCompletionsForRuleSet(node, result);
15249 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Supports) {
15250 return this.getCompletionsForSupports(node, result);
15254 CSSCompletion.prototype.getCompletionForTopLevel = function (result) {
15256 this.cssDataManager.getAtDirectives().forEach(function (entry) {
15257 result.items.push({
15259 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(_this.getCompletionRange(null), entry.name),
15260 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
15261 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemTag.Deprecated] : [],
15262 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Keyword
15265 this.getCompletionsForSelector(null, false, result);
15268 CSSCompletion.prototype.getCompletionsForRuleSet = function (ruleSet, result) {
15269 var declarations = ruleSet.getDeclarations();
15270 var isAfter = declarations && declarations.endsWith('}') && this.offset >= declarations.end;
15272 return this.getCompletionForTopLevel(result);
15274 var isInSelectors = !declarations || this.offset <= declarations.offset;
15275 if (isInSelectors) {
15276 return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result);
15278 return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result);
15280 CSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
15282 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);
15283 if (!existingNode && this.offset - this.currentWord.length > 0 && this.textDocument.getText()[this.offset - this.currentWord.length - 1] === ':') {
15284 // after the ':' of a pseudo selector, no node generated for just ':'
15285 this.currentWord = ':' + this.currentWord;
15286 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Position.create(this.position.line, this.position.character - this.currentWord.length), this.position);
15288 var pseudoClasses = this.cssDataManager.getPseudoClasses();
15289 pseudoClasses.forEach(function (entry) {
15290 var insertText = moveCursorInsideParenthesis(entry.name);
15293 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(_this.getCompletionRange(existingNode), insertText),
15294 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
15295 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemTag.Deprecated] : [],
15296 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15297 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
15299 if (_utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(entry.name, ':-')) {
15300 item.sortText = SortTexts.VendorPrefixed;
15302 result.items.push(item);
15304 var pseudoElements = this.cssDataManager.getPseudoElements();
15305 pseudoElements.forEach(function (entry) {
15306 var insertText = moveCursorInsideParenthesis(entry.name);
15309 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(_this.getCompletionRange(existingNode), insertText),
15310 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
15311 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemTag.Deprecated] : [],
15312 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15313 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
15315 if (_utils_strings__WEBPACK_IMPORTED_MODULE_7__.startsWith(entry.name, '::-')) {
15316 item.sortText = SortTexts.VendorPrefixed;
15318 result.items.push(item);
15320 if (!isNested) { // show html tags only for top level
15321 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.html5Tags; _i < _a.length; _i++) {
15322 var entry = _a[_i];
15323 result.items.push({
15325 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), entry),
15326 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Keyword
15329 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.svgElements; _b < _c.length; _b++) {
15330 var entry = _c[_b];
15331 result.items.push({
15333 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), entry),
15334 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Keyword
15339 visited[this.currentWord] = true;
15340 var docText = this.textDocument.getText();
15341 this.styleSheet.accept(function (n) {
15342 if (n.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SimpleSelector && n.length > 0) {
15343 var selector = docText.substr(n.offset, n.length);
15344 if (selector.charAt(0) === '.' && !visited[selector]) {
15345 visited[selector] = true;
15346 result.items.push({
15348 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(_this.getCompletionRange(existingNode), selector),
15349 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Keyword
15356 if (ruleSet && ruleSet.isNested()) {
15357 var selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset);
15358 if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) {
15359 this.getPropertyProposals(null, result);
15364 CSSCompletion.prototype.getCompletionsForDeclarations = function (declarations, result) {
15365 if (!declarations || this.offset === declarations.offset) { // incomplete nodes
15368 var node = declarations.findFirstChildBeforeOffset(this.offset);
15370 return this.getCompletionsForDeclarationProperty(null, result);
15372 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.AbstractDeclaration) {
15373 var declaration = node;
15374 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition) || this.offset <= declaration.colonPosition) {
15375 // complete property
15376 return this.getCompletionsForDeclarationProperty(declaration, result);
15378 else if (((0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset)) {
15379 if (this.offset === declaration.semicolonPosition + 1) {
15380 return result; // don't show new properties right after semicolon (see Bug 15421:[intellisense] [css] Be less aggressive when manually typing CSS)
15382 // complete next property
15383 return this.getCompletionsForDeclarationProperty(null, result);
15385 if (declaration instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
15387 return this.getCompletionsForDeclarationValue(declaration, result);
15390 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ExtendsReference) {
15391 this.getCompletionsForExtendsReference(node, null, result);
15393 else if (this.currentWord && this.currentWord[0] === '@') {
15394 this.getCompletionsForDeclarationProperty(null, result);
15396 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
15397 this.getCompletionsForDeclarationProperty(null, result);
15401 CSSCompletion.prototype.getCompletionsForVariableDeclaration = function (declaration, result) {
15402 if (this.offset && (0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition) && this.offset > declaration.colonPosition) {
15403 this.getVariableProposals(declaration.getValue(), result);
15407 CSSCompletion.prototype.getCompletionsForExpression = function (expression, result) {
15408 var parent = expression.getParent();
15409 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument) {
15410 this.getCompletionsForFunctionArgument(parent, parent.getParent(), result);
15413 var declaration = expression.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Declaration);
15414 if (!declaration) {
15415 this.getTermProposals(undefined, null, result);
15418 var node = expression.findChildAtOffset(this.offset, true);
15420 return this.getCompletionsForDeclarationValue(declaration, result);
15422 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NumericValue || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Identifier) {
15423 return this.getCompletionsForDeclarationValue(declaration, result);
15427 CSSCompletion.prototype.getCompletionsForFunctionArgument = function (arg, func, result) {
15428 var identifier = func.getIdentifier();
15429 if (identifier && identifier.matches('var')) {
15430 if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) {
15431 this.getVariableProposalsForCSSVarFunction(result);
15436 CSSCompletion.prototype.getCompletionsForFunctionDeclaration = function (decl, result) {
15437 var declarations = decl.getDeclarations();
15438 if (declarations && this.offset > declarations.offset && this.offset < declarations.end) {
15439 this.getTermProposals(undefined, null, result);
15443 CSSCompletion.prototype.getCompletionsForMixinReference = function (ref, result) {
15445 var allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Mixin);
15446 for (var _i = 0, allMixins_1 = allMixins; _i < allMixins_1.length; _i++) {
15447 var mixinSymbol = allMixins_1[_i];
15448 if (mixinSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.MixinDeclaration) {
15449 result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null));
15452 var identifierNode = ref.getIdentifier() || null;
15453 this.completionParticipants.forEach(function (participant) {
15454 if (participant.onCssMixinReference) {
15455 participant.onCssMixinReference({
15456 mixinName: _this.currentWord,
15457 range: _this.getCompletionRange(identifierNode)
15463 CSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
15464 var allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function);
15465 for (var _i = 0, allFunctions_1 = allFunctions; _i < allFunctions_1.length; _i++) {
15466 var functionSymbol = allFunctions_1[_i];
15467 if (functionSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionDeclaration) {
15468 result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode));
15473 CSSCompletion.prototype.makeTermProposal = function (symbol, parameters, existingNode) {
15474 var decl = symbol.node;
15475 var params = parameters.getChildren().map(function (c) {
15476 return (c instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionParameter) ? c.getName() : c.getText();
15478 var insertText = symbol.name + '(' + params.map(function (p, index) { return '${' + (index + 1) + ':' + p + '}'; }).join(', ') + ')';
15480 label: symbol.name,
15481 detail: symbol.name + '(' + params.join(', ') + ')',
15482 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15483 insertTextFormat: SnippetFormat,
15484 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CompletionItemKind.Function,
15485 sortText: SortTexts.Term
15488 CSSCompletion.prototype.getCompletionsForSupportsCondition = function (supportsCondition, result) {
15489 var child = supportsCondition.findFirstChildBeforeOffset(this.offset);
15491 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
15492 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(child.colonPosition) || this.offset <= child.colonPosition) {
15493 return this.getCompletionsForDeclarationProperty(child, result);
15496 return this.getCompletionsForDeclarationValue(child, result);
15499 else if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
15500 return this.getCompletionsForSupportsCondition(child, result);
15503 if ((0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) {
15504 return this.getCompletionsForDeclarationProperty(null, result);
15508 CSSCompletion.prototype.getCompletionsForSupports = function (supports, result) {
15509 var declarations = supports.getDeclarations();
15510 var inInCondition = !declarations || this.offset <= declarations.offset;
15511 if (inInCondition) {
15512 var child = supports.findFirstChildBeforeOffset(this.offset);
15513 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
15514 return this.getCompletionsForSupportsCondition(child, result);
15518 return this.getCompletionForTopLevel(result);
15520 CSSCompletion.prototype.getCompletionsForExtendsReference = function (extendsRef, existingNode, result) {
15523 CSSCompletion.prototype.getCompletionForUriLiteralValue = function (uriLiteralNode, result) {
15527 // No children, empty value
15528 if (!uriLiteralNode.hasChildren()) {
15530 position = this.position;
15531 var emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + 'url('.length);
15532 range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(emptyURIValuePosition, emptyURIValuePosition);
15535 var uriValueNode = uriLiteralNode.getChild(0);
15536 uriValue = uriValueNode.getText();
15537 position = this.position;
15538 range = this.getCompletionRange(uriValueNode);
15540 this.completionParticipants.forEach(function (participant) {
15541 if (participant.onCssURILiteralValue) {
15542 participant.onCssURILiteralValue({
15543 uriValue: uriValue,
15544 position: position,
15551 CSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
15553 this.completionParticipants.forEach(function (participant) {
15554 if (participant.onCssImportPath) {
15555 participant.onCssImportPath({
15556 pathValue: importPathNode.getText(),
15557 position: _this.position,
15558 range: _this.getCompletionRange(importPathNode)
15564 CSSCompletion.prototype.doesSupportMarkdown = function () {
15566 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.supportsMarkdown)) {
15567 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.lsOptions.clientCapabilities)) {
15568 this.supportsMarkdown = true;
15569 return this.supportsMarkdown;
15571 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;
15572 this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.MarkupKind.Markdown) !== -1;
15574 return this.supportsMarkdown;
15576 return CSSCompletion;
15579 function isDeprecated(entry) {
15580 if (entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete')) {
15586 * Rank number should all be same length strings
15588 function computeRankNumber(n) {
15589 var nstr = n.toString();
15590 switch (nstr.length) {
15596 return '00' + nstr;
15598 return '000' + nstr;
15603 var Set = /** @class */ (function () {
15607 Set.prototype.add = function (entry) {
15608 this.entries[entry] = true;
15610 Set.prototype.getEntries = function () {
15611 return Object.keys(this.entries);
15615 function moveCursorInsideParenthesis(text) {
15616 return text.replace(/\(\)$/, "($1)");
15618 function collectValues(styleSheet, declaration) {
15619 var fullPropertyName = declaration.getFullPropertyName();
15620 var entries = new Set();
15621 function visitValue(node) {
15622 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) {
15623 entries.add(node.getText());
15627 function matchesProperty(decl) {
15628 var propertyName = decl.getFullPropertyName();
15629 return fullPropertyName === propertyName;
15631 function vistNode(node) {
15632 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration && node !== declaration) {
15633 if (matchesProperty(node)) {
15634 var value = node.getValue();
15636 value.accept(visitValue);
15642 styleSheet.accept(vistNode);
15645 var ColorValueCollector = /** @class */ (function () {
15646 function ColorValueCollector(entries, currentOffset) {
15647 this.entries = entries;
15648 this.currentOffset = currentOffset;
15651 ColorValueCollector.prototype.visitNode = function (node) {
15652 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))) {
15653 if (this.currentOffset < node.offset || node.end < this.currentOffset) {
15654 this.entries.add(node.getText());
15659 return ColorValueCollector;
15661 function getCurrentWord(document, offset) {
15662 var i = offset - 1;
15663 var text = document.getText();
15664 while (i >= 0 && ' \t\n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) {
15667 return text.substring(i + 1, offset);
15669 function isColorString(s) {
15670 // From https://stackoverflow.com/questions/8027423/how-to-check-if-a-string-is-a-valid-hex-color-representation/8027444
15671 return (s.toLowerCase() in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors) || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(s);
15677 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15679 __webpack_require__.r(__webpack_exports__);
15680 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15681 /* harmony export */ "Scope": () => /* binding */ Scope,
15682 /* harmony export */ "GlobalScope": () => /* binding */ GlobalScope,
15683 /* harmony export */ "Symbol": () => /* binding */ Symbol,
15684 /* harmony export */ "ScopeBuilder": () => /* binding */ ScopeBuilder,
15685 /* harmony export */ "Symbols": () => /* binding */ Symbols
15686 /* harmony export */ });
15687 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
15688 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
15689 /*---------------------------------------------------------------------------------------------
15690 * Copyright (c) Microsoft Corporation. All rights reserved.
15691 * Licensed under the MIT License. See License.txt in the project root for license information.
15692 *--------------------------------------------------------------------------------------------*/
15694 var __extends = (undefined && undefined.__extends) || (function () {
15695 var extendStatics = function (d, b) {
15696 extendStatics = Object.setPrototypeOf ||
15697 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15698 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
15699 return extendStatics(d, b);
15701 return function (d, b) {
15702 extendStatics(d, b);
15703 function __() { this.constructor = d; }
15704 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15709 var Scope = /** @class */ (function () {
15710 function Scope(offset, length) {
15711 this.offset = offset;
15712 this.length = length;
15714 this.parent = null;
15715 this.children = [];
15717 Scope.prototype.addChild = function (scope) {
15718 this.children.push(scope);
15719 scope.setParent(this);
15721 Scope.prototype.setParent = function (scope) {
15722 this.parent = scope;
15724 Scope.prototype.findScope = function (offset, length) {
15725 if (length === void 0) { length = 0; }
15726 if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) {
15727 return this.findInScope(offset, length);
15731 Scope.prototype.findInScope = function (offset, length) {
15732 if (length === void 0) { length = 0; }
15733 // find the first scope child that has an offset larger than offset + length
15734 var end = offset + length;
15735 var idx = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_1__.findFirst)(this.children, function (s) { return s.offset > end; });
15737 // all scopes have offsets larger than our end
15740 var res = this.children[idx - 1];
15741 if (res.offset <= offset && res.offset + res.length >= offset + length) {
15742 return res.findInScope(offset, length);
15746 Scope.prototype.addSymbol = function (symbol) {
15747 this.symbols.push(symbol);
15749 Scope.prototype.getSymbol = function (name, type) {
15750 for (var index = 0; index < this.symbols.length; index++) {
15751 var symbol = this.symbols[index];
15752 if (symbol.name === name && symbol.type === type) {
15758 Scope.prototype.getSymbols = function () {
15759 return this.symbols;
15764 var GlobalScope = /** @class */ (function (_super) {
15765 __extends(GlobalScope, _super);
15766 function GlobalScope() {
15767 return _super.call(this, 0, Number.MAX_VALUE) || this;
15769 return GlobalScope;
15772 var Symbol = /** @class */ (function () {
15773 function Symbol(name, value, node, type) {
15775 this.value = value;
15782 var ScopeBuilder = /** @class */ (function () {
15783 function ScopeBuilder(scope) {
15784 this.scope = scope;
15786 ScopeBuilder.prototype.addSymbol = function (node, name, value, type) {
15787 if (node.offset !== -1) {
15788 var current = this.scope.findScope(node.offset, node.length);
15790 current.addSymbol(new Symbol(name, value, node, type));
15794 ScopeBuilder.prototype.addScope = function (node) {
15795 if (node.offset !== -1) {
15796 var current = this.scope.findScope(node.offset, node.length);
15797 if (current && (current.offset !== node.offset || current.length !== node.length)) { // scope already known?
15798 var newScope = new Scope(node.offset, node.length);
15799 current.addChild(newScope);
15806 ScopeBuilder.prototype.addSymbolToChildScope = function (scopeNode, node, name, value, type) {
15807 if (scopeNode && scopeNode.offset !== -1) {
15808 var current = this.addScope(scopeNode); // create the scope or gets the existing one
15810 current.addSymbol(new Symbol(name, value, node, type));
15814 ScopeBuilder.prototype.visitNode = function (node) {
15815 switch (node.type) {
15816 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Keyframe:
15817 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Keyframe);
15819 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.CustomPropertyDeclaration:
15820 return this.visitCustomPropertyDeclarationNode(node);
15821 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.VariableDeclaration:
15822 return this.visitVariableDeclarationNode(node);
15823 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Ruleset:
15824 return this.visitRuleSet(node);
15825 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
15826 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Mixin);
15828 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionDeclaration:
15829 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function);
15831 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionParameter: {
15832 return this.visitFunctionParameterNode(node);
15834 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Declarations:
15835 this.addScope(node);
15837 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.For:
15838 var forNode = node;
15839 var scopeNode = forNode.getDeclarations();
15840 if (scopeNode && forNode.variable) {
15841 this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15844 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Each: {
15845 var eachNode = node;
15846 var scopeNode_1 = eachNode.getDeclarations();
15848 var variables = eachNode.getVariables().getChildren();
15849 for (var _i = 0, variables_1 = variables; _i < variables_1.length; _i++) {
15850 var variable = variables_1[_i];
15851 this.addSymbolToChildScope(scopeNode_1, variable, variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15859 ScopeBuilder.prototype.visitRuleSet = function (node) {
15860 var current = this.scope.findScope(node.offset, node.length);
15862 for (var _i = 0, _a = node.getSelectors().getChildren(); _i < _a.length; _i++) {
15863 var child = _a[_i];
15864 if (child instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Selector) {
15865 if (child.getChildren().length === 1) { // only selectors with a single element can be extended
15866 current.addSymbol(new Symbol(child.getChild(0).getText(), void 0, child, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Rule));
15873 ScopeBuilder.prototype.visitVariableDeclarationNode = function (node) {
15874 var value = node.getValue() ? node.getValue().getText() : void 0;
15875 this.addSymbol(node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15878 ScopeBuilder.prototype.visitFunctionParameterNode = function (node) {
15879 // parameters are part of the body scope
15880 var scopeNode = node.getParent().getDeclarations();
15882 var valueNode = node.getDefaultValue();
15883 var value = valueNode ? valueNode.getText() : void 0;
15884 this.addSymbolToChildScope(scopeNode, node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15888 ScopeBuilder.prototype.visitCustomPropertyDeclarationNode = function (node) {
15889 var value = node.getValue() ? node.getValue().getText() : '';
15890 this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15893 ScopeBuilder.prototype.addCSSVariable = function (node, name, value, type) {
15894 if (node.offset !== -1) {
15895 this.scope.addSymbol(new Symbol(name, value, node, type));
15898 return ScopeBuilder;
15901 var Symbols = /** @class */ (function () {
15902 function Symbols(node) {
15903 this.global = new GlobalScope();
15904 node.acceptVisitor(new ScopeBuilder(this.global));
15906 Symbols.prototype.findSymbolsAtOffset = function (offset, referenceType) {
15907 var scope = this.global.findScope(offset, 0);
15911 var symbols = scope.getSymbols();
15912 for (var i = 0; i < symbols.length; i++) {
15913 var symbol = symbols[i];
15914 if (symbol.type === referenceType && !names[symbol.name]) {
15915 result.push(symbol);
15916 names[symbol.name] = true;
15919 scope = scope.parent;
15923 Symbols.prototype.internalFindSymbol = function (node, referenceTypes) {
15924 var scopeNode = node;
15925 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionParameter && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.BodyDeclaration) {
15926 scopeNode = node.parent.getParent().getDeclarations();
15928 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Function) {
15929 var funcId = node.parent.getParent().getIdentifier();
15931 var functionSymbol = this.internalFindSymbol(funcId, [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function]);
15932 if (functionSymbol) {
15933 scopeNode = functionSymbol.node.getDeclarations();
15940 var name = node.getText();
15941 var scope = this.global.findScope(scopeNode.offset, scopeNode.length);
15943 for (var index = 0; index < referenceTypes.length; index++) {
15944 var type = referenceTypes[index];
15945 var symbol = scope.getSymbol(name, type);
15950 scope = scope.parent;
15954 Symbols.prototype.evaluateReferenceTypes = function (node) {
15955 if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Identifier) {
15956 var referenceTypes = node.referenceTypes;
15957 if (referenceTypes) {
15958 return referenceTypes;
15961 if (node.isCustomProperty) {
15962 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable];
15964 // are a reference to a keyframe?
15965 var decl = _cssNodes__WEBPACK_IMPORTED_MODULE_0__.getParentDeclaration(node);
15967 var propertyName = decl.getNonPrefixedPropertyName();
15968 if ((propertyName === 'animation' || propertyName === 'animation-name')
15969 && decl.getValue() && decl.getValue().offset === node.offset) {
15970 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Keyframe];
15975 else if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Variable) {
15976 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable];
15978 var selector = node.findAParent(_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Selector, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference);
15980 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Rule];
15984 Symbols.prototype.findSymbolFromNode = function (node) {
15988 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Interpolation) {
15989 node = node.getParent();
15991 var referenceTypes = this.evaluateReferenceTypes(node);
15992 if (referenceTypes) {
15993 return this.internalFindSymbol(node, referenceTypes);
15997 Symbols.prototype.matchesSymbol = function (node, symbol) {
16001 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Interpolation) {
16002 node = node.getParent();
16004 if (!node.matches(symbol.name)) {
16007 var referenceTypes = this.evaluateReferenceTypes(node);
16008 if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) {
16011 var nodeSymbol = this.internalFindSymbol(node, referenceTypes);
16012 return nodeSymbol === symbol;
16014 Symbols.prototype.findSymbol = function (name, type, offset) {
16015 var scope = this.global.findScope(offset);
16017 var symbol = scope.getSymbol(name, type);
16021 scope = scope.parent;
16032 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16034 __webpack_require__.r(__webpack_exports__);
16035 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16036 /* harmony export */ "findFirst": () => /* binding */ findFirst,
16037 /* harmony export */ "includes": () => /* binding */ includes,
16038 /* harmony export */ "union": () => /* binding */ union
16039 /* harmony export */ });
16040 /*---------------------------------------------------------------------------------------------
16041 * Copyright (c) Microsoft Corporation. All rights reserved.
16042 * Licensed under the MIT License. See License.txt in the project root for license information.
16043 *--------------------------------------------------------------------------------------------*/
16046 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
16047 * are located before all elements where p(x) is true.
16048 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
16050 function findFirst(array, p) {
16051 var low = 0, high = array.length;
16053 return 0; // no children
16055 while (low < high) {
16056 var mid = Math.floor((low + high) / 2);
16057 if (p(array[mid])) {
16066 function includes(array, item) {
16067 return array.indexOf(item) !== -1;
16071 for (var _i = 0; _i < arguments.length; _i++) {
16072 arrays[_i] = arguments[_i];
16075 for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
16076 var array = arrays_1[_a];
16077 for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
16078 var item = array_1[_b];
16079 if (!includes(result, item)) {
16090 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16092 __webpack_require__.r(__webpack_exports__);
16093 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16094 /* harmony export */ "TextDocument": () => /* reexport safe */ vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__.TextDocument,
16095 /* harmony export */ "CodeAction": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeAction,
16096 /* harmony export */ "CodeActionContext": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionContext,
16097 /* harmony export */ "CodeActionKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionKind,
16098 /* harmony export */ "CodeLens": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeLens,
16099 /* harmony export */ "Color": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Color,
16100 /* harmony export */ "ColorInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorInformation,
16101 /* harmony export */ "ColorPresentation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorPresentation,
16102 /* harmony export */ "Command": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Command,
16103 /* harmony export */ "CompletionItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItem,
16104 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind,
16105 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemTag,
16106 /* harmony export */ "CompletionList": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionList,
16107 /* harmony export */ "CreateFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CreateFile,
16108 /* harmony export */ "DeleteFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DeleteFile,
16109 /* harmony export */ "Diagnostic": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Diagnostic,
16110 /* harmony export */ "DiagnosticCode": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticCode,
16111 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticRelatedInformation,
16112 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticSeverity,
16113 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticTag,
16114 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlight,
16115 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind,
16116 /* harmony export */ "DocumentLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentLink,
16117 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentSymbol,
16118 /* harmony export */ "EOL": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.EOL,
16119 /* harmony export */ "FoldingRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRange,
16120 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind,
16121 /* harmony export */ "FormattingOptions": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FormattingOptions,
16122 /* harmony export */ "Hover": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Hover,
16123 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertReplaceEdit,
16124 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertTextFormat,
16125 /* harmony export */ "Location": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Location,
16126 /* harmony export */ "LocationLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.LocationLink,
16127 /* harmony export */ "MarkedString": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkedString,
16128 /* harmony export */ "MarkupContent": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupContent,
16129 /* harmony export */ "MarkupKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind,
16130 /* harmony export */ "ParameterInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ParameterInformation,
16131 /* harmony export */ "Position": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Position,
16132 /* harmony export */ "Range": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Range,
16133 /* harmony export */ "RenameFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.RenameFile,
16134 /* harmony export */ "SelectionRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SelectionRange,
16135 /* harmony export */ "SignatureInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SignatureInformation,
16136 /* harmony export */ "SymbolInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolInformation,
16137 /* harmony export */ "SymbolKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolKind,
16138 /* harmony export */ "SymbolTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolTag,
16139 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentEdit,
16140 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentIdentifier,
16141 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentItem,
16142 /* harmony export */ "TextEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextEdit,
16143 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.VersionedTextDocumentIdentifier,
16144 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceChange,
16145 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceEdit,
16146 /* harmony export */ "ClientCapabilities": () => /* binding */ ClientCapabilities,
16147 /* harmony export */ "FileType": () => /* binding */ FileType
16148 /* harmony export */ });
16149 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(106);
16150 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(107);
16151 /*---------------------------------------------------------------------------------------------
16152 * Copyright (c) Microsoft Corporation. All rights reserved.
16153 * Licensed under the MIT License. See License.txt in the project root for license information.
16154 *--------------------------------------------------------------------------------------------*/
16159 var ClientCapabilities;
16160 (function (ClientCapabilities) {
16161 ClientCapabilities.LATEST = {
16165 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
16169 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
16173 })(ClientCapabilities || (ClientCapabilities = {}));
16175 (function (FileType) {
16177 * The file type is unknown.
16179 FileType[FileType["Unknown"] = 0] = "Unknown";
16183 FileType[FileType["File"] = 1] = "File";
16187 FileType[FileType["Directory"] = 2] = "Directory";
16189 * A symbolic link to a file.
16191 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
16192 })(FileType || (FileType = {}));
16197 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16199 __webpack_require__.r(__webpack_exports__);
16200 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16201 /* harmony export */ "Position": () => /* binding */ Position,
16202 /* harmony export */ "Range": () => /* binding */ Range,
16203 /* harmony export */ "Location": () => /* binding */ Location,
16204 /* harmony export */ "LocationLink": () => /* binding */ LocationLink,
16205 /* harmony export */ "Color": () => /* binding */ Color,
16206 /* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
16207 /* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
16208 /* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
16209 /* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
16210 /* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
16211 /* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
16212 /* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
16213 /* harmony export */ "DiagnosticCode": () => /* binding */ DiagnosticCode,
16214 /* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
16215 /* harmony export */ "Command": () => /* binding */ Command,
16216 /* harmony export */ "TextEdit": () => /* binding */ TextEdit,
16217 /* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
16218 /* harmony export */ "CreateFile": () => /* binding */ CreateFile,
16219 /* harmony export */ "RenameFile": () => /* binding */ RenameFile,
16220 /* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
16221 /* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
16222 /* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
16223 /* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
16224 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
16225 /* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
16226 /* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
16227 /* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
16228 /* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
16229 /* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
16230 /* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
16231 /* harmony export */ "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
16232 /* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
16233 /* harmony export */ "CompletionList": () => /* binding */ CompletionList,
16234 /* harmony export */ "MarkedString": () => /* binding */ MarkedString,
16235 /* harmony export */ "Hover": () => /* binding */ Hover,
16236 /* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
16237 /* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
16238 /* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
16239 /* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
16240 /* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
16241 /* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
16242 /* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
16243 /* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
16244 /* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
16245 /* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
16246 /* harmony export */ "CodeAction": () => /* binding */ CodeAction,
16247 /* harmony export */ "CodeLens": () => /* binding */ CodeLens,
16248 /* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
16249 /* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
16250 /* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
16251 /* harmony export */ "EOL": () => /* binding */ EOL,
16252 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
16253 /* harmony export */ });
16254 /* --------------------------------------------------------------------------------------------
16255 * Copyright (c) Microsoft Corporation. All rights reserved.
16256 * Licensed under the MIT License. See License.txt in the project root for license information.
16257 * ------------------------------------------------------------------------------------------ */
16260 * The Position namespace provides helper functions to work with
16261 * [Position](#Position) literals.
16264 (function (Position) {
16266 * Creates a new Position literal from the given line and character.
16267 * @param line The position's line.
16268 * @param character The position's character.
16270 function create(line, character) {
16271 return { line: line, character: character };
16273 Position.create = create;
16275 * Checks whether the given liternal conforms to the [Position](#Position) interface.
16277 function is(value) {
16278 var candidate = value;
16279 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
16282 })(Position || (Position = {}));
16284 * The Range namespace provides helper functions to work with
16285 * [Range](#Range) literals.
16288 (function (Range) {
16289 function create(one, two, three, four) {
16290 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
16291 return { start: Position.create(one, two), end: Position.create(three, four) };
16293 else if (Position.is(one) && Position.is(two)) {
16294 return { start: one, end: two };
16297 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
16300 Range.create = create;
16302 * Checks whether the given literal conforms to the [Range](#Range) interface.
16304 function is(value) {
16305 var candidate = value;
16306 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
16309 })(Range || (Range = {}));
16311 * The Location namespace provides helper functions to work with
16312 * [Location](#Location) literals.
16315 (function (Location) {
16317 * Creates a Location literal.
16318 * @param uri The location's uri.
16319 * @param range The location's range.
16321 function create(uri, range) {
16322 return { uri: uri, range: range };
16324 Location.create = create;
16326 * Checks whether the given literal conforms to the [Location](#Location) interface.
16328 function is(value) {
16329 var candidate = value;
16330 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
16333 })(Location || (Location = {}));
16335 * The LocationLink namespace provides helper functions to work with
16336 * [LocationLink](#LocationLink) literals.
16339 (function (LocationLink) {
16341 * Creates a LocationLink literal.
16342 * @param targetUri The definition's uri.
16343 * @param targetRange The full range of the definition.
16344 * @param targetSelectionRange The span of the symbol definition at the target.
16345 * @param originSelectionRange The span of the symbol being defined in the originating source file.
16347 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
16348 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
16350 LocationLink.create = create;
16352 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
16354 function is(value) {
16355 var candidate = value;
16356 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
16357 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
16358 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
16360 LocationLink.is = is;
16361 })(LocationLink || (LocationLink = {}));
16363 * The Color namespace provides helper functions to work with
16364 * [Color](#Color) literals.
16367 (function (Color) {
16369 * Creates a new Color literal.
16371 function create(red, green, blue, alpha) {
16379 Color.create = create;
16381 * Checks whether the given literal conforms to the [Color](#Color) interface.
16383 function is(value) {
16384 var candidate = value;
16385 return Is.number(candidate.red)
16386 && Is.number(candidate.green)
16387 && Is.number(candidate.blue)
16388 && Is.number(candidate.alpha);
16391 })(Color || (Color = {}));
16393 * The ColorInformation namespace provides helper functions to work with
16394 * [ColorInformation](#ColorInformation) literals.
16396 var ColorInformation;
16397 (function (ColorInformation) {
16399 * Creates a new ColorInformation literal.
16401 function create(range, color) {
16407 ColorInformation.create = create;
16409 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
16411 function is(value) {
16412 var candidate = value;
16413 return Range.is(candidate.range) && Color.is(candidate.color);
16415 ColorInformation.is = is;
16416 })(ColorInformation || (ColorInformation = {}));
16418 * The Color namespace provides helper functions to work with
16419 * [ColorPresentation](#ColorPresentation) literals.
16421 var ColorPresentation;
16422 (function (ColorPresentation) {
16424 * Creates a new ColorInformation literal.
16426 function create(label, textEdit, additionalTextEdits) {
16429 textEdit: textEdit,
16430 additionalTextEdits: additionalTextEdits,
16433 ColorPresentation.create = create;
16435 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
16437 function is(value) {
16438 var candidate = value;
16439 return Is.string(candidate.label)
16440 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
16441 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
16443 ColorPresentation.is = is;
16444 })(ColorPresentation || (ColorPresentation = {}));
16446 * Enum of known range kinds
16448 var FoldingRangeKind;
16449 (function (FoldingRangeKind) {
16451 * Folding range for a comment
16453 FoldingRangeKind["Comment"] = "comment";
16455 * Folding range for a imports or includes
16457 FoldingRangeKind["Imports"] = "imports";
16459 * Folding range for a region (e.g. `#region`)
16461 FoldingRangeKind["Region"] = "region";
16462 })(FoldingRangeKind || (FoldingRangeKind = {}));
16464 * The folding range namespace provides helper functions to work with
16465 * [FoldingRange](#FoldingRange) literals.
16468 (function (FoldingRange) {
16470 * Creates a new FoldingRange literal.
16472 function create(startLine, endLine, startCharacter, endCharacter, kind) {
16474 startLine: startLine,
16477 if (Is.defined(startCharacter)) {
16478 result.startCharacter = startCharacter;
16480 if (Is.defined(endCharacter)) {
16481 result.endCharacter = endCharacter;
16483 if (Is.defined(kind)) {
16484 result.kind = kind;
16488 FoldingRange.create = create;
16490 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
16492 function is(value) {
16493 var candidate = value;
16494 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
16495 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
16496 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
16497 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
16499 FoldingRange.is = is;
16500 })(FoldingRange || (FoldingRange = {}));
16502 * The DiagnosticRelatedInformation namespace provides helper functions to work with
16503 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
16505 var DiagnosticRelatedInformation;
16506 (function (DiagnosticRelatedInformation) {
16508 * Creates a new DiagnosticRelatedInformation literal.
16510 function create(location, message) {
16512 location: location,
16516 DiagnosticRelatedInformation.create = create;
16518 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
16520 function is(value) {
16521 var candidate = value;
16522 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
16524 DiagnosticRelatedInformation.is = is;
16525 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
16527 * The diagnostic's severity.
16529 var DiagnosticSeverity;
16530 (function (DiagnosticSeverity) {
16532 * Reports an error.
16534 DiagnosticSeverity.Error = 1;
16536 * Reports a warning.
16538 DiagnosticSeverity.Warning = 2;
16540 * Reports an information.
16542 DiagnosticSeverity.Information = 3;
16546 DiagnosticSeverity.Hint = 4;
16547 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
16549 * The diagnostic tags.
16554 (function (DiagnosticTag) {
16556 * Unused or unnecessary code.
16558 * Clients are allowed to render diagnostics with this tag faded out instead of having
16559 * an error squiggle.
16561 DiagnosticTag.Unnecessary = 1;
16563 * Deprecated or obsolete code.
16565 * Clients are allowed to rendered diagnostics with this tag strike through.
16567 DiagnosticTag.Deprecated = 2;
16568 })(DiagnosticTag || (DiagnosticTag = {}));
16570 * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
16572 * @since 3.16.0 - Proposed state
16574 var DiagnosticCode;
16575 (function (DiagnosticCode) {
16577 * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
16579 function is(value) {
16580 var candidate = value;
16581 return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
16583 DiagnosticCode.is = is;
16584 })(DiagnosticCode || (DiagnosticCode = {}));
16586 * The Diagnostic namespace provides helper functions to work with
16587 * [Diagnostic](#Diagnostic) literals.
16590 (function (Diagnostic) {
16592 * Creates a new Diagnostic literal.
16594 function create(range, message, severity, code, source, relatedInformation) {
16595 var result = { range: range, message: message };
16596 if (Is.defined(severity)) {
16597 result.severity = severity;
16599 if (Is.defined(code)) {
16600 result.code = code;
16602 if (Is.defined(source)) {
16603 result.source = source;
16605 if (Is.defined(relatedInformation)) {
16606 result.relatedInformation = relatedInformation;
16610 Diagnostic.create = create;
16612 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
16614 function is(value) {
16615 var candidate = value;
16616 return Is.defined(candidate)
16617 && Range.is(candidate.range)
16618 && Is.string(candidate.message)
16619 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
16620 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
16621 && (Is.string(candidate.source) || Is.undefined(candidate.source))
16622 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
16624 Diagnostic.is = is;
16625 })(Diagnostic || (Diagnostic = {}));
16627 * The Command namespace provides helper functions to work with
16628 * [Command](#Command) literals.
16631 (function (Command) {
16633 * Creates a new Command literal.
16635 function create(title, command) {
16637 for (var _i = 2; _i < arguments.length; _i++) {
16638 args[_i - 2] = arguments[_i];
16640 var result = { title: title, command: command };
16641 if (Is.defined(args) && args.length > 0) {
16642 result.arguments = args;
16646 Command.create = create;
16648 * Checks whether the given literal conforms to the [Command](#Command) interface.
16650 function is(value) {
16651 var candidate = value;
16652 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
16655 })(Command || (Command = {}));
16657 * The TextEdit namespace provides helper function to create replace,
16658 * insert and delete edits more easily.
16661 (function (TextEdit) {
16663 * Creates a replace text edit.
16664 * @param range The range of text to be replaced.
16665 * @param newText The new text.
16667 function replace(range, newText) {
16668 return { range: range, newText: newText };
16670 TextEdit.replace = replace;
16672 * Creates a insert text edit.
16673 * @param position The position to insert the text at.
16674 * @param newText The text to be inserted.
16676 function insert(position, newText) {
16677 return { range: { start: position, end: position }, newText: newText };
16679 TextEdit.insert = insert;
16681 * Creates a delete text edit.
16682 * @param range The range of text to be deleted.
16684 function del(range) {
16685 return { range: range, newText: '' };
16687 TextEdit.del = del;
16688 function is(value) {
16689 var candidate = value;
16690 return Is.objectLiteral(candidate)
16691 && Is.string(candidate.newText)
16692 && Range.is(candidate.range);
16695 })(TextEdit || (TextEdit = {}));
16697 * The TextDocumentEdit namespace provides helper function to create
16698 * an edit that manipulates a text document.
16700 var TextDocumentEdit;
16701 (function (TextDocumentEdit) {
16703 * Creates a new `TextDocumentEdit`
16705 function create(textDocument, edits) {
16706 return { textDocument: textDocument, edits: edits };
16708 TextDocumentEdit.create = create;
16709 function is(value) {
16710 var candidate = value;
16711 return Is.defined(candidate)
16712 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
16713 && Array.isArray(candidate.edits);
16715 TextDocumentEdit.is = is;
16716 })(TextDocumentEdit || (TextDocumentEdit = {}));
16718 (function (CreateFile) {
16719 function create(uri, options) {
16724 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
16725 result.options = options;
16729 CreateFile.create = create;
16730 function is(value) {
16731 var candidate = value;
16732 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
16733 (candidate.options === void 0 ||
16734 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
16736 CreateFile.is = is;
16737 })(CreateFile || (CreateFile = {}));
16739 (function (RenameFile) {
16740 function create(oldUri, newUri, options) {
16746 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
16747 result.options = options;
16751 RenameFile.create = create;
16752 function is(value) {
16753 var candidate = value;
16754 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
16755 (candidate.options === void 0 ||
16756 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
16758 RenameFile.is = is;
16759 })(RenameFile || (RenameFile = {}));
16761 (function (DeleteFile) {
16762 function create(uri, options) {
16767 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
16768 result.options = options;
16772 DeleteFile.create = create;
16773 function is(value) {
16774 var candidate = value;
16775 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
16776 (candidate.options === void 0 ||
16777 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
16779 DeleteFile.is = is;
16780 })(DeleteFile || (DeleteFile = {}));
16782 (function (WorkspaceEdit) {
16783 function is(value) {
16784 var candidate = value;
16785 return candidate &&
16786 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
16787 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
16788 if (Is.string(change.kind)) {
16789 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
16792 return TextDocumentEdit.is(change);
16796 WorkspaceEdit.is = is;
16797 })(WorkspaceEdit || (WorkspaceEdit = {}));
16798 var TextEditChangeImpl = /** @class */ (function () {
16799 function TextEditChangeImpl(edits) {
16800 this.edits = edits;
16802 TextEditChangeImpl.prototype.insert = function (position, newText) {
16803 this.edits.push(TextEdit.insert(position, newText));
16805 TextEditChangeImpl.prototype.replace = function (range, newText) {
16806 this.edits.push(TextEdit.replace(range, newText));
16808 TextEditChangeImpl.prototype.delete = function (range) {
16809 this.edits.push(TextEdit.del(range));
16811 TextEditChangeImpl.prototype.add = function (edit) {
16812 this.edits.push(edit);
16814 TextEditChangeImpl.prototype.all = function () {
16817 TextEditChangeImpl.prototype.clear = function () {
16818 this.edits.splice(0, this.edits.length);
16820 return TextEditChangeImpl;
16823 * A workspace change helps constructing changes to a workspace.
16825 var WorkspaceChange = /** @class */ (function () {
16826 function WorkspaceChange(workspaceEdit) {
16828 this._textEditChanges = Object.create(null);
16829 if (workspaceEdit) {
16830 this._workspaceEdit = workspaceEdit;
16831 if (workspaceEdit.documentChanges) {
16832 workspaceEdit.documentChanges.forEach(function (change) {
16833 if (TextDocumentEdit.is(change)) {
16834 var textEditChange = new TextEditChangeImpl(change.edits);
16835 _this._textEditChanges[change.textDocument.uri] = textEditChange;
16839 else if (workspaceEdit.changes) {
16840 Object.keys(workspaceEdit.changes).forEach(function (key) {
16841 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
16842 _this._textEditChanges[key] = textEditChange;
16847 Object.defineProperty(WorkspaceChange.prototype, "edit", {
16849 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
16850 * use to be returned from a workspace edit operation like rename.
16853 if (this._workspaceEdit === undefined) {
16854 return { documentChanges: [] };
16856 return this._workspaceEdit;
16861 WorkspaceChange.prototype.getTextEditChange = function (key) {
16862 if (VersionedTextDocumentIdentifier.is(key)) {
16863 if (!this._workspaceEdit) {
16864 this._workspaceEdit = {
16865 documentChanges: []
16868 if (!this._workspaceEdit.documentChanges) {
16869 throw new Error('Workspace edit is not configured for document changes.');
16871 var textDocument = key;
16872 var result = this._textEditChanges[textDocument.uri];
16875 var textDocumentEdit = {
16876 textDocument: textDocument,
16879 this._workspaceEdit.documentChanges.push(textDocumentEdit);
16880 result = new TextEditChangeImpl(edits);
16881 this._textEditChanges[textDocument.uri] = result;
16886 if (!this._workspaceEdit) {
16887 this._workspaceEdit = {
16888 changes: Object.create(null)
16891 if (!this._workspaceEdit.changes) {
16892 throw new Error('Workspace edit is not configured for normal text edit changes.');
16894 var result = this._textEditChanges[key];
16897 this._workspaceEdit.changes[key] = edits;
16898 result = new TextEditChangeImpl(edits);
16899 this._textEditChanges[key] = result;
16904 WorkspaceChange.prototype.createFile = function (uri, options) {
16905 this.checkDocumentChanges();
16906 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
16908 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
16909 this.checkDocumentChanges();
16910 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
16912 WorkspaceChange.prototype.deleteFile = function (uri, options) {
16913 this.checkDocumentChanges();
16914 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
16916 WorkspaceChange.prototype.checkDocumentChanges = function () {
16917 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
16918 throw new Error('Workspace edit is not configured for document changes.');
16921 return WorkspaceChange;
16925 * The TextDocumentIdentifier namespace provides helper functions to work with
16926 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
16928 var TextDocumentIdentifier;
16929 (function (TextDocumentIdentifier) {
16931 * Creates a new TextDocumentIdentifier literal.
16932 * @param uri The document's uri.
16934 function create(uri) {
16935 return { uri: uri };
16937 TextDocumentIdentifier.create = create;
16939 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
16941 function is(value) {
16942 var candidate = value;
16943 return Is.defined(candidate) && Is.string(candidate.uri);
16945 TextDocumentIdentifier.is = is;
16946 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
16948 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
16949 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
16951 var VersionedTextDocumentIdentifier;
16952 (function (VersionedTextDocumentIdentifier) {
16954 * Creates a new VersionedTextDocumentIdentifier literal.
16955 * @param uri The document's uri.
16956 * @param uri The document's text.
16958 function create(uri, version) {
16959 return { uri: uri, version: version };
16961 VersionedTextDocumentIdentifier.create = create;
16963 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
16965 function is(value) {
16966 var candidate = value;
16967 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
16969 VersionedTextDocumentIdentifier.is = is;
16970 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
16972 * The TextDocumentItem namespace provides helper functions to work with
16973 * [TextDocumentItem](#TextDocumentItem) literals.
16975 var TextDocumentItem;
16976 (function (TextDocumentItem) {
16978 * Creates a new TextDocumentItem literal.
16979 * @param uri The document's uri.
16980 * @param languageId The document's language identifier.
16981 * @param version The document's version number.
16982 * @param text The document's text.
16984 function create(uri, languageId, version, text) {
16985 return { uri: uri, languageId: languageId, version: version, text: text };
16987 TextDocumentItem.create = create;
16989 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
16991 function is(value) {
16992 var candidate = value;
16993 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
16995 TextDocumentItem.is = is;
16996 })(TextDocumentItem || (TextDocumentItem = {}));
16998 * Describes the content type that a client supports in various
16999 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
17001 * Please note that `MarkupKinds` must not start with a `$`. This kinds
17002 * are reserved for internal usage.
17005 (function (MarkupKind) {
17007 * Plain text is supported as a content format
17009 MarkupKind.PlainText = 'plaintext';
17011 * Markdown is supported as a content format
17013 MarkupKind.Markdown = 'markdown';
17014 })(MarkupKind || (MarkupKind = {}));
17015 (function (MarkupKind) {
17017 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
17019 function is(value) {
17020 var candidate = value;
17021 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
17023 MarkupKind.is = is;
17024 })(MarkupKind || (MarkupKind = {}));
17026 (function (MarkupContent) {
17028 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
17030 function is(value) {
17031 var candidate = value;
17032 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
17034 MarkupContent.is = is;
17035 })(MarkupContent || (MarkupContent = {}));
17037 * The kind of a completion entry.
17039 var CompletionItemKind;
17040 (function (CompletionItemKind) {
17041 CompletionItemKind.Text = 1;
17042 CompletionItemKind.Method = 2;
17043 CompletionItemKind.Function = 3;
17044 CompletionItemKind.Constructor = 4;
17045 CompletionItemKind.Field = 5;
17046 CompletionItemKind.Variable = 6;
17047 CompletionItemKind.Class = 7;
17048 CompletionItemKind.Interface = 8;
17049 CompletionItemKind.Module = 9;
17050 CompletionItemKind.Property = 10;
17051 CompletionItemKind.Unit = 11;
17052 CompletionItemKind.Value = 12;
17053 CompletionItemKind.Enum = 13;
17054 CompletionItemKind.Keyword = 14;
17055 CompletionItemKind.Snippet = 15;
17056 CompletionItemKind.Color = 16;
17057 CompletionItemKind.File = 17;
17058 CompletionItemKind.Reference = 18;
17059 CompletionItemKind.Folder = 19;
17060 CompletionItemKind.EnumMember = 20;
17061 CompletionItemKind.Constant = 21;
17062 CompletionItemKind.Struct = 22;
17063 CompletionItemKind.Event = 23;
17064 CompletionItemKind.Operator = 24;
17065 CompletionItemKind.TypeParameter = 25;
17066 })(CompletionItemKind || (CompletionItemKind = {}));
17068 * Defines whether the insert text in a completion item should be interpreted as
17069 * plain text or a snippet.
17071 var InsertTextFormat;
17072 (function (InsertTextFormat) {
17074 * The primary text to be inserted is treated as a plain string.
17076 InsertTextFormat.PlainText = 1;
17078 * The primary text to be inserted is treated as a snippet.
17080 * A snippet can define tab stops and placeholders with `$1`, `$2`
17081 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
17082 * the end of the snippet. Placeholders with equal identifiers are linked,
17083 * that is typing in one will update others too.
17085 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
17087 InsertTextFormat.Snippet = 2;
17088 })(InsertTextFormat || (InsertTextFormat = {}));
17090 * Completion item tags are extra annotations that tweak the rendering of a completion
17095 var CompletionItemTag;
17096 (function (CompletionItemTag) {
17098 * Render a completion as obsolete, usually using a strike-out.
17100 CompletionItemTag.Deprecated = 1;
17101 })(CompletionItemTag || (CompletionItemTag = {}));
17103 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
17105 * @since 3.16.0 - Proposed state
17107 var InsertReplaceEdit;
17108 (function (InsertReplaceEdit) {
17110 * Creates a new insert / replace edit
17112 function create(newText, insert, replace) {
17113 return { newText: newText, insert: insert, replace: replace };
17115 InsertReplaceEdit.create = create;
17117 * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
17119 function is(value) {
17120 var candidate = value;
17121 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
17123 InsertReplaceEdit.is = is;
17124 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
17126 * The CompletionItem namespace provides functions to deal with
17127 * completion items.
17129 var CompletionItem;
17130 (function (CompletionItem) {
17132 * Create a completion item and seed it with a label.
17133 * @param label The completion item's label
17135 function create(label) {
17136 return { label: label };
17138 CompletionItem.create = create;
17139 })(CompletionItem || (CompletionItem = {}));
17141 * The CompletionList namespace provides functions to deal with
17142 * completion lists.
17144 var CompletionList;
17145 (function (CompletionList) {
17147 * Creates a new completion list.
17149 * @param items The completion items.
17150 * @param isIncomplete The list is not complete.
17152 function create(items, isIncomplete) {
17153 return { items: items ? items : [], isIncomplete: !!isIncomplete };
17155 CompletionList.create = create;
17156 })(CompletionList || (CompletionList = {}));
17158 (function (MarkedString) {
17160 * Creates a marked string from plain text.
17162 * @param plainText The plain text.
17164 function fromPlainText(plainText) {
17165 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
17167 MarkedString.fromPlainText = fromPlainText;
17169 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
17171 function is(value) {
17172 var candidate = value;
17173 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
17175 MarkedString.is = is;
17176 })(MarkedString || (MarkedString = {}));
17178 (function (Hover) {
17180 * Checks whether the given value conforms to the [Hover](#Hover) interface.
17182 function is(value) {
17183 var candidate = value;
17184 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
17185 MarkedString.is(candidate.contents) ||
17186 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
17189 })(Hover || (Hover = {}));
17191 * The ParameterInformation namespace provides helper functions to work with
17192 * [ParameterInformation](#ParameterInformation) literals.
17194 var ParameterInformation;
17195 (function (ParameterInformation) {
17197 * Creates a new parameter information literal.
17199 * @param label A label string.
17200 * @param documentation A doc string.
17202 function create(label, documentation) {
17203 return documentation ? { label: label, documentation: documentation } : { label: label };
17205 ParameterInformation.create = create;
17206 })(ParameterInformation || (ParameterInformation = {}));
17208 * The SignatureInformation namespace provides helper functions to work with
17209 * [SignatureInformation](#SignatureInformation) literals.
17211 var SignatureInformation;
17212 (function (SignatureInformation) {
17213 function create(label, documentation) {
17214 var parameters = [];
17215 for (var _i = 2; _i < arguments.length; _i++) {
17216 parameters[_i - 2] = arguments[_i];
17218 var result = { label: label };
17219 if (Is.defined(documentation)) {
17220 result.documentation = documentation;
17222 if (Is.defined(parameters)) {
17223 result.parameters = parameters;
17226 result.parameters = [];
17230 SignatureInformation.create = create;
17231 })(SignatureInformation || (SignatureInformation = {}));
17233 * A document highlight kind.
17235 var DocumentHighlightKind;
17236 (function (DocumentHighlightKind) {
17238 * A textual occurrence.
17240 DocumentHighlightKind.Text = 1;
17242 * Read-access of a symbol, like reading a variable.
17244 DocumentHighlightKind.Read = 2;
17246 * Write-access of a symbol, like writing to a variable.
17248 DocumentHighlightKind.Write = 3;
17249 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
17251 * DocumentHighlight namespace to provide helper functions to work with
17252 * [DocumentHighlight](#DocumentHighlight) literals.
17254 var DocumentHighlight;
17255 (function (DocumentHighlight) {
17257 * Create a DocumentHighlight object.
17258 * @param range The range the highlight applies to.
17260 function create(range, kind) {
17261 var result = { range: range };
17262 if (Is.number(kind)) {
17263 result.kind = kind;
17267 DocumentHighlight.create = create;
17268 })(DocumentHighlight || (DocumentHighlight = {}));
17273 (function (SymbolKind) {
17274 SymbolKind.File = 1;
17275 SymbolKind.Module = 2;
17276 SymbolKind.Namespace = 3;
17277 SymbolKind.Package = 4;
17278 SymbolKind.Class = 5;
17279 SymbolKind.Method = 6;
17280 SymbolKind.Property = 7;
17281 SymbolKind.Field = 8;
17282 SymbolKind.Constructor = 9;
17283 SymbolKind.Enum = 10;
17284 SymbolKind.Interface = 11;
17285 SymbolKind.Function = 12;
17286 SymbolKind.Variable = 13;
17287 SymbolKind.Constant = 14;
17288 SymbolKind.String = 15;
17289 SymbolKind.Number = 16;
17290 SymbolKind.Boolean = 17;
17291 SymbolKind.Array = 18;
17292 SymbolKind.Object = 19;
17293 SymbolKind.Key = 20;
17294 SymbolKind.Null = 21;
17295 SymbolKind.EnumMember = 22;
17296 SymbolKind.Struct = 23;
17297 SymbolKind.Event = 24;
17298 SymbolKind.Operator = 25;
17299 SymbolKind.TypeParameter = 26;
17300 })(SymbolKind || (SymbolKind = {}));
17302 * Symbol tags are extra annotations that tweak the rendering of a symbol.
17306 (function (SymbolTag) {
17308 * Render a symbol as obsolete, usually using a strike-out.
17310 SymbolTag.Deprecated = 1;
17311 })(SymbolTag || (SymbolTag = {}));
17312 var SymbolInformation;
17313 (function (SymbolInformation) {
17315 * Creates a new symbol information literal.
17317 * @param name The name of the symbol.
17318 * @param kind The kind of the symbol.
17319 * @param range The range of the location of the symbol.
17320 * @param uri The resource of the location of symbol, defaults to the current document.
17321 * @param containerName The name of the symbol containing the symbol.
17323 function create(name, kind, range, uri, containerName) {
17327 location: { uri: uri, range: range }
17329 if (containerName) {
17330 result.containerName = containerName;
17334 SymbolInformation.create = create;
17335 })(SymbolInformation || (SymbolInformation = {}));
17336 var DocumentSymbol;
17337 (function (DocumentSymbol) {
17339 * Creates a new symbol information literal.
17341 * @param name The name of the symbol.
17342 * @param detail The detail of the symbol.
17343 * @param kind The kind of the symbol.
17344 * @param range The range of the symbol.
17345 * @param selectionRange The selectionRange of the symbol.
17346 * @param children Children of the symbol.
17348 function create(name, detail, kind, range, selectionRange, children) {
17354 selectionRange: selectionRange
17356 if (children !== void 0) {
17357 result.children = children;
17361 DocumentSymbol.create = create;
17363 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
17365 function is(value) {
17366 var candidate = value;
17367 return candidate &&
17368 Is.string(candidate.name) && Is.number(candidate.kind) &&
17369 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
17370 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
17371 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
17372 (candidate.children === void 0 || Array.isArray(candidate.children)) &&
17373 (candidate.tags === void 0 || Array.isArray(candidate.tags));
17375 DocumentSymbol.is = is;
17376 })(DocumentSymbol || (DocumentSymbol = {}));
17378 * A set of predefined code action kinds
17380 var CodeActionKind;
17381 (function (CodeActionKind) {
17385 CodeActionKind.Empty = '';
17387 * Base kind for quickfix actions: 'quickfix'
17389 CodeActionKind.QuickFix = 'quickfix';
17391 * Base kind for refactoring actions: 'refactor'
17393 CodeActionKind.Refactor = 'refactor';
17395 * Base kind for refactoring extraction actions: 'refactor.extract'
17397 * Example extract actions:
17400 * - Extract function
17401 * - Extract variable
17402 * - Extract interface from class
17405 CodeActionKind.RefactorExtract = 'refactor.extract';
17407 * Base kind for refactoring inline actions: 'refactor.inline'
17409 * Example inline actions:
17411 * - Inline function
17412 * - Inline variable
17413 * - Inline constant
17416 CodeActionKind.RefactorInline = 'refactor.inline';
17418 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
17420 * Example rewrite actions:
17422 * - Convert JavaScript function to class
17423 * - Add or remove parameter
17424 * - Encapsulate field
17425 * - Make method static
17426 * - Move method to base class
17429 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
17431 * Base kind for source actions: `source`
17433 * Source code actions apply to the entire file.
17435 CodeActionKind.Source = 'source';
17437 * Base kind for an organize imports source action: `source.organizeImports`
17439 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
17441 * Base kind for auto-fix source actions: `source.fixAll`.
17443 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
17444 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
17448 CodeActionKind.SourceFixAll = 'source.fixAll';
17449 })(CodeActionKind || (CodeActionKind = {}));
17451 * The CodeActionContext namespace provides helper functions to work with
17452 * [CodeActionContext](#CodeActionContext) literals.
17454 var CodeActionContext;
17455 (function (CodeActionContext) {
17457 * Creates a new CodeActionContext literal.
17459 function create(diagnostics, only) {
17460 var result = { diagnostics: diagnostics };
17461 if (only !== void 0 && only !== null) {
17462 result.only = only;
17466 CodeActionContext.create = create;
17468 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
17470 function is(value) {
17471 var candidate = value;
17472 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
17474 CodeActionContext.is = is;
17475 })(CodeActionContext || (CodeActionContext = {}));
17477 (function (CodeAction) {
17478 function create(title, commandOrEdit, kind) {
17479 var result = { title: title };
17480 if (Command.is(commandOrEdit)) {
17481 result.command = commandOrEdit;
17484 result.edit = commandOrEdit;
17486 if (kind !== void 0) {
17487 result.kind = kind;
17491 CodeAction.create = create;
17492 function is(value) {
17493 var candidate = value;
17494 return candidate && Is.string(candidate.title) &&
17495 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
17496 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
17497 (candidate.edit !== void 0 || candidate.command !== void 0) &&
17498 (candidate.command === void 0 || Command.is(candidate.command)) &&
17499 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
17500 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
17502 CodeAction.is = is;
17503 })(CodeAction || (CodeAction = {}));
17505 * The CodeLens namespace provides helper functions to work with
17506 * [CodeLens](#CodeLens) literals.
17509 (function (CodeLens) {
17511 * Creates a new CodeLens literal.
17513 function create(range, data) {
17514 var result = { range: range };
17515 if (Is.defined(data)) {
17516 result.data = data;
17520 CodeLens.create = create;
17522 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
17524 function is(value) {
17525 var candidate = value;
17526 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
17529 })(CodeLens || (CodeLens = {}));
17531 * The FormattingOptions namespace provides helper functions to work with
17532 * [FormattingOptions](#FormattingOptions) literals.
17534 var FormattingOptions;
17535 (function (FormattingOptions) {
17537 * Creates a new FormattingOptions literal.
17539 function create(tabSize, insertSpaces) {
17540 return { tabSize: tabSize, insertSpaces: insertSpaces };
17542 FormattingOptions.create = create;
17544 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
17546 function is(value) {
17547 var candidate = value;
17548 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
17550 FormattingOptions.is = is;
17551 })(FormattingOptions || (FormattingOptions = {}));
17553 * The DocumentLink namespace provides helper functions to work with
17554 * [DocumentLink](#DocumentLink) literals.
17557 (function (DocumentLink) {
17559 * Creates a new DocumentLink literal.
17561 function create(range, target, data) {
17562 return { range: range, target: target, data: data };
17564 DocumentLink.create = create;
17566 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
17568 function is(value) {
17569 var candidate = value;
17570 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
17572 DocumentLink.is = is;
17573 })(DocumentLink || (DocumentLink = {}));
17575 * The SelectionRange namespace provides helper function to work with
17576 * SelectionRange literals.
17578 var SelectionRange;
17579 (function (SelectionRange) {
17581 * Creates a new SelectionRange
17582 * @param range the range.
17583 * @param parent an optional parent.
17585 function create(range, parent) {
17586 return { range: range, parent: parent };
17588 SelectionRange.create = create;
17589 function is(value) {
17590 var candidate = value;
17591 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
17593 SelectionRange.is = is;
17594 })(SelectionRange || (SelectionRange = {}));
17595 var EOL = ['\n', '\r\n', '\r'];
17597 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
17600 (function (TextDocument) {
17602 * Creates a new ITextDocument literal from the given uri and content.
17603 * @param uri The document's uri.
17604 * @param languageId The document's language Id.
17605 * @param content The document's content.
17607 function create(uri, languageId, version, content) {
17608 return new FullTextDocument(uri, languageId, version, content);
17610 TextDocument.create = create;
17612 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
17614 function is(value) {
17615 var candidate = value;
17616 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
17617 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
17619 TextDocument.is = is;
17620 function applyEdits(document, edits) {
17621 var text = document.getText();
17622 var sortedEdits = mergeSort(edits, function (a, b) {
17623 var diff = a.range.start.line - b.range.start.line;
17625 return a.range.start.character - b.range.start.character;
17629 var lastModifiedOffset = text.length;
17630 for (var i = sortedEdits.length - 1; i >= 0; i--) {
17631 var e = sortedEdits[i];
17632 var startOffset = document.offsetAt(e.range.start);
17633 var endOffset = document.offsetAt(e.range.end);
17634 if (endOffset <= lastModifiedOffset) {
17635 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
17638 throw new Error('Overlapping edit');
17640 lastModifiedOffset = startOffset;
17644 TextDocument.applyEdits = applyEdits;
17645 function mergeSort(data, compare) {
17646 if (data.length <= 1) {
17650 var p = (data.length / 2) | 0;
17651 var left = data.slice(0, p);
17652 var right = data.slice(p);
17653 mergeSort(left, compare);
17654 mergeSort(right, compare);
17658 while (leftIdx < left.length && rightIdx < right.length) {
17659 var ret = compare(left[leftIdx], right[rightIdx]);
17661 // smaller_equal -> take left to preserve order
17662 data[i++] = left[leftIdx++];
17665 // greater -> take right
17666 data[i++] = right[rightIdx++];
17669 while (leftIdx < left.length) {
17670 data[i++] = left[leftIdx++];
17672 while (rightIdx < right.length) {
17673 data[i++] = right[rightIdx++];
17677 })(TextDocument || (TextDocument = {}));
17678 var FullTextDocument = /** @class */ (function () {
17679 function FullTextDocument(uri, languageId, version, content) {
17681 this._languageId = languageId;
17682 this._version = version;
17683 this._content = content;
17684 this._lineOffsets = undefined;
17686 Object.defineProperty(FullTextDocument.prototype, "uri", {
17693 Object.defineProperty(FullTextDocument.prototype, "languageId", {
17695 return this._languageId;
17700 Object.defineProperty(FullTextDocument.prototype, "version", {
17702 return this._version;
17707 FullTextDocument.prototype.getText = function (range) {
17709 var start = this.offsetAt(range.start);
17710 var end = this.offsetAt(range.end);
17711 return this._content.substring(start, end);
17713 return this._content;
17715 FullTextDocument.prototype.update = function (event, version) {
17716 this._content = event.text;
17717 this._version = version;
17718 this._lineOffsets = undefined;
17720 FullTextDocument.prototype.getLineOffsets = function () {
17721 if (this._lineOffsets === undefined) {
17722 var lineOffsets = [];
17723 var text = this._content;
17724 var isLineStart = true;
17725 for (var i = 0; i < text.length; i++) {
17727 lineOffsets.push(i);
17728 isLineStart = false;
17730 var ch = text.charAt(i);
17731 isLineStart = (ch === '\r' || ch === '\n');
17732 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
17736 if (isLineStart && text.length > 0) {
17737 lineOffsets.push(text.length);
17739 this._lineOffsets = lineOffsets;
17741 return this._lineOffsets;
17743 FullTextDocument.prototype.positionAt = function (offset) {
17744 offset = Math.max(Math.min(offset, this._content.length), 0);
17745 var lineOffsets = this.getLineOffsets();
17746 var low = 0, high = lineOffsets.length;
17748 return Position.create(0, offset);
17750 while (low < high) {
17751 var mid = Math.floor((low + high) / 2);
17752 if (lineOffsets[mid] > offset) {
17759 // low is the least x for which the line offset is larger than the current offset
17760 // or array.length if no line offset is larger than the current offset
17761 var line = low - 1;
17762 return Position.create(line, offset - lineOffsets[line]);
17764 FullTextDocument.prototype.offsetAt = function (position) {
17765 var lineOffsets = this.getLineOffsets();
17766 if (position.line >= lineOffsets.length) {
17767 return this._content.length;
17769 else if (position.line < 0) {
17772 var lineOffset = lineOffsets[position.line];
17773 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
17774 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
17776 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
17778 return this.getLineOffsets().length;
17783 return FullTextDocument;
17787 var toString = Object.prototype.toString;
17788 function defined(value) {
17789 return typeof value !== 'undefined';
17791 Is.defined = defined;
17792 function undefined(value) {
17793 return typeof value === 'undefined';
17795 Is.undefined = undefined;
17796 function boolean(value) {
17797 return value === true || value === false;
17799 Is.boolean = boolean;
17800 function string(value) {
17801 return toString.call(value) === '[object String]';
17803 Is.string = string;
17804 function number(value) {
17805 return toString.call(value) === '[object Number]';
17807 Is.number = number;
17808 function func(value) {
17809 return toString.call(value) === '[object Function]';
17812 function objectLiteral(value) {
17813 // Strictly speaking class instances pass this check as well. Since the LSP
17814 // doesn't use classes we ignore this for now. If we do we need to add something
17815 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
17816 return value !== null && typeof value === 'object';
17818 Is.objectLiteral = objectLiteral;
17819 function typedArray(value, check) {
17820 return Array.isArray(value) && value.every(check);
17822 Is.typedArray = typedArray;
17823 })(Is || (Is = {}));
17828 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17830 __webpack_require__.r(__webpack_exports__);
17831 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17832 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
17833 /* harmony export */ });
17834 /* --------------------------------------------------------------------------------------------
17835 * Copyright (c) Microsoft Corporation. All rights reserved.
17836 * Licensed under the MIT License. See License.txt in the project root for license information.
17837 * ------------------------------------------------------------------------------------------ */
17839 var FullTextDocument = /** @class */ (function () {
17840 function FullTextDocument(uri, languageId, version, content) {
17842 this._languageId = languageId;
17843 this._version = version;
17844 this._content = content;
17845 this._lineOffsets = undefined;
17847 Object.defineProperty(FullTextDocument.prototype, "uri", {
17854 Object.defineProperty(FullTextDocument.prototype, "languageId", {
17856 return this._languageId;
17861 Object.defineProperty(FullTextDocument.prototype, "version", {
17863 return this._version;
17868 FullTextDocument.prototype.getText = function (range) {
17870 var start = this.offsetAt(range.start);
17871 var end = this.offsetAt(range.end);
17872 return this._content.substring(start, end);
17874 return this._content;
17876 FullTextDocument.prototype.update = function (changes, version) {
17877 for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {
17878 var change = changes_1[_i];
17879 if (FullTextDocument.isIncremental(change)) {
17880 // makes sure start is before end
17881 var range = getWellformedRange(change.range);
17883 var startOffset = this.offsetAt(range.start);
17884 var endOffset = this.offsetAt(range.end);
17885 this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
17886 // update the offsets
17887 var startLine = Math.max(range.start.line, 0);
17888 var endLine = Math.max(range.end.line, 0);
17889 var lineOffsets = this._lineOffsets;
17890 var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
17891 if (endLine - startLine === addedLineOffsets.length) {
17892 for (var i = 0, len = addedLineOffsets.length; i < len; i++) {
17893 lineOffsets[i + startLine + 1] = addedLineOffsets[i];
17897 if (addedLineOffsets.length < 10000) {
17898 lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));
17900 else { // avoid too many arguments for splice
17901 this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
17904 var diff = change.text.length - (endOffset - startOffset);
17906 for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
17907 lineOffsets[i] = lineOffsets[i] + diff;
17911 else if (FullTextDocument.isFull(change)) {
17912 this._content = change.text;
17913 this._lineOffsets = undefined;
17916 throw new Error('Unknown change event received');
17919 this._version = version;
17921 FullTextDocument.prototype.getLineOffsets = function () {
17922 if (this._lineOffsets === undefined) {
17923 this._lineOffsets = computeLineOffsets(this._content, true);
17925 return this._lineOffsets;
17927 FullTextDocument.prototype.positionAt = function (offset) {
17928 offset = Math.max(Math.min(offset, this._content.length), 0);
17929 var lineOffsets = this.getLineOffsets();
17930 var low = 0, high = lineOffsets.length;
17932 return { line: 0, character: offset };
17934 while (low < high) {
17935 var mid = Math.floor((low + high) / 2);
17936 if (lineOffsets[mid] > offset) {
17943 // low is the least x for which the line offset is larger than the current offset
17944 // or array.length if no line offset is larger than the current offset
17945 var line = low - 1;
17946 return { line: line, character: offset - lineOffsets[line] };
17948 FullTextDocument.prototype.offsetAt = function (position) {
17949 var lineOffsets = this.getLineOffsets();
17950 if (position.line >= lineOffsets.length) {
17951 return this._content.length;
17953 else if (position.line < 0) {
17956 var lineOffset = lineOffsets[position.line];
17957 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
17958 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
17960 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
17962 return this.getLineOffsets().length;
17967 FullTextDocument.isIncremental = function (event) {
17968 var candidate = event;
17969 return candidate !== undefined && candidate !== null &&
17970 typeof candidate.text === 'string' && candidate.range !== undefined &&
17971 (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
17973 FullTextDocument.isFull = function (event) {
17974 var candidate = event;
17975 return candidate !== undefined && candidate !== null &&
17976 typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
17978 return FullTextDocument;
17981 (function (TextDocument) {
17983 * Creates a new text document.
17985 * @param uri The document's uri.
17986 * @param languageId The document's language Id.
17987 * @param version The document's initial version number.
17988 * @param content The document's content.
17990 function create(uri, languageId, version, content) {
17991 return new FullTextDocument(uri, languageId, version, content);
17993 TextDocument.create = create;
17995 * Updates a TextDocument by modifing its content.
17997 * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
17998 * @param changes the changes to apply to the document.
17999 * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
18002 function update(document, changes, version) {
18003 if (document instanceof FullTextDocument) {
18004 document.update(changes, version);
18008 throw new Error('TextDocument.update: document must be created by TextDocument.create');
18011 TextDocument.update = update;
18012 function applyEdits(document, edits) {
18013 var text = document.getText();
18014 var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {
18015 var diff = a.range.start.line - b.range.start.line;
18017 return a.range.start.character - b.range.start.character;
18021 var lastModifiedOffset = 0;
18023 for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {
18024 var e = sortedEdits_1[_i];
18025 var startOffset = document.offsetAt(e.range.start);
18026 if (startOffset < lastModifiedOffset) {
18027 throw new Error('Overlapping edit');
18029 else if (startOffset > lastModifiedOffset) {
18030 spans.push(text.substring(lastModifiedOffset, startOffset));
18032 if (e.newText.length) {
18033 spans.push(e.newText);
18035 lastModifiedOffset = document.offsetAt(e.range.end);
18037 spans.push(text.substr(lastModifiedOffset));
18038 return spans.join('');
18040 TextDocument.applyEdits = applyEdits;
18041 })(TextDocument || (TextDocument = {}));
18042 function mergeSort(data, compare) {
18043 if (data.length <= 1) {
18047 var p = (data.length / 2) | 0;
18048 var left = data.slice(0, p);
18049 var right = data.slice(p);
18050 mergeSort(left, compare);
18051 mergeSort(right, compare);
18055 while (leftIdx < left.length && rightIdx < right.length) {
18056 var ret = compare(left[leftIdx], right[rightIdx]);
18058 // smaller_equal -> take left to preserve order
18059 data[i++] = left[leftIdx++];
18062 // greater -> take right
18063 data[i++] = right[rightIdx++];
18066 while (leftIdx < left.length) {
18067 data[i++] = left[leftIdx++];
18069 while (rightIdx < right.length) {
18070 data[i++] = right[rightIdx++];
18074 function computeLineOffsets(text, isAtLineStart, textOffset) {
18075 if (textOffset === void 0) { textOffset = 0; }
18076 var result = isAtLineStart ? [textOffset] : [];
18077 for (var i = 0; i < text.length; i++) {
18078 var ch = text.charCodeAt(i);
18079 if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
18080 if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
18083 result.push(textOffset + i + 1);
18088 function getWellformedRange(range) {
18089 var start = range.start;
18090 var end = range.end;
18091 if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
18092 return { start: end, end: start };
18096 function getWellformedEdit(textEdit) {
18097 var range = getWellformedRange(textEdit.range);
18098 if (range !== textEdit.range) {
18099 return { newText: textEdit.newText, range: range };
18107 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18109 __webpack_require__.r(__webpack_exports__);
18110 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18111 /* harmony export */ "PathCompletionParticipant": () => /* binding */ PathCompletionParticipant
18112 /* harmony export */ });
18113 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
18114 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92);
18115 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(109);
18116 /*---------------------------------------------------------------------------------------------
18117 * Copyright (c) Microsoft Corporation. All rights reserved.
18118 * Licensed under the MIT License. See License.txt in the project root for license information.
18119 *--------------------------------------------------------------------------------------------*/
18120 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
18121 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18122 return new (P || (P = Promise))(function (resolve, reject) {
18123 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18124 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18125 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18126 step((generator = generator.apply(thisArg, _arguments || [])).next());
18129 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
18130 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
18131 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
18132 function verb(n) { return function (v) { return step([n, v]); }; }
18133 function step(op) {
18134 if (f) throw new TypeError("Generator is already executing.");
18136 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;
18137 if (y = 0, t) op = [op[0] & 2, t.value];
18139 case 0: case 1: t = op; break;
18140 case 4: _.label++; return { value: op[1], done: false };
18141 case 5: _.label++; y = op[1]; op = [0]; continue;
18142 case 7: op = _.ops.pop(); _.trys.pop(); continue;
18144 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
18145 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
18146 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
18147 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
18148 if (t[2]) _.ops.pop();
18149 _.trys.pop(); continue;
18151 op = body.call(thisArg, _);
18152 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
18153 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
18159 var PathCompletionParticipant = /** @class */ (function () {
18160 function PathCompletionParticipant(readDirectory) {
18161 this.readDirectory = readDirectory;
18162 this.literalCompletions = [];
18163 this.importCompletions = [];
18165 PathCompletionParticipant.prototype.onCssURILiteralValue = function (context) {
18166 this.literalCompletions.push(context);
18168 PathCompletionParticipant.prototype.onCssImportPath = function (context) {
18169 this.importCompletions.push(context);
18171 PathCompletionParticipant.prototype.computeCompletions = function (document, documentContext) {
18172 return __awaiter(this, void 0, void 0, function () {
18173 var result, _i, _a, literalCompletion, uriValue, fullValue, items, _b, items_1, item, _c, _d, importCompletion, pathValue, fullValue, suggestions, _e, suggestions_1, item;
18174 return __generator(this, function (_f) {
18175 switch (_f.label) {
18177 result = { items: [], isIncomplete: false };
18178 _i = 0, _a = this.literalCompletions;
18181 if (!(_i < _a.length)) return [3 /*break*/, 5];
18182 literalCompletion = _a[_i];
18183 uriValue = literalCompletion.uriValue;
18184 fullValue = stripQuotes(uriValue);
18185 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 2];
18186 result.isIncomplete = true;
18187 return [3 /*break*/, 4];
18188 case 2: return [4 /*yield*/, this.providePathSuggestions(uriValue, literalCompletion.position, literalCompletion.range, document, documentContext)];
18191 for (_b = 0, items_1 = items; _b < items_1.length; _b++) {
18192 item = items_1[_b];
18193 result.items.push(item);
18198 return [3 /*break*/, 1];
18200 _c = 0, _d = this.importCompletions;
18203 if (!(_c < _d.length)) return [3 /*break*/, 10];
18204 importCompletion = _d[_c];
18205 pathValue = importCompletion.pathValue;
18206 fullValue = stripQuotes(pathValue);
18207 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 7];
18208 result.isIncomplete = true;
18209 return [3 /*break*/, 9];
18210 case 7: return [4 /*yield*/, this.providePathSuggestions(pathValue, importCompletion.position, importCompletion.range, document, documentContext)];
18212 suggestions = _f.sent();
18213 if (document.languageId === 'scss') {
18214 suggestions.forEach(function (s) {
18215 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(s.label, '_') && (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.endsWith)(s.label, '.scss')) {
18217 s.textEdit.newText = s.label.slice(1, -5);
18220 s.label = s.label.slice(1, -5);
18225 for (_e = 0, suggestions_1 = suggestions; _e < suggestions_1.length; _e++) {
18226 item = suggestions_1[_e];
18227 result.items.push(item);
18232 return [3 /*break*/, 6];
18233 case 10: return [2 /*return*/, result];
18238 PathCompletionParticipant.prototype.providePathSuggestions = function (pathValue, position, range, document, documentContext) {
18239 return __awaiter(this, void 0, void 0, function () {
18240 var fullValue, isValueQuoted, valueBeforeCursor, currentDocUri, fullValueRange, replaceRange, valueBeforeLastSlash, parentDir, result, infos, _i, infos_1, _a, name, type, e_1;
18241 return __generator(this, function (_b) {
18242 switch (_b.label) {
18244 fullValue = stripQuotes(pathValue);
18245 isValueQuoted = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(pathValue, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(pathValue, "\"");
18246 valueBeforeCursor = isValueQuoted
18247 ? fullValue.slice(0, position.character - (range.start.character + 1))
18248 : fullValue.slice(0, position.character - range.start.character);
18249 currentDocUri = document.uri;
18250 fullValueRange = isValueQuoted ? shiftRange(range, 1, -1) : range;
18251 replaceRange = pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange);
18252 valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
18253 parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', currentDocUri);
18254 if (!parentDir) return [3 /*break*/, 4];
18257 _b.trys.push([1, 3, , 4]);
18259 return [4 /*yield*/, this.readDirectory(parentDir)];
18262 for (_i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
18263 _a = infos_1[_i], name = _a[0], type = _a[1];
18264 // Exclude paths that start with `.`
18265 if (name.charCodeAt(0) !== CharCode_dot && (type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Directory || (0,_utils_resources__WEBPACK_IMPORTED_MODULE_1__.joinPath)(parentDir, name) !== currentDocUri)) {
18266 result.push(createCompletionItem(name, type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Directory, replaceRange));
18269 return [2 /*return*/, result];
18272 return [3 /*break*/, 4];
18273 case 4: return [2 /*return*/, []];
18278 return PathCompletionParticipant;
18281 var CharCode_dot = '.'.charCodeAt(0);
18282 function stripQuotes(fullValue) {
18283 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(fullValue, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(fullValue, "\"")) {
18284 return fullValue.slice(1, -1);
18290 function pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange) {
18292 var lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
18293 if (lastIndexOfSlash === -1) {
18294 replaceRange = fullValueRange;
18297 // For cases where cursor is in the middle of attribute value, like <script src="./s|rc/test.js">
18298 // Find the last slash before cursor, and calculate the start of replace range from there
18299 var valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
18300 var startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length);
18301 // If whitespace exists, replace until it
18302 var whitespaceIndex = valueAfterLastSlash.indexOf(' ');
18303 var endPos = void 0;
18304 if (whitespaceIndex !== -1) {
18305 endPos = shiftPosition(startPos, whitespaceIndex);
18308 endPos = fullValueRange.end;
18310 replaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(startPos, endPos);
18312 return replaceRange;
18314 function createCompletionItem(name, isDir, replaceRange) {
18318 label: escapePath(name),
18319 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.Folder,
18320 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, escapePath(name)),
18323 command: 'editor.action.triggerSuggest'
18329 label: escapePath(name),
18330 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.File,
18331 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, escapePath(name))
18335 // Escape https://www.w3.org/TR/CSS1/#url
18336 function escapePath(p) {
18337 return p.replace(/(\s|\(|\)|,|"|')/g, '\\$1');
18339 function shiftPosition(pos, offset) {
18340 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(pos.line, pos.character + offset);
18342 function shiftRange(range, startOffset, endOffset) {
18343 var start = shiftPosition(range.start, startOffset);
18344 var end = shiftPosition(range.end, endOffset);
18345 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(start, end);
18351 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18353 __webpack_require__.r(__webpack_exports__);
18354 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18355 /* harmony export */ "isAbsolutePath": () => /* binding */ isAbsolutePath,
18356 /* harmony export */ "dirname": () => /* binding */ dirname,
18357 /* harmony export */ "basename": () => /* binding */ basename,
18358 /* harmony export */ "extname": () => /* binding */ extname,
18359 /* harmony export */ "resolvePath": () => /* binding */ resolvePath,
18360 /* harmony export */ "normalizePath": () => /* binding */ normalizePath,
18361 /* harmony export */ "joinPath": () => /* binding */ joinPath
18362 /* harmony export */ });
18363 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
18364 /*---------------------------------------------------------------------------------------------
18365 * Copyright (c) Microsoft Corporation. All rights reserved.
18366 * Licensed under the MIT License. See License.txt in the project root for license information.
18367 *--------------------------------------------------------------------------------------------*/
18369 var Slash = '/'.charCodeAt(0);
18370 var Dot = '.'.charCodeAt(0);
18371 function isAbsolutePath(path) {
18372 return path.charCodeAt(0) === Slash;
18374 function dirname(uri) {
18375 var lastIndexOfSlash = uri.lastIndexOf('/');
18376 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
18378 function basename(uri) {
18379 var lastIndexOfSlash = uri.lastIndexOf('/');
18380 return uri.substr(lastIndexOfSlash + 1);
18382 function extname(uri) {
18383 for (var i = uri.length - 1; i >= 0; i--) {
18384 var ch = uri.charCodeAt(i);
18386 if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
18387 return uri.substr(i);
18393 else if (ch === Slash) {
18399 function resolvePath(uriString, path) {
18400 if (isAbsolutePath(path)) {
18401 var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_0__.URI.parse(uriString);
18402 var parts = path.split('/');
18403 return uri.with({ path: normalizePath(parts) }).toString();
18405 return joinPath(uriString, path);
18407 function normalizePath(parts) {
18409 for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
18410 var part = parts_1[_i];
18411 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
18414 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
18418 newParts.push(part);
18421 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
18424 var res = newParts.join('/');
18425 if (parts[0].length === 0) {
18430 function joinPath(uriString) {
18432 for (var _i = 1; _i < arguments.length; _i++) {
18433 paths[_i - 1] = arguments[_i];
18435 var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_0__.URI.parse(uriString);
18436 var parts = uri.path.split('/');
18437 for (var _a = 0, paths_1 = paths; _a < paths_1.length; _a++) {
18438 var path = paths_1[_a];
18439 parts.push.apply(parts, path.split('/'));
18441 return uri.with({ path: normalizePath(parts) }).toString();
18447 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18449 __webpack_require__.r(__webpack_exports__);
18450 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18451 /* harmony export */ "CSSHover": () => /* binding */ CSSHover
18452 /* harmony export */ });
18453 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
18454 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);
18455 /* harmony import */ var _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111);
18456 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92);
18457 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(105);
18458 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101);
18459 /*---------------------------------------------------------------------------------------------
18460 * Copyright (c) Microsoft Corporation. All rights reserved.
18461 * Licensed under the MIT License. See License.txt in the project root for license information.
18462 *--------------------------------------------------------------------------------------------*/
18470 var CSSHover = /** @class */ (function () {
18471 function CSSHover(clientCapabilities, cssDataManager) {
18472 this.clientCapabilities = clientCapabilities;
18473 this.cssDataManager = cssDataManager;
18474 this.selectorPrinting = new _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__.SelectorPrinting(cssDataManager);
18476 CSSHover.prototype.doHover = function (document, position, stylesheet) {
18477 function getRange(node) {
18478 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(document.positionAt(node.offset), document.positionAt(node.end));
18480 var offset = document.offsetAt(position);
18481 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(stylesheet, offset);
18483 * nodepath is top-down
18484 * Build up the hover by appending inner node's information
18487 for (var i = 0; i < nodepath.length; i++) {
18488 var node = nodepath[i];
18489 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Selector) {
18491 contents: this.selectorPrinting.selectorToMarkedString(node),
18492 range: getRange(node)
18496 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
18498 * Some sass specific at rules such as `@at-root` are parsed as `SimpleSelector`
18500 if (!(0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.startsWith)(node.getText(), '@')) {
18502 contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
18503 range: getRange(node)
18508 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
18509 var propertyName = node.getFullPropertyName();
18510 var entry = this.cssDataManager.getProperty(propertyName);
18512 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown());
18515 contents: contents,
18516 range: getRange(node)
18525 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.UnknownAtRule) {
18526 var atRuleName = node.getText();
18527 var entry = this.cssDataManager.getAtDirective(atRuleName);
18529 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown());
18532 contents: contents,
18533 range: getRange(node)
18542 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Node && node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector) {
18543 var selectorName = node.getText();
18544 var entry = selectorName.slice(0, 2) === '::'
18545 ? this.cssDataManager.getPseudoElement(selectorName)
18546 : this.cssDataManager.getPseudoClass(selectorName);
18548 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown());
18551 contents: contents,
18552 range: getRange(node)
18563 hover.contents = this.convertContents(hover.contents);
18567 CSSHover.prototype.convertContents = function (contents) {
18568 if (!this.doesSupportMarkdown()) {
18569 if (typeof contents === 'string') {
18573 else if ('kind' in contents) {
18576 value: contents.value
18580 else if (Array.isArray(contents)) {
18581 return contents.map(function (c) {
18582 return typeof c === 'string' ? c : c.value;
18587 return contents.value;
18592 CSSHover.prototype.doesSupportMarkdown = function () {
18593 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_5__.isDefined)(this.supportsMarkdown)) {
18594 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_5__.isDefined)(this.clientCapabilities)) {
18595 this.supportsMarkdown = true;
18596 return this.supportsMarkdown;
18598 var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
18599 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.MarkupKind.Markdown) !== -1;
18601 return this.supportsMarkdown;
18610 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18612 __webpack_require__.r(__webpack_exports__);
18613 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18614 /* harmony export */ "Element": () => /* binding */ Element,
18615 /* harmony export */ "RootElement": () => /* binding */ RootElement,
18616 /* harmony export */ "LabelElement": () => /* binding */ LabelElement,
18617 /* harmony export */ "toElement": () => /* binding */ toElement,
18618 /* harmony export */ "SelectorPrinting": () => /* binding */ SelectorPrinting,
18619 /* harmony export */ "selectorToElement": () => /* binding */ selectorToElement
18620 /* harmony export */ });
18621 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
18622 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
18623 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
18624 /*---------------------------------------------------------------------------------------------
18625 * Copyright (c) Microsoft Corporation. All rights reserved.
18626 * Licensed under the MIT License. See License.txt in the project root for license information.
18627 *--------------------------------------------------------------------------------------------*/
18629 var __extends = (undefined && undefined.__extends) || (function () {
18630 var extendStatics = function (d, b) {
18631 extendStatics = Object.setPrototypeOf ||
18632 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18633 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18634 return extendStatics(d, b);
18636 return function (d, b) {
18637 extendStatics(d, b);
18638 function __() { this.constructor = d; }
18639 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18645 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__.loadMessageBundle();
18646 var Element = /** @class */ (function () {
18647 function Element() {
18648 this.parent = null;
18649 this.children = null;
18650 this.attributes = null;
18652 Element.prototype.findAttribute = function (name) {
18653 if (this.attributes) {
18654 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18655 var attribute = _a[_i];
18656 if (attribute.name === name) {
18657 return attribute.value;
18663 Element.prototype.addChild = function (child) {
18664 if (child instanceof Element) {
18665 child.parent = this;
18667 if (!this.children) {
18668 this.children = [];
18670 this.children.push(child);
18672 Element.prototype.append = function (text) {
18673 if (this.attributes) {
18674 var last = this.attributes[this.attributes.length - 1];
18675 last.value = last.value + text;
18678 Element.prototype.prepend = function (text) {
18679 if (this.attributes) {
18680 var first = this.attributes[0];
18681 first.value = text + first.value;
18684 Element.prototype.findRoot = function () {
18686 while (curr.parent && !(curr.parent instanceof RootElement)) {
18687 curr = curr.parent;
18691 Element.prototype.removeChild = function (child) {
18692 if (this.children) {
18693 var index = this.children.indexOf(child);
18694 if (index !== -1) {
18695 this.children.splice(index, 1);
18701 Element.prototype.addAttr = function (name, value) {
18702 if (!this.attributes) {
18703 this.attributes = [];
18705 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18706 var attribute = _a[_i];
18707 if (attribute.name === name) {
18708 attribute.value += ' ' + value;
18712 this.attributes.push({ name: name, value: value });
18714 Element.prototype.clone = function (cloneChildren) {
18715 if (cloneChildren === void 0) { cloneChildren = true; }
18716 var elem = new Element();
18717 if (this.attributes) {
18718 elem.attributes = [];
18719 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
18720 var attribute = _a[_i];
18721 elem.addAttr(attribute.name, attribute.value);
18724 if (cloneChildren && this.children) {
18725 elem.children = [];
18726 for (var index = 0; index < this.children.length; index++) {
18727 elem.addChild(this.children[index].clone());
18732 Element.prototype.cloneWithParent = function () {
18733 var clone = this.clone(false);
18734 if (this.parent && !(this.parent instanceof RootElement)) {
18735 var parentClone = this.parent.cloneWithParent();
18736 parentClone.addChild(clone);
18743 var RootElement = /** @class */ (function (_super) {
18744 __extends(RootElement, _super);
18745 function RootElement() {
18746 return _super !== null && _super.apply(this, arguments) || this;
18748 return RootElement;
18751 var LabelElement = /** @class */ (function (_super) {
18752 __extends(LabelElement, _super);
18753 function LabelElement(label) {
18754 var _this = _super.call(this) || this;
18755 _this.addAttr('name', label);
18758 return LabelElement;
18761 var MarkedStringPrinter = /** @class */ (function () {
18762 function MarkedStringPrinter(quote) {
18763 this.quote = quote;
18767 MarkedStringPrinter.prototype.print = function (element) {
18769 if (element instanceof RootElement) {
18770 if (element.children) {
18771 this.doPrint(element.children, 0);
18775 this.doPrint([element], 0);
18777 var value = this.result.join('\n');
18778 return [{ language: 'html', value: value }];
18780 MarkedStringPrinter.prototype.doPrint = function (elements, indent) {
18781 for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
18782 var element = elements_1[_i];
18783 this.doPrintElement(element, indent);
18784 if (element.children) {
18785 this.doPrint(element.children, indent + 1);
18789 MarkedStringPrinter.prototype.writeLine = function (level, content) {
18790 var indent = new Array(level + 1).join(' ');
18791 this.result.push(indent + content);
18793 MarkedStringPrinter.prototype.doPrintElement = function (element, indent) {
18794 var name = element.findAttribute('name');
18795 // special case: a simple label
18796 if (element instanceof LabelElement || name === '\u2026') {
18797 this.writeLine(indent, name);
18801 var content = ['<'];
18804 content.push(name);
18807 content.push('element');
18810 if (element.attributes) {
18811 for (var _i = 0, _a = element.attributes; _i < _a.length; _i++) {
18813 if (attr.name !== 'name') {
18815 content.push(attr.name);
18816 var value = attr.value;
18819 content.push(quotes.ensure(value, this.quote));
18825 this.writeLine(indent, content.join(''));
18827 return MarkedStringPrinter;
18830 (function (quotes) {
18831 function ensure(value, which) {
18832 return which + remove(value) + which;
18834 quotes.ensure = ensure;
18835 function remove(value) {
18836 var match = value.match(/^['"](.*)["']$/);
18842 quotes.remove = remove;
18843 })(quotes || (quotes = {}));
18844 var Specificity = /** @class */ (function () {
18845 function Specificity() {
18846 /** Count of identifiers (e.g., `#app`) */
18848 /** Count of attributes (`[type="number"]`), classes (`.container-fluid`), and pseudo-classes (`:hover`) */
18850 /** Count of tag names (`div`), and pseudo-elements (`::before`) */
18853 return Specificity;
18855 function toElement(node, parentElement) {
18856 var result = new Element();
18857 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
18858 var child = _a[_i];
18859 switch (child.type) {
18860 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinator:
18861 if (parentElement) {
18862 var segments = child.getText().split('&');
18863 if (segments.length === 1) {
18864 // should not happen
18865 result.addAttr('name', segments[0]);
18868 result = parentElement.cloneWithParent();
18870 var root = result.findRoot();
18871 root.prepend(segments[0]);
18873 for (var i = 1; i < segments.length; i++) {
18875 var clone = parentElement.cloneWithParent();
18876 result.addChild(clone.findRoot());
18879 result.append(segments[i]);
18883 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorPlaceholder:
18884 if (child.matches('@at-root')) {
18888 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ElementNameSelector:
18889 var text = child.getText();
18890 result.addAttr('name', text === '*' ? 'element' : unescape(text));
18892 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ClassSelector:
18893 result.addAttr('class', unescape(child.getText().substring(1)));
18895 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.IdentifierSelector:
18896 result.addAttr('id', unescape(child.getText().substring(1)));
18898 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
18899 result.addAttr('class', child.getName());
18901 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector:
18902 result.addAttr(unescape(child.getText()), '');
18904 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.AttributeSelector:
18905 var selector = child;
18906 var identifier = selector.getIdentifier();
18908 var expression = selector.getValue();
18909 var operator = selector.getOperator();
18910 var value = void 0;
18911 if (expression && operator) {
18912 switch (unescape(operator.getText())) {
18914 // excatly or followed by -words
18915 value = quotes.remove(unescape(expression.getText())) + "-\u2026";
18919 value = quotes.remove(unescape(expression.getText())) + "\u2026";
18923 value = "\u2026" + quotes.remove(unescape(expression.getText()));
18926 // one of a list of words
18927 value = " \u2026 " + quotes.remove(unescape(expression.getText())) + " \u2026 ";
18931 value = "\u2026" + quotes.remove(unescape(expression.getText())) + "\u2026";
18934 value = quotes.remove(unescape(expression.getText()));
18938 result.addAttr(unescape(identifier.getText()), value);
18945 function unescape(content) {
18946 var scanner = new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__.Scanner();
18947 scanner.setSource(content);
18948 var token = scanner.scanUnquotedString();
18954 var SelectorPrinting = /** @class */ (function () {
18955 function SelectorPrinting(cssDataManager) {
18956 this.cssDataManager = cssDataManager;
18958 SelectorPrinting.prototype.selectorToMarkedString = function (node) {
18959 var root = selectorToElement(node);
18961 var markedStrings = new MarkedStringPrinter('"').print(root);
18962 markedStrings.push(this.selectorToSpecificityMarkedString(node));
18963 return markedStrings;
18969 SelectorPrinting.prototype.simpleSelectorToMarkedString = function (node) {
18970 var element = toElement(node);
18971 var markedStrings = new MarkedStringPrinter('"').print(element);
18972 markedStrings.push(this.selectorToSpecificityMarkedString(node));
18973 return markedStrings;
18975 SelectorPrinting.prototype.isPseudoElementIdentifier = function (text) {
18976 var match = text.match(/^::?([\w-]+)/);
18980 return !!this.cssDataManager.getPseudoElement("::" + match[1]);
18982 SelectorPrinting.prototype.selectorToSpecificityMarkedString = function (node) {
18984 //https://www.w3.org/TR/selectors-3/#specificity
18985 var calculateScore = function (node) {
18986 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
18987 var element = _a[_i];
18988 switch (element.type) {
18989 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.IdentifierSelector:
18992 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ClassSelector:
18993 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.AttributeSelector:
18994 specificity.attr++;
18996 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ElementNameSelector:
18997 //ignore universal selector
18998 if (element.matches("*")) {
19003 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector:
19004 var text = element.getText();
19005 if (_this.isPseudoElementIdentifier(text)) {
19006 specificity.tag++; // pseudo element
19009 //ignore psuedo class NOT
19010 if (text.match(/^:not/i)) {
19013 specificity.attr++; //pseudo class
19017 if (element.getChildren().length > 0) {
19018 calculateScore(element);
19022 var specificity = new Specificity();
19023 calculateScore(node);
19024 return localize('specificity', "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
19026 return SelectorPrinting;
19029 var SelectorElementBuilder = /** @class */ (function () {
19030 function SelectorElementBuilder(element) {
19032 this.element = element;
19034 SelectorElementBuilder.prototype.processSelector = function (selector) {
19035 var parentElement = null;
19036 if (!(this.element instanceof RootElement)) {
19037 if (selector.getChildren().some(function (c) { return c.hasChildren() && c.getChild(0).type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinator; })) {
19038 var curr = this.element.findRoot();
19039 if (curr.parent instanceof RootElement) {
19040 parentElement = this.element;
19041 this.element = curr.parent;
19042 this.element.removeChild(curr);
19047 for (var _i = 0, _a = selector.getChildren(); _i < _a.length; _i++) {
19048 var selectorChild = _a[_i];
19049 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
19050 if (this.prev instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
19051 var labelElement = new LabelElement('\u2026');
19052 this.element.addChild(labelElement);
19053 this.element = labelElement;
19055 else if (this.prev && (this.prev.matches('+') || this.prev.matches('~')) && this.element.parent) {
19056 this.element = this.element.parent;
19058 if (this.prev && this.prev.matches('~')) {
19059 this.element.addChild(toElement(selectorChild));
19060 this.element.addChild(new LabelElement('\u22EE'));
19062 var thisElement = toElement(selectorChild, parentElement);
19063 var root = thisElement.findRoot();
19064 this.element.addChild(root);
19065 this.element = thisElement;
19067 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector ||
19068 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorParent ||
19069 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorShadowPiercingDescendant ||
19070 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorSibling ||
19071 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorAllSiblings) {
19072 this.prev = selectorChild;
19076 return SelectorElementBuilder;
19078 function isNewSelectorContext(node) {
19079 switch (node.type) {
19080 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
19081 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Stylesheet:
19086 function selectorToElement(node) {
19087 if (node.matches('@at-root')) {
19090 var root = new RootElement();
19091 var parentRuleSets = [];
19092 var ruleSet = node.getParent();
19093 if (ruleSet instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
19094 var parent = ruleSet.getParent(); // parent of the selector's ruleset
19095 while (parent && !isNewSelectorContext(parent)) {
19096 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
19097 if (parent.getSelectors().matches('@at-root')) {
19100 parentRuleSets.push(parent);
19102 parent = parent.getParent();
19105 var builder = new SelectorElementBuilder(root);
19106 for (var i = parentRuleSets.length - 1; i >= 0; i--) {
19107 var selector = parentRuleSets[i].getSelectors().getChild(0);
19109 builder.processSelector(selector);
19112 builder.processSelector(node);
19119 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19121 __webpack_require__.r(__webpack_exports__);
19122 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19123 /* harmony export */ "CSSNavigation": () => /* binding */ CSSNavigation
19124 /* harmony export */ });
19125 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
19126 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
19127 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91);
19128 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(103);
19129 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97);
19130 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92);
19131 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(109);
19132 /*---------------------------------------------------------------------------------------------
19133 * Copyright (c) Microsoft Corporation. All rights reserved.
19134 * Licensed under the MIT License. See License.txt in the project root for license information.
19135 *--------------------------------------------------------------------------------------------*/
19137 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
19138 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19139 return new (P || (P = Promise))(function (resolve, reject) {
19140 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19141 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19142 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19143 step((generator = generator.apply(thisArg, _arguments || [])).next());
19146 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
19147 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
19148 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
19149 function verb(n) { return function (v) { return step([n, v]); }; }
19150 function step(op) {
19151 if (f) throw new TypeError("Generator is already executing.");
19153 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;
19154 if (y = 0, t) op = [op[0] & 2, t.value];
19156 case 0: case 1: t = op; break;
19157 case 4: _.label++; return { value: op[1], done: false };
19158 case 5: _.label++; y = op[1]; op = [0]; continue;
19159 case 7: op = _.ops.pop(); _.trys.pop(); continue;
19161 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
19162 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19163 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
19164 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
19165 if (t[2]) _.ops.pop();
19166 _.trys.pop(); continue;
19168 op = body.call(thisArg, _);
19169 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
19170 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
19180 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
19181 var CSSNavigation = /** @class */ (function () {
19182 function CSSNavigation(fileSystemProvider) {
19183 this.fileSystemProvider = fileSystemProvider;
19185 CSSNavigation.prototype.findDefinition = function (document, position, stylesheet) {
19186 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__.Symbols(stylesheet);
19187 var offset = document.offsetAt(position);
19188 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.getNodeAtOffset(stylesheet, offset);
19192 var symbol = symbols.findSymbolFromNode(node);
19198 range: getRange(symbol.node, document)
19201 CSSNavigation.prototype.findReferences = function (document, position, stylesheet) {
19202 var highlights = this.findDocumentHighlights(document, position, stylesheet);
19203 return highlights.map(function (h) {
19210 CSSNavigation.prototype.findDocumentHighlights = function (document, position, stylesheet) {
19212 var offset = document.offsetAt(position);
19213 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.getNodeAtOffset(stylesheet, offset);
19214 if (!node || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Stylesheet || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Declarations) {
19217 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Identifier && node.parent && node.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.ClassSelector) {
19218 node = node.parent;
19220 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__.Symbols(stylesheet);
19221 var symbol = symbols.findSymbolFromNode(node);
19222 var name = node.getText();
19223 stylesheet.accept(function (candidate) {
19225 if (symbols.matchesSymbol(candidate, symbol)) {
19227 kind: getHighlightKind(candidate),
19228 range: getRange(candidate, document)
19233 else if (node && node.type === candidate.type && candidate.matches(name)) {
19234 // Same node type and data
19236 kind: getHighlightKind(candidate),
19237 range: getRange(candidate, document)
19244 CSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
19245 return node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Import;
19247 CSSNavigation.prototype.findDocumentLinks = function (document, stylesheet, documentContext) {
19248 var links = this.findUnresolvedLinks(document, stylesheet);
19249 for (var i = 0; i < links.length; i++) {
19250 var target = links[i].target;
19251 if (target && !(/^\w+:\/\//g.test(target))) {
19252 var resolved = documentContext.resolveReference(target, document.uri);
19254 links[i].target = resolved;
19260 CSSNavigation.prototype.findDocumentLinks2 = function (document, stylesheet, documentContext) {
19261 return __awaiter(this, void 0, void 0, function () {
19262 var links, resolvedLinks, _i, links_1, link, target, resolvedTarget;
19263 return __generator(this, function (_a) {
19264 switch (_a.label) {
19266 links = this.findUnresolvedLinks(document, stylesheet);
19267 resolvedLinks = [];
19268 _i = 0, links_1 = links;
19271 if (!(_i < links_1.length)) return [3 /*break*/, 5];
19272 link = links_1[_i];
19273 target = link.target;
19274 if (!(target && !(/^\w+:\/\//g.test(target)))) return [3 /*break*/, 3];
19275 return [4 /*yield*/, this.resolveRelativeReference(target, document.uri, documentContext)];
19277 resolvedTarget = _a.sent();
19278 if (resolvedTarget !== undefined) {
19279 link.target = resolvedTarget;
19280 resolvedLinks.push(link);
19282 return [3 /*break*/, 4];
19284 resolvedLinks.push(link);
19288 return [3 /*break*/, 1];
19289 case 5: return [2 /*return*/, resolvedLinks];
19294 CSSNavigation.prototype.findUnresolvedLinks = function (document, stylesheet) {
19297 var collect = function (uriStringNode) {
19298 var rawUri = uriStringNode.getText();
19299 var range = getRange(uriStringNode, document);
19300 // Make sure the range is not empty
19301 if (range.start.line === range.end.line && range.start.character === range.end.character) {
19304 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_6__.startsWith)(rawUri, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_6__.startsWith)(rawUri, "\"")) {
19305 rawUri = rawUri.slice(1, -1);
19307 result.push({ target: rawUri, range: range });
19309 stylesheet.accept(function (candidate) {
19310 if (candidate.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.URILiteral) {
19311 var first = candidate.getChild(0);
19318 * In @import, it is possible to include links that do not use `url()`
19319 * For example, `@import 'foo.css';`
19321 if (candidate.parent && _this.isRawStringDocumentLinkNode(candidate.parent)) {
19322 var rawText = candidate.getText();
19323 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_6__.startsWith)(rawText, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_6__.startsWith)(rawText, "\"")) {
19324 collect(candidate);
19332 CSSNavigation.prototype.findDocumentSymbols = function (document, stylesheet) {
19334 stylesheet.accept(function (node) {
19337 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Class,
19340 var locationNode = node;
19341 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Selector) {
19342 entry.name = node.getText();
19343 locationNode = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Ruleset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.ExtendsReference);
19344 if (locationNode) {
19345 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Location.create(document.uri, getRange(locationNode, document));
19346 result.push(entry);
19350 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.VariableDeclaration) {
19351 entry.name = node.getName();
19352 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Variable;
19354 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.MixinDeclaration) {
19355 entry.name = node.getName();
19356 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Method;
19358 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.FunctionDeclaration) {
19359 entry.name = node.getName();
19360 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Function;
19362 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Keyframe) {
19363 entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
19365 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.FontFace) {
19366 entry.name = localize('literal.fontface', "@font-face");
19368 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Media) {
19369 var mediaList = node.getChild(0);
19370 if (mediaList instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Medialist) {
19371 entry.name = '@media ' + mediaList.getText();
19372 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Module;
19376 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Location.create(document.uri, getRange(locationNode, document));
19377 result.push(entry);
19383 CSSNavigation.prototype.findDocumentColors = function (document, stylesheet) {
19385 stylesheet.accept(function (node) {
19386 var colorInfo = getColorInformation(node, document);
19388 result.push(colorInfo);
19394 CSSNavigation.prototype.getColorPresentations = function (document, stylesheet, color, range) {
19396 var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
19398 if (color.alpha === 1) {
19399 label = "rgb(" + red256 + ", " + green256 + ", " + blue256 + ")";
19402 label = "rgba(" + red256 + ", " + green256 + ", " + blue256 + ", " + color.alpha + ")";
19404 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
19405 if (color.alpha === 1) {
19406 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
19409 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
19411 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
19412 var hsl = (0,_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__.hslFromColor)(color);
19414 label = "hsl(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%)";
19417 label = "hsla(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%, " + hsl.a + ")";
19419 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
19422 CSSNavigation.prototype.doRename = function (document, position, newName, stylesheet) {
19424 var highlights = this.findDocumentHighlights(document, position, stylesheet);
19425 var edits = highlights.map(function (h) { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(h.range, newName); });
19427 changes: (_a = {}, _a[document.uri] = edits, _a)
19430 CSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
19431 return __awaiter(this, void 0, void 0, function () {
19432 var moduleName, rootFolderUri, documentFolderUri, modulePath, pathWithinModule;
19433 return __generator(this, function (_a) {
19434 switch (_a.label) {
19436 if (!(ref[0] === '~' && ref[1] !== '/' && this.fileSystemProvider)) return [3 /*break*/, 3];
19437 ref = ref.substring(1);
19438 if (!(0,_utils_strings__WEBPACK_IMPORTED_MODULE_6__.startsWith)(documentUri, 'file://')) return [3 /*break*/, 2];
19439 moduleName = getModuleNameFromPath(ref);
19440 rootFolderUri = documentContext.resolveReference('/', documentUri);
19441 documentFolderUri = (0,_utils_resources__WEBPACK_IMPORTED_MODULE_5__.dirname)(documentUri);
19442 return [4 /*yield*/, this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri)];
19444 modulePath = _a.sent();
19446 pathWithinModule = ref.substring(moduleName.length + 1);
19447 return [2 /*return*/, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_5__.joinPath)(modulePath, pathWithinModule)];
19450 case 2: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
19451 case 3: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
19456 CSSNavigation.prototype.resolvePathToModule = function (_moduleName, documentFolderUri, rootFolderUri) {
19457 return __awaiter(this, void 0, void 0, function () {
19459 return __generator(this, function (_a) {
19460 switch (_a.label) {
19462 packPath = (0,_utils_resources__WEBPACK_IMPORTED_MODULE_5__.joinPath)(documentFolderUri, 'node_modules', _moduleName, 'package.json');
19463 return [4 /*yield*/, this.fileExists(packPath)];
19466 return [2 /*return*/, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_5__.dirname)(packPath)];
19468 else if (rootFolderUri && documentFolderUri.startsWith(rootFolderUri) && (documentFolderUri.length !== rootFolderUri.length)) {
19469 return [2 /*return*/, this.resolvePathToModule(_moduleName, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_5__.dirname)(documentFolderUri), rootFolderUri)];
19471 return [2 /*return*/, undefined];
19476 CSSNavigation.prototype.fileExists = function (uri) {
19477 return __awaiter(this, void 0, void 0, function () {
19479 return __generator(this, function (_a) {
19480 switch (_a.label) {
19482 if (!this.fileSystemProvider) {
19483 return [2 /*return*/, false];
19487 _a.trys.push([1, 3, , 4]);
19488 return [4 /*yield*/, this.fileSystemProvider.stat(uri)];
19491 if (stat.type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Unknown && stat.size === -1) {
19492 return [2 /*return*/, false];
19494 return [2 /*return*/, true];
19497 return [2 /*return*/, false];
19498 case 4: return [2 /*return*/];
19503 return CSSNavigation;
19506 function getColorInformation(node, document) {
19507 var color = (0,_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__.getColorValue)(node);
19509 var range = getRange(node, document);
19510 return { color: color, range: range };
19514 function getRange(node, document) {
19515 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(node.offset), document.positionAt(node.end));
19517 function getHighlightKind(node) {
19518 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Selector) {
19519 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
19521 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Identifier) {
19522 if (node.parent && node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Property) {
19523 if (node.isCustomProperty) {
19524 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
19529 switch (node.parent.type) {
19530 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FunctionDeclaration:
19531 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.MixinDeclaration:
19532 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Keyframe:
19533 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.VariableDeclaration:
19534 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FunctionParameter:
19535 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
19538 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Read;
19540 function toTwoDigitHex(n) {
19541 var r = n.toString(16);
19542 return r.length !== 2 ? '0' + r : r;
19544 function getModuleNameFromPath(path) {
19545 // If a scoped module (starts with @) then get up until second instance of '/', otherwise get until first instance of '/'
19546 if (path[0] === '@') {
19547 return path.substring(0, path.indexOf('/', path.indexOf('/') + 1));
19549 return path.substring(0, path.indexOf('/'));
19555 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19557 __webpack_require__.r(__webpack_exports__);
19558 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19559 /* harmony export */ "CSSCodeActions": () => /* binding */ CSSCodeActions
19560 /* harmony export */ });
19561 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19562 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92);
19563 /* harmony import */ var _services_lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(114);
19564 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(105);
19565 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
19566 /*---------------------------------------------------------------------------------------------
19567 * Copyright (c) Microsoft Corporation. All rights reserved.
19568 * Licensed under the MIT License. See License.txt in the project root for license information.
19569 *--------------------------------------------------------------------------------------------*/
19576 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__.loadMessageBundle();
19577 var CSSCodeActions = /** @class */ (function () {
19578 function CSSCodeActions(cssDataManager) {
19579 this.cssDataManager = cssDataManager;
19581 CSSCodeActions.prototype.doCodeActions = function (document, range, context, stylesheet) {
19582 return this.doCodeActions2(document, range, context, stylesheet).map(function (ca) {
19583 var textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0];
19584 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.Command.create(ca.title, '_css.applyCodeAction', document.uri, document.version, textDocumentEdit && textDocumentEdit.edits);
19587 CSSCodeActions.prototype.doCodeActions2 = function (document, range, context, stylesheet) {
19589 if (context.diagnostics) {
19590 for (var _i = 0, _a = context.diagnostics; _i < _a.length; _i++) {
19591 var diagnostic = _a[_i];
19592 this.appendFixesForMarker(document, stylesheet, diagnostic, result);
19597 CSSCodeActions.prototype.getFixesForUnknownProperty = function (document, property, marker, result) {
19598 var propertyName = property.getName();
19599 var candidates = [];
19600 this.cssDataManager.getProperties().forEach(function (p) {
19601 var score = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.difference)(propertyName, p.name);
19602 if (score >= propertyName.length / 2 /*score_lim*/) {
19603 candidates.push({ property: p.name, score: score });
19606 // Sort in descending order.
19607 candidates.sort(function (a, b) {
19608 return b.score - a.score || a.property.localeCompare(b.property);
19610 var maxActions = 3;
19611 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
19612 var candidate = candidates_1[_i];
19613 var propertyName_1 = candidate.property;
19614 var title = localize('css.codeaction.rename', "Rename to '{0}'", propertyName_1);
19615 var edit = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(marker.range, propertyName_1);
19616 var documentIdentifier = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.VersionedTextDocumentIdentifier.create(document.uri, document.version);
19617 var workspaceEdit = { documentChanges: [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextDocumentEdit.create(documentIdentifier, [edit])] };
19618 var codeAction = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CodeAction.create(title, workspaceEdit, _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CodeActionKind.QuickFix);
19619 codeAction.diagnostics = [marker];
19620 result.push(codeAction);
19621 if (--maxActions <= 0) {
19626 CSSCodeActions.prototype.appendFixesForMarker = function (document, stylesheet, marker, result) {
19627 if (marker.code !== _services_lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.UnknownProperty.id) {
19630 var offset = document.offsetAt(marker.range.start);
19631 var end = document.offsetAt(marker.range.end);
19632 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(stylesheet, offset);
19633 for (var i = nodepath.length - 1; i >= 0; i--) {
19634 var node = nodepath[i];
19635 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
19636 var property = node.getProperty();
19637 if (property && property.offset === offset && property.end === end) {
19638 this.getFixesForUnknownProperty(document, property, marker, result);
19644 return CSSCodeActions;
19651 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19653 __webpack_require__.r(__webpack_exports__);
19654 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19655 /* harmony export */ "Rule": () => /* binding */ Rule,
19656 /* harmony export */ "Setting": () => /* binding */ Setting,
19657 /* harmony export */ "Rules": () => /* binding */ Rules,
19658 /* harmony export */ "Settings": () => /* binding */ Settings,
19659 /* harmony export */ "LintConfigurationSettings": () => /* binding */ LintConfigurationSettings
19660 /* harmony export */ });
19661 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19662 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94);
19663 /*---------------------------------------------------------------------------------------------
19664 * Copyright (c) Microsoft Corporation. All rights reserved.
19665 * Licensed under the MIT License. See License.txt in the project root for license information.
19666 *--------------------------------------------------------------------------------------------*/
19670 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
19671 var Warning = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Warning;
19672 var Error = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Error;
19673 var Ignore = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore;
19674 var Rule = /** @class */ (function () {
19675 function Rule(id, message, defaultValue) {
19677 this.message = message;
19678 this.defaultValue = defaultValue;
19684 var Setting = /** @class */ (function () {
19685 function Setting(id, message, defaultValue) {
19687 this.message = message;
19688 this.defaultValue = defaultValue;
19695 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),
19696 IncludeStandardPropertyWhenUsingVendorPrefix: new Rule('vendorPrefix', localize('rule.standardvendorprefix.all', "When using a vendor-specific prefix also include the standard property"), Warning),
19697 DuplicateDeclarations: new Rule('duplicateProperties', localize('rule.duplicateDeclarations', "Do not use duplicate style definitions"), Ignore),
19698 EmptyRuleSet: new Rule('emptyRules', localize('rule.emptyRuleSets', "Do not use empty rulesets"), Warning),
19699 ImportStatemement: new Rule('importStatement', localize('rule.importDirective', "Import statements do not load in parallel"), Ignore),
19700 BewareOfBoxModelSize: new Rule('boxModel', localize('rule.bewareOfBoxModelSize', "Do not use width or height when using padding or border"), Ignore),
19701 UniversalSelector: new Rule('universalSelector', localize('rule.universalSelector', "The universal selector (*) is known to be slow"), Ignore),
19702 ZeroWithUnit: new Rule('zeroUnits', localize('rule.zeroWidthUnit', "No unit for zero needed"), Ignore),
19703 RequiredPropertiesForFontFace: new Rule('fontFaceProperties', localize('rule.fontFaceProperties', "@font-face rule must define 'src' and 'font-family' properties"), Warning),
19704 HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three, four, six or eight hex numbers"), Error),
19705 ArgsInColorFunction: new Rule('argumentsInColorFunction', localize('rule.colorFunction', "Invalid number of parameters"), Error),
19706 UnknownProperty: new Rule('unknownProperties', localize('rule.unknownProperty', "Unknown property."), Warning),
19707 UnknownAtRules: new Rule('unknownAtRules', localize('rule.unknownAtRules', "Unknown at-rule."), Warning),
19708 IEStarHack: new Rule('ieHack', localize('rule.ieHack', "IE hacks are only necessary when supporting IE7 and older"), Ignore),
19709 UnknownVendorSpecificProperty: new Rule('unknownVendorSpecificProperties', localize('rule.unknownVendorSpecificProperty', "Unknown vendor specific property."), Ignore),
19710 PropertyIgnoredDueToDisplay: new Rule('propertyIgnoredDueToDisplay', localize('rule.propertyIgnoredDueToDisplay', "Property is ignored due to the display."), Warning),
19711 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),
19712 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),
19713 AvoidIdSelector: new Rule('idSelector', localize('rule.avoidIdSelector', "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore),
19716 ValidProperties: new Setting('validProperties', localize('rule.validProperties', "A list of properties that are not validated against the `unknownProperties` rule."), [])
19718 var LintConfigurationSettings = /** @class */ (function () {
19719 function LintConfigurationSettings(conf) {
19720 if (conf === void 0) { conf = {}; }
19723 LintConfigurationSettings.prototype.getRule = function (rule) {
19724 if (this.conf.hasOwnProperty(rule.id)) {
19725 var level = toLevel(this.conf[rule.id]);
19730 return rule.defaultValue;
19732 LintConfigurationSettings.prototype.getSetting = function (setting) {
19733 return this.conf[setting.id];
19735 return LintConfigurationSettings;
19738 function toLevel(level) {
19740 case 'ignore': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore;
19741 case 'warning': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Warning;
19742 case 'error': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Error;
19750 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19752 __webpack_require__.r(__webpack_exports__);
19753 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19754 /* harmony export */ "CSSValidation": () => /* binding */ CSSValidation
19755 /* harmony export */ });
19756 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
19757 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(114);
19758 /* harmony import */ var _lint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(116);
19759 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(105);
19760 /*---------------------------------------------------------------------------------------------
19761 * Copyright (c) Microsoft Corporation. All rights reserved.
19762 * Licensed under the MIT License. See License.txt in the project root for license information.
19763 *--------------------------------------------------------------------------------------------*/
19769 var CSSValidation = /** @class */ (function () {
19770 function CSSValidation(cssDataManager) {
19771 this.cssDataManager = cssDataManager;
19773 CSSValidation.prototype.configure = function (settings) {
19774 this.settings = settings;
19776 CSSValidation.prototype.doValidation = function (document, stylesheet, settings) {
19777 if (settings === void 0) { settings = this.settings; }
19778 if (settings && settings.validate === false) {
19782 entries.push.apply(entries, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ParseErrorCollector.entries(stylesheet));
19783 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));
19785 for (var r in _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules) {
19786 ruleIds.push(_lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules[r].id);
19788 function toDiagnostic(marker) {
19789 var range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength()));
19790 var source = document.languageId;
19792 code: marker.getRule().id,
19794 message: marker.getMessage(),
19795 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,
19799 return entries.filter(function (entry) { return entry.getLevel() !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore; }).map(toDiagnostic);
19801 return CSSValidation;
19808 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19810 __webpack_require__.r(__webpack_exports__);
19811 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19812 /* harmony export */ "LintVisitor": () => /* binding */ LintVisitor
19813 /* harmony export */ });
19814 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
19815 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(114);
19816 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91);
19817 /* harmony import */ var _lintUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(117);
19818 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(104);
19819 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94);
19820 /*---------------------------------------------------------------------------------------------
19821 * Copyright (c) Microsoft Corporation. All rights reserved.
19822 * Licensed under the MIT License. See License.txt in the project root for license information.
19823 *--------------------------------------------------------------------------------------------*/
19831 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();
19832 var NodesByRootMap = /** @class */ (function () {
19833 function NodesByRootMap() {
19836 NodesByRootMap.prototype.add = function (root, name, node) {
19837 var entry = this.data[root];
19839 entry = { nodes: [], names: [] };
19840 this.data[root] = entry;
19842 entry.names.push(name);
19844 entry.nodes.push(node);
19847 return NodesByRootMap;
19849 var LintVisitor = /** @class */ (function () {
19850 function LintVisitor(document, settings, cssDataManager) {
19852 this.cssDataManager = cssDataManager;
19853 this.warnings = [];
19854 this.settings = settings;
19855 this.documentText = document.getText();
19856 this.keyframes = new NodesByRootMap();
19857 this.validProperties = {};
19858 var properties = settings.getSetting(_lintRules__WEBPACK_IMPORTED_MODULE_1__.Settings.ValidProperties);
19859 if (Array.isArray(properties)) {
19860 properties.forEach(function (p) {
19861 if (typeof p === 'string') {
19862 var name = p.trim().toLowerCase();
19864 _this.validProperties[name] = true;
19870 LintVisitor.entries = function (node, document, settings, cssDataManager, entryFilter) {
19871 var visitor = new LintVisitor(document, settings, cssDataManager);
19872 node.acceptVisitor(visitor);
19873 visitor.completeValidations();
19874 return visitor.getEntries(entryFilter);
19876 LintVisitor.prototype.isValidPropertyDeclaration = function (element) {
19877 var propertyName = element.fullPropertyName;
19878 return this.validProperties[propertyName];
19880 LintVisitor.prototype.fetch = function (input, s) {
19882 for (var _i = 0, input_1 = input; _i < input_1.length; _i++) {
19883 var curr = input_1[_i];
19884 if (curr.fullPropertyName === s) {
19885 elements.push(curr);
19890 LintVisitor.prototype.fetchWithValue = function (input, s, v) {
19892 for (var _i = 0, input_2 = input; _i < input_2.length; _i++) {
19893 var inputElement = input_2[_i];
19894 if (inputElement.fullPropertyName === s) {
19895 var expression = inputElement.node.getValue();
19896 if (expression && this.findValueInExpression(expression, v)) {
19897 elements.push(inputElement);
19903 LintVisitor.prototype.findValueInExpression = function (expression, v) {
19905 expression.accept(function (node) {
19906 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Identifier && node.matches(v)) {
19913 LintVisitor.prototype.getEntries = function (filter) {
19914 if (filter === void 0) { filter = (_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Level.Warning | _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Level.Error); }
19915 return this.warnings.filter(function (entry) {
19916 return (entry.getLevel() & filter) !== 0;
19919 LintVisitor.prototype.addEntry = function (node, rule, details) {
19920 var entry = new _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Marker(node, rule, this.settings.getRule(rule), details);
19921 this.warnings.push(entry);
19923 LintVisitor.prototype.getMissingNames = function (expected, actual) {
19924 var expectedClone = expected.slice(0); // clone
19925 for (var i = 0; i < actual.length; i++) {
19926 var k = expectedClone.indexOf(actual[i]);
19928 expectedClone[k] = null;
19932 for (var i = 0; i < expectedClone.length; i++) {
19933 var curr = expectedClone[i];
19935 if (result === null) {
19936 result = localize('namelist.single', "'{0}'", curr);
19939 result = localize('namelist.concatenated', "{0}, '{1}'", result, curr);
19945 LintVisitor.prototype.visitNode = function (node) {
19946 switch (node.type) {
19947 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.UnknownAtRule:
19948 return this.visitUnknownAtRule(node);
19949 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Keyframe:
19950 return this.visitKeyframe(node);
19951 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FontFace:
19952 return this.visitFontFace(node);
19953 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Ruleset:
19954 return this.visitRuleSet(node);
19955 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.SimpleSelector:
19956 return this.visitSimpleSelector(node);
19957 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Function:
19958 return this.visitFunction(node);
19959 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.NumericValue:
19960 return this.visitNumericValue(node);
19961 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Import:
19962 return this.visitImport(node);
19963 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.HexColorValue:
19964 return this.visitHexColorValue(node);
19965 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Prio:
19966 return this.visitPrio(node);
19970 LintVisitor.prototype.completeValidations = function () {
19971 this.validateKeyframes();
19973 LintVisitor.prototype.visitUnknownAtRule = function (node) {
19974 var atRuleName = node.getChild(0);
19978 var atDirective = this.cssDataManager.getAtDirective(atRuleName.getText());
19982 this.addEntry(atRuleName, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.UnknownAtRules, "Unknown at rule " + atRuleName.getText());
19985 LintVisitor.prototype.visitKeyframe = function (node) {
19986 var keyword = node.getKeyword();
19990 var text = keyword.getText();
19991 this.keyframes.add(node.getName(), text, (text !== '@keyframes') ? keyword : null);
19994 LintVisitor.prototype.validateKeyframes = function () {
19995 // @keyframe and it's vendor specific alternatives
19996 // @keyframe should be included
19997 var expected = ['@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes'];
19998 for (var name in this.keyframes.data) {
19999 var actual = this.keyframes.data[name].names;
20000 var needsStandard = (actual.indexOf('@keyframes') === -1);
20001 if (!needsStandard && actual.length === 1) {
20002 continue; // only the non-vendor specific keyword is used, that's fine, no warning
20004 var missingVendorSpecific = this.getMissingNames(expected, actual);
20005 if (missingVendorSpecific || needsStandard) {
20006 for (var _i = 0, _a = this.keyframes.data[name].nodes; _i < _a.length; _i++) {
20008 if (needsStandard) {
20009 var message = localize('keyframes.standardrule.missing', "Always define standard rule '@keyframes' when defining keyframes.");
20010 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
20012 if (missingVendorSpecific) {
20013 var message = localize('keyframes.vendorspecific.missing', "Always include all vendor specific rules: Missing: {0}", missingVendorSpecific);
20014 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.AllVendorPrefixes, message);
20021 LintVisitor.prototype.visitSimpleSelector = function (node) {
20022 var firstChar = this.documentText.charAt(node.offset);
20023 /////////////////////////////////////////////////////////////
20024 // Lint - The universal selector (*) is known to be slow.
20025 /////////////////////////////////////////////////////////////
20026 if (node.length === 1 && firstChar === '*') {
20027 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.UniversalSelector);
20029 /////////////////////////////////////////////////////////////
20030 // Lint - Avoid id selectors
20031 /////////////////////////////////////////////////////////////
20032 if (firstChar === '#') {
20033 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.AvoidIdSelector);
20037 LintVisitor.prototype.visitImport = function (node) {
20038 /////////////////////////////////////////////////////////////
20039 // Lint - Import statements shouldn't be used, because they aren't offering parallel downloads.
20040 /////////////////////////////////////////////////////////////
20041 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.ImportStatemement);
20044 LintVisitor.prototype.visitRuleSet = function (node) {
20045 /////////////////////////////////////////////////////////////
20046 // Lint - Don't use empty rulesets.
20047 /////////////////////////////////////////////////////////////
20048 var declarations = node.getDeclarations();
20049 if (!declarations) {
20053 if (!declarations.hasChildren()) {
20054 this.addEntry(node.getSelectors(), _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.EmptyRuleSet);
20056 var propertyTable = [];
20057 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
20058 var element = _a[_i];
20059 if (element instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Declaration) {
20060 propertyTable.push(new _lintUtil__WEBPACK_IMPORTED_MODULE_3__.Element(element));
20063 /////////////////////////////////////////////////////////////
20064 // the rule warns when it finds:
20065 // width being used with border, border-left, border-right, padding, padding-left, or padding-right
20066 // height being used with border, border-top, border-bottom, padding, padding-top, or padding-bottom
20067 // No error when box-sizing property is specified, as it assumes the user knows what he's doing.
20068 // see https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size
20069 /////////////////////////////////////////////////////////////
20070 var boxModel = (0,_lintUtil__WEBPACK_IMPORTED_MODULE_3__.default)(propertyTable);
20071 if (boxModel.width) {
20072 var properties = [];
20073 if (boxModel.right.value) {
20074 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_5__.union)(properties, boxModel.right.properties);
20076 if (boxModel.left.value) {
20077 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_5__.union)(properties, boxModel.left.properties);
20079 if (properties.length !== 0) {
20080 for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
20081 var item = properties_1[_b];
20082 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.BewareOfBoxModelSize);
20084 this.addEntry(boxModel.width.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.BewareOfBoxModelSize);
20087 if (boxModel.height) {
20088 var properties = [];
20089 if (boxModel.top.value) {
20090 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_5__.union)(properties, boxModel.top.properties);
20092 if (boxModel.bottom.value) {
20093 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_5__.union)(properties, boxModel.bottom.properties);
20095 if (properties.length !== 0) {
20096 for (var _c = 0, properties_2 = properties; _c < properties_2.length; _c++) {
20097 var item = properties_2[_c];
20098 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.BewareOfBoxModelSize);
20100 this.addEntry(boxModel.height.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.BewareOfBoxModelSize);
20103 /////////////////////////////////////////////////////////////
20104 // Properties ignored due to display
20105 /////////////////////////////////////////////////////////////
20106 // With 'display: inline-block', 'float' has no effect
20107 var displayElems = this.fetchWithValue(propertyTable, 'display', 'inline-block');
20108 if (displayElems.length > 0) {
20109 var elem = this.fetch(propertyTable, 'float');
20110 for (var index = 0; index < elem.length; index++) {
20111 var node_1 = elem[index].node;
20112 var value = node_1.getValue();
20113 if (value && !value.matches('none')) {
20114 this.addEntry(node_1, _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'"));
20118 // With 'display: block', 'vertical-align' has no effect
20119 displayElems = this.fetchWithValue(propertyTable, 'display', 'block');
20120 if (displayElems.length > 0) {
20121 var elem = this.fetch(propertyTable, 'vertical-align');
20122 for (var index = 0; index < elem.length; index++) {
20123 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."));
20126 /////////////////////////////////////////////////////////////
20128 /////////////////////////////////////////////////////////////
20129 var elements = this.fetch(propertyTable, 'float');
20130 for (var index = 0; index < elements.length; index++) {
20131 var element = elements[index];
20132 if (!this.isValidPropertyDeclaration(element)) {
20133 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.AvoidFloat);
20136 /////////////////////////////////////////////////////////////
20137 // Don't use duplicate declarations.
20138 /////////////////////////////////////////////////////////////
20139 for (var i = 0; i < propertyTable.length; i++) {
20140 var element = propertyTable[i];
20141 if (element.fullPropertyName !== 'background' && !this.validProperties[element.fullPropertyName]) {
20142 var value = element.node.getValue();
20143 if (value && this.documentText.charAt(value.offset) !== '-') {
20144 var elements_1 = this.fetch(propertyTable, element.fullPropertyName);
20145 if (elements_1.length > 1) {
20146 for (var k = 0; k < elements_1.length; k++) {
20147 var value_1 = elements_1[k].node.getValue();
20148 if (value_1 && this.documentText.charAt(value_1.offset) !== '-' && elements_1[k] !== element) {
20149 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.DuplicateDeclarations);
20156 /////////////////////////////////////////////////////////////
20157 // Unknown propery & When using a vendor-prefixed gradient, make sure to use them all.
20158 /////////////////////////////////////////////////////////////
20159 var isExportBlock = node.getSelectors().matches(":export");
20160 if (!isExportBlock) {
20161 var propertiesBySuffix = new NodesByRootMap();
20162 var containsUnknowns = false;
20163 for (var _d = 0, propertyTable_1 = propertyTable; _d < propertyTable_1.length; _d++) {
20164 var element = propertyTable_1[_d];
20165 var decl = element.node;
20166 if (this.isCSSDeclaration(decl)) {
20167 var name = element.fullPropertyName;
20168 var firstChar = name.charAt(0);
20169 if (firstChar === '-') {
20170 if (name.charAt(1) !== '-') { // avoid css variables
20171 if (!this.cssDataManager.isKnownProperty(name) && !this.validProperties[name]) {
20172 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.UnknownVendorSpecificProperty);
20174 var nonPrefixedName = decl.getNonPrefixedPropertyName();
20175 propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty());
20179 var fullName = name;
20180 if (firstChar === '*' || firstChar === '_') {
20181 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.IEStarHack);
20182 name = name.substr(1);
20184 // _property and *property might be contributed via custom data
20185 if (!this.cssDataManager.isKnownProperty(fullName) && !this.cssDataManager.isKnownProperty(name)) {
20186 if (!this.validProperties[name]) {
20187 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.UnknownProperty, localize('property.unknownproperty.detailed', "Unknown property: '{0}'", decl.getFullPropertyName()));
20190 propertiesBySuffix.add(name, name, null); // don't pass the node as we don't show errors on the standard
20194 containsUnknowns = true;
20197 if (!containsUnknowns) { // don't perform this test if there are
20198 for (var suffix in propertiesBySuffix.data) {
20199 var entry = propertiesBySuffix.data[suffix];
20200 var actual = entry.names;
20201 var needsStandard = this.cssDataManager.isStandardProperty(suffix) && (actual.indexOf(suffix) === -1);
20202 if (!needsStandard && actual.length === 1) {
20203 continue; // only the non-vendor specific rule is used, that's fine, no warning
20206 for (var i = 0, len = LintVisitor.prefixes.length; i < len; i++) {
20207 var prefix = LintVisitor.prefixes[i];
20208 if (this.cssDataManager.isStandardProperty(prefix + suffix)) {
20209 expected.push(prefix + suffix);
20212 var missingVendorSpecific = this.getMissingNames(expected, actual);
20213 if (missingVendorSpecific || needsStandard) {
20214 for (var _e = 0, _f = entry.nodes; _e < _f.length; _e++) {
20215 var node_2 = _f[_e];
20216 if (needsStandard) {
20217 var message = localize('property.standard.missing', "Also define the standard property '{0}' for compatibility", suffix);
20218 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
20220 if (missingVendorSpecific) {
20221 var message = localize('property.vendorspecific.missing', "Always include all vendor specific properties: Missing: {0}", missingVendorSpecific);
20222 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.AllVendorPrefixes, message);
20231 LintVisitor.prototype.visitPrio = function (node) {
20232 /////////////////////////////////////////////////////////////
20233 // Don't use !important
20234 /////////////////////////////////////////////////////////////
20235 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.AvoidImportant);
20238 LintVisitor.prototype.visitNumericValue = function (node) {
20239 /////////////////////////////////////////////////////////////
20240 // 0 has no following unit
20241 /////////////////////////////////////////////////////////////
20242 var funcDecl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Function);
20243 if (funcDecl && funcDecl.getName() === 'calc') {
20246 var decl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Declaration);
20248 var declValue = decl.getValue();
20250 var value = node.getValue();
20251 if (!value.unit || _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__.units.length.indexOf(value.unit.toLowerCase()) === -1) {
20254 if (parseFloat(value.value) === 0.0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) {
20255 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.ZeroWithUnit);
20261 LintVisitor.prototype.visitFontFace = function (node) {
20262 var declarations = node.getDeclarations();
20263 if (!declarations) {
20267 var definesSrc = false, definesFontFamily = false;
20268 var containsUnknowns = false;
20269 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
20270 var node_3 = _a[_i];
20271 if (this.isCSSDeclaration(node_3)) {
20272 var name = node_3.getProperty().getName().toLowerCase();
20273 if (name === 'src') {
20276 if (name === 'font-family') {
20277 definesFontFamily = true;
20281 containsUnknowns = true;
20284 if (!containsUnknowns && (!definesSrc || !definesFontFamily)) {
20285 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.RequiredPropertiesForFontFace);
20289 LintVisitor.prototype.isCSSDeclaration = function (node) {
20290 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Declaration) {
20291 if (!node.getValue()) {
20294 var property = node.getProperty();
20298 var identifier = property.getIdentifier();
20299 if (!identifier || identifier.containsInterpolation()) {
20306 LintVisitor.prototype.visitHexColorValue = function (node) {
20307 // Rule: #eeff0011 or #eeff00 or #ef01 or #ef0
20308 var length = node.length;
20309 if (length !== 9 && length !== 7 && length !== 5 && length !== 4) {
20310 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.HexColorLength);
20314 LintVisitor.prototype.visitFunction = function (node) {
20315 var fnName = node.getName().toLowerCase();
20316 var expectedAttrCount = -1;
20317 var actualAttrCount = 0;
20321 expectedAttrCount = 3;
20325 expectedAttrCount = 4;
20328 if (expectedAttrCount !== -1) {
20329 node.getArguments().accept(function (n) {
20330 if (n instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.BinaryExpression) {
20331 actualAttrCount += 1;
20336 if (actualAttrCount !== expectedAttrCount) {
20337 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules.ArgsInColorFunction);
20342 LintVisitor.prefixes = [
20343 '-ms-', '-moz-', '-o-', '-webkit-',
20345 return LintVisitor;
20352 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20354 __webpack_require__.r(__webpack_exports__);
20355 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20356 /* harmony export */ "Element": () => /* binding */ Element,
20357 /* harmony export */ "default": () => /* binding */ calculateBoxModel
20358 /* harmony export */ });
20359 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(104);
20360 /*---------------------------------------------------------------------------------------------
20361 * Copyright (c) Microsoft Corporation. All rights reserved.
20362 * Licensed under the MIT License. See License.txt in the project root for license information.
20363 *--------------------------------------------------------------------------------------------*/
20366 var Element = /** @class */ (function () {
20367 function Element(decl) {
20368 this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
20374 function setSide(model, side, value, property) {
20375 var state = model[side];
20376 state.value = value;
20378 if (!(0,_utils_arrays__WEBPACK_IMPORTED_MODULE_0__.includes)(state.properties, property)) {
20379 state.properties.push(property);
20383 function setAllSides(model, value, property) {
20384 setSide(model, 'top', value, property);
20385 setSide(model, 'right', value, property);
20386 setSide(model, 'bottom', value, property);
20387 setSide(model, 'left', value, property);
20389 function updateModelWithValue(model, side, value, property) {
20390 if (side === 'top' || side === 'right' ||
20391 side === 'bottom' || side === 'left') {
20392 setSide(model, side, value, property);
20395 setAllSides(model, value, property);
20398 function updateModelWithList(model, values, property) {
20399 switch (values.length) {
20401 updateModelWithValue(model, undefined, values[0], property);
20404 updateModelWithValue(model, 'top', values[0], property);
20405 updateModelWithValue(model, 'bottom', values[0], property);
20406 updateModelWithValue(model, 'right', values[1], property);
20407 updateModelWithValue(model, 'left', values[1], property);
20410 updateModelWithValue(model, 'top', values[0], property);
20411 updateModelWithValue(model, 'right', values[1], property);
20412 updateModelWithValue(model, 'left', values[1], property);
20413 updateModelWithValue(model, 'bottom', values[2], property);
20416 updateModelWithValue(model, 'top', values[0], property);
20417 updateModelWithValue(model, 'right', values[1], property);
20418 updateModelWithValue(model, 'bottom', values[2], property);
20419 updateModelWithValue(model, 'left', values[3], property);
20423 function matches(value, candidates) {
20424 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
20425 var candidate = candidates_1[_i];
20426 if (value.matches(candidate)) {
20433 * @param allowsKeywords whether the initial value of property is zero, so keywords `initial` and `unset` count as zero
20434 * @return `true` if this node represents a non-zero border; otherwise, `false`
20436 function checkLineWidth(value, allowsKeywords) {
20437 if (allowsKeywords === void 0) { allowsKeywords = true; }
20438 if (allowsKeywords && matches(value, ['initial', 'unset'])) {
20441 // a <length> is a value and a unit
20442 // so use `parseFloat` to strip the unit
20443 return parseFloat(value.getText()) !== 0;
20445 function checkLineWidthList(nodes, allowsKeywords) {
20446 if (allowsKeywords === void 0) { allowsKeywords = true; }
20447 return nodes.map(function (node) { return checkLineWidth(node, allowsKeywords); });
20450 * @param allowsKeywords whether keywords `initial` and `unset` count as zero
20451 * @return `true` if this node represents a non-zero border; otherwise, `false`
20453 function checkLineStyle(valueNode, allowsKeywords) {
20454 if (allowsKeywords === void 0) { allowsKeywords = true; }
20455 if (matches(valueNode, ['none', 'hidden'])) {
20458 if (allowsKeywords && matches(valueNode, ['initial', 'unset'])) {
20463 function checkLineStyleList(nodes, allowsKeywords) {
20464 if (allowsKeywords === void 0) { allowsKeywords = true; }
20465 return nodes.map(function (node) { return checkLineStyle(node, allowsKeywords); });
20467 function checkBorderShorthand(node) {
20468 var children = node.getChildren();
20469 // the only child can be a keyword, a <line-width>, or a <line-style>
20470 // if either check returns false, the result is no border
20471 if (children.length === 1) {
20472 var value = children[0];
20473 return checkLineWidth(value) && checkLineStyle(value);
20475 // multiple children can't contain keywords
20476 // if any child means no border, the result is no border
20477 for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
20478 var child = children_1[_i];
20480 if (!checkLineWidth(value, /* allowsKeywords: */ false) ||
20481 !checkLineStyle(value, /* allowsKeywords: */ false)) {
20487 function calculateBoxModel(propertyTable) {
20489 top: { value: false, properties: [] },
20490 right: { value: false, properties: [] },
20491 bottom: { value: false, properties: [] },
20492 left: { value: false, properties: [] },
20494 for (var _i = 0, propertyTable_1 = propertyTable; _i < propertyTable_1.length; _i++) {
20495 var property = propertyTable_1[_i];
20496 var value = property.node.value;
20497 if (typeof value === 'undefined') {
20500 switch (property.fullPropertyName) {
20502 // has `box-sizing`, bail out
20504 top: { value: false, properties: [] },
20505 right: { value: false, properties: [] },
20506 bottom: { value: false, properties: [] },
20507 left: { value: false, properties: [] },
20510 model.width = property;
20513 model.height = property;
20516 var segments = property.fullPropertyName.split('-');
20517 switch (segments[0]) {
20519 switch (segments[1]) {
20525 switch (segments[2]) {
20527 updateModelWithValue(model, segments[1], checkBorderShorthand(value), property);
20530 // the initial value of `border-width` is `medium`, not zero
20531 updateModelWithValue(model, segments[1], checkLineWidth(value, false), property);
20534 // the initial value of `border-style` is `none`
20535 updateModelWithValue(model, segments[1], checkLineStyle(value, true), property);
20540 // the initial value of `border-width` is `medium`, not zero
20541 updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property);
20544 // the initial value of `border-style` is `none`
20545 updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property);
20550 if (segments.length === 1) {
20551 // the initial value of `padding` is zero
20552 updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property);
20555 // the initial value of `padding` is zero
20556 updateModelWithValue(model, segments[1], checkLineWidth(value, true), property);
20569 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20571 __webpack_require__.r(__webpack_exports__);
20572 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20573 /* harmony export */ "SCSSParser": () => /* binding */ SCSSParser
20574 /* harmony export */ });
20575 /* harmony import */ var _scssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(119);
20576 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
20577 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
20578 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91);
20579 /* harmony import */ var _scssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(120);
20580 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(93);
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 *--------------------------------------------------------------------------------------------*/
20586 var __extends = (undefined && undefined.__extends) || (function () {
20587 var extendStatics = function (d, b) {
20588 extendStatics = Object.setPrototypeOf ||
20589 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20590 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20591 return extendStatics(d, b);
20593 return function (d, b) {
20594 extendStatics(d, b);
20595 function __() { this.constructor = d; }
20596 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20606 /// A parser for scss
20607 /// http://sass-lang.com/documentation/file.SASS_REFERENCE.html
20609 var SCSSParser = /** @class */ (function (_super) {
20610 __extends(SCSSParser, _super);
20611 function SCSSParser() {
20612 return _super.call(this, new _scssScanner__WEBPACK_IMPORTED_MODULE_0__.SCSSScanner()) || this;
20614 SCSSParser.prototype._parseStylesheetStatement = function (isNested) {
20615 if (isNested === void 0) { isNested = false; }
20616 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
20617 return this._parseWarnAndDebug() // @warn, @debug and @error statements
20618 || this._parseControlStatement() // @if, @while, @for, @each
20619 || this._parseMixinDeclaration() // @mixin
20620 || this._parseMixinContent() // @content
20621 || this._parseMixinReference() // @include
20622 || this._parseFunctionDeclaration() // @function
20623 || this._parseForward() // @forward
20624 || this._parseUse() // @use
20625 || this._parseRuleset(isNested) // @at-rule
20626 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
20628 return this._parseRuleset(true) || this._parseVariableDeclaration();
20630 SCSSParser.prototype._parseImport = function () {
20631 if (!this.peekKeyword('@import')) {
20634 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Import);
20635 this.consumeToken();
20636 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
20637 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.URIOrStringExpected);
20639 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
20640 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
20641 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.URIOrStringExpected);
20644 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
20645 node.setMedialist(this._parseMediaQueryList());
20647 return this.finish(node);
20649 // scss variables: $font-size: 12px;
20650 SCSSParser.prototype._parseVariableDeclaration = function (panic) {
20651 if (panic === void 0) { panic = []; }
20652 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.VariableName)) {
20655 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.VariableDeclaration);
20656 if (!node.setVariable(this._parseVariable())) {
20659 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
20660 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ColonExpected);
20662 if (this.prevToken) {
20663 node.colonPosition = this.prevToken.offset;
20665 if (!node.setValue(this._parseExpr())) {
20666 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableValueExpected, [], panic);
20668 while (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Exclamation)) {
20669 if (node.addChild(this._tryParsePrio())) {
20673 this.consumeToken();
20674 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /^(default|global)$/)) {
20675 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
20677 this.consumeToken();
20680 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
20681 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
20683 return this.finish(node);
20685 SCSSParser.prototype._parseMediaContentStart = function () {
20686 return this._parseInterpolation();
20688 SCSSParser.prototype._parseMediaFeatureName = function () {
20689 return this._parseModuleMember()
20690 || this._parseFunction() // function before ident
20691 || this._parseIdent()
20692 || this._parseVariable();
20694 SCSSParser.prototype._parseKeyframeSelector = function () {
20695 return this._tryParseKeyframeSelector()
20696 || this._parseControlStatement(this._parseKeyframeSelector.bind(this))
20697 || this._parseVariableDeclaration()
20698 || this._parseMixinContent();
20700 SCSSParser.prototype._parseVariable = function () {
20701 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.VariableName)) {
20704 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Variable);
20705 this.consumeToken();
20708 SCSSParser.prototype._parseModuleMember = function () {
20709 var pos = this.mark();
20710 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Module);
20711 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module]))) {
20714 if (this.hasWhitespace()
20715 || !this.acceptDelim('.')
20716 || this.hasWhitespace()) {
20717 this.restoreAtMark(pos);
20720 if (!node.addChild(this._parseVariable() || this._parseFunction())) {
20721 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrVariableExpected);
20725 SCSSParser.prototype._parseIdent = function (referenceTypes) {
20727 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) && !this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.InterpolationFunction) && !this.peekDelim('-')) {
20730 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
20731 node.referenceTypes = referenceTypes;
20732 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /^--/);
20733 var hasContent = false;
20734 var indentInterpolation = function () {
20735 var pos = _this.mark();
20736 if (_this.acceptDelim('-')) {
20737 if (!_this.hasWhitespace()) {
20738 _this.acceptDelim('-');
20740 if (_this.hasWhitespace()) {
20741 _this.restoreAtMark(pos);
20745 return _this._parseInterpolation();
20747 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) || node.addChild(indentInterpolation()) || (hasContent && this.acceptRegexp(/^[\w-]/))) {
20749 if (this.hasWhitespace()) {
20753 return hasContent ? this.finish(node) : null;
20755 SCSSParser.prototype._parseTermExpression = function () {
20756 return this._parseModuleMember() ||
20757 this._parseVariable() ||
20758 this._parseSelectorCombinator() ||
20759 //this._tryParsePrio() ||
20760 _super.prototype._parseTermExpression.call(this);
20762 SCSSParser.prototype._parseInterpolation = function () {
20763 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.InterpolationFunction)) {
20764 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Interpolation);
20765 this.consumeToken();
20766 if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
20767 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
20768 return this.finish(node);
20770 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
20772 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
20773 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightCurlyExpected);
20775 return this.finish(node);
20779 SCSSParser.prototype._parseOperator = function () {
20780 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.EqualsOperator) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.NotEqualsOperator)
20781 || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.GreaterEqualsOperator) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.SmallerEqualsOperator)
20782 || this.peekDelim('>') || this.peekDelim('<')
20783 || this.peekIdent('and') || this.peekIdent('or')
20784 || this.peekDelim('%')) {
20785 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
20786 this.consumeToken();
20787 return this.finish(node);
20789 return _super.prototype._parseOperator.call(this);
20791 SCSSParser.prototype._parseUnaryOperator = function () {
20792 if (this.peekIdent('not')) {
20793 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
20794 this.consumeToken();
20795 return this.finish(node);
20797 return _super.prototype._parseUnaryOperator.call(this);
20799 SCSSParser.prototype._parseRuleSetDeclaration = function () {
20800 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
20801 return this._parseKeyframe() // nested @keyframe
20802 || this._parseImport() // nested @import
20803 || this._parseMedia(true) // nested @media
20804 || this._parseFontFace() // nested @font-face
20805 || this._parseWarnAndDebug() // @warn, @debug and @error statements
20806 || this._parseControlStatement() // @if, @while, @for, @each
20807 || this._parseFunctionDeclaration() // @function
20808 || this._parseExtends() // @extends
20809 || this._parseMixinReference() // @include
20810 || this._parseMixinContent() // @content
20811 || this._parseMixinDeclaration() // nested @mixin
20812 || this._parseRuleset(true) // @at-rule
20813 || this._parseSupports(true) // @supports
20814 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
20816 return this._parseVariableDeclaration() // variable declaration
20817 || this._tryParseRuleset(true) // nested ruleset
20818 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
20820 SCSSParser.prototype._parseDeclaration = function (resyncStopTokens) {
20821 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Declaration);
20822 if (!node.setProperty(this._parseProperty())) {
20825 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
20826 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon], resyncStopTokens);
20828 if (this.prevToken) {
20829 node.colonPosition = this.prevToken.offset;
20831 var hasContent = false;
20832 if (node.setValue(this._parseExpr())) {
20834 node.addChild(this._parsePrio());
20836 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
20837 node.setNestedProperties(this._parseNestedProperties());
20841 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.PropertyValueExpected);
20844 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
20845 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
20847 return this.finish(node);
20849 SCSSParser.prototype._parseNestedProperties = function () {
20850 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NestedProperties);
20851 return this._parseBody(node, this._parseDeclaration.bind(this));
20853 SCSSParser.prototype._parseExtends = function () {
20854 if (this.peekKeyword('@extend')) {
20855 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
20856 this.consumeToken();
20857 if (!node.getSelectors().addChild(this._parseSimpleSelector())) {
20858 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SelectorExpected);
20860 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
20861 node.getSelectors().addChild(this._parseSimpleSelector());
20863 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Exclamation)) {
20864 if (!this.acceptIdent('optional')) {
20865 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
20868 return this.finish(node);
20872 SCSSParser.prototype._parseSimpleSelectorBody = function () {
20873 return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || _super.prototype._parseSimpleSelectorBody.call(this);
20875 SCSSParser.prototype._parseSelectorCombinator = function () {
20876 if (this.peekDelim('&')) {
20877 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorCombinator);
20878 this.consumeToken();
20879 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('&'))) {
20882 return this.finish(node);
20886 SCSSParser.prototype._parseSelectorPlaceholder = function () {
20887 if (this.peekDelim('%')) {
20888 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorPlaceholder);
20889 this.consumeToken();
20890 this._parseIdent();
20891 return this.finish(node);
20893 else if (this.peekKeyword('@at-root')) {
20894 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorPlaceholder);
20895 this.consumeToken();
20896 return this.finish(node);
20900 SCSSParser.prototype._parseElementName = function () {
20901 var pos = this.mark();
20902 var node = _super.prototype._parseElementName.call(this);
20903 if (node && !this.hasWhitespace() && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) { // for #49589
20904 this.restoreAtMark(pos);
20909 SCSSParser.prototype._tryParsePseudoIdentifier = function () {
20910 return this._parseInterpolation() || _super.prototype._tryParsePseudoIdentifier.call(this); // for #49589
20912 SCSSParser.prototype._parseWarnAndDebug = function () {
20913 if (!this.peekKeyword('@debug')
20914 && !this.peekKeyword('@warn')
20915 && !this.peekKeyword('@error')) {
20918 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Debug);
20919 this.consumeToken(); // @debug, @warn or @error
20920 node.addChild(this._parseExpr()); // optional
20921 return this.finish(node);
20923 SCSSParser.prototype._parseControlStatement = function (parseStatement) {
20924 if (parseStatement === void 0) { parseStatement = this._parseRuleSetDeclaration.bind(this); }
20925 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
20928 return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement)
20929 || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement);
20931 SCSSParser.prototype._parseIfStatement = function (parseStatement) {
20932 if (!this.peekKeyword('@if')) {
20935 return this._internalParseIfStatement(parseStatement);
20937 SCSSParser.prototype._internalParseIfStatement = function (parseStatement) {
20938 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.IfStatement);
20939 this.consumeToken(); // @if or if
20940 if (!node.setExpression(this._parseExpr(true))) {
20941 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
20943 this._parseBody(node, parseStatement);
20944 if (this.acceptKeyword('@else')) {
20945 if (this.peekIdent('if')) {
20946 node.setElseClause(this._internalParseIfStatement(parseStatement));
20948 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
20949 var elseNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ElseStatement);
20950 this._parseBody(elseNode, parseStatement);
20951 node.setElseClause(elseNode);
20954 return this.finish(node);
20956 SCSSParser.prototype._parseForStatement = function (parseStatement) {
20957 if (!this.peekKeyword('@for')) {
20960 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ForStatement);
20961 this.consumeToken(); // @for
20962 if (!node.setVariable(this._parseVariable())) {
20963 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20965 if (!this.acceptIdent('from')) {
20966 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.FromExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20968 if (!node.addChild(this._parseBinaryExpr())) {
20969 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20971 if (!this.acceptIdent('to') && !this.acceptIdent('through')) {
20972 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.ThroughOrToExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20974 if (!node.addChild(this._parseBinaryExpr())) {
20975 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20977 return this._parseBody(node, parseStatement);
20979 SCSSParser.prototype._parseEachStatement = function (parseStatement) {
20980 if (!this.peekKeyword('@each')) {
20983 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.EachStatement);
20984 this.consumeToken(); // @each
20985 var variables = node.getVariables();
20986 if (!variables.addChild(this._parseVariable())) {
20987 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20989 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
20990 if (!variables.addChild(this._parseVariable())) {
20991 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20994 this.finish(variables);
20995 if (!this.acceptIdent('in')) {
20996 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.InExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
20998 if (!node.addChild(this._parseExpr())) {
20999 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21001 return this._parseBody(node, parseStatement);
21003 SCSSParser.prototype._parseWhileStatement = function (parseStatement) {
21004 if (!this.peekKeyword('@while')) {
21007 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.WhileStatement);
21008 this.consumeToken(); // @while
21009 if (!node.addChild(this._parseBinaryExpr())) {
21010 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21012 return this._parseBody(node, parseStatement);
21014 SCSSParser.prototype._parseFunctionBodyDeclaration = function () {
21015 return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug()
21016 || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this));
21018 SCSSParser.prototype._parseFunctionDeclaration = function () {
21019 if (!this.peekKeyword('@function')) {
21022 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionDeclaration);
21023 this.consumeToken(); // @function
21024 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Function]))) {
21025 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21027 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21028 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21030 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21031 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21032 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21035 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21036 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
21040 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21041 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21043 return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this));
21045 SCSSParser.prototype._parseReturnStatement = function () {
21046 if (!this.peekKeyword('@return')) {
21049 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.ReturnStatement);
21050 this.consumeToken(); // @function
21051 if (!node.addChild(this._parseExpr())) {
21052 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
21054 return this.finish(node);
21056 SCSSParser.prototype._parseMixinDeclaration = function () {
21057 if (!this.peekKeyword('@mixin')) {
21060 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
21061 this.consumeToken();
21062 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]))) {
21063 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21065 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21066 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21067 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21068 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21071 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21072 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
21076 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21077 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21080 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
21082 SCSSParser.prototype._parseParameterDeclaration = function () {
21083 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionParameter);
21084 if (!node.setIdentifier(this._parseVariable())) {
21087 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
21090 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
21091 if (!node.setDefaultValue(this._parseExpr(true))) {
21092 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]);
21095 return this.finish(node);
21097 SCSSParser.prototype._parseMixinContent = function () {
21098 if (!this.peekKeyword('@content')) {
21101 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinContentReference);
21102 this.consumeToken();
21103 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21104 if (node.getArguments().addChild(this._parseFunctionArgument())) {
21105 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21106 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21109 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
21110 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
21114 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21115 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
21118 return this.finish(node);
21120 SCSSParser.prototype._parseMixinReference = function () {
21121 if (!this.peekKeyword('@include')) {
21124 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
21125 this.consumeToken();
21126 // Could be module or mixin identifier, set as mixin as default.
21127 var firstIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]);
21128 if (!node.setIdentifier(firstIdent)) {
21129 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21131 // Is a module accessor.
21132 if (!this.hasWhitespace() && this.acceptDelim('.') && !this.hasWhitespace()) {
21133 var secondIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]);
21134 if (!secondIdent) {
21135 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
21137 var moduleToken = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Module);
21138 // Re-purpose first matched ident as identifier for module token.
21139 firstIdent.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module];
21140 moduleToken.setIdentifier(firstIdent);
21141 // Override identifier with second ident.
21142 node.setIdentifier(secondIdent);
21143 node.addChild(moduleToken);
21145 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21146 if (node.getArguments().addChild(this._parseFunctionArgument())) {
21147 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21148 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21151 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
21152 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
21156 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21157 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
21160 if (this.peekIdent('using') || this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
21161 node.setContent(this._parseMixinContentDeclaration());
21163 return this.finish(node);
21165 SCSSParser.prototype._parseMixinContentDeclaration = function () {
21166 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinContentDeclaration);
21167 if (this.acceptIdent('using')) {
21168 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21169 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL]);
21171 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
21172 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21173 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21176 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
21177 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
21181 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21182 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL]);
21185 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
21186 this._parseBody(node, this._parseMixinReferenceBodyStatement.bind(this));
21188 return this.finish(node);
21190 SCSSParser.prototype._parseMixinReferenceBodyStatement = function () {
21191 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
21193 SCSSParser.prototype._parseFunctionArgument = function () {
21194 // [variableName ':'] expression | variableName '...'
21195 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionArgument);
21196 var pos = this.mark();
21197 var argument = this._parseVariable();
21199 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
21200 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) { // optional
21201 node.setValue(argument);
21202 return this.finish(node);
21205 this.restoreAtMark(pos);
21209 node.setIdentifier(argument);
21212 if (node.setValue(this._parseExpr(true))) {
21213 this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis); // #43746
21214 node.addChild(this._parsePrio()); // #9859
21215 return this.finish(node);
21217 else if (node.setValue(this._tryParsePrio())) {
21218 return this.finish(node);
21222 SCSSParser.prototype._parseURLArgument = function () {
21223 var pos = this.mark();
21224 var node = _super.prototype._parseURLArgument.call(this);
21225 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21226 this.restoreAtMark(pos);
21227 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
21228 node_1.addChild(this._parseBinaryExpr());
21229 return this.finish(node_1);
21233 SCSSParser.prototype._parseOperation = function () {
21234 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21237 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
21238 this.consumeToken();
21239 while (node.addChild(this._parseListElement())) {
21240 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma); // optional
21242 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21243 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
21245 return this.finish(node);
21247 SCSSParser.prototype._parseListElement = function () {
21248 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ListEntry);
21249 var child = this._parseBinaryExpr();
21253 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
21254 node.setKey(child);
21255 if (!node.setValue(this._parseBinaryExpr())) {
21256 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
21260 node.setValue(child);
21262 return this.finish(node);
21264 SCSSParser.prototype._parseUse = function () {
21265 if (!this.peekKeyword('@use')) {
21268 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Use);
21269 this.consumeToken(); // @use
21270 if (!node.addChild(this._parseStringLiteral())) {
21271 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.StringLiteralExpected);
21273 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
21274 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /as|with/)) {
21275 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
21277 if (this.acceptIdent('as') &&
21278 (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module])) && !this.acceptDelim('*'))) {
21279 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrWildcardExpected);
21281 if (this.acceptIdent('with')) {
21282 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21283 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
21285 // First variable statement, no comma.
21286 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
21287 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
21289 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21290 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21293 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
21294 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
21297 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21298 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
21302 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
21303 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SemiColonExpected);
21305 return this.finish(node);
21307 SCSSParser.prototype._parseModuleConfigDeclaration = function () {
21308 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ModuleConfiguration);
21309 if (!node.setIdentifier(this._parseVariable())) {
21312 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon) || !node.setValue(this._parseExpr(true))) {
21313 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]);
21315 return this.finish(node);
21317 SCSSParser.prototype._parseForward = function () {
21318 if (!this.peekKeyword('@forward')) {
21321 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Forward);
21322 this.consumeToken();
21323 if (!node.addChild(this._parseStringLiteral())) {
21324 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.StringLiteralExpected);
21326 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
21327 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /as|hide|show/)) {
21328 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
21330 if (this.acceptIdent('as')) {
21331 var identifier = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Forward]);
21332 if (!node.setIdentifier(identifier)) {
21333 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected);
21335 // Wildcard must be the next character after the identifier string.
21336 if (this.hasWhitespace() || !this.acceptDelim('*')) {
21337 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.WildcardExpected);
21340 if (this.peekIdent('hide') || this.peekIdent('show')) {
21341 if (!node.addChild(this._parseForwardVisibility())) {
21342 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrVariableExpected);
21346 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
21347 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SemiColonExpected);
21349 return this.finish(node);
21351 SCSSParser.prototype._parseForwardVisibility = function () {
21352 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ForwardVisibility);
21353 // Assume to be "hide" or "show".
21354 node.setIdentifier(this._parseIdent());
21355 while (node.addChild(this._parseVariable() || this._parseIdent())) {
21356 // Consume all variables and idents ahead.
21358 // More than just identifier
21359 return node.getChildren().length > 1 ? node : null;
21361 SCSSParser.prototype._parseSupportsCondition = function () {
21362 return this._parseInterpolation() || _super.prototype._parseSupportsCondition.call(this);
21365 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__.Parser));
21371 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21373 __webpack_require__.r(__webpack_exports__);
21374 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21375 /* harmony export */ "VariableName": () => /* binding */ VariableName,
21376 /* harmony export */ "InterpolationFunction": () => /* binding */ InterpolationFunction,
21377 /* harmony export */ "Default": () => /* binding */ Default,
21378 /* harmony export */ "EqualsOperator": () => /* binding */ EqualsOperator,
21379 /* harmony export */ "NotEqualsOperator": () => /* binding */ NotEqualsOperator,
21380 /* harmony export */ "GreaterEqualsOperator": () => /* binding */ GreaterEqualsOperator,
21381 /* harmony export */ "SmallerEqualsOperator": () => /* binding */ SmallerEqualsOperator,
21382 /* harmony export */ "Ellipsis": () => /* binding */ Ellipsis,
21383 /* harmony export */ "Module": () => /* binding */ Module,
21384 /* harmony export */ "SCSSScanner": () => /* binding */ SCSSScanner
21385 /* harmony export */ });
21386 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
21387 /*---------------------------------------------------------------------------------------------
21388 * Copyright (c) Microsoft Corporation. All rights reserved.
21389 * Licensed under the MIT License. See License.txt in the project root for license information.
21390 *--------------------------------------------------------------------------------------------*/
21392 var __extends = (undefined && undefined.__extends) || (function () {
21393 var extendStatics = function (d, b) {
21394 extendStatics = Object.setPrototypeOf ||
21395 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21396 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21397 return extendStatics(d, b);
21399 return function (d, b) {
21400 extendStatics(d, b);
21401 function __() { this.constructor = d; }
21402 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21406 var _FSL = '/'.charCodeAt(0);
21407 var _NWL = '\n'.charCodeAt(0);
21408 var _CAR = '\r'.charCodeAt(0);
21409 var _LFD = '\f'.charCodeAt(0);
21410 var _DLR = '$'.charCodeAt(0);
21411 var _HSH = '#'.charCodeAt(0);
21412 var _CUL = '{'.charCodeAt(0);
21413 var _EQS = '='.charCodeAt(0);
21414 var _BNG = '!'.charCodeAt(0);
21415 var _LAN = '<'.charCodeAt(0);
21416 var _RAN = '>'.charCodeAt(0);
21417 var _DOT = '.'.charCodeAt(0);
21418 var _ATS = '@'.charCodeAt(0);
21419 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CustomToken;
21420 var VariableName = customTokenValue++;
21421 var InterpolationFunction = customTokenValue++;
21422 var Default = customTokenValue++;
21423 var EqualsOperator = customTokenValue++;
21424 var NotEqualsOperator = customTokenValue++;
21425 var GreaterEqualsOperator = customTokenValue++;
21426 var SmallerEqualsOperator = customTokenValue++;
21427 var Ellipsis = customTokenValue++;
21428 var Module = customTokenValue++;
21429 var SCSSScanner = /** @class */ (function (_super) {
21430 __extends(SCSSScanner, _super);
21431 function SCSSScanner() {
21432 return _super !== null && _super.apply(this, arguments) || this;
21434 SCSSScanner.prototype.scanNext = function (offset) {
21436 if (this.stream.advanceIfChar(_DLR)) {
21437 var content = ['$'];
21438 if (this.ident(content)) {
21439 return this.finishToken(offset, VariableName, content.join(''));
21442 this.stream.goBackTo(offset);
21445 // scss: interpolation function #{..})
21446 if (this.stream.advanceIfChars([_HSH, _CUL])) {
21447 return this.finishToken(offset, InterpolationFunction);
21450 if (this.stream.advanceIfChars([_EQS, _EQS])) {
21451 return this.finishToken(offset, EqualsOperator);
21454 if (this.stream.advanceIfChars([_BNG, _EQS])) {
21455 return this.finishToken(offset, NotEqualsOperator);
21458 if (this.stream.advanceIfChar(_LAN)) {
21459 if (this.stream.advanceIfChar(_EQS)) {
21460 return this.finishToken(offset, SmallerEqualsOperator);
21462 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim);
21464 // ooperators >, >=
21465 if (this.stream.advanceIfChar(_RAN)) {
21466 if (this.stream.advanceIfChar(_EQS)) {
21467 return this.finishToken(offset, GreaterEqualsOperator);
21469 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim);
21472 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
21473 return this.finishToken(offset, Ellipsis);
21475 return _super.prototype.scanNext.call(this, offset);
21477 SCSSScanner.prototype.comment = function () {
21478 if (_super.prototype.comment.call(this)) {
21481 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
21482 this.stream.advanceWhileChar(function (ch) {
21498 return SCSSScanner;
21499 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner));
21505 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21507 __webpack_require__.r(__webpack_exports__);
21508 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21509 /* harmony export */ "SCSSIssueType": () => /* binding */ SCSSIssueType,
21510 /* harmony export */ "SCSSParseError": () => /* binding */ SCSSParseError
21511 /* harmony export */ });
21512 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
21513 /*---------------------------------------------------------------------------------------------
21514 * Copyright (c) Microsoft Corporation. All rights reserved.
21515 * Licensed under the MIT License. See License.txt in the project root for license information.
21516 *--------------------------------------------------------------------------------------------*/
21519 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
21520 var SCSSIssueType = /** @class */ (function () {
21521 function SCSSIssueType(id, message) {
21523 this.message = message;
21525 return SCSSIssueType;
21528 var SCSSParseError = {
21529 FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
21530 ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
21531 InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
21537 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21539 __webpack_require__.r(__webpack_exports__);
21540 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21541 /* harmony export */ "SCSSCompletion": () => /* binding */ SCSSCompletion
21542 /* harmony export */ });
21543 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(102);
21544 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
21545 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(105);
21546 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
21547 /*---------------------------------------------------------------------------------------------
21548 * Copyright (c) Microsoft Corporation. All rights reserved.
21549 * Licensed under the MIT License. See License.txt in the project root for license information.
21550 *--------------------------------------------------------------------------------------------*/
21552 var __extends = (undefined && undefined.__extends) || (function () {
21553 var extendStatics = function (d, b) {
21554 extendStatics = Object.setPrototypeOf ||
21555 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21556 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21557 return extendStatics(d, b);
21559 return function (d, b) {
21560 extendStatics(d, b);
21561 function __() { this.constructor = d; }
21562 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21569 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__.loadMessageBundle();
21570 var SCSSCompletion = /** @class */ (function (_super) {
21571 __extends(SCSSCompletion, _super);
21572 function SCSSCompletion(lsServiceOptions, cssDataManager) {
21573 var _this = _super.call(this, '$', lsServiceOptions, cssDataManager) || this;
21574 addReferencesToDocumentation(SCSSCompletion.scssModuleLoaders);
21575 addReferencesToDocumentation(SCSSCompletion.scssModuleBuiltIns);
21578 SCSSCompletion.prototype.isImportPathParent = function (type) {
21579 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward
21580 || type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use
21581 || _super.prototype.isImportPathParent.call(this, type);
21583 SCSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
21584 var parentType = importPathNode.getParent().type;
21585 if (parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward || parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use) {
21586 for (var _i = 0, _a = SCSSCompletion.scssModuleBuiltIns; _i < _a.length; _i++) {
21590 documentation: p.documentation,
21591 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(importPathNode), "'" + p.label + "'"),
21592 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Module
21594 result.items.push(item);
21597 return _super.prototype.getCompletionForImportPath.call(this, importPathNode, result);
21599 SCSSCompletion.prototype.createReplaceFunction = function () {
21600 var tabStopCounter = 1;
21601 return function (_match, p1) {
21602 return '\\' + p1 + ': ${' + tabStopCounter++ + ':' + (SCSSCompletion.variableDefaults[p1] || '') + '}';
21605 SCSSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
21606 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
21607 var p = proposals_1[_i];
21608 var insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction());
21609 var label = p.func.substr(0, p.func.indexOf('('));
21613 documentation: p.desc,
21614 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
21615 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21616 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Function
21619 item.sortText = 'z';
21621 result.items.push(item);
21625 SCSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
21626 this.createFunctionProposals(SCSSCompletion.selectorFuncs, null, true, result);
21627 return _super.prototype.getCompletionsForSelector.call(this, ruleSet, isNested, result);
21629 SCSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
21630 var functions = SCSSCompletion.builtInFuncs;
21632 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
21634 this.createFunctionProposals(functions, existingNode, true, result);
21635 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
21637 SCSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
21638 this.createFunctionProposals(SCSSCompletion.colorProposals, existingNode, false, result);
21639 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
21641 SCSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
21642 this.getCompletionForAtDirectives(result);
21643 this.getCompletionsForSelector(null, true, result);
21644 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
21646 SCSSCompletion.prototype.getCompletionsForExtendsReference = function (_extendsRef, existingNode, result) {
21647 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Rule);
21648 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
21649 var symbol = symbols_1[_i];
21651 label: symbol.name,
21652 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(existingNode), symbol.name),
21653 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Function,
21655 result.items.push(suggest);
21659 SCSSCompletion.prototype.getCompletionForAtDirectives = function (result) {
21661 (_a = result.items).push.apply(_a, SCSSCompletion.scssAtDirectives);
21664 SCSSCompletion.prototype.getCompletionForTopLevel = function (result) {
21665 this.getCompletionForAtDirectives(result);
21666 this.getCompletionForModuleLoaders(result);
21667 _super.prototype.getCompletionForTopLevel.call(this, result);
21670 SCSSCompletion.prototype.getCompletionForModuleLoaders = function (result) {
21672 (_a = result.items).push.apply(_a, SCSSCompletion.scssModuleLoaders);
21675 SCSSCompletion.variableDefaults = {
21680 '$color': '#000000',
21683 '$saturation': '0%',
21684 '$lightness': '0%',
21688 '$substring': '"s"',
21692 SCSSCompletion.colorProposals = [
21693 { func: 'red($color)', desc: localize('scss.builtin.red', 'Gets the red component of a color.') },
21694 { func: 'green($color)', desc: localize('scss.builtin.green', 'Gets the green component of a color.') },
21695 { func: 'blue($color)', desc: localize('scss.builtin.blue', 'Gets the blue component of a color.') },
21696 { func: 'mix($color, $color, [$weight])', desc: localize('scss.builtin.mix', 'Mixes two colors together.') },
21697 { func: 'hue($color)', desc: localize('scss.builtin.hue', 'Gets the hue component of a color.') },
21698 { func: 'saturation($color)', desc: localize('scss.builtin.saturation', 'Gets the saturation component of a color.') },
21699 { func: 'lightness($color)', desc: localize('scss.builtin.lightness', 'Gets the lightness component of a color.') },
21700 { func: 'adjust-hue($color, $degrees)', desc: localize('scss.builtin.adjust-hue', 'Changes the hue of a color.') },
21701 { func: 'lighten($color, $amount)', desc: localize('scss.builtin.lighten', 'Makes a color lighter.') },
21702 { func: 'darken($color, $amount)', desc: localize('scss.builtin.darken', 'Makes a color darker.') },
21703 { func: 'saturate($color, $amount)', desc: localize('scss.builtin.saturate', 'Makes a color more saturated.') },
21704 { func: 'desaturate($color, $amount)', desc: localize('scss.builtin.desaturate', 'Makes a color less saturated.') },
21705 { func: 'grayscale($color)', desc: localize('scss.builtin.grayscale', 'Converts a color to grayscale.') },
21706 { func: 'complement($color)', desc: localize('scss.builtin.complement', 'Returns the complement of a color.') },
21707 { func: 'invert($color)', desc: localize('scss.builtin.invert', 'Returns the inverse of a color.') },
21708 { func: 'alpha($color)', desc: localize('scss.builtin.alpha', 'Gets the opacity component of a color.') },
21709 { func: 'opacity($color)', desc: 'Gets the alpha component (opacity) of a color.' },
21710 { func: 'rgba($color, $alpha)', desc: localize('scss.builtin.rgba', 'Changes the alpha component for a color.') },
21711 { func: 'opacify($color, $amount)', desc: localize('scss.builtin.opacify', 'Makes a color more opaque.') },
21712 { func: 'fade-in($color, $amount)', desc: localize('scss.builtin.fade-in', 'Makes a color more opaque.') },
21713 { func: 'transparentize($color, $amount)', desc: localize('scss.builtin.transparentize', 'Makes a color more transparent.') },
21714 { func: 'fade-out($color, $amount)', desc: localize('scss.builtin.fade-out', 'Makes a color more transparent.') },
21715 { 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.') },
21716 { 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.') },
21717 { 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.') },
21718 { func: 'ie-hex-str($color)', desc: localize('scss.builtin.ie-hex-str', 'Converts a color into the format understood by IE filters.') }
21720 SCSSCompletion.selectorFuncs = [
21721 { func: 'selector-nest($selectors…)', desc: localize('scss.builtin.selector-nest', 'Nests selector beneath one another like they would be nested in the stylesheet.') },
21722 { func: 'selector-append($selectors…)', desc: localize('scss.builtin.selector-append', 'Appends selectors to one another without spaces in between.') },
21723 { func: 'selector-extend($selector, $extendee, $extender)', desc: localize('scss.builtin.selector-extend', 'Extends $extendee with $extender within $selector.') },
21724 { func: 'selector-replace($selector, $original, $replacement)', desc: localize('scss.builtin.selector-replace', 'Replaces $original with $replacement within $selector.') },
21725 { func: 'selector-unify($selector1, $selector2)', desc: localize('scss.builtin.selector-unify', 'Unifies two selectors to produce a selector that matches elements matched by both.') },
21726 { func: 'is-superselector($super, $sub)', desc: localize('scss.builtin.is-superselector', 'Returns whether $super matches all the elements $sub does, and possibly more.') },
21727 { func: 'simple-selectors($selector)', desc: localize('scss.builtin.simple-selectors', 'Returns the simple selectors that comprise a compound selector.') },
21728 { func: 'selector-parse($selector)', desc: localize('scss.builtin.selector-parse', 'Parses a selector into the format returned by &.') }
21730 SCSSCompletion.builtInFuncs = [
21731 { func: 'unquote($string)', desc: localize('scss.builtin.unquote', 'Removes quotes from a string.') },
21732 { func: 'quote($string)', desc: localize('scss.builtin.quote', 'Adds quotes to a string.') },
21733 { func: 'str-length($string)', desc: localize('scss.builtin.str-length', 'Returns the number of characters in a string.') },
21734 { func: 'str-insert($string, $insert, $index)', desc: localize('scss.builtin.str-insert', 'Inserts $insert into $string at $index.') },
21735 { func: 'str-index($string, $substring)', desc: localize('scss.builtin.str-index', 'Returns the index of the first occurance of $substring in $string.') },
21736 { func: 'str-slice($string, $start-at, [$end-at])', desc: localize('scss.builtin.str-slice', 'Extracts a substring from $string.') },
21737 { func: 'to-upper-case($string)', desc: localize('scss.builtin.to-upper-case', 'Converts a string to upper case.') },
21738 { func: 'to-lower-case($string)', desc: localize('scss.builtin.to-lower-case', 'Converts a string to lower case.') },
21739 { func: 'percentage($number)', desc: localize('scss.builtin.percentage', 'Converts a unitless number to a percentage.'), type: 'percentage' },
21740 { func: 'round($number)', desc: localize('scss.builtin.round', 'Rounds a number to the nearest whole number.') },
21741 { func: 'ceil($number)', desc: localize('scss.builtin.ceil', 'Rounds a number up to the next whole number.') },
21742 { func: 'floor($number)', desc: localize('scss.builtin.floor', 'Rounds a number down to the previous whole number.') },
21743 { func: 'abs($number)', desc: localize('scss.builtin.abs', 'Returns the absolute value of a number.') },
21744 { func: 'min($numbers)', desc: localize('scss.builtin.min', 'Finds the minimum of several numbers.') },
21745 { func: 'max($numbers)', desc: localize('scss.builtin.max', 'Finds the maximum of several numbers.') },
21746 { func: 'random([$limit])', desc: localize('scss.builtin.random', 'Returns a random number.') },
21747 { func: 'length($list)', desc: localize('scss.builtin.length', 'Returns the length of a list.') },
21748 { func: 'nth($list, $n)', desc: localize('scss.builtin.nth', 'Returns a specific item in a list.') },
21749 { func: 'set-nth($list, $n, $value)', desc: localize('scss.builtin.set-nth', 'Replaces the nth item in a list.') },
21750 { func: 'join($list1, $list2, [$separator])', desc: localize('scss.builtin.join', 'Joins together two lists into one.') },
21751 { func: 'append($list1, $val, [$separator])', desc: localize('scss.builtin.append', 'Appends a single value onto the end of a list.') },
21752 { func: 'zip($lists)', desc: localize('scss.builtin.zip', 'Combines several lists into a single multidimensional list.') },
21753 { func: 'index($list, $value)', desc: localize('scss.builtin.index', 'Returns the position of a value within a list.') },
21754 { func: 'list-separator(#list)', desc: localize('scss.builtin.list-separator', 'Returns the separator of a list.') },
21755 { func: 'map-get($map, $key)', desc: localize('scss.builtin.map-get', 'Returns the value in a map associated with a given key.') },
21756 { func: 'map-merge($map1, $map2)', desc: localize('scss.builtin.map-merge', 'Merges two maps together into a new map.') },
21757 { func: 'map-remove($map, $keys)', desc: localize('scss.builtin.map-remove', 'Returns a new map with keys removed.') },
21758 { func: 'map-keys($map)', desc: localize('scss.builtin.map-keys', 'Returns a list of all keys in a map.') },
21759 { func: 'map-values($map)', desc: localize('scss.builtin.map-values', 'Returns a list of all values in a map.') },
21760 { 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.') },
21761 { func: 'keywords($args)', desc: localize('scss.builtin.keywords', 'Returns the keywords passed to a function that takes variable arguments.') },
21762 { func: 'feature-exists($feature)', desc: localize('scss.builtin.feature-exists', 'Returns whether a feature exists in the current Sass runtime.') },
21763 { func: 'variable-exists($name)', desc: localize('scss.builtin.variable-exists', 'Returns whether a variable with the given name exists in the current scope.') },
21764 { 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.') },
21765 { func: 'function-exists($name)', desc: localize('scss.builtin.function-exists', 'Returns whether a function with the given name exists.') },
21766 { func: 'mixin-exists($name)', desc: localize('scss.builtin.mixin-exists', 'Returns whether a mixin with the given name exists.') },
21767 { func: 'inspect($value)', desc: localize('scss.builtin.inspect', 'Returns the string representation of a value as it would be represented in Sass.') },
21768 { func: 'type-of($value)', desc: localize('scss.builtin.type-of', 'Returns the type of a value.') },
21769 { func: 'unit($number)', desc: localize('scss.builtin.unit', 'Returns the unit(s) associated with a number.') },
21770 { func: 'unitless($number)', desc: localize('scss.builtin.unitless', 'Returns whether a number has units.') },
21771 { func: 'comparable($number1, $number2)', desc: localize('scss.builtin.comparable', 'Returns whether two numbers can be added, subtracted, or compared.') },
21772 { func: 'call($name, $args…)', desc: localize('scss.builtin.call', 'Dynamically calls a Sass function.') }
21774 SCSSCompletion.scssAtDirectives = [
21777 documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector."),
21778 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21782 documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."),
21783 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21787 documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
21788 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21792 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."),
21793 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21797 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."),
21798 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21802 documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
21803 insertText: "@if ${1:expr} {\n\t$0\n}",
21804 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21805 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21809 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."),
21810 insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",
21811 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21812 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21816 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`."),
21817 insertText: "@each \\$${1:var} in ${2:list} {\n\t$0\n}",
21818 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21819 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21823 documentation: localize("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),
21824 insertText: "@while ${1:condition} {\n\t$0\n}",
21825 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21826 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21830 documentation: localize("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."),
21831 insertText: "@mixin ${1:name} {\n\t$0\n}",
21832 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21833 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21837 documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."),
21838 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21841 label: "@function",
21842 documentation: localize("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."),
21843 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21846 SCSSCompletion.scssModuleLoaders = [
21849 documentation: localize("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),
21850 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/use' }],
21851 insertText: "@use '$0';",
21852 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21853 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21857 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."),
21858 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/forward' }],
21859 insertText: "@forward '$0';",
21860 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
21861 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
21864 SCSSCompletion.scssModuleBuiltIns = [
21866 label: 'sass:math',
21867 documentation: localize('scss.builtin.sass:math', 'Provides functions that operate on numbers.'),
21868 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/math' }]
21871 label: 'sass:string',
21872 documentation: localize('scss.builtin.sass:string', 'Makes it easy to combine, search, or split apart strings.'),
21873 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/string' }]
21876 label: 'sass:color',
21877 documentation: localize('scss.builtin.sass:color', 'Generates new colors based on existing ones, making it easy to build color themes.'),
21878 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/color' }]
21881 label: 'sass:list',
21882 documentation: localize('scss.builtin.sass:list', 'Lets you access and modify values in lists.'),
21883 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/list' }]
21887 documentation: localize('scss.builtin.sass:map', 'Makes it possible to look up the value associated with a key in a map, and much more.'),
21888 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/map' }]
21891 label: 'sass:selector',
21892 documentation: localize('scss.builtin.sass:selector', 'Provides access to Sass’s powerful selector engine.'),
21893 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/selector' }]
21896 label: 'sass:meta',
21897 documentation: localize('scss.builtin.sass:meta', 'Exposes the details of Sass’s inner workings.'),
21898 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/meta' }]
21901 return SCSSCompletion;
21902 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__.CSSCompletion));
21905 * Todo @Pine: Remove this and do it through custom data
21907 function addReferencesToDocumentation(items) {
21908 items.forEach(function (i) {
21909 if (i.documentation && i.references && i.references.length > 0) {
21910 var markdownDoc = typeof i.documentation === 'string'
21911 ? { kind: 'markdown', value: i.documentation }
21912 : { kind: 'markdown', value: i.documentation.value };
21913 markdownDoc.value += '\n\n';
21914 markdownDoc.value += i.references
21915 .map(function (r) {
21916 return "[" + r.name + "](" + r.url + ")";
21919 i.documentation = markdownDoc;
21927 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21929 __webpack_require__.r(__webpack_exports__);
21930 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21931 /* harmony export */ "LESSParser": () => /* binding */ LESSParser
21932 /* harmony export */ });
21933 /* harmony import */ var _lessScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(123);
21934 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
21935 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
21936 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91);
21937 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93);
21938 /*---------------------------------------------------------------------------------------------
21939 * Copyright (c) Microsoft Corporation. All rights reserved.
21940 * Licensed under the MIT License. See License.txt in the project root for license information.
21941 *--------------------------------------------------------------------------------------------*/
21943 var __extends = (undefined && undefined.__extends) || (function () {
21944 var extendStatics = function (d, b) {
21945 extendStatics = Object.setPrototypeOf ||
21946 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21947 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21948 return extendStatics(d, b);
21950 return function (d, b) {
21951 extendStatics(d, b);
21952 function __() { this.constructor = d; }
21953 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21962 /// A parser for LESS
21963 /// http://lesscss.org/
21965 var LESSParser = /** @class */ (function (_super) {
21966 __extends(LESSParser, _super);
21967 function LESSParser() {
21968 return _super.call(this, new _lessScanner__WEBPACK_IMPORTED_MODULE_0__.LESSScanner()) || this;
21970 LESSParser.prototype._parseStylesheetStatement = function (isNested) {
21971 if (isNested === void 0) { isNested = false; }
21972 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
21973 return this._parseVariableDeclaration()
21974 || this._parsePlugin()
21975 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
21977 return this._tryParseMixinDeclaration()
21978 || this._tryParseMixinReference()
21979 || this._parseFunction()
21980 || this._parseRuleset(true);
21982 LESSParser.prototype._parseImport = function () {
21983 if (!this.peekKeyword('@import') && !this.peekKeyword('@import-once') /* deprecated in less 1.4.1 */) {
21986 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Import);
21987 this.consumeToken();
21988 // less 1.4.1: @import (css) "lib"
21989 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
21990 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident)) {
21991 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
21994 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21997 } while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident));
21998 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
21999 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
22002 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
22003 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.URIOrStringExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
22005 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
22006 node.setMedialist(this._parseMediaQueryList());
22008 return this.finish(node);
22010 LESSParser.prototype._parsePlugin = function () {
22011 if (!this.peekKeyword('@plugin')) {
22014 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Plugin);
22015 this.consumeToken(); // @import
22016 if (!node.addChild(this._parseStringLiteral())) {
22017 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.StringLiteralExpected);
22019 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22020 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SemiColonExpected);
22022 return this.finish(node);
22024 LESSParser.prototype._parseMediaQuery = function (resyncStopToken) {
22025 var node = _super.prototype._parseMediaQuery.call(this, resyncStopToken);
22027 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MediaQuery);
22028 if (node_1.addChild(this._parseVariable())) {
22029 return this.finish(node_1);
22035 LESSParser.prototype._parseMediaDeclaration = function (isNested) {
22036 if (isNested === void 0) { isNested = false; }
22037 return this._tryParseRuleset(isNested)
22038 || this._tryToParseDeclaration()
22039 || this._tryParseMixinDeclaration()
22040 || this._tryParseMixinReference()
22041 || this._parseDetachedRuleSetMixin()
22042 || this._parseStylesheetStatement(isNested);
22044 LESSParser.prototype._parseMediaFeatureName = function () {
22045 return this._parseIdent() || this._parseVariable();
22047 LESSParser.prototype._parseVariableDeclaration = function (panic) {
22048 if (panic === void 0) { panic = []; }
22049 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.VariableDeclaration);
22050 var mark = this.mark();
22051 if (!node.setVariable(this._parseVariable(true))) {
22054 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22055 if (this.prevToken) {
22056 node.colonPosition = this.prevToken.offset;
22058 if (node.setValue(this._parseDetachedRuleSet())) {
22059 node.needsSemicolon = false;
22061 else if (!node.setValue(this._parseExpr())) {
22062 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.VariableValueExpected, [], panic);
22064 node.addChild(this._parsePrio());
22067 this.restoreAtMark(mark);
22068 return null; // at keyword, but no ':', not a variable declaration but some at keyword
22070 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22071 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
22073 return this.finish(node);
22075 LESSParser.prototype._parseDetachedRuleSet = function () {
22076 var mark = this.mark();
22077 // "Anonymous mixin" used in each() and possibly a generic type in the future
22078 if (this.peekDelim('#') || this.peekDelim('.')) {
22079 this.consumeToken();
22080 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22081 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
22082 if (node.getParameters().addChild(this._parseMixinParameter())) {
22083 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22084 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22087 if (!node.getParameters().addChild(this._parseMixinParameter())) {
22088 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22092 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22093 this.restoreAtMark(mark);
22098 this.restoreAtMark(mark);
22102 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22105 var content = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.BodyDeclaration);
22106 this._parseBody(content, this._parseDetachedRuleSetBody.bind(this));
22107 return this.finish(content);
22109 LESSParser.prototype._parseDetachedRuleSetBody = function () {
22110 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
22112 LESSParser.prototype._addLookupChildren = function (node) {
22113 if (!node.addChild(this._parseLookupValue())) {
22116 var expectsValue = false;
22118 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
22119 expectsValue = true;
22121 if (!node.addChild(this._parseLookupValue())) {
22124 expectsValue = false;
22126 return !expectsValue;
22128 LESSParser.prototype._parseLookupValue = function () {
22129 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22130 var mark = this.mark();
22131 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
22132 this.restoreAtMark(mark);
22135 if (((node.addChild(this._parseVariable(false, true)) ||
22136 node.addChild(this._parsePropertyIdentifier())) &&
22137 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketR)) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketR)) {
22140 this.restoreAtMark(mark);
22143 LESSParser.prototype._parseVariable = function (declaration, insideLookup) {
22144 if (declaration === void 0) { declaration = false; }
22145 if (insideLookup === void 0) { insideLookup = false; }
22146 var isPropertyReference = !declaration && this.peekDelim('$');
22147 if (!this.peekDelim('@') && !isPropertyReference && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
22150 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Variable);
22151 var mark = this.mark();
22152 while (this.acceptDelim('@') || (!declaration && this.acceptDelim('$'))) {
22153 if (this.hasWhitespace()) {
22154 this.restoreAtMark(mark);
22158 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident)) {
22159 this.restoreAtMark(mark);
22162 if (!insideLookup && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
22163 if (!this._addLookupChildren(node)) {
22164 this.restoreAtMark(mark);
22170 LESSParser.prototype._parseTermExpression = function () {
22171 return this._parseVariable() ||
22172 this._parseEscaped() ||
22173 _super.prototype._parseTermExpression.call(this) || // preference for colors before mixin references
22174 this._tryParseMixinReference(false);
22176 LESSParser.prototype._parseEscaped = function () {
22177 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EscapedJavaScript) ||
22178 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BadEscapedJavaScript)) {
22179 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.EscapedValue);
22180 this.consumeToken();
22181 return this.finish(node);
22183 if (this.peekDelim('~')) {
22184 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.EscapedValue);
22185 this.consumeToken();
22186 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.String) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EscapedJavaScript)) {
22187 return this.finish(node);
22190 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.TermExpected);
22195 LESSParser.prototype._parseOperator = function () {
22196 var node = this._parseGuardOperator();
22201 return _super.prototype._parseOperator.call(this);
22204 LESSParser.prototype._parseGuardOperator = function () {
22205 if (this.peekDelim('>')) {
22206 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
22207 this.consumeToken();
22208 this.acceptDelim('=');
22211 else if (this.peekDelim('=')) {
22212 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
22213 this.consumeToken();
22214 this.acceptDelim('<');
22217 else if (this.peekDelim('<')) {
22218 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
22219 this.consumeToken();
22220 this.acceptDelim('=');
22225 LESSParser.prototype._parseRuleSetDeclaration = function () {
22226 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
22227 return this._parseKeyframe()
22228 || this._parseMedia(true)
22229 || this._parseImport()
22230 || this._parseSupports(true) // @supports
22231 || this._parseDetachedRuleSetMixin() // less detached ruleset mixin
22232 || this._parseVariableDeclaration() // Variable declarations
22233 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
22235 return this._tryParseMixinDeclaration()
22236 || this._tryParseRuleset(true) // nested ruleset
22237 || this._tryParseMixinReference() // less mixin reference
22238 || this._parseFunction()
22239 || this._parseExtend() // less extend declaration
22240 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as the last option
22242 LESSParser.prototype._parseKeyframeIdent = function () {
22243 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Keyframe]) || this._parseVariable();
22245 LESSParser.prototype._parseKeyframeSelector = function () {
22246 return this._parseDetachedRuleSetMixin() // less detached ruleset mixin
22247 || _super.prototype._parseKeyframeSelector.call(this);
22249 LESSParser.prototype._parseSimpleSelectorBody = function () {
22250 return this._parseSelectorCombinator() || _super.prototype._parseSimpleSelectorBody.call(this);
22252 LESSParser.prototype._parseSelector = function (isNested) {
22254 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Selector);
22255 var hasContent = false;
22257 // nested selectors can start with a combinator
22258 hasContent = node.addChild(this._parseCombinator());
22260 while (node.addChild(this._parseSimpleSelector())) {
22262 var mark = this.mark();
22263 if (node.addChild(this._parseGuard()) && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22266 this.restoreAtMark(mark);
22267 node.addChild(this._parseCombinator()); // optional
22269 return hasContent ? this.finish(node) : null;
22271 LESSParser.prototype._parseSelectorCombinator = function () {
22272 if (this.peekDelim('&')) {
22273 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorCombinator);
22274 this.consumeToken();
22275 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('&'))) {
22278 return this.finish(node);
22282 LESSParser.prototype._parseSelectorIdent = function () {
22283 if (!this.peekInterpolatedIdent()) {
22286 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorInterpolation);
22287 var hasContent = this._acceptInterpolatedIdent(node);
22288 return hasContent ? this.finish(node) : null;
22290 LESSParser.prototype._parsePropertyIdentifier = function (inLookup) {
22291 if (inLookup === void 0) { inLookup = false; }
22292 var propertyRegex = /^[\w-]+/;
22293 if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) {
22296 var mark = this.mark();
22297 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
22298 node.isCustomProperty = this.acceptDelim('-') && this.acceptDelim('-');
22299 var childAdded = false;
22301 if (node.isCustomProperty) {
22302 childAdded = this._acceptInterpolatedIdent(node);
22305 childAdded = this._acceptInterpolatedIdent(node, propertyRegex);
22309 if (node.isCustomProperty) {
22310 childAdded = node.addChild(this._parseIdent());
22313 childAdded = node.addChild(this._parseRegexp(propertyRegex));
22317 this.restoreAtMark(mark);
22320 if (!inLookup && !this.hasWhitespace()) {
22321 this.acceptDelim('+');
22322 if (!this.hasWhitespace()) {
22323 this.acceptIdent('_');
22326 return this.finish(node);
22328 LESSParser.prototype.peekInterpolatedIdent = function () {
22329 return this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) ||
22330 this.peekDelim('@') ||
22331 this.peekDelim('$') ||
22332 this.peekDelim('-');
22334 LESSParser.prototype._acceptInterpolatedIdent = function (node, identRegex) {
22336 var hasContent = false;
22337 var indentInterpolation = function () {
22338 var pos = _this.mark();
22339 if (_this.acceptDelim('-')) {
22340 if (!_this.hasWhitespace()) {
22341 _this.acceptDelim('-');
22343 if (_this.hasWhitespace()) {
22344 _this.restoreAtMark(pos);
22348 return _this._parseInterpolation();
22350 var accept = identRegex ?
22351 function () { return _this.acceptRegexp(identRegex); } :
22352 function () { return _this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident); };
22354 node.addChild(this._parseInterpolation() ||
22355 this.try(indentInterpolation))) {
22357 if (this.hasWhitespace()) {
22363 LESSParser.prototype._parseInterpolation = function () {
22364 // @{name} Variable or
22365 // ${name} Property
22366 var mark = this.mark();
22367 if (this.peekDelim('@') || this.peekDelim('$')) {
22368 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Interpolation);
22369 this.consumeToken();
22370 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22371 this.restoreAtMark(mark);
22374 if (!node.addChild(this._parseIdent())) {
22375 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected);
22377 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
22378 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightCurlyExpected);
22380 return this.finish(node);
22384 LESSParser.prototype._tryParseMixinDeclaration = function () {
22385 var mark = this.mark();
22386 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
22387 if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22388 this.restoreAtMark(mark);
22391 if (node.getParameters().addChild(this._parseMixinParameter())) {
22392 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22393 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22396 if (!node.getParameters().addChild(this._parseMixinParameter())) {
22397 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22401 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22402 this.restoreAtMark(mark);
22405 node.setGuard(this._parseGuard());
22406 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22407 this.restoreAtMark(mark);
22410 return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this));
22412 LESSParser.prototype._parseMixInBodyDeclaration = function () {
22413 return this._parseFontFace() || this._parseRuleSetDeclaration();
22415 LESSParser.prototype._parseMixinDeclarationIdentifier = function () {
22417 if (this.peekDelim('#') || this.peekDelim('.')) {
22418 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
22419 this.consumeToken(); // # or .
22420 if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) {
22424 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Hash)) {
22425 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
22426 this.consumeToken(); // TokenType.Hash
22431 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin];
22432 return this.finish(identifier);
22434 LESSParser.prototype._parsePseudo = function () {
22435 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22438 var mark = this.mark();
22439 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
22440 this.consumeToken(); // :
22441 if (this.acceptIdent('extend')) {
22442 return this._completeExtends(node);
22444 this.restoreAtMark(mark);
22445 return _super.prototype._parsePseudo.call(this);
22447 LESSParser.prototype._parseExtend = function () {
22448 if (!this.peekDelim('&')) {
22451 var mark = this.mark();
22452 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
22453 this.consumeToken(); // &
22454 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon) || !this.acceptIdent('extend')) {
22455 this.restoreAtMark(mark);
22458 return this._completeExtends(node);
22460 LESSParser.prototype._completeExtends = function (node) {
22461 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22462 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.LeftParenthesisExpected);
22464 var selectors = node.getSelectors();
22465 if (!selectors.addChild(this._parseSelector(true))) {
22466 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SelectorExpected);
22468 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22469 if (!selectors.addChild(this._parseSelector(true))) {
22470 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SelectorExpected);
22473 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22474 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
22476 return this.finish(node);
22478 LESSParser.prototype._parseDetachedRuleSetMixin = function () {
22479 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
22482 var mark = this.mark();
22483 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
22484 if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL))) {
22485 this.restoreAtMark(mark);
22488 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22489 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
22491 return this.finish(node);
22493 LESSParser.prototype._tryParseMixinReference = function (atRoot) {
22494 if (atRoot === void 0) { atRoot = true; }
22495 var mark = this.mark();
22496 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
22497 var identifier = this._parseMixinDeclarationIdentifier();
22498 while (identifier) {
22499 this.acceptDelim('>');
22500 var nextId = this._parseMixinDeclarationIdentifier();
22502 node.getNamespaces().addChild(identifier);
22503 identifier = nextId;
22509 if (!node.setIdentifier(identifier)) {
22510 this.restoreAtMark(mark);
22513 var hasArguments = false;
22514 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22515 hasArguments = true;
22516 if (node.getArguments().addChild(this._parseMixinArgument())) {
22517 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22518 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22521 if (!node.getArguments().addChild(this._parseMixinArgument())) {
22522 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ExpressionExpected);
22526 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22527 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
22529 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin];
22532 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin, _cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Rule];
22534 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
22536 this._addLookupChildren(node);
22540 node.addChild(this._parsePrio());
22542 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)) {
22543 this.restoreAtMark(mark);
22546 return this.finish(node);
22548 LESSParser.prototype._parseMixinArgument = function () {
22549 // [variableName ':'] expression | variableName '...'
22550 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionArgument);
22551 var pos = this.mark();
22552 var argument = this._parseVariable();
22554 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22555 this.restoreAtMark(pos);
22558 node.setIdentifier(argument);
22561 if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) {
22562 return this.finish(node);
22564 this.restoreAtMark(pos);
22567 LESSParser.prototype._parseMixinParameter = function () {
22568 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionParameter);
22569 // special rest variable: @rest...
22570 if (this.peekKeyword('@rest')) {
22571 var restNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22572 this.consumeToken();
22573 if (!this.accept(_lessScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
22574 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]);
22576 node.setIdentifier(this.finish(restNode));
22577 return this.finish(node);
22579 // special const args: ...
22580 if (this.peek(_lessScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
22581 var varargsNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22582 this.consumeToken();
22583 node.setIdentifier(this.finish(varargsNode));
22584 return this.finish(node);
22586 var hasContent = false;
22587 // default variable declaration: @param: 12 or @name
22588 if (node.setIdentifier(this._parseVariable())) {
22589 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon);
22592 if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) {
22595 return this.finish(node);
22597 LESSParser.prototype._parseGuard = function () {
22598 if (!this.peekIdent('when')) {
22601 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.LessGuard);
22602 this.consumeToken(); // when
22603 node.isNegated = this.acceptIdent('not');
22604 if (!node.getConditions().addChild(this._parseGuardCondition())) {
22605 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ConditionExpected);
22607 while (this.acceptIdent('and') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22608 if (!node.getConditions().addChild(this._parseGuardCondition())) {
22609 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ConditionExpected);
22612 return this.finish(node);
22614 LESSParser.prototype._parseGuardCondition = function () {
22615 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22618 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.GuardCondition);
22619 this.consumeToken(); // ParenthesisL
22620 if (!node.addChild(this._parseExpr())) {
22623 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22624 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
22626 return this.finish(node);
22628 LESSParser.prototype._parseFunction = function () {
22629 var pos = this.mark();
22630 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Function);
22631 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
22634 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22635 this.restoreAtMark(pos);
22638 if (node.getArguments().addChild(this._parseMixinArgument())) {
22639 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
22640 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22643 if (!node.getArguments().addChild(this._parseMixinArgument())) {
22644 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ExpressionExpected);
22648 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22649 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
22651 return this.finish(node);
22653 LESSParser.prototype._parseFunctionIdentifier = function () {
22654 if (this.peekDelim('%')) {
22655 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
22656 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Function];
22657 this.consumeToken();
22658 return this.finish(node);
22660 return _super.prototype._parseFunctionIdentifier.call(this);
22662 LESSParser.prototype._parseURLArgument = function () {
22663 var pos = this.mark();
22664 var node = _super.prototype._parseURLArgument.call(this);
22665 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22666 this.restoreAtMark(pos);
22667 var node_2 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22668 node_2.addChild(this._parseBinaryExpr());
22669 return this.finish(node_2);
22674 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__.Parser));
22680 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22682 __webpack_require__.r(__webpack_exports__);
22683 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22684 /* harmony export */ "Ellipsis": () => /* binding */ Ellipsis,
22685 /* harmony export */ "LESSScanner": () => /* binding */ LESSScanner
22686 /* harmony export */ });
22687 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
22688 /*---------------------------------------------------------------------------------------------
22689 * Copyright (c) Microsoft Corporation. All rights reserved.
22690 * Licensed under the MIT License. See License.txt in the project root for license information.
22691 *--------------------------------------------------------------------------------------------*/
22693 var __extends = (undefined && undefined.__extends) || (function () {
22694 var extendStatics = function (d, b) {
22695 extendStatics = Object.setPrototypeOf ||
22696 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22697 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22698 return extendStatics(d, b);
22700 return function (d, b) {
22701 extendStatics(d, b);
22702 function __() { this.constructor = d; }
22703 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22707 var _FSL = '/'.charCodeAt(0);
22708 var _NWL = '\n'.charCodeAt(0);
22709 var _CAR = '\r'.charCodeAt(0);
22710 var _LFD = '\f'.charCodeAt(0);
22711 var _TIC = '`'.charCodeAt(0);
22712 var _DOT = '.'.charCodeAt(0);
22713 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CustomToken;
22714 var Ellipsis = customTokenValue++;
22715 var LESSScanner = /** @class */ (function (_super) {
22716 __extends(LESSScanner, _super);
22717 function LESSScanner() {
22718 return _super !== null && _super.apply(this, arguments) || this;
22720 LESSScanner.prototype.scanNext = function (offset) {
22721 // LESS: escaped JavaScript code `const a = "dddd"`
22722 var tokenType = this.escapedJavaScript();
22723 if (tokenType !== null) {
22724 return this.finishToken(offset, tokenType);
22726 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
22727 return this.finishToken(offset, Ellipsis);
22729 return _super.prototype.scanNext.call(this, offset);
22731 LESSScanner.prototype.comment = function () {
22732 if (_super.prototype.comment.call(this)) {
22735 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
22736 this.stream.advanceWhileChar(function (ch) {
22752 LESSScanner.prototype.escapedJavaScript = function () {
22753 var ch = this.stream.peekChar();
22755 this.stream.advance(1);
22756 this.stream.advanceWhileChar(function (ch) { return ch !== _TIC; });
22757 return this.stream.advanceIfChar(_TIC) ? _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EscapedJavaScript : _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadEscapedJavaScript;
22761 return LESSScanner;
22762 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner));
22768 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22770 __webpack_require__.r(__webpack_exports__);
22771 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22772 /* harmony export */ "LESSCompletion": () => /* binding */ LESSCompletion
22773 /* harmony export */ });
22774 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(102);
22775 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105);
22776 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
22777 /*---------------------------------------------------------------------------------------------
22778 * Copyright (c) Microsoft Corporation. All rights reserved.
22779 * Licensed under the MIT License. See License.txt in the project root for license information.
22780 *--------------------------------------------------------------------------------------------*/
22782 var __extends = (undefined && undefined.__extends) || (function () {
22783 var extendStatics = function (d, b) {
22784 extendStatics = Object.setPrototypeOf ||
22785 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22786 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22787 return extendStatics(d, b);
22789 return function (d, b) {
22790 extendStatics(d, b);
22791 function __() { this.constructor = d; }
22792 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22798 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__.loadMessageBundle();
22799 var LESSCompletion = /** @class */ (function (_super) {
22800 __extends(LESSCompletion, _super);
22801 function LESSCompletion(lsOptions, cssDataManager) {
22802 return _super.call(this, '@', lsOptions, cssDataManager) || this;
22804 LESSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
22805 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
22806 var p = proposals_1[_i];
22810 documentation: p.description,
22811 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(this.getCompletionRange(existingNode), p.name + '($0)'),
22812 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet,
22813 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function
22816 item.sortText = 'z';
22818 result.items.push(item);
22822 LESSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
22823 var functions = LESSCompletion.builtInProposals;
22825 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
22827 this.createFunctionProposals(functions, existingNode, true, result);
22828 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
22830 LESSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
22831 this.createFunctionProposals(LESSCompletion.colorProposals, existingNode, false, result);
22832 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
22834 LESSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
22835 this.getCompletionsForSelector(null, true, result);
22836 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
22838 LESSCompletion.builtInProposals = [
22839 // Boolean functions
22842 'example': 'if(condition, trueValue [, falseValue]);',
22843 'description': localize('less.builtin.if', 'returns one of two values depending on a condition.')
22847 'example': 'boolean(condition);',
22848 'description': localize('less.builtin.boolean', '"store" a boolean test for later evaluation in a guard or if().')
22853 'example': 'length(@list);',
22854 'description': localize('less.builtin.length', 'returns the number of elements in a value list')
22858 'example': 'extract(@list, index);',
22859 'description': localize('less.builtin.extract', 'returns a value at the specified position in the list')
22863 'example': 'range([start, ] end [, step]);',
22864 'description': localize('less.builtin.range', 'generate a list spanning a range of values')
22868 'example': 'each(@list, ruleset);',
22869 'description': localize('less.builtin.each', 'bind the evaluation of a ruleset to each member of a list.')
22874 'example': 'escape(@string);',
22875 'description': localize('less.builtin.escape', 'URL encodes a string')
22879 'example': 'e(@string);',
22880 'description': localize('less.builtin.e', 'escape string content')
22884 'example': 'replace(@string, @pattern, @replacement[, @flags]);',
22885 'description': localize('less.builtin.replace', 'string replace')
22889 'example': 'unit(@dimension, [@unit: \'\']);',
22890 'description': localize('less.builtin.unit', 'remove or change the unit of a dimension')
22894 'example': 'color(@string);',
22895 'description': localize('less.builtin.color', 'parses a string to a color'),
22900 'example': 'convert(@value, unit);',
22901 'description': localize('less.builtin.convert', 'converts numbers from one type into another')
22904 'name': 'data-uri',
22905 'example': 'data-uri([mimetype,] url);',
22906 'description': localize('less.builtin.data-uri', 'inlines a resource and falls back to `url()`'),
22911 'description': localize('less.builtin.abs', 'absolute value of a number'),
22912 'example': 'abs(number);'
22916 'description': localize('less.builtin.acos', 'arccosine - inverse of cosine function'),
22917 'example': 'acos(number);'
22921 'description': localize('less.builtin.asin', 'arcsine - inverse of sine function'),
22922 'example': 'asin(number);'
22926 'example': 'ceil(@number);',
22927 'description': localize('less.builtin.ceil', 'rounds up to an integer')
22931 'description': localize('less.builtin.cos', 'cosine function'),
22932 'example': 'cos(number);'
22936 'description': localize('less.builtin.floor', 'rounds down to an integer'),
22937 'example': 'floor(@number);'
22940 'name': 'percentage',
22941 'description': localize('less.builtin.percentage', 'converts to a %, e.g. 0.5 > 50%'),
22942 'example': 'percentage(@number);',
22943 'type': 'percentage'
22947 'description': localize('less.builtin.round', 'rounds a number to a number of places'),
22948 'example': 'round(number, [places: 0]);'
22952 'description': localize('less.builtin.sqrt', 'calculates square root of a number'),
22953 'example': 'sqrt(number);'
22957 'description': localize('less.builtin.sin', 'sine function'),
22958 'example': 'sin(number);'
22962 'description': localize('less.builtin.tan', 'tangent function'),
22963 'example': 'tan(number);'
22967 'description': localize('less.builtin.atan', 'arctangent - inverse of tangent function'),
22968 'example': 'atan(number);'
22972 'description': localize('less.builtin.pi', 'returns pi'),
22977 'description': localize('less.builtin.pow', 'first argument raised to the power of the second argument'),
22978 'example': 'pow(@base, @exponent);'
22982 'description': localize('less.builtin.mod', 'first argument modulus second argument'),
22983 'example': 'mod(number, number);'
22987 'description': localize('less.builtin.min', 'returns the lowest of one or more values'),
22988 'example': 'min(@x, @y);'
22992 'description': localize('less.builtin.max', 'returns the lowest of one or more values'),
22993 'example': 'max(@x, @y);'
22996 LESSCompletion.colorProposals = [
22999 'example': 'argb(@color);',
23000 'description': localize('less.builtin.argb', 'creates a #AARRGGBB')
23004 'example': 'hsl(@hue, @saturation, @lightness);',
23005 'description': localize('less.builtin.hsl', 'creates a color')
23009 'example': 'hsla(@hue, @saturation, @lightness, @alpha);',
23010 'description': localize('less.builtin.hsla', 'creates a color')
23014 'example': 'hsv(@hue, @saturation, @value);',
23015 'description': localize('less.builtin.hsv', 'creates a color')
23019 'example': 'hsva(@hue, @saturation, @value, @alpha);',
23020 'description': localize('less.builtin.hsva', 'creates a color')
23024 'example': 'hue(@color);',
23025 'description': localize('less.builtin.hue', 'returns the `hue` channel of `@color` in the HSL space')
23028 'name': 'saturation',
23029 'example': 'saturation(@color);',
23030 'description': localize('less.builtin.saturation', 'returns the `saturation` channel of `@color` in the HSL space')
23033 'name': 'lightness',
23034 'example': 'lightness(@color);',
23035 'description': localize('less.builtin.lightness', 'returns the `lightness` channel of `@color` in the HSL space')
23039 'example': 'hsvhue(@color);',
23040 'description': localize('less.builtin.hsvhue', 'returns the `hue` channel of `@color` in the HSV space')
23043 'name': 'hsvsaturation',
23044 'example': 'hsvsaturation(@color);',
23045 'description': localize('less.builtin.hsvsaturation', 'returns the `saturation` channel of `@color` in the HSV space')
23048 'name': 'hsvvalue',
23049 'example': 'hsvvalue(@color);',
23050 'description': localize('less.builtin.hsvvalue', 'returns the `value` channel of `@color` in the HSV space')
23054 'example': 'red(@color);',
23055 'description': localize('less.builtin.red', 'returns the `red` channel of `@color`')
23059 'example': 'green(@color);',
23060 'description': localize('less.builtin.green', 'returns the `green` channel of `@color`')
23064 'example': 'blue(@color);',
23065 'description': localize('less.builtin.blue', 'returns the `blue` channel of `@color`')
23069 'example': 'alpha(@color);',
23070 'description': localize('less.builtin.alpha', 'returns the `alpha` channel of `@color`')
23074 'example': 'luma(@color);',
23075 'description': localize('less.builtin.luma', 'returns the `luma` value (perceptual brightness) of `@color`')
23078 'name': 'saturate',
23079 'example': 'saturate(@color, 10%);',
23080 'description': localize('less.builtin.saturate', 'return `@color` 10% points more saturated')
23083 'name': 'desaturate',
23084 'example': 'desaturate(@color, 10%);',
23085 'description': localize('less.builtin.desaturate', 'return `@color` 10% points less saturated')
23089 'example': 'lighten(@color, 10%);',
23090 'description': localize('less.builtin.lighten', 'return `@color` 10% points lighter')
23094 'example': 'darken(@color, 10%);',
23095 'description': localize('less.builtin.darken', 'return `@color` 10% points darker')
23099 'example': 'fadein(@color, 10%);',
23100 'description': localize('less.builtin.fadein', 'return `@color` 10% points less transparent')
23104 'example': 'fadeout(@color, 10%);',
23105 'description': localize('less.builtin.fadeout', 'return `@color` 10% points more transparent')
23109 'example': 'fade(@color, 50%);',
23110 'description': localize('less.builtin.fade', 'return `@color` with 50% transparency')
23114 'example': 'spin(@color, 10);',
23115 'description': localize('less.builtin.spin', 'return `@color` with a 10 degree larger in hue')
23119 'example': 'mix(@color1, @color2, [@weight: 50%]);',
23120 'description': localize('less.builtin.mix', 'return a mix of `@color1` and `@color2`')
23123 'name': 'greyscale',
23124 'example': 'greyscale(@color);',
23125 'description': localize('less.builtin.greyscale', 'returns a grey, 100% desaturated color'),
23128 'name': 'contrast',
23129 'example': 'contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);',
23130 'description': localize('less.builtin.contrast', 'return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes')
23133 'name': 'multiply',
23134 'example': 'multiply(@color1, @color2);'
23138 'example': 'screen(@color1, @color2);'
23142 'example': 'overlay(@color1, @color2);'
23145 'name': 'softlight',
23146 'example': 'softlight(@color1, @color2);'
23149 'name': 'hardlight',
23150 'example': 'hardlight(@color1, @color2);'
23153 'name': 'difference',
23154 'example': 'difference(@color1, @color2);'
23157 'name': 'exclusion',
23158 'example': 'exclusion(@color1, @color2);'
23162 'example': 'average(@color1, @color2);'
23165 'name': 'negation',
23166 'example': 'negation(@color1, @color2);'
23169 return LESSCompletion;
23170 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__.CSSCompletion));
23176 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23178 __webpack_require__.r(__webpack_exports__);
23179 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23180 /* harmony export */ "getFoldingRanges": () => /* binding */ getFoldingRanges
23181 /* harmony export */ });
23182 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
23183 /* harmony import */ var _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(119);
23184 /* harmony import */ var _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(123);
23185 /*---------------------------------------------------------------------------------------------
23186 * Copyright (c) Microsoft Corporation. All rights reserved.
23187 * Licensed under the MIT License. See License.txt in the project root for license information.
23188 *--------------------------------------------------------------------------------------------*/
23193 function getFoldingRanges(document, context) {
23194 var ranges = computeFoldingRanges(document);
23195 return limitFoldingRanges(ranges, context);
23197 function computeFoldingRanges(document) {
23198 function getStartLine(t) {
23199 return document.positionAt(t.offset).line;
23201 function getEndLine(t) {
23202 return document.positionAt(t.offset + t.len).line;
23204 function getScanner() {
23205 switch (document.languageId) {
23207 return new _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__.SCSSScanner();
23209 return new _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__.LESSScanner();
23211 return new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner();
23214 function tokenToRange(t, kind) {
23215 var startLine = getStartLine(t);
23216 var endLine = getEndLine(t);
23217 if (startLine !== endLine) {
23219 startLine: startLine,
23229 var delimiterStack = [];
23230 var scanner = getScanner();
23231 scanner.ignoreComment = false;
23232 scanner.setSource(document.getText());
23233 var token = scanner.scan();
23234 var prevToken = null;
23235 var _loop_1 = function () {
23236 switch (token.type) {
23237 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
23238 case _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__.InterpolationFunction:
23240 delimiterStack.push({ line: getStartLine(token), type: 'brace', isStart: true });
23243 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR: {
23244 if (delimiterStack.length !== 0) {
23245 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
23246 if (!prevDelimiter) {
23249 var endLine = getEndLine(token);
23250 if (prevDelimiter.type === 'brace') {
23252 * Other than the case when curly brace is not on a new line by itself, for example
23255 * Use endLine minus one to show ending curly brace
23257 if (prevToken && getEndLine(prevToken) !== endLine) {
23260 if (prevDelimiter.line !== endLine) {
23262 startLine: prevDelimiter.line,
23272 * In CSS, there is no single line comment prefixed with //
23273 * All comments are marked as `Comment`
23275 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comment: {
23276 var commentRegionMarkerToDelimiter_1 = function (marker) {
23277 if (marker === '#region') {
23278 return { line: getStartLine(token), type: 'comment', isStart: true };
23281 return { line: getEndLine(token), type: 'comment', isStart: false };
23284 var getCurrDelimiter = function (token) {
23285 var matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
23287 return commentRegionMarkerToDelimiter_1(matches[1]);
23289 else if (document.languageId === 'scss' || document.languageId === 'less') {
23290 var matches_1 = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
23292 return commentRegionMarkerToDelimiter_1(matches_1[1]);
23297 var currDelimiter = getCurrDelimiter(token);
23298 // /* */ comment region folding
23299 // All #region and #endregion cases
23300 if (currDelimiter) {
23301 if (currDelimiter.isStart) {
23302 delimiterStack.push(currDelimiter);
23305 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
23306 if (!prevDelimiter) {
23309 if (prevDelimiter.type === 'comment') {
23310 if (prevDelimiter.line !== currDelimiter.line) {
23312 startLine: prevDelimiter.line,
23313 endLine: currDelimiter.line,
23320 // Multiline comment case
23322 var range = tokenToRange(token, 'comment');
23324 ranges.push(range);
23331 token = scanner.scan();
23333 while (token.type !== _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) {
23338 function popPrevStartDelimiterOfType(stack, type) {
23339 if (stack.length === 0) {
23342 for (var i = stack.length - 1; i >= 0; i--) {
23343 if (stack[i].type === type && stack[i].isStart) {
23344 return stack.splice(i, 1)[0];
23351 * - Remove invalid regions (intersections)
23352 * - If limit exceeds, only return `rangeLimit` amount of ranges
23354 function limitFoldingRanges(ranges, context) {
23355 var maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
23356 var sortedRanges = ranges.sort(function (r1, r2) {
23357 var diff = r1.startLine - r2.startLine;
23359 diff = r1.endLine - r2.endLine;
23363 var validRanges = [];
23364 var prevEndLine = -1;
23365 sortedRanges.forEach(function (r) {
23366 if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
23367 validRanges.push(r);
23368 prevEndLine = r.endLine;
23371 if (validRanges.length < maxRanges) {
23372 return validRanges;
23375 return validRanges.slice(0, maxRanges);
23382 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23384 __webpack_require__.r(__webpack_exports__);
23385 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23386 /* harmony export */ "CSSDataManager": () => /* binding */ CSSDataManager
23387 /* harmony export */ });
23388 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(101);
23389 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(127);
23390 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(128);
23391 /*---------------------------------------------------------------------------------------------
23392 * Copyright (c) Microsoft Corporation. All rights reserved.
23393 * Licensed under the MIT License. See License.txt in the project root for license information.
23394 *--------------------------------------------------------------------------------------------*/
23399 var CSSDataManager = /** @class */ (function () {
23400 function CSSDataManager(options) {
23401 this.dataProviders = [];
23402 this._propertySet = {};
23403 this._atDirectiveSet = {};
23404 this._pseudoClassSet = {};
23405 this._pseudoElementSet = {};
23406 this._properties = [];
23407 this._atDirectives = [];
23408 this._pseudoClasses = [];
23409 this._pseudoElements = [];
23410 this.setDataProviders((options === null || options === void 0 ? void 0 : options.useDefaultDataProvider) !== false, (options === null || options === void 0 ? void 0 : options.customDataProviders) || []);
23412 CSSDataManager.prototype.setDataProviders = function (builtIn, providers) {
23414 this.dataProviders = [];
23416 this.dataProviders.push(new _dataProvider__WEBPACK_IMPORTED_MODULE_1__.CSSDataProvider(_data_webCustomData__WEBPACK_IMPORTED_MODULE_0__.cssData));
23418 (_a = this.dataProviders).push.apply(_a, providers);
23419 this.collectData();
23422 * Collect all data & handle duplicates
23424 CSSDataManager.prototype.collectData = function () {
23426 this._propertySet = {};
23427 this._atDirectiveSet = {};
23428 this._pseudoClassSet = {};
23429 this._pseudoElementSet = {};
23430 this.dataProviders.forEach(function (provider) {
23431 provider.provideProperties().forEach(function (p) {
23432 if (!_this._propertySet[p.name]) {
23433 _this._propertySet[p.name] = p;
23436 provider.provideAtDirectives().forEach(function (p) {
23437 if (!_this._atDirectiveSet[p.name]) {
23438 _this._atDirectiveSet[p.name] = p;
23441 provider.providePseudoClasses().forEach(function (p) {
23442 if (!_this._pseudoClassSet[p.name]) {
23443 _this._pseudoClassSet[p.name] = p;
23446 provider.providePseudoElements().forEach(function (p) {
23447 if (!_this._pseudoElementSet[p.name]) {
23448 _this._pseudoElementSet[p.name] = p;
23452 this._properties = _utils_objects__WEBPACK_IMPORTED_MODULE_2__.values(this._propertySet);
23453 this._atDirectives = _utils_objects__WEBPACK_IMPORTED_MODULE_2__.values(this._atDirectiveSet);
23454 this._pseudoClasses = _utils_objects__WEBPACK_IMPORTED_MODULE_2__.values(this._pseudoClassSet);
23455 this._pseudoElements = _utils_objects__WEBPACK_IMPORTED_MODULE_2__.values(this._pseudoElementSet);
23457 CSSDataManager.prototype.getProperty = function (name) { return this._propertySet[name]; };
23458 CSSDataManager.prototype.getAtDirective = function (name) { return this._atDirectiveSet[name]; };
23459 CSSDataManager.prototype.getPseudoClass = function (name) { return this._pseudoClassSet[name]; };
23460 CSSDataManager.prototype.getPseudoElement = function (name) { return this._pseudoElementSet[name]; };
23461 CSSDataManager.prototype.getProperties = function () {
23462 return this._properties;
23464 CSSDataManager.prototype.getAtDirectives = function () {
23465 return this._atDirectives;
23467 CSSDataManager.prototype.getPseudoClasses = function () {
23468 return this._pseudoClasses;
23470 CSSDataManager.prototype.getPseudoElements = function () {
23471 return this._pseudoElements;
23473 CSSDataManager.prototype.isKnownProperty = function (name) {
23474 return name.toLowerCase() in this._propertySet;
23476 CSSDataManager.prototype.isStandardProperty = function (name) {
23477 return this.isKnownProperty(name) &&
23478 (!this._propertySet[name.toLowerCase()].status || this._propertySet[name.toLowerCase()].status === 'standard');
23480 return CSSDataManager;
23487 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23489 __webpack_require__.r(__webpack_exports__);
23490 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23491 /* harmony export */ "cssData": () => /* binding */ cssData
23492 /* harmony export */ });
23493 /*---------------------------------------------------------------------------------------------
23494 * Copyright (c) Microsoft Corporation. All rights reserved.
23495 * Licensed under the MIT License. See License.txt in the project root for license information.
23496 *--------------------------------------------------------------------------------------------*/
23497 // file generated from vscode-web-custom-data NPM package
23502 "name": "additive-symbols",
23506 "syntax": "[ <integer> && <symbol> ]#",
23508 "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'.",
23517 "name": "align-content",
23521 "description": "Lines are packed toward the center of the flex container."
23524 "name": "flex-end",
23525 "description": "Lines are packed toward the end of the flex container."
23528 "name": "flex-start",
23529 "description": "Lines are packed toward the start of the flex container."
23532 "name": "space-around",
23533 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
23536 "name": "space-between",
23537 "description": "Lines are evenly distributed in the flex container."
23541 "description": "Lines stretch to take up the remaining space."
23544 "syntax": "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
23546 "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.",
23552 "name": "align-items",
23555 "name": "baseline",
23556 "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."
23560 "description": "The flex item’s margin box is centered in the cross axis within the line."
23563 "name": "flex-end",
23564 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
23567 "name": "flex-start",
23568 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
23572 "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."
23575 "syntax": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
23577 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
23583 "name": "justify-items",
23598 "name": "flex-end",
23599 "description": "\"Flex items are packed toward the end of the line.\""
23602 "name": "flex-start",
23603 "description": "\"Flex items are packed toward the start of the line.\""
23606 "name": "self-end",
23607 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
23610 "name": "self-start",
23611 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
23615 "description": "The items are packed flush to each other toward the center of the of the alignment container."
23627 "name": "first baseline"
23630 "name": "last baseline"
23634 "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."
23646 "syntax": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
23648 "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",
23654 "name": "justify-self",
23676 "name": "flex-end",
23677 "description": "\"Flex items are packed toward the end of the line.\""
23680 "name": "flex-start",
23681 "description": "\"Flex items are packed toward the start of the line.\""
23684 "name": "self-end",
23685 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
23688 "name": "self-start",
23689 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
23693 "description": "The items are packed flush to each other toward the center of the of the alignment container."
23705 "name": "first baseline"
23708 "name": "last baseline"
23712 "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."
23721 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
23723 "description": "Defines the way of justifying a box inside its container along the appropriate axis.",
23729 "name": "align-self",
23733 "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."
23736 "name": "baseline",
23737 "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."
23741 "description": "The flex item’s margin box is centered in the cross axis within the line."
23744 "name": "flex-end",
23745 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
23748 "name": "flex-start",
23749 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
23753 "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."
23756 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
23758 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
23773 "syntax": "initial | inherit | unset | revert",
23777 "name": "MDN Reference",
23778 "url": "https://developer.mozilla.org/docs/Web/CSS/all"
23781 "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",
23795 "name": "MDN Reference",
23796 "url": "https://developer.mozilla.org/docs/Web/CSS/alt"
23799 "description": "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",
23806 "name": "animation",
23809 "name": "alternate",
23810 "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."
23813 "name": "alternate-reverse",
23814 "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."
23817 "name": "backwards",
23818 "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'."
23822 "description": "Both forwards and backwards fill modes are applied."
23825 "name": "forwards",
23826 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
23829 "name": "infinite",
23830 "description": "Causes the animation to repeat forever."
23834 "description": "No animation is performed"
23838 "description": "Normal playback."
23842 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
23845 "syntax": "<single-animation>#",
23849 "name": "MDN Reference",
23850 "url": "https://developer.mozilla.org/docs/Web/CSS/animation"
23853 "description": "Shorthand property combines six of the animation properties into a single property.",
23863 "name": "animation-delay",
23864 "syntax": "<time>#",
23868 "name": "MDN Reference",
23869 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
23872 "description": "Defines when the animation will start.",
23878 "name": "animation-direction",
23881 "name": "alternate",
23882 "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."
23885 "name": "alternate-reverse",
23886 "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."
23890 "description": "Normal playback."
23894 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
23897 "syntax": "<single-animation-direction>#",
23901 "name": "MDN Reference",
23902 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
23905 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
23911 "name": "animation-duration",
23912 "syntax": "<time>#",
23916 "name": "MDN Reference",
23917 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
23920 "description": "Defines the length of time that an animation takes to complete one cycle.",
23926 "name": "animation-fill-mode",
23929 "name": "backwards",
23930 "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'."
23934 "description": "Both forwards and backwards fill modes are applied."
23937 "name": "forwards",
23938 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
23942 "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."
23945 "syntax": "<single-animation-fill-mode>#",
23949 "name": "MDN Reference",
23950 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
23953 "description": "Defines what values are applied by the animation outside the time it is executing.",
23959 "name": "animation-iteration-count",
23962 "name": "infinite",
23963 "description": "Causes the animation to repeat forever."
23966 "syntax": "<single-animation-iteration-count>#",
23970 "name": "MDN Reference",
23971 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
23974 "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.",
23981 "name": "animation-name",
23985 "description": "No animation is performed"
23988 "syntax": "[ none | <keyframes-name> ]#",
23992 "name": "MDN Reference",
23993 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-name"
23996 "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.",
24003 "name": "animation-play-state",
24007 "description": "A running animation will be paused."
24011 "description": "Resume playback of a paused animation."
24014 "syntax": "<single-animation-play-state>#",
24018 "name": "MDN Reference",
24019 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
24022 "description": "Defines whether the animation is running or paused.",
24028 "name": "animation-timing-function",
24029 "syntax": "<timing-function>#",
24033 "name": "MDN Reference",
24034 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
24037 "description": "Describes how the animation will progress over one cycle of its duration.",
24043 "name": "backface-visibility",
24047 "description": "Back side is hidden."
24051 "description": "Back side is visible."
24054 "syntax": "visible | hidden",
24058 "name": "MDN Reference",
24059 "url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
24062 "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.",
24068 "name": "background",
24072 "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."
24076 "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."
24080 "description": "A value of 'none' counts as an image layer but draws nothing."
24084 "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.)"
24087 "syntax": "[ <bg-layer> , ]* <final-bg-layer>",
24091 "name": "MDN Reference",
24092 "url": "https://developer.mozilla.org/docs/Web/CSS/background"
24095 "description": "Shorthand property for setting most background properties at the same place in the style sheet.",
24108 "name": "background-attachment",
24112 "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."
24116 "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."
24120 "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.)"
24123 "syntax": "<attachment>#",
24127 "name": "MDN Reference",
24128 "url": "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
24131 "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').",
24137 "name": "background-blend-mode",
24148 "description": "Default attribute which specifies no blending"
24151 "name": "multiply",
24152 "description": "The source color is multiplied by the destination color and replaces the destination."
24156 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
24160 "description": "Multiplies or screens the colors, depending on the backdrop color value."
24164 "description": "Selects the darker of the backdrop and source colors."
24168 "description": "Selects the lighter of the backdrop and source colors."
24171 "name": "color-dodge",
24172 "description": "Brightens the backdrop color to reflect the source color."
24175 "name": "color-burn",
24176 "description": "Darkens the backdrop color to reflect the source color."
24179 "name": "hard-light",
24180 "description": "Multiplies or screens the colors, depending on the source color value."
24183 "name": "soft-light",
24184 "description": "Darkens or lightens the colors, depending on the source color value."
24187 "name": "difference",
24188 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
24191 "name": "exclusion",
24192 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
24203 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
24206 "name": "saturation",
24214 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
24225 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
24228 "name": "luminosity",
24236 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
24239 "syntax": "<blend-mode>#",
24243 "name": "MDN Reference",
24244 "url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
24247 "description": "Defines the blending mode of each background layer.",
24253 "name": "background-clip",
24254 "syntax": "<box>#",
24258 "name": "MDN Reference",
24259 "url": "https://developer.mozilla.org/docs/Web/CSS/background-clip"
24262 "description": "Determines the background painting area.",
24268 "name": "background-color",
24269 "syntax": "<color>",
24273 "name": "MDN Reference",
24274 "url": "https://developer.mozilla.org/docs/Web/CSS/background-color"
24277 "description": "Sets the background color of an element.",
24283 "name": "background-image",
24287 "description": "Counts as an image layer but draws nothing."
24290 "syntax": "<bg-image>#",
24294 "name": "MDN Reference",
24295 "url": "https://developer.mozilla.org/docs/Web/CSS/background-image"
24298 "description": "Sets the background image(s) of an element.",
24305 "name": "background-origin",
24306 "syntax": "<box>#",
24310 "name": "MDN Reference",
24311 "url": "https://developer.mozilla.org/docs/Web/CSS/background-origin"
24314 "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).",
24320 "name": "background-position",
24321 "syntax": "<bg-position>#",
24325 "name": "MDN Reference",
24326 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
24329 "description": "Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",
24337 "name": "background-position-x",
24341 "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."
24345 "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."
24349 "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."
24352 "status": "experimental",
24353 "syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
24357 "name": "MDN Reference",
24358 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
24361 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
24368 "name": "background-position-y",
24372 "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."
24376 "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."
24380 "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."
24383 "status": "experimental",
24384 "syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
24388 "name": "MDN Reference",
24389 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
24392 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
24399 "name": "background-repeat",
24401 "syntax": "<repeat-style>#",
24405 "name": "MDN Reference",
24406 "url": "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
24409 "description": "Specifies how background images are tiled after they have been sized and positioned.",
24415 "name": "background-size",
24419 "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%."
24423 "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."
24427 "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."
24430 "syntax": "<bg-size>#",
24434 "name": "MDN Reference",
24435 "url": "https://developer.mozilla.org/docs/Web/CSS/background-size"
24438 "description": "Specifies the size of the background images.",
24445 "name": "behavior",
24450 "description": "IE only. Used to extend behaviors of the browser.",
24456 "name": "block-size",
24467 "description": "Depends on the values of other properties."
24470 "syntax": "<'width'>",
24474 "name": "MDN Reference",
24475 "url": "https://developer.mozilla.org/docs/Web/CSS/block-size"
24478 "description": "Logical 'width'. Mapping depends on the element’s 'writing-mode'.",
24486 "syntax": "<line-width> || <line-style> || <color>",
24490 "name": "MDN Reference",
24491 "url": "https://developer.mozilla.org/docs/Web/CSS/border"
24494 "description": "Shorthand property for setting border width, style, and color.",
24503 "name": "border-block-end",
24511 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
24515 "name": "MDN Reference",
24516 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
24519 "description": "Logical 'border-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24528 "name": "border-block-start",
24536 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
24540 "name": "MDN Reference",
24541 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
24544 "description": "Logical 'border-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24553 "name": "border-block-end-color",
24561 "syntax": "<'border-top-color'>",
24565 "name": "MDN Reference",
24566 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
24569 "description": "Logical 'border-bottom-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24575 "name": "border-block-start-color",
24583 "syntax": "<'border-top-color'>",
24587 "name": "MDN Reference",
24588 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
24591 "description": "Logical 'border-top-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24597 "name": "border-block-end-style",
24605 "syntax": "<'border-top-style'>",
24609 "name": "MDN Reference",
24610 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
24613 "description": "Logical 'border-bottom-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24619 "name": "border-block-start-style",
24627 "syntax": "<'border-top-style'>",
24631 "name": "MDN Reference",
24632 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
24635 "description": "Logical 'border-top-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24641 "name": "border-block-end-width",
24649 "syntax": "<'border-top-width'>",
24653 "name": "MDN Reference",
24654 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
24657 "description": "Logical 'border-bottom-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24664 "name": "border-block-start-width",
24672 "syntax": "<'border-top-width'>",
24676 "name": "MDN Reference",
24677 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
24680 "description": "Logical 'border-top-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
24687 "name": "border-bottom",
24688 "syntax": "<line-width> || <line-style> || <color>",
24692 "name": "MDN Reference",
24693 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
24696 "description": "Shorthand property for setting border width, style and color.",
24705 "name": "border-bottom-color",
24706 "syntax": "<'border-top-color'>",
24710 "name": "MDN Reference",
24711 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
24714 "description": "Sets the color of the bottom border.",
24720 "name": "border-bottom-left-radius",
24721 "syntax": "<length-percentage>{1,2}",
24725 "name": "MDN Reference",
24726 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
24729 "description": "Defines the radii of the bottom left outer border edge.",
24736 "name": "border-bottom-right-radius",
24737 "syntax": "<length-percentage>{1,2}",
24741 "name": "MDN Reference",
24742 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
24745 "description": "Defines the radii of the bottom right outer border edge.",
24752 "name": "border-bottom-style",
24753 "syntax": "<line-style>",
24757 "name": "MDN Reference",
24758 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
24761 "description": "Sets the style of the bottom border.",
24767 "name": "border-bottom-width",
24768 "syntax": "<line-width>",
24772 "name": "MDN Reference",
24773 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
24776 "description": "Sets the thickness of the bottom border.",
24783 "name": "border-collapse",
24786 "name": "collapse",
24787 "description": "Selects the collapsing borders model."
24790 "name": "separate",
24791 "description": "Selects the separated borders border model."
24794 "syntax": "collapse | separate",
24798 "name": "MDN Reference",
24799 "url": "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
24802 "description": "Selects a table's border model.",
24808 "name": "border-color",
24810 "syntax": "<color>{1,4}",
24814 "name": "MDN Reference",
24815 "url": "https://developer.mozilla.org/docs/Web/CSS/border-color"
24818 "description": "The color of the border around all four edges of an element.",
24824 "name": "border-image",
24828 "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."
24832 "description": "Causes the middle part of the border-image to be preserved."
24836 "description": "Use the border styles."
24840 "description": "The image is tiled (repeated) to fill the area."
24844 "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."
24848 "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."
24852 "description": "The image is stretched to fill the area."
24858 "syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
24862 "name": "MDN Reference",
24863 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image"
24866 "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.",
24876 "name": "border-image-outset",
24877 "syntax": "[ <length> | <number> ]{1,4}",
24881 "name": "MDN Reference",
24882 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
24885 "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.",
24892 "name": "border-image-repeat",
24896 "description": "The image is tiled (repeated) to fill the area."
24900 "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."
24904 "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."
24908 "description": "The image is stretched to fill the area."
24911 "syntax": "[ stretch | repeat | round | space ]{1,2}",
24915 "name": "MDN Reference",
24916 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
24919 "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.",
24925 "name": "border-image-slice",
24929 "description": "Causes the middle part of the border-image to be preserved."
24932 "syntax": "<number-percentage>{1,4} && fill?",
24936 "name": "MDN Reference",
24937 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
24940 "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.",
24947 "name": "border-image-source",
24951 "description": "Use the border styles."
24954 "syntax": "none | <image>",
24958 "name": "MDN Reference",
24959 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
24962 "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.",
24968 "name": "border-image-width",
24972 "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."
24975 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
24979 "name": "MDN Reference",
24980 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
24983 "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.",
24991 "name": "border-inline-end",
24999 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
25003 "name": "MDN Reference",
25004 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
25007 "description": "Logical 'border-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25016 "name": "border-inline-start",
25024 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
25028 "name": "MDN Reference",
25029 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
25032 "description": "Logical 'border-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25041 "name": "border-inline-end-color",
25049 "syntax": "<'border-top-color'>",
25053 "name": "MDN Reference",
25054 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
25057 "description": "Logical 'border-right-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25063 "name": "border-inline-start-color",
25071 "syntax": "<'border-top-color'>",
25075 "name": "MDN Reference",
25076 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
25079 "description": "Logical 'border-left-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25085 "name": "border-inline-end-style",
25093 "syntax": "<'border-top-style'>",
25097 "name": "MDN Reference",
25098 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
25101 "description": "Logical 'border-right-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25107 "name": "border-inline-start-style",
25115 "syntax": "<'border-top-style'>",
25119 "name": "MDN Reference",
25120 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
25123 "description": "Logical 'border-left-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25129 "name": "border-inline-end-width",
25137 "syntax": "<'border-top-width'>",
25141 "name": "MDN Reference",
25142 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
25145 "description": "Logical 'border-right-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25152 "name": "border-inline-start-width",
25160 "syntax": "<'border-top-width'>",
25164 "name": "MDN Reference",
25165 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
25168 "description": "Logical 'border-left-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25175 "name": "border-left",
25176 "syntax": "<line-width> || <line-style> || <color>",
25180 "name": "MDN Reference",
25181 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left"
25184 "description": "Shorthand property for setting border width, style and color",
25193 "name": "border-left-color",
25194 "syntax": "<color>",
25198 "name": "MDN Reference",
25199 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
25202 "description": "Sets the color of the left border.",
25208 "name": "border-left-style",
25209 "syntax": "<line-style>",
25213 "name": "MDN Reference",
25214 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
25217 "description": "Sets the style of the left border.",
25223 "name": "border-left-width",
25224 "syntax": "<line-width>",
25228 "name": "MDN Reference",
25229 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
25232 "description": "Sets the thickness of the left border.",
25239 "name": "border-radius",
25240 "syntax": "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
25244 "name": "MDN Reference",
25245 "url": "https://developer.mozilla.org/docs/Web/CSS/border-radius"
25248 "description": "Defines the radii of the outer border edge.",
25255 "name": "border-right",
25256 "syntax": "<line-width> || <line-style> || <color>",
25260 "name": "MDN Reference",
25261 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right"
25264 "description": "Shorthand property for setting border width, style and color",
25273 "name": "border-right-color",
25274 "syntax": "<color>",
25278 "name": "MDN Reference",
25279 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
25282 "description": "Sets the color of the right border.",
25288 "name": "border-right-style",
25289 "syntax": "<line-style>",
25293 "name": "MDN Reference",
25294 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
25297 "description": "Sets the style of the right border.",
25303 "name": "border-right-width",
25304 "syntax": "<line-width>",
25308 "name": "MDN Reference",
25309 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
25312 "description": "Sets the thickness of the right border.",
25319 "name": "border-spacing",
25320 "syntax": "<length> <length>?",
25324 "name": "MDN Reference",
25325 "url": "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
25328 "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.",
25334 "name": "border-style",
25336 "syntax": "<line-style>{1,4}",
25340 "name": "MDN Reference",
25341 "url": "https://developer.mozilla.org/docs/Web/CSS/border-style"
25344 "description": "The style of the border around edges of an element.",
25350 "name": "border-top",
25351 "syntax": "<line-width> || <line-style> || <color>",
25355 "name": "MDN Reference",
25356 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top"
25359 "description": "Shorthand property for setting border width, style and color",
25368 "name": "border-top-color",
25369 "syntax": "<color>",
25373 "name": "MDN Reference",
25374 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
25377 "description": "Sets the color of the top border.",
25383 "name": "border-top-left-radius",
25384 "syntax": "<length-percentage>{1,2}",
25388 "name": "MDN Reference",
25389 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
25392 "description": "Defines the radii of the top left outer border edge.",
25399 "name": "border-top-right-radius",
25400 "syntax": "<length-percentage>{1,2}",
25404 "name": "MDN Reference",
25405 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
25408 "description": "Defines the radii of the top right outer border edge.",
25415 "name": "border-top-style",
25416 "syntax": "<line-style>",
25420 "name": "MDN Reference",
25421 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
25424 "description": "Sets the style of the top border.",
25430 "name": "border-top-width",
25431 "syntax": "<line-width>",
25435 "name": "MDN Reference",
25436 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
25439 "description": "Sets the thickness of the top border.",
25446 "name": "border-width",
25448 "syntax": "<line-width>{1,4}",
25452 "name": "MDN Reference",
25453 "url": "https://developer.mozilla.org/docs/Web/CSS/border-width"
25456 "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.",
25467 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
25470 "syntax": "<length> | <percentage> | auto",
25474 "name": "MDN Reference",
25475 "url": "https://developer.mozilla.org/docs/Web/CSS/bottom"
25478 "description": "Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",
25485 "name": "box-decoration-break",
25496 "description": "Each box is independently wrapped with the border and padding."
25500 "description": "The effect is as though the element were rendered with no breaks present, and then sliced by the breaks afterward."
25503 "syntax": "slice | clone",
25507 "name": "MDN Reference",
25508 "url": "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
25511 "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.",
25517 "name": "box-shadow",
25521 "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)."
25525 "description": "No shadow."
25528 "syntax": "none | <shadow>#",
25532 "name": "MDN Reference",
25533 "url": "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
25536 "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.",
25544 "name": "box-sizing",
25547 "name": "border-box",
25548 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
25551 "name": "content-box",
25552 "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."
25555 "syntax": "content-box | border-box",
25559 "name": "MDN Reference",
25560 "url": "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
25563 "description": "Specifies the behavior of the 'width' and 'height' properties.",
25569 "name": "break-after",
25573 "description": "Always force a page break before/after the generated box."
25577 "description": "Neither force nor forbid a page/column break before/after the principal box."
25581 "description": "Avoid a break before/after the principal box."
25584 "name": "avoid-column",
25585 "description": "Avoid a column break before/after the principal box."
25588 "name": "avoid-page",
25589 "description": "Avoid a page break before/after the principal box."
25593 "description": "Always force a column break before/after the principal box."
25597 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
25601 "description": "Always force a page break before/after the principal box."
25605 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
25608 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
25610 "description": "Describes the page/column/region break behavior after the generated box.",
25616 "name": "break-before",
25620 "description": "Always force a page break before/after the generated box."
25624 "description": "Neither force nor forbid a page/column break before/after the principal box."
25628 "description": "Avoid a break before/after the principal box."
25631 "name": "avoid-column",
25632 "description": "Avoid a column break before/after the principal box."
25635 "name": "avoid-page",
25636 "description": "Avoid a page break before/after the principal box."
25640 "description": "Always force a column break before/after the principal box."
25644 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
25648 "description": "Always force a page break before/after the principal box."
25652 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
25655 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
25657 "description": "Describes the page/column/region break behavior before the generated box.",
25663 "name": "break-inside",
25667 "description": "Impose no additional breaking constraints within the box."
25671 "description": "Avoid breaks within the box."
25674 "name": "avoid-column",
25675 "description": "Avoid a column break within the box."
25678 "name": "avoid-page",
25679 "description": "Avoid a page break within the box."
25682 "syntax": "auto | avoid | avoid-page | avoid-column | avoid-region",
25684 "description": "Describes the page/column/region break behavior inside the principal box.",
25690 "name": "caption-side",
25694 "description": "Positions the caption box below the table box."
25698 "description": "Positions the caption box above the table box."
25701 "syntax": "top | bottom | block-start | block-end | inline-start | inline-end",
25705 "name": "MDN Reference",
25706 "url": "https://developer.mozilla.org/docs/Web/CSS/caption-side"
25709 "description": "Specifies the position of the caption box with respect to the table box.",
25715 "name": "caret-color",
25726 "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."
25729 "syntax": "auto | <color>",
25733 "name": "MDN Reference",
25734 "url": "https://developer.mozilla.org/docs/Web/CSS/caret-color"
25737 "description": "Controls the color of the text insertion indicator.",
25748 "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."
25752 "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."
25756 "description": "No constraint on the box's position with respect to floats."
25760 "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."
25763 "syntax": "none | left | right | both | inline-start | inline-end",
25767 "name": "MDN Reference",
25768 "url": "https://developer.mozilla.org/docs/Web/CSS/clear"
25771 "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.",
25781 "description": "The element does not clip."
25785 "description": "Specifies offsets from the edges of the border box."
25788 "syntax": "<shape> | auto",
25792 "name": "MDN Reference",
25793 "url": "https://developer.mozilla.org/docs/Web/CSS/clip"
25796 "description": "Deprecated. Use the 'clip-path' property when support allows. Defines the visible portion of an element’s box.",
25802 "name": "clip-path",
25806 "description": "No clipping path gets created."
25810 "description": "References a <clipPath> element to create a clipping path."
25813 "syntax": "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
25817 "name": "MDN Reference",
25818 "url": "https://developer.mozilla.org/docs/Web/CSS/clip-path"
25821 "description": "Specifies a clipping path where everything inside the path is visible and everything outside is clipped out.",
25830 "name": "clip-rule",
25842 "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."
25846 "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."
25850 "description": "Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",
25857 "syntax": "<color>",
25861 "name": "MDN Reference",
25862 "url": "https://developer.mozilla.org/docs/Web/CSS/color"
25865 "description": "Sets the color of an element's text",
25871 "name": "color-interpolation-filters",
25883 "description": "Color operations are not required to occur in a particular color space."
25886 "name": "linearRGB",
25887 "description": "Color operations should occur in the linearized RGB color space."
25891 "description": "Color operations should occur in the sRGB color space."
25895 "description": "Specifies the color space for imaging operations performed via filter effects.",
25901 "name": "column-count",
25905 "description": "Determines the number of columns by the 'column-width' property and the element width."
25908 "syntax": "<integer> | auto",
25912 "name": "MDN Reference",
25913 "url": "https://developer.mozilla.org/docs/Web/CSS/column-count"
25916 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
25923 "name": "column-fill",
25927 "description": "Fills columns sequentially."
25931 "description": "Balance content equally between columns, if possible."
25934 "syntax": "auto | balance | balance-all",
25938 "name": "MDN Reference",
25939 "url": "https://developer.mozilla.org/docs/Web/CSS/column-fill"
25942 "description": "In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",
25948 "name": "column-gap",
25952 "description": "User agent specific and typically equivalent to 1em."
25955 "syntax": "normal | <length-percentage>",
25957 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
25964 "name": "column-rule",
25965 "syntax": "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
25969 "name": "MDN Reference",
25970 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule"
25973 "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.",
25982 "name": "column-rule-color",
25983 "syntax": "<color>",
25987 "name": "MDN Reference",
25988 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
25991 "description": "Sets the color of the column rule",
25997 "name": "column-rule-style",
25998 "syntax": "<'border-style'>",
26002 "name": "MDN Reference",
26003 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
26006 "description": "Sets the style of the rule between columns of an element.",
26012 "name": "column-rule-width",
26013 "syntax": "<'border-width'>",
26017 "name": "MDN Reference",
26018 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
26021 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
26032 "description": "The width depends on the values of other properties."
26035 "syntax": "<'column-width'> || <'column-count'>",
26039 "name": "MDN Reference",
26040 "url": "https://developer.mozilla.org/docs/Web/CSS/columns"
26043 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
26051 "name": "column-span",
26055 "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."
26059 "description": "The element does not span multiple columns."
26062 "syntax": "none | all",
26066 "name": "MDN Reference",
26067 "url": "https://developer.mozilla.org/docs/Web/CSS/column-span"
26070 "description": "Describes the page/column break behavior after the generated box.",
26076 "name": "column-width",
26080 "description": "The width depends on the values of other properties."
26083 "syntax": "<length> | auto",
26087 "name": "MDN Reference",
26088 "url": "https://developer.mozilla.org/docs/Web/CSS/column-width"
26091 "description": "Describes the width of columns in multicol elements.",
26108 "description": "Indicates that the property has no effect."
26112 "description": "Turns on all forms of containment for the element."
26116 "description": "All containment rules except size are applied to the element."
26120 "description": "For properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element."
26124 "description": "Turns on layout containment for the element."
26128 "description": "Turns on style containment for the element."
26132 "description": "Turns on paint containment for the element."
26135 "syntax": "none | strict | content | [ size || layout || style || paint ]",
26139 "name": "MDN Reference",
26140 "url": "https://developer.mozilla.org/docs/Web/CSS/contain"
26143 "description": "Indicates that an element and its contents are, as much as possible, independent of the rest of the document tree.",
26153 "description": "The attr(n) function returns as a string the value of attribute n for the subject of the selector."
26156 "name": "counter(name)",
26157 "description": "Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."
26161 "description": "The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."
26165 "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."
26169 "description": "See http://www.w3.org/TR/css3-content/#content for computation rules."
26175 "syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
26179 "name": "MDN Reference",
26180 "url": "https://developer.mozilla.org/docs/Web/CSS/content"
26183 "description": "Determines which page-based occurrence of a given element is applied to a counter or string value.",
26190 "name": "counter-increment",
26194 "description": "This element does not alter the value of any counters."
26197 "syntax": "[ <custom-ident> <integer>? ]+ | none",
26201 "name": "MDN Reference",
26202 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
26205 "description": "Manipulate the value of existing counters.",
26212 "name": "counter-reset",
26216 "description": "The counter is not modified."
26219 "syntax": "[ <custom-ident> <integer>? ]+ | none",
26223 "name": "MDN Reference",
26224 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
26227 "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.",
26238 "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."
26241 "name": "all-scroll",
26242 "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."
26246 "description": "The UA determines the cursor to display based on the current context."
26250 "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."
26253 "name": "col-resize",
26254 "description": "Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."
26257 "name": "context-menu",
26258 "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."
26262 "description": "Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."
26265 "name": "crosshair",
26266 "description": "A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."
26270 "description": "The platform-dependent default cursor. Often rendered as an arrow."
26273 "name": "e-resize",
26274 "description": "Indicates that east edge is to be moved."
26277 "name": "ew-resize",
26278 "description": "Indicates a bidirectional east-west resize cursor."
26282 "description": "Indicates that something can be grabbed."
26285 "name": "grabbing",
26286 "description": "Indicates that something is being grabbed."
26290 "description": "Help is available for the object under the cursor. Often rendered as a question mark or a balloon."
26294 "description": "Indicates something is to be moved."
26297 "name": "-moz-grab",
26298 "description": "Indicates that something can be grabbed."
26301 "name": "-moz-grabbing",
26302 "description": "Indicates that something is being grabbed."
26305 "name": "-moz-zoom-in",
26306 "description": "Indicates that something can be zoomed (magnified) in."
26309 "name": "-moz-zoom-out",
26310 "description": "Indicates that something can be zoomed (magnified) out."
26313 "name": "ne-resize",
26314 "description": "Indicates that movement starts from north-east corner."
26317 "name": "nesw-resize",
26318 "description": "Indicates a bidirectional north-east/south-west cursor."
26322 "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."
26326 "description": "No cursor is rendered for the element."
26329 "name": "not-allowed",
26330 "description": "Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."
26333 "name": "n-resize",
26334 "description": "Indicates that north edge is to be moved."
26337 "name": "ns-resize",
26338 "description": "Indicates a bidirectional north-south cursor."
26341 "name": "nw-resize",
26342 "description": "Indicates that movement starts from north-west corner."
26345 "name": "nwse-resize",
26346 "description": "Indicates a bidirectional north-west/south-east cursor."
26350 "description": "The cursor is a pointer that indicates a link."
26353 "name": "progress",
26354 "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."
26357 "name": "row-resize",
26358 "description": "Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."
26361 "name": "se-resize",
26362 "description": "Indicates that movement starts from south-east corner."
26365 "name": "s-resize",
26366 "description": "Indicates that south edge is to be moved."
26369 "name": "sw-resize",
26370 "description": "Indicates that movement starts from south-west corner."
26374 "description": "Indicates text that may be selected. Often rendered as a vertical I-beam."
26377 "name": "vertical-text",
26378 "description": "Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."
26382 "description": "Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."
26385 "name": "-webkit-grab",
26386 "description": "Indicates that something can be grabbed."
26389 "name": "-webkit-grabbing",
26390 "description": "Indicates that something is being grabbed."
26393 "name": "-webkit-zoom-in",
26394 "description": "Indicates that something can be zoomed (magnified) in."
26397 "name": "-webkit-zoom-out",
26398 "description": "Indicates that something can be zoomed (magnified) out."
26401 "name": "w-resize",
26402 "description": "Indicates that west edge is to be moved."
26406 "description": "Indicates that something can be zoomed (magnified) in."
26409 "name": "zoom-out",
26410 "description": "Indicates that something can be zoomed (magnified) out."
26413 "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 ] ]",
26417 "name": "MDN Reference",
26418 "url": "https://developer.mozilla.org/docs/Web/CSS/cursor"
26421 "description": "Allows control over cursor appearance in an element",
26429 "name": "direction",
26433 "description": "Left-to-right direction."
26437 "description": "Right-to-left direction."
26440 "syntax": "ltr | rtl",
26444 "name": "MDN Reference",
26445 "url": "https://developer.mozilla.org/docs/Web/CSS/direction"
26448 "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.",
26458 "description": "The element generates a block-level box"
26461 "name": "contents",
26462 "description": "The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal."
26466 "description": "The element generates a principal flex container box and establishes a flex formatting context."
26470 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
26473 "name": "flow-root",
26474 "description": "The element generates a block container box, and lays out its contents using flow layout."
26478 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
26482 "description": "The element generates an inline-level box."
26485 "name": "inline-block",
26486 "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."
26489 "name": "inline-flex",
26490 "description": "Inline-level flex container."
26493 "name": "inline-flexbox",
26494 "description": "Inline-level flex container. Standardized as 'inline-flex'"
26497 "name": "inline-table",
26498 "description": "Inline-level table wrapper box containing table box."
26501 "name": "list-item",
26502 "description": "One or more block boxes and one marker box."
26505 "name": "-moz-box",
26506 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
26509 "name": "-moz-deck"
26512 "name": "-moz-grid"
26515 "name": "-moz-grid-group"
26518 "name": "-moz-grid-line"
26521 "name": "-moz-groupbox"
26524 "name": "-moz-inline-box",
26525 "description": "Inline-level flex container. Standardized as 'inline-flex'"
26528 "name": "-moz-inline-grid"
26531 "name": "-moz-inline-stack"
26534 "name": "-moz-marker"
26537 "name": "-moz-popup"
26540 "name": "-moz-stack"
26543 "name": "-ms-flexbox",
26544 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
26547 "name": "-ms-grid",
26548 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
26551 "name": "-ms-inline-flexbox",
26552 "description": "Inline-level flex container. Standardized as 'inline-flex'"
26555 "name": "-ms-inline-grid",
26556 "description": "Inline-level grid container."
26560 "description": "The element and its descendants generates no boxes."
26564 "description": "The element generates a principal ruby container box, and establishes a ruby formatting context."
26567 "name": "ruby-base"
26570 "name": "ruby-base-container"
26573 "name": "ruby-text"
26576 "name": "ruby-text-container"
26580 "description": "The element generates a run-in box. Run-in elements act like inlines or blocks, depending on the surrounding elements."
26584 "description": "The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context."
26587 "name": "table-caption"
26590 "name": "table-cell"
26593 "name": "table-column"
26596 "name": "table-column-group"
26599 "name": "table-footer-group"
26602 "name": "table-header-group"
26605 "name": "table-row"
26608 "name": "table-row-group"
26611 "name": "-webkit-box",
26612 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
26615 "name": "-webkit-flex",
26616 "description": "The element lays out its contents using flow layout (block-and-inline layout)."
26619 "name": "-webkit-inline-box",
26620 "description": "Inline-level flex container. Standardized as 'inline-flex'"
26623 "name": "-webkit-inline-flex",
26624 "description": "Inline-level flex container."
26627 "syntax": "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
26631 "name": "MDN Reference",
26632 "url": "https://developer.mozilla.org/docs/Web/CSS/display"
26635 "description": "In combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",
26641 "name": "empty-cells",
26645 "description": "No borders or backgrounds are drawn around/behind empty cells."
26648 "name": "-moz-show-background"
26652 "description": "Borders and backgrounds are drawn around/behind empty cells (like normal cells)."
26655 "syntax": "show | hide",
26659 "name": "MDN Reference",
26660 "url": "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
26663 "description": "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",
26669 "name": "enable-background",
26672 "name": "accumulate",
26673 "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."
26677 "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."
26681 "description": "Deprecated. Use 'isolation' property instead when support allows. Specifies how the accumulation of the background image is managed.",
26690 "name": "fallback",
26694 "syntax": "<counter-style-name>",
26696 "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.",
26706 "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’."
26710 "description": "No paint is applied in this layer."
26714 "description": "Paints the interior of the given graphical element.",
26722 "name": "fill-opacity",
26724 "description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
26730 "name": "fill-rule",
26734 "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."
26738 "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."
26742 "description": "Indicates the algorithm (or winding rule) which is to be used to determine what parts of the canvas are included inside the shape.",
26759 "description": "No filter effects are applied."
26763 "description": "Applies a Gaussian blur to the input image."
26766 "name": "brightness()",
26767 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
26770 "name": "contrast()",
26771 "description": "Adjusts the contrast of the input."
26774 "name": "drop-shadow()",
26775 "description": "Applies a drop shadow effect to the input image."
26778 "name": "grayscale()",
26779 "description": "Converts the input image to grayscale."
26782 "name": "hue-rotate()",
26783 "description": "Applies a hue rotation on the input image. "
26786 "name": "invert()",
26787 "description": "Inverts the samples in the input image."
26790 "name": "opacity()",
26791 "description": "Applies transparency to the samples in the input image."
26794 "name": "saturate()",
26795 "description": "Saturates the input image."
26799 "description": "Converts the input image to sepia."
26810 "description": "A filter reference to a <filter> element."
26813 "syntax": "none | <filter-function-list>",
26817 "name": "MDN Reference",
26818 "url": "https://developer.mozilla.org/docs/Web/CSS/filter"
26821 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
26832 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
26836 "description": "Indicates automatic sizing, based on the flex item’s content."
26840 "description": "Expands to '0 0 auto'."
26843 "syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
26847 "name": "MDN Reference",
26848 "url": "https://developer.mozilla.org/docs/Web/CSS/flex"
26851 "description": "Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",
26859 "name": "flex-basis",
26863 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
26867 "description": "Indicates automatic sizing, based on the flex item’s content."
26870 "syntax": "content | <'width'>",
26874 "name": "MDN Reference",
26875 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
26878 "description": "Sets the flex basis.",
26886 "name": "flex-direction",
26890 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
26893 "name": "column-reverse",
26894 "description": "Same as 'column', except the main-start and main-end directions are swapped."
26898 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
26901 "name": "row-reverse",
26902 "description": "Same as 'row', except the main-start and main-end directions are swapped."
26905 "syntax": "row | row-reverse | column | column-reverse",
26909 "name": "MDN Reference",
26910 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
26913 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
26919 "name": "flex-flow",
26923 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
26926 "name": "column-reverse",
26927 "description": "Same as 'column', except the main-start and main-end directions are swapped."
26931 "description": "The flex container is single-line."
26935 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
26938 "name": "row-reverse",
26939 "description": "Same as 'row', except the main-start and main-end directions are swapped."
26943 "description": "The flexbox is multi-line."
26946 "name": "wrap-reverse",
26947 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
26950 "syntax": "<'flex-direction'> || <'flex-wrap'>",
26954 "name": "MDN Reference",
26955 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
26958 "description": "Specifies how flexbox items are placed in the flexbox.",
26964 "name": "flex-grow",
26965 "syntax": "<number>",
26969 "name": "MDN Reference",
26970 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
26973 "description": "Sets the flex grow factor. Negative numbers are invalid.",
26979 "name": "flex-shrink",
26980 "syntax": "<number>",
26984 "name": "MDN Reference",
26985 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
26988 "description": "Sets the flex shrink factor. Negative numbers are invalid.",
26994 "name": "flex-wrap",
26998 "description": "The flex container is single-line."
27002 "description": "The flexbox is multi-line."
27005 "name": "wrap-reverse",
27006 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
27009 "syntax": "nowrap | wrap | wrap-reverse",
27013 "name": "MDN Reference",
27014 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
27017 "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.",
27026 "name": "inline-end",
27027 "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."
27030 "name": "inline-start",
27031 "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."
27035 "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)."
27039 "description": "The box is not floated."
27043 "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."
27046 "syntax": "left | right | none | inline-start | inline-end",
27050 "name": "MDN Reference",
27051 "url": "https://developer.mozilla.org/docs/Web/CSS/float"
27054 "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.",
27060 "name": "flood-color",
27070 "description": "Indicates what color to use to flood the current filter primitive subregion.",
27076 "name": "flood-opacity",
27086 "description": "Indicates what opacity to use to flood the current filter primitive subregion.",
27097 "description": "Thin"
27101 "description": "Extra Light (Ultra Light)"
27105 "description": "Light"
27109 "description": "Normal"
27113 "description": "Medium"
27117 "description": "Semi Bold (Demi Bold)"
27121 "description": "Bold"
27125 "description": "Extra Bold (Ultra Bold)"
27129 "description": "Black (Heavy)"
27133 "description": "Same as 700"
27137 "description": "Specifies the weight of the face bolder than the inherited value."
27141 "description": "The font used for captioned controls (e.g., buttons, drop-downs, etc.)."
27145 "description": "The font used to label icons."
27149 "description": "Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."
27159 "description": "Specifies the weight of the face lighter than the inherited value."
27166 "description": "The font used in menus (e.g., dropdown menus and menu lists)."
27169 "name": "message-box",
27170 "description": "The font used in dialog boxes."
27174 "description": "Specifies a face that is not labeled as a small-caps font."
27178 "description": "Selects a font that is labeled 'oblique'."
27184 "name": "small-caps",
27185 "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."
27188 "name": "small-caption",
27189 "description": "The font used for labeling small controls."
27195 "name": "status-bar",
27196 "description": "The font used in window status bars."
27211 "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",
27215 "name": "MDN Reference",
27216 "url": "https://developer.mozilla.org/docs/Web/CSS/font"
27219 "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.",
27225 "name": "font-family",
27228 "name": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
27231 "name": "Arial, Helvetica, sans-serif"
27234 "name": "Cambria, Cochin, Georgia, Times, 'Times New Roman', serif"
27237 "name": "'Courier New', Courier, monospace"
27246 "name": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
27249 "name": "Georgia, 'Times New Roman', Times, serif"
27252 "name": "'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif"
27255 "name": "Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif"
27258 "name": "'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif"
27261 "name": "monospace"
27264 "name": "sans-serif"
27267 "name": "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"
27273 "name": "'Times New Roman', Times, serif"
27276 "name": "'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif"
27279 "name": "Verdana, Geneva, Tahoma, sans-serif"
27282 "syntax": "<family-name>",
27286 "name": "MDN Reference",
27287 "url": "https://developer.mozilla.org/docs/Web/CSS/font-family"
27290 "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.",
27296 "name": "font-feature-settings",
27299 "name": "\"aalt\"",
27300 "description": "Access All Alternates."
27303 "name": "\"abvf\"",
27304 "description": "Above-base Forms. Required in Khmer script."
27307 "name": "\"abvm\"",
27308 "description": "Above-base Mark Positioning. Required in Indic scripts."
27311 "name": "\"abvs\"",
27312 "description": "Above-base Substitutions. Required in Indic scripts."
27315 "name": "\"afrc\"",
27316 "description": "Alternative Fractions."
27319 "name": "\"akhn\"",
27320 "description": "Akhand. Required in most Indic scripts."
27323 "name": "\"blwf\"",
27324 "description": "Below-base Form. Required in a number of Indic scripts."
27327 "name": "\"blwm\"",
27328 "description": "Below-base Mark Positioning. Required in Indic scripts."
27331 "name": "\"blws\"",
27332 "description": "Below-base Substitutions. Required in Indic scripts."
27335 "name": "\"calt\"",
27336 "description": "Contextual Alternates."
27339 "name": "\"case\"",
27340 "description": "Case-Sensitive Forms. Applies only to European scripts; particularly prominent in Spanish-language setting."
27343 "name": "\"ccmp\"",
27344 "description": "Glyph Composition/Decomposition."
27347 "name": "\"cfar\"",
27348 "description": "Conjunct Form After Ro. Required in Khmer scripts."
27351 "name": "\"cjct\"",
27352 "description": "Conjunct Forms. Required in Indic scripts that show similarity to Devanagari."
27355 "name": "\"clig\"",
27356 "description": "Contextual Ligatures."
27359 "name": "\"cpct\"",
27360 "description": "Centered CJK Punctuation. Used primarily in Chinese fonts."
27363 "name": "\"cpsp\"",
27364 "description": "Capital Spacing. Should not be used in connecting scripts (e.g. most Arabic)."
27367 "name": "\"cswh\"",
27368 "description": "Contextual Swash."
27371 "name": "\"curs\"",
27372 "description": "Cursive Positioning. Can be used in any cursive script."
27375 "name": "\"c2pc\"",
27376 "description": "Petite Capitals From Capitals. Applies only to bicameral scripts."
27379 "name": "\"c2sc\"",
27380 "description": "Small Capitals From Capitals. Applies only to bicameral scripts."
27383 "name": "\"dist\"",
27384 "description": "Distances. Required in Indic scripts."
27387 "name": "\"dlig\"",
27388 "description": "Discretionary ligatures."
27391 "name": "\"dnom\"",
27392 "description": "Denominators."
27395 "name": "\"dtls\"",
27396 "description": "Dotless Forms. Applied to math formula layout."
27399 "name": "\"expt\"",
27400 "description": "Expert Forms. Applies only to Japanese."
27403 "name": "\"falt\"",
27404 "description": "Final Glyph on Line Alternates. Can be used in any cursive script."
27407 "name": "\"fin2\"",
27408 "description": "Terminal Form #2. Used only with the Syriac script."
27411 "name": "\"fin3\"",
27412 "description": "Terminal Form #3. Used only with the Syriac script."
27415 "name": "\"fina\"",
27416 "description": "Terminal Forms. Can be used in any alphabetic script."
27419 "name": "\"flac\"",
27420 "description": "Flattened ascent forms. Applied to math formula layout."
27423 "name": "\"frac\"",
27424 "description": "Fractions."
27427 "name": "\"fwid\"",
27428 "description": "Full Widths. Applies to any script which can use monospaced forms."
27431 "name": "\"half\"",
27432 "description": "Half Forms. Required in Indic scripts that show similarity to Devanagari."
27435 "name": "\"haln\"",
27436 "description": "Halant Forms. Required in Indic scripts."
27439 "name": "\"halt\"",
27440 "description": "Alternate Half Widths. Used only in CJKV fonts."
27443 "name": "\"hist\"",
27444 "description": "Historical Forms."
27447 "name": "\"hkna\"",
27448 "description": "Horizontal Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
27451 "name": "\"hlig\"",
27452 "description": "Historical Ligatures."
27455 "name": "\"hngl\"",
27456 "description": "Hangul. Korean only."
27459 "name": "\"hojo\"",
27460 "description": "Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms). Used only with Kanji script."
27463 "name": "\"hwid\"",
27464 "description": "Half Widths. Generally used only in CJKV fonts."
27467 "name": "\"init\"",
27468 "description": "Initial Forms. Can be used in any alphabetic script."
27471 "name": "\"isol\"",
27472 "description": "Isolated Forms. Can be used in any cursive script."
27475 "name": "\"ital\"",
27476 "description": "Italics. Applies mostly to Latin; note that many non-Latin fonts contain Latin as well."
27479 "name": "\"jalt\"",
27480 "description": "Justification Alternates. Can be used in any cursive script."
27483 "name": "\"jp78\"",
27484 "description": "JIS78 Forms. Applies only to Japanese."
27487 "name": "\"jp83\"",
27488 "description": "JIS83 Forms. Applies only to Japanese."
27491 "name": "\"jp90\"",
27492 "description": "JIS90 Forms. Applies only to Japanese."
27495 "name": "\"jp04\"",
27496 "description": "JIS2004 Forms. Applies only to Japanese."
27499 "name": "\"kern\"",
27500 "description": "Kerning."
27503 "name": "\"lfbd\"",
27504 "description": "Left Bounds."
27507 "name": "\"liga\"",
27508 "description": "Standard Ligatures."
27511 "name": "\"ljmo\"",
27512 "description": "Leading Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
27515 "name": "\"lnum\"",
27516 "description": "Lining Figures."
27519 "name": "\"locl\"",
27520 "description": "Localized Forms."
27523 "name": "\"ltra\"",
27524 "description": "Left-to-right glyph alternates."
27527 "name": "\"ltrm\"",
27528 "description": "Left-to-right mirrored forms."
27531 "name": "\"mark\"",
27532 "description": "Mark Positioning."
27535 "name": "\"med2\"",
27536 "description": "Medial Form #2. Used only with the Syriac script."
27539 "name": "\"medi\"",
27540 "description": "Medial Forms."
27543 "name": "\"mgrk\"",
27544 "description": "Mathematical Greek."
27547 "name": "\"mkmk\"",
27548 "description": "Mark to Mark Positioning."
27551 "name": "\"nalt\"",
27552 "description": "Alternate Annotation Forms."
27555 "name": "\"nlck\"",
27556 "description": "NLC Kanji Forms. Used only with Kanji script."
27559 "name": "\"nukt\"",
27560 "description": "Nukta Forms. Required in Indic scripts.."
27563 "name": "\"numr\"",
27564 "description": "Numerators."
27567 "name": "\"onum\"",
27568 "description": "Oldstyle Figures."
27571 "name": "\"opbd\"",
27572 "description": "Optical Bounds."
27575 "name": "\"ordn\"",
27576 "description": "Ordinals. Applies mostly to Latin script."
27579 "name": "\"ornm\"",
27580 "description": "Ornaments."
27583 "name": "\"palt\"",
27584 "description": "Proportional Alternate Widths. Used mostly in CJKV fonts."
27587 "name": "\"pcap\"",
27588 "description": "Petite Capitals."
27591 "name": "\"pkna\"",
27592 "description": "Proportional Kana. Generally used only in Japanese fonts."
27595 "name": "\"pnum\"",
27596 "description": "Proportional Figures."
27599 "name": "\"pref\"",
27600 "description": "Pre-base Forms. Required in Khmer and Myanmar (Burmese) scripts and southern Indic scripts that may display a pre-base form of Ra."
27603 "name": "\"pres\"",
27604 "description": "Pre-base Substitutions. Required in Indic scripts."
27607 "name": "\"pstf\"",
27608 "description": "Post-base Forms. Required in scripts of south and southeast Asia that have post-base forms for consonants eg: Gurmukhi, Malayalam, Khmer."
27611 "name": "\"psts\"",
27612 "description": "Post-base Substitutions."
27615 "name": "\"pwid\"",
27616 "description": "Proportional Widths."
27619 "name": "\"qwid\"",
27620 "description": "Quarter Widths. Generally used only in CJKV fonts."
27623 "name": "\"rand\"",
27624 "description": "Randomize."
27627 "name": "\"rclt\"",
27628 "description": "Required Contextual Alternates. May apply to any script, but is especially important for many styles of Arabic."
27631 "name": "\"rlig\"",
27632 "description": "Required Ligatures. Applies to Arabic and Syriac. May apply to some other scripts."
27635 "name": "\"rkrf\"",
27636 "description": "Rakar Forms. Required in Devanagari and Gujarati scripts."
27639 "name": "\"rphf\"",
27640 "description": "Reph Form. Required in Indic scripts. E.g. Devanagari, Kannada."
27643 "name": "\"rtbd\"",
27644 "description": "Right Bounds."
27647 "name": "\"rtla\"",
27648 "description": "Right-to-left alternates."
27651 "name": "\"rtlm\"",
27652 "description": "Right-to-left mirrored forms."
27655 "name": "\"ruby\"",
27656 "description": "Ruby Notation Forms. Applies only to Japanese."
27659 "name": "\"salt\"",
27660 "description": "Stylistic Alternates."
27663 "name": "\"sinf\"",
27664 "description": "Scientific Inferiors."
27667 "name": "\"size\"",
27668 "description": "Optical size."
27671 "name": "\"smcp\"",
27672 "description": "Small Capitals. Applies only to bicameral scripts."
27675 "name": "\"smpl\"",
27676 "description": "Simplified Forms. Applies only to Chinese and Japanese."
27679 "name": "\"ssty\"",
27680 "description": "Math script style alternates."
27683 "name": "\"stch\"",
27684 "description": "Stretching Glyph Decomposition."
27687 "name": "\"subs\"",
27688 "description": "Subscript."
27691 "name": "\"sups\"",
27692 "description": "Superscript."
27695 "name": "\"swsh\"",
27696 "description": "Swash. Does not apply to ideographic scripts."
27699 "name": "\"titl\"",
27700 "description": "Titling."
27703 "name": "\"tjmo\"",
27704 "description": "Trailing Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
27707 "name": "\"tnam\"",
27708 "description": "Traditional Name Forms. Applies only to Japanese."
27711 "name": "\"tnum\"",
27712 "description": "Tabular Figures."
27715 "name": "\"trad\"",
27716 "description": "Traditional Forms. Applies only to Chinese and Japanese."
27719 "name": "\"twid\"",
27720 "description": "Third Widths. Generally used only in CJKV fonts."
27723 "name": "\"unic\"",
27724 "description": "Unicase."
27727 "name": "\"valt\"",
27728 "description": "Alternate Vertical Metrics. Applies only to scripts with vertical writing modes."
27731 "name": "\"vatu\"",
27732 "description": "Vattu Variants. Used for Indic scripts. E.g. Devanagari."
27735 "name": "\"vert\"",
27736 "description": "Vertical Alternates. Applies only to scripts with vertical writing modes."
27739 "name": "\"vhal\"",
27740 "description": "Alternate Vertical Half Metrics. Used only in CJKV fonts."
27743 "name": "\"vjmo\"",
27744 "description": "Vowel Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
27747 "name": "\"vkna\"",
27748 "description": "Vertical Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
27751 "name": "\"vkrn\"",
27752 "description": "Vertical Kerning."
27755 "name": "\"vpal\"",
27756 "description": "Proportional Alternate Vertical Metrics. Used mostly in CJKV fonts."
27759 "name": "\"vrt2\"",
27760 "description": "Vertical Alternates and Rotation. Applies only to scripts with vertical writing modes."
27763 "name": "\"zero\"",
27764 "description": "Slashed Zero."
27768 "description": "No change in glyph substitution or positioning occurs."
27772 "description": "Disable feature."
27776 "description": "Enable feature."
27779 "syntax": "normal | <feature-tag-value>#",
27783 "name": "MDN Reference",
27784 "url": "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
27787 "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.",
27794 "name": "font-kerning",
27805 "description": "Specifies that kerning is applied at the discretion of the user agent."
27809 "description": "Specifies that kerning is not applied."
27813 "description": "Specifies that kerning is applied."
27816 "syntax": "auto | normal | none",
27820 "name": "MDN Reference",
27821 "url": "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
27824 "description": "Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",
27830 "name": "font-language-override",
27837 "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."
27840 "syntax": "normal | <string>",
27844 "name": "MDN Reference",
27845 "url": "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
27848 "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.",
27854 "name": "font-size",
27884 "syntax": "<absolute-size> | <relative-size> | <length-percentage>",
27888 "name": "MDN Reference",
27889 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size"
27892 "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.",
27899 "name": "font-size-adjust",
27909 "description": "Do not preserve the font’s x-height."
27912 "syntax": "none | <number>",
27916 "name": "MDN Reference",
27917 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
27920 "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.",
27926 "name": "font-stretch",
27929 "name": "condensed"
27935 "name": "extra-condensed"
27938 "name": "extra-expanded"
27941 "name": "narrower",
27942 "description": "Indicates a narrower value relative to the width of the parent element."
27948 "name": "semi-condensed"
27951 "name": "semi-expanded"
27954 "name": "ultra-condensed"
27957 "name": "ultra-expanded"
27961 "description": "Indicates a wider value relative to the width of the parent element."
27964 "syntax": "<font-stretch-absolute>{1,2}",
27968 "name": "MDN Reference",
27969 "url": "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
27972 "description": "Selects a normal, condensed, or expanded face from a font family.",
27978 "name": "font-style",
27982 "description": "Selects a font that is labeled as an 'italic' face, or an 'oblique' face if one is not"
27986 "description": "Selects a face that is classified as 'normal'."
27990 "description": "Selects a font that is labeled as an 'oblique' face, or an 'italic' face if one is not."
27993 "syntax": "normal | italic | oblique <angle>{0,2}",
27997 "name": "MDN Reference",
27998 "url": "https://developer.mozilla.org/docs/Web/CSS/font-style"
28001 "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.",
28007 "name": "font-synthesis",
28015 "description": "Disallow all synthetic faces."
28019 "description": "Allow synthetic italic faces."
28023 "description": "Allow synthetic bold faces."
28026 "syntax": "none | [ weight || style ]",
28030 "name": "MDN Reference",
28031 "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
28034 "description": "Controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",
28040 "name": "font-variant",
28044 "description": "Specifies a face that is not labeled as a small-caps font."
28047 "name": "small-caps",
28048 "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."
28051 "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 ]",
28055 "name": "MDN Reference",
28056 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant"
28059 "description": "Specifies variant representations of the font",
28065 "name": "font-variant-alternates",
28071 "name": "annotation()",
28072 "description": "Enables display of alternate annotation forms."
28075 "name": "character-variant()",
28076 "description": "Enables display of specific character variants."
28079 "name": "historical-forms",
28080 "description": "Enables display of historical forms."
28084 "description": "None of the features are enabled."
28087 "name": "ornaments()",
28088 "description": "Enables replacement of default glyphs with ornaments, if provided in the font."
28091 "name": "styleset()",
28092 "description": "Enables display with stylistic sets."
28095 "name": "stylistic()",
28096 "description": "Enables display of stylistic alternates."
28100 "description": "Enables display of swash glyphs."
28103 "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> ) ]",
28107 "name": "MDN Reference",
28108 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
28111 "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.",
28117 "name": "font-variant-caps",
28126 "name": "all-petite-caps",
28127 "description": "Enables display of petite capitals for both upper and lowercase letters."
28130 "name": "all-small-caps",
28131 "description": "Enables display of small capitals for both upper and lowercase letters."
28135 "description": "None of the features are enabled."
28138 "name": "petite-caps",
28139 "description": "Enables display of petite capitals."
28142 "name": "small-caps",
28143 "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."
28146 "name": "titling-caps",
28147 "description": "Enables display of titling capitals."
28151 "description": "Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."
28154 "syntax": "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
28158 "name": "MDN Reference",
28159 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
28162 "description": "Specifies control over capitalized forms.",
28168 "name": "font-variant-east-asian",
28177 "name": "full-width",
28178 "description": "Enables rendering of full-width variants."
28182 "description": "Enables rendering of JIS04 forms."
28186 "description": "Enables rendering of JIS78 forms."
28190 "description": "Enables rendering of JIS83 forms."
28194 "description": "Enables rendering of JIS90 forms."
28198 "description": "None of the features are enabled."
28201 "name": "proportional-width",
28202 "description": "Enables rendering of proportionally-spaced variants."
28206 "description": "Enables display of ruby variant glyphs."
28209 "name": "simplified",
28210 "description": "Enables rendering of simplified forms."
28213 "name": "traditional",
28214 "description": "Enables rendering of traditional forms."
28217 "syntax": "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
28221 "name": "MDN Reference",
28222 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
28225 "description": "Allows control of glyph substitute and positioning in East Asian text.",
28231 "name": "font-variant-ligatures",
28241 "name": "additional-ligatures",
28242 "description": "Enables display of additional ligatures."
28245 "name": "common-ligatures",
28246 "description": "Enables display of common ligatures."
28249 "name": "contextual",
28257 "description": "Enables display of contextual alternates."
28260 "name": "discretionary-ligatures",
28261 "description": "Enables display of discretionary ligatures."
28264 "name": "historical-ligatures",
28265 "description": "Enables display of historical ligatures."
28268 "name": "no-additional-ligatures",
28269 "description": "Disables display of additional ligatures."
28272 "name": "no-common-ligatures",
28273 "description": "Disables display of common ligatures."
28276 "name": "no-contextual",
28284 "description": "Disables display of contextual alternates."
28287 "name": "no-discretionary-ligatures",
28288 "description": "Disables display of discretionary ligatures."
28291 "name": "no-historical-ligatures",
28292 "description": "Disables display of historical ligatures."
28303 "description": "Disables all ligatures."
28307 "description": "Implies that the defaults set by the font are used."
28310 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
28314 "name": "MDN Reference",
28315 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
28318 "description": "Specifies control over which ligatures are enabled or disabled. A value of ‘normal’ implies that the defaults set by the font are used.",
28324 "name": "font-variant-numeric",
28334 "name": "diagonal-fractions",
28335 "description": "Enables display of lining diagonal fractions."
28338 "name": "lining-nums",
28339 "description": "Enables display of lining numerals."
28343 "description": "None of the features are enabled."
28346 "name": "oldstyle-nums",
28347 "description": "Enables display of old-style numerals."
28351 "description": "Enables display of letter forms used with ordinal numbers."
28354 "name": "proportional-nums",
28355 "description": "Enables display of proportional numerals."
28358 "name": "slashed-zero",
28359 "description": "Enables display of slashed zeros."
28362 "name": "stacked-fractions",
28363 "description": "Enables display of lining stacked fractions."
28366 "name": "tabular-nums",
28367 "description": "Enables display of tabular numerals."
28370 "syntax": "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
28374 "name": "MDN Reference",
28375 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
28378 "description": "Specifies control over numerical forms.",
28384 "name": "font-variant-position",
28391 "description": "None of the features are enabled."
28395 "description": "Enables display of subscript variants (OpenType feature: subs)."
28399 "description": "Enables display of superscript variants (OpenType feature: sups)."
28402 "syntax": "normal | sub | super",
28406 "name": "MDN Reference",
28407 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
28410 "description": "Specifies the vertical position",
28416 "name": "font-weight",
28420 "description": "Thin"
28424 "description": "Extra Light (Ultra Light)"
28428 "description": "Light"
28432 "description": "Normal"
28436 "description": "Medium"
28440 "description": "Semi Bold (Demi Bold)"
28444 "description": "Bold"
28448 "description": "Extra Bold (Ultra Bold)"
28452 "description": "Black (Heavy)"
28456 "description": "Same as 700"
28460 "description": "Specifies the weight of the face bolder than the inherited value."
28464 "description": "Specifies the weight of the face lighter than the inherited value."
28468 "description": "Same as 400"
28471 "syntax": "<font-weight-absolute>{1,2}",
28475 "name": "MDN Reference",
28476 "url": "https://developer.mozilla.org/docs/Web/CSS/font-weight"
28479 "description": "Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",
28485 "name": "glyph-orientation-horizontal",
28487 "description": "Controls glyph orientation when the inline-progression-direction is horizontal.",
28494 "name": "glyph-orientation-vertical",
28498 "description": "Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."
28502 "description": "Controls glyph orientation when the inline-progression-direction is vertical.",
28510 "name": "grid-area",
28521 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28525 "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."
28528 "syntax": "<grid-line> [ / <grid-line> ]{0,3}",
28532 "name": "MDN Reference",
28533 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-area"
28536 "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'.",
28551 "syntax": "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
28555 "name": "MDN Reference",
28556 "url": "https://developer.mozilla.org/docs/Web/CSS/grid"
28559 "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.",
28569 "name": "grid-auto-columns",
28572 "name": "min-content",
28573 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
28576 "name": "max-content",
28577 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
28581 "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."
28584 "name": "minmax()",
28585 "description": "Defines a size range greater than or equal to min and less than or equal to max."
28588 "syntax": "<track-size>+",
28592 "name": "MDN Reference",
28593 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
28596 "description": "Specifies the size of implicitly created columns.",
28603 "name": "grid-auto-flow",
28614 "description": "The auto-placement algorithm places items by filling each row in turn, adding new rows as necessary."
28618 "description": "The auto-placement algorithm places items by filling each column in turn, adding new columns as necessary."
28622 "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."
28625 "syntax": "[ row | column ] || dense",
28629 "name": "MDN Reference",
28630 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
28633 "description": "Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.",
28639 "name": "grid-auto-rows",
28642 "name": "min-content",
28643 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
28646 "name": "max-content",
28647 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
28651 "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."
28654 "name": "minmax()",
28655 "description": "Defines a size range greater than or equal to min and less than or equal to max."
28658 "syntax": "<track-size>+",
28662 "name": "MDN Reference",
28663 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
28666 "description": "Specifies the size of implicitly created rows.",
28673 "name": "grid-column",
28684 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28688 "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."
28691 "syntax": "<grid-line> [ / <grid-line> ]?",
28695 "name": "MDN Reference",
28696 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column"
28699 "description": "Shorthand for 'grid-column-start' and 'grid-column-end'.",
28707 "name": "grid-column-end",
28718 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28722 "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."
28725 "syntax": "<grid-line>",
28729 "name": "MDN Reference",
28730 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
28733 "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.",
28741 "name": "grid-column-gap",
28748 "status": "obsolete",
28749 "syntax": "<length-percentage>",
28751 "description": "Specifies the gutters between grid columns. Replaced by 'column-gap' property.",
28757 "name": "grid-column-start",
28768 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28772 "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."
28775 "syntax": "<grid-line>",
28779 "name": "MDN Reference",
28780 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
28783 "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.",
28791 "name": "grid-gap",
28798 "status": "obsolete",
28799 "syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
28801 "description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
28807 "name": "grid-row",
28818 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28822 "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."
28825 "syntax": "<grid-line> [ / <grid-line> ]?",
28829 "name": "MDN Reference",
28830 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row"
28833 "description": "Shorthand for 'grid-row-start' and 'grid-row-end'.",
28841 "name": "grid-row-end",
28852 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28856 "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."
28859 "syntax": "<grid-line>",
28863 "name": "MDN Reference",
28864 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
28867 "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.",
28875 "name": "grid-row-gap",
28882 "status": "obsolete",
28883 "syntax": "<length-percentage>",
28885 "description": "Specifies the gutters between grid rows. Replaced by 'row-gap' property.",
28891 "name": "grid-row-start",
28902 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
28906 "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."
28909 "syntax": "<grid-line>",
28913 "name": "MDN Reference",
28914 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
28917 "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.",
28925 "name": "grid-template",
28936 "description": "Sets all three properties to their initial values."
28939 "name": "min-content",
28940 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
28943 "name": "max-content",
28944 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
28948 "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."
28952 "description": "Sets 'grid-template-rows' and 'grid-template-columns' to 'subgrid', and 'grid-template-areas' to its initial value."
28955 "name": "minmax()",
28956 "description": "Defines a size range greater than or equal to min and less than or equal to max."
28959 "name": "repeat()",
28960 "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."
28963 "syntax": "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
28967 "name": "MDN Reference",
28968 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template"
28971 "description": "Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.",
28981 "name": "grid-template-areas",
28992 "description": "The grid container doesn’t define any named grid areas."
28995 "syntax": "none | <string>+",
28999 "name": "MDN Reference",
29000 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
29003 "description": "Specifies named grid areas, which are not associated with any particular grid item, but can be referenced from the grid-placement properties.",
29009 "name": "grid-template-columns",
29020 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
29023 "name": "min-content",
29024 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
29027 "name": "max-content",
29028 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
29032 "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."
29036 "description": "Indicates that the grid will align to its parent grid in that axis."
29039 "name": "minmax()",
29040 "description": "Defines a size range greater than or equal to min and less than or equal to max."
29043 "name": "repeat()",
29044 "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."
29047 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
29051 "name": "MDN Reference",
29052 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
29055 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
29064 "name": "grid-template-rows",
29075 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
29078 "name": "min-content",
29079 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
29082 "name": "max-content",
29083 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
29087 "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."
29091 "description": "Indicates that the grid will align to its parent grid in that axis."
29094 "name": "minmax()",
29095 "description": "Defines a size range greater than or equal to min and less than or equal to max."
29098 "name": "repeat()",
29099 "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."
29102 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
29106 "name": "MDN Reference",
29107 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
29110 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
29124 "description": "The height depends on the values of other properties."
29127 "name": "fit-content",
29128 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
29131 "name": "max-content",
29132 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
29135 "name": "min-content",
29136 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
29139 "syntax": "<viewport-length>{1,2}",
29143 "name": "MDN Reference",
29144 "url": "https://developer.mozilla.org/docs/Web/CSS/height"
29147 "description": "Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
29158 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
29162 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
29166 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
29169 "syntax": "none | manual | auto",
29173 "name": "MDN Reference",
29174 "url": "https://developer.mozilla.org/docs/Web/CSS/hyphens"
29177 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
29183 "name": "image-orientation",
29194 "description": "After rotating by the precededing angle, the image is flipped horizontally. Defaults to 0deg if the angle is ommitted."
29197 "name": "from-image",
29198 "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."
29201 "syntax": "from-image | <angle> | [ <angle>? flip ]",
29205 "name": "MDN Reference",
29206 "url": "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
29209 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
29215 "name": "image-rendering",
29226 "description": "The image should be scaled with an algorithm that maximizes the appearance of the image."
29229 "name": "crisp-edges",
29230 "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."
29233 "name": "-moz-crisp-edges",
29243 "name": "optimizeQuality",
29244 "description": "Deprecated."
29247 "name": "optimizeSpeed",
29248 "description": "Deprecated."
29251 "name": "pixelated",
29252 "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."
29255 "syntax": "auto | crisp-edges | pixelated",
29259 "name": "MDN Reference",
29260 "url": "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
29263 "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.",
29269 "name": "ime-mode",
29278 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
29282 "description": "No change is made to the current input method editor state. This is the default."
29285 "name": "disabled",
29286 "description": "The input method editor is disabled and may not be activated by the user."
29289 "name": "inactive",
29290 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
29294 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
29297 "status": "obsolete",
29298 "syntax": "auto | normal | active | inactive | disabled",
29302 "name": "MDN Reference",
29303 "url": "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
29306 "description": "Controls the state of the input method editor for text fields.",
29312 "name": "inline-size",
29323 "description": "Depends on the values of other properties."
29326 "syntax": "<'width'>",
29330 "name": "MDN Reference",
29331 "url": "https://developer.mozilla.org/docs/Web/CSS/inline-size"
29334 "description": "Logical 'height'. Mapping depends on the element’s 'writing-mode'.",
29341 "name": "isolation",
29352 "description": "Elements are not isolated unless an operation is applied that causes the creation of a stacking context."
29356 "description": "In CSS will turn the element into a stacking context."
29359 "syntax": "auto | isolate",
29363 "name": "MDN Reference",
29364 "url": "https://developer.mozilla.org/docs/Web/CSS/isolation"
29367 "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.",
29373 "name": "justify-content",
29377 "description": "Flex items are packed toward the center of the line."
29381 "description": "The items are packed flush to each other toward the start edge of the alignment container in the main axis."
29385 "description": "The items are packed flush to each other toward the end edge of the alignment container in the main axis."
29389 "description": "The items are packed flush to each other toward the left edge of the alignment container in the main axis."
29393 "description": "The items are packed flush to each other toward the right edge of the alignment container in the main axis."
29397 "description": "If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were start."
29401 "description": "Regardless of the relative sizes of the item and alignment container, the given alignment value is honored."
29405 "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."
29408 "name": "space-evenly",
29409 "description": "The items are evenly distributed within the alignment container along the main axis."
29412 "name": "flex-end",
29413 "description": "Flex items are packed toward the end of the line."
29416 "name": "flex-start",
29417 "description": "Flex items are packed toward the start of the line."
29420 "name": "space-around",
29421 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
29424 "name": "space-between",
29425 "description": "Flex items are evenly distributed in the line."
29428 "name": "baseline",
29429 "description": "Specifies participation in first-baseline alignment."
29432 "name": "first baseline",
29433 "description": "Specifies participation in first-baseline alignment."
29436 "name": "last baseline",
29437 "description": "Specifies participation in last-baseline alignment."
29440 "syntax": "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
29442 "description": "Aligns flex items along the main axis of the current line of the flex container.",
29452 "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."
29456 "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.",
29467 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
29470 "syntax": "<length> | <percentage> | auto",
29474 "name": "MDN Reference",
29475 "url": "https://developer.mozilla.org/docs/Web/CSS/left"
29478 "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'.",
29485 "name": "letter-spacing",
29489 "description": "The spacing is the normal spacing for the current font. It is typically zero-length."
29492 "syntax": "normal | <length>",
29496 "name": "MDN Reference",
29497 "url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
29500 "description": "Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",
29506 "name": "lighting-color",
29516 "description": "Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",
29522 "name": "line-break",
29526 "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."
29530 "description": "Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
29534 "description": "Breaks text using the most common set of line-breaking rules."
29538 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
29541 "syntax": "auto | loose | normal | strict | anywhere",
29545 "name": "MDN Reference",
29546 "url": "https://developer.mozilla.org/docs/Web/CSS/line-break"
29549 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
29555 "name": "line-height",
29559 "description": "Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."
29562 "syntax": "normal | <number> | <length> | <percentage>",
29566 "name": "MDN Reference",
29567 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height"
29570 "description": "Determines the block-progression dimension of the text content area of an inline box.",
29578 "name": "list-style",
29585 "description": "A hollow circle."
29591 "name": "decimal-leading-zero"
29595 "description": "A filled circle."
29602 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
29605 "name": "lower-alpha"
29608 "name": "lower-greek"
29611 "name": "lower-latin"
29614 "name": "lower-roman"
29621 "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."
29625 "description": "A filled square."
29628 "name": "symbols()",
29629 "description": "Allows a counter style to be defined inline."
29632 "name": "upper-alpha"
29635 "name": "upper-latin"
29638 "name": "upper-roman"
29644 "syntax": "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
29648 "name": "MDN Reference",
29649 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style"
29652 "description": "Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",
29660 "name": "list-style-image",
29664 "description": "The default contents of the of the list item’s marker are given by 'list-style-type' instead."
29667 "syntax": "<url> | none",
29671 "name": "MDN Reference",
29672 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
29675 "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.",
29681 "name": "list-style-position",
29685 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
29689 "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."
29692 "syntax": "inside | outside",
29696 "name": "MDN Reference",
29697 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
29700 "description": "Specifies the position of the '::marker' pseudo-element's box in the list item.",
29706 "name": "list-style-type",
29709 "name": "armenian",
29710 "description": "Traditional uppercase Armenian numbering."
29714 "description": "A hollow circle."
29718 "description": "Western decimal numbers."
29721 "name": "decimal-leading-zero",
29722 "description": "Decimal numbers padded by initial zeros."
29726 "description": "A filled circle."
29729 "name": "georgian",
29730 "description": "Traditional Georgian numbering."
29733 "name": "lower-alpha",
29734 "description": "Lowercase ASCII letters."
29737 "name": "lower-greek",
29738 "description": "Lowercase classical Greek."
29741 "name": "lower-latin",
29742 "description": "Lowercase ASCII letters."
29745 "name": "lower-roman",
29746 "description": "Lowercase ASCII Roman numerals."
29750 "description": "No marker"
29754 "description": "A filled square."
29757 "name": "symbols()",
29758 "description": "Allows a counter style to be defined inline."
29761 "name": "upper-alpha",
29762 "description": "Uppercase ASCII letters."
29765 "name": "upper-latin",
29766 "description": "Uppercase ASCII letters."
29769 "name": "upper-roman",
29770 "description": "Uppercase ASCII Roman numerals."
29773 "syntax": "<counter-style> | <string> | none",
29777 "name": "MDN Reference",
29778 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
29781 "description": "Used to construct the default contents of a list item’s marker",
29794 "syntax": "[ <length> | <percentage> | auto ]{1,4}",
29798 "name": "MDN Reference",
29799 "url": "https://developer.mozilla.org/docs/Web/CSS/margin"
29802 "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.",
29809 "name": "margin-block-end",
29822 "syntax": "<'margin-left'>",
29826 "name": "MDN Reference",
29827 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
29830 "description": "Logical 'margin-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29837 "name": "margin-block-start",
29850 "syntax": "<'margin-left'>",
29854 "name": "MDN Reference",
29855 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
29858 "description": "Logical 'margin-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29865 "name": "margin-bottom",
29871 "syntax": "<length> | <percentage> | auto",
29875 "name": "MDN Reference",
29876 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
29879 "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..",
29886 "name": "margin-inline-end",
29899 "syntax": "<'margin-left'>",
29903 "name": "MDN Reference",
29904 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
29907 "description": "Logical 'margin-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29914 "name": "margin-inline-start",
29927 "syntax": "<'margin-left'>",
29931 "name": "MDN Reference",
29932 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
29935 "description": "Logical 'margin-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
29942 "name": "margin-left",
29948 "syntax": "<length> | <percentage> | auto",
29952 "name": "MDN Reference",
29953 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
29956 "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..",
29963 "name": "margin-right",
29969 "syntax": "<length> | <percentage> | auto",
29973 "name": "MDN Reference",
29974 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
29977 "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..",
29984 "name": "margin-top",
29990 "syntax": "<length> | <percentage> | auto",
29994 "name": "MDN Reference",
29995 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
29998 "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..",
30009 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
30013 "description": "Indicates that the <marker> element referenced will be used."
30017 "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.",
30023 "name": "marker-end",
30027 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
30031 "description": "Indicates that the <marker> element referenced will be used."
30035 "description": "Specifies the marker that will be drawn at the last vertices of the given markable element.",
30041 "name": "marker-mid",
30045 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
30049 "description": "Indicates that the <marker> element referenced will be used."
30053 "description": "Specifies the marker that will be drawn at all vertices except the first and last.",
30059 "name": "marker-start",
30063 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
30067 "description": "Indicates that the <marker> element referenced will be used."
30071 "description": "Specifies the marker that will be drawn at the first vertices of the given markable element.",
30077 "name": "mask-image",
30088 "description": "Counts as a transparent black image layer."
30092 "description": "Reference to a <mask element or to a CSS image."
30095 "syntax": "<mask-reference>#",
30099 "name": "MDN Reference",
30100 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-image"
30103 "description": "Sets the mask layer image of an element.",
30111 "name": "mask-mode",
30118 "description": "Alpha values of the mask layer image should be used as the mask values."
30122 "description": "Use alpha values if 'mask-image' is an image, luminance if a <mask> element or a CSS image."
30125 "name": "luminance",
30126 "description": "Luminance values of the mask layer image should be used as the mask values."
30129 "syntax": "<masking-mode>#",
30133 "name": "MDN Reference",
30134 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
30137 "description": "Indicates whether the mask layer image is treated as luminance mask or alpha mask.",
30145 "name": "mask-origin",
30153 "syntax": "<geometry-box>#",
30157 "name": "MDN Reference",
30158 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
30161 "description": "Specifies the mask positioning area.",
30168 "name": "mask-position",
30176 "syntax": "<position>#",
30180 "name": "MDN Reference",
30181 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-position"
30184 "description": "Specifies how mask layer images are positioned.",
30192 "name": "mask-repeat",
30200 "syntax": "<repeat-style>#",
30204 "name": "MDN Reference",
30205 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
30208 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
30214 "name": "mask-size",
30225 "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%."
30229 "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."
30233 "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."
30236 "syntax": "<bg-size>#",
30240 "name": "MDN Reference",
30241 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-size"
30244 "description": "Specifies the size of the mask layer images.",
30252 "name": "mask-type",
30263 "description": "Indicates that the alpha values of the mask should be used."
30266 "name": "luminance",
30267 "description": "Indicates that the luminance values of the mask should be used."
30270 "syntax": "luminance | alpha",
30274 "name": "MDN Reference",
30275 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
30278 "description": "Defines whether the content of the <mask> element is treated as as luminance mask or alpha mask.",
30284 "name": "max-block-size",
30295 "description": "No limit on the width of the box."
30298 "syntax": "<'max-width'>",
30302 "name": "MDN Reference",
30303 "url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
30306 "description": "Logical 'max-width'. Mapping depends on the element’s 'writing-mode'.",
30313 "name": "max-height",
30317 "description": "No limit on the height of the box."
30320 "name": "fit-content",
30321 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
30324 "name": "max-content",
30325 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
30328 "name": "min-content",
30329 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
30332 "syntax": "<viewport-length>",
30336 "name": "MDN Reference",
30337 "url": "https://developer.mozilla.org/docs/Web/CSS/max-height"
30340 "description": "Allows authors to constrain content height to a certain range.",
30347 "name": "max-inline-size",
30358 "description": "No limit on the height of the box."
30361 "syntax": "<'max-width'>",
30365 "name": "MDN Reference",
30366 "url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
30369 "description": "Logical 'max-height'. Mapping depends on the element’s 'writing-mode'.",
30376 "name": "max-width",
30380 "description": "No limit on the width of the box."
30383 "name": "fit-content",
30384 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
30387 "name": "max-content",
30388 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
30391 "name": "min-content",
30392 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
30395 "syntax": "<viewport-length>",
30399 "name": "MDN Reference",
30400 "url": "https://developer.mozilla.org/docs/Web/CSS/max-width"
30403 "description": "Allows authors to constrain content width to a certain range.",
30410 "name": "min-block-size",
30418 "syntax": "<'min-width'>",
30422 "name": "MDN Reference",
30423 "url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
30426 "description": "Logical 'min-width'. Mapping depends on the element’s 'writing-mode'.",
30433 "name": "min-height",
30439 "name": "fit-content",
30440 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
30443 "name": "max-content",
30444 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
30447 "name": "min-content",
30448 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
30451 "syntax": "<viewport-length>",
30455 "name": "MDN Reference",
30456 "url": "https://developer.mozilla.org/docs/Web/CSS/min-height"
30459 "description": "Allows authors to constrain content height to a certain range.",
30466 "name": "min-inline-size",
30474 "syntax": "<'min-width'>",
30478 "name": "MDN Reference",
30479 "url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
30482 "description": "Logical 'min-height'. Mapping depends on the element’s 'writing-mode'.",
30489 "name": "min-width",
30495 "name": "fit-content",
30496 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
30499 "name": "max-content",
30500 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
30503 "name": "min-content",
30504 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
30507 "syntax": "<viewport-length>",
30511 "name": "MDN Reference",
30512 "url": "https://developer.mozilla.org/docs/Web/CSS/min-width"
30515 "description": "Allows authors to constrain content width to a certain range.",
30522 "name": "mix-blend-mode",
30533 "description": "Default attribute which specifies no blending"
30536 "name": "multiply",
30537 "description": "The source color is multiplied by the destination color and replaces the destination."
30541 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
30545 "description": "Multiplies or screens the colors, depending on the backdrop color value."
30549 "description": "Selects the darker of the backdrop and source colors."
30553 "description": "Selects the lighter of the backdrop and source colors."
30556 "name": "color-dodge",
30557 "description": "Brightens the backdrop color to reflect the source color."
30560 "name": "color-burn",
30561 "description": "Darkens the backdrop color to reflect the source color."
30564 "name": "hard-light",
30565 "description": "Multiplies or screens the colors, depending on the source color value."
30568 "name": "soft-light",
30569 "description": "Darkens or lightens the colors, depending on the source color value."
30572 "name": "difference",
30573 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
30576 "name": "exclusion",
30577 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
30588 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
30591 "name": "saturation",
30599 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
30610 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
30613 "name": "luminosity",
30621 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
30624 "syntax": "<blend-mode>",
30628 "name": "MDN Reference",
30629 "url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
30632 "description": "Defines the formula that must be used to mix the colors with the backdrop.",
30646 "description": "No motion path gets created."
30650 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
30654 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
30658 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
30662 "description": "Shorthand property for setting 'motion-path', 'motion-offset' and 'motion-rotation'.",
30674 "name": "motion-offset",
30680 "description": "A distance that describes the position along the specified motion path.",
30687 "name": "motion-path",
30695 "description": "No motion path gets created."
30699 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
30703 "description": "Specifies the motion path the element gets positioned at.",
30712 "name": "motion-rotation",
30720 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
30724 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
30728 "description": "Defines the direction of the element while positioning along the motion path.",
30734 "name": "-moz-animation",
30740 "name": "alternate",
30741 "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."
30744 "name": "alternate-reverse",
30745 "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."
30748 "name": "backwards",
30749 "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'."
30753 "description": "Both forwards and backwards fill modes are applied."
30756 "name": "forwards",
30757 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
30760 "name": "infinite",
30761 "description": "Causes the animation to repeat forever."
30765 "description": "No animation is performed"
30769 "description": "Normal playback."
30773 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
30777 "description": "Shorthand property combines six of the animation properties into a single property.",
30787 "name": "-moz-animation-delay",
30792 "description": "Defines when the animation will start.",
30798 "name": "-moz-animation-direction",
30804 "name": "alternate",
30805 "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."
30808 "name": "alternate-reverse",
30809 "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."
30813 "description": "Normal playback."
30817 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
30821 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
30827 "name": "-moz-animation-duration",
30832 "description": "Defines the length of time that an animation takes to complete one cycle.",
30838 "name": "-moz-animation-iteration-count",
30844 "name": "infinite",
30845 "description": "Causes the animation to repeat forever."
30849 "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.",
30856 "name": "-moz-animation-name",
30863 "description": "No animation is performed"
30867 "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.",
30874 "name": "-moz-animation-play-state",
30881 "description": "A running animation will be paused."
30885 "description": "Resume playback of a paused animation."
30889 "description": "Defines whether the animation is running or paused.",
30895 "name": "-moz-animation-timing-function",
30900 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
30906 "name": "-moz-appearance",
30915 "name": "button-arrow-down"
30918 "name": "button-arrow-next"
30921 "name": "button-arrow-previous"
30924 "name": "button-arrow-up"
30927 "name": "button-bevel"
30933 "name": "checkbox-container"
30936 "name": "checkbox-label"
30948 "name": "menuarrow"
30951 "name": "menuimage"
30957 "name": "menuitemtext"
30963 "name": "menulist-button"
30966 "name": "menulist-text"
30969 "name": "menulist-textfield"
30972 "name": "menupopup"
30975 "name": "menuradio"
30978 "name": "menuseparator"
30981 "name": "-moz-mac-unified-toolbar"
30984 "name": "-moz-win-borderless-glass"
30987 "name": "-moz-win-browsertabbar-toolbox"
30990 "name": "-moz-win-communications-toolbox"
30993 "name": "-moz-win-glass"
30996 "name": "-moz-win-media-toolbox"
31002 "name": "progressbar"
31005 "name": "progresschunk"
31011 "name": "radio-container"
31014 "name": "radio-label"
31017 "name": "radiomenuitem"
31023 "name": "resizerpanel"
31026 "name": "scrollbarbutton-down"
31029 "name": "scrollbarbutton-left"
31032 "name": "scrollbarbutton-right"
31035 "name": "scrollbarbutton-up"
31038 "name": "scrollbar-small"
31041 "name": "scrollbartrack-horizontal"
31044 "name": "scrollbartrack-vertical"
31047 "name": "separator"
31053 "name": "spinner-downbutton"
31056 "name": "spinner-textfield"
31059 "name": "spinner-upbutton"
31062 "name": "statusbar"
31065 "name": "statusbarpanel"
31071 "name": "tabpanels"
31074 "name": "tab-scroll-arrow-back"
31077 "name": "tab-scroll-arrow-forward"
31080 "name": "textfield"
31083 "name": "textfield-multiline"
31095 "name": "treeheadercell"
31098 "name": "treeheadersortarrow"
31104 "name": "treetwistyopen"
31110 "name": "treewisty"
31116 "status": "nonstandard",
31117 "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",
31119 "description": "Used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",
31125 "name": "-moz-backface-visibility",
31138 "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.",
31144 "name": "-moz-background-clip",
31154 "description": "Determines the background painting area.",
31161 "name": "-moz-background-inline-policy",
31167 "name": "bounding-box"
31170 "name": "continuous"
31177 "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.",
31183 "name": "-moz-background-origin",
31188 "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).",
31194 "name": "-moz-border-bottom-colors",
31198 "status": "nonstandard",
31199 "syntax": "<color>+ | none",
31201 "description": "Sets a list of colors for the bottom border.",
31207 "name": "-moz-border-image",
31214 "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."
31218 "description": "Causes the middle part of the border-image to be preserved."
31225 "description": "The image is tiled (repeated) to fill the area."
31229 "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."
31233 "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."
31237 "description": "The image is stretched to fill the area."
31244 "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.",
31254 "name": "-moz-border-left-colors",
31258 "status": "nonstandard",
31259 "syntax": "<color>+ | none",
31261 "description": "Sets a list of colors for the bottom border.",
31267 "name": "-moz-border-right-colors",
31271 "status": "nonstandard",
31272 "syntax": "<color>+ | none",
31274 "description": "Sets a list of colors for the bottom border.",
31280 "name": "-moz-border-top-colors",
31284 "status": "nonstandard",
31285 "syntax": "<color>+ | none",
31287 "description": "Ske Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",
31293 "name": "-moz-box-align",
31299 "name": "baseline",
31300 "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."
31304 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
31308 "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."
31312 "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."
31316 "description": "The height of each child is adjusted to that of the containing block."
31320 "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.",
31326 "name": "-moz-box-direction",
31333 "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."
31337 "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."
31341 "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).",
31347 "name": "-moz-box-flex",
31352 "description": "Specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout.",
31358 "name": "-moz-box-flexgroup",
31363 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
31369 "name": "-moz-box-ordinal-group",
31374 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
31380 "name": "-moz-box-orient",
31386 "name": "block-axis",
31387 "description": "Elements are oriented along the box's axis."
31390 "name": "horizontal",
31391 "description": "The box displays its children from left to right in a horizontal line."
31394 "name": "inline-axis",
31395 "description": "Elements are oriented vertically."
31398 "name": "vertical",
31399 "description": "The box displays its children from stacked from top to bottom vertically."
31403 "description": "In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",
31409 "name": "-moz-box-pack",
31416 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
31420 "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."
31424 "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."
31428 "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."
31432 "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.",
31438 "name": "-moz-box-sizing",
31444 "name": "border-box",
31445 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
31448 "name": "content-box",
31449 "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."
31452 "name": "padding-box",
31453 "description": "The specified width and height (and respective min/max properties) on this element determine the padding box of the element."
31457 "description": "Box Model addition in CSS3.",
31463 "name": "-moz-column-count",
31470 "description": "Determines the number of columns by the 'column-width' property and the element width."
31474 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
31480 "name": "-moz-column-gap",
31487 "description": "User agent specific and typically equivalent to 1em."
31491 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
31497 "name": "-moz-column-rule",
31502 "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.",
31511 "name": "-moz-column-rule-color",
31516 "description": "Sets the color of the column rule",
31522 "name": "-moz-column-rule-style",
31527 "description": "Sets the style of the rule between columns of an element.",
31533 "name": "-moz-column-rule-width",
31538 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
31545 "name": "-moz-columns",
31552 "description": "The width depends on the values of other properties."
31556 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
31563 "name": "-moz-column-width",
31570 "description": "The width depends on the values of other properties."
31574 "description": "This property describes the width of columns in multicol elements.",
31580 "name": "-moz-font-feature-settings",
31614 "description": "No change in glyph substitution or positioning occurs."
31630 "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.",
31637 "name": "-moz-hyphens",
31644 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
31648 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
31652 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
31656 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
31662 "name": "-moz-perspective",
31669 "description": "No perspective transform is applied."
31673 "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.",
31679 "name": "-moz-perspective-origin",
31684 "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.",
31692 "name": "-moz-text-align-last",
31702 "description": "The inline contents are centered within the line box."
31706 "description": "The text is justified according to the method specified by the 'text-justify' property."
31710 "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."
31714 "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."
31718 "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'.",
31724 "name": "-moz-text-decoration-color",
31729 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
31735 "name": "-moz-text-decoration-line",
31741 "name": "line-through",
31742 "description": "Each line of text has a line through the middle."
31746 "description": "Neither produces nor inhibits text decoration."
31749 "name": "overline",
31750 "description": "Each line of text has a line above it."
31753 "name": "underline",
31754 "description": "Each line of text is underlined."
31758 "description": "Specifies what line decorations, if any, are added to the element.",
31764 "name": "-moz-text-decoration-style",
31771 "description": "Produces a dashed line style."
31775 "description": "Produces a dotted line."
31779 "description": "Produces a double line."
31783 "description": "Produces no line."
31787 "description": "Produces a solid line."
31791 "description": "Produces a wavy line."
31795 "description": "Specifies the line style for underline, line-through and overline text decoration.",
31801 "name": "-moz-text-size-adjust",
31808 "description": "Renderers must use the default size adjustment when displaying on a small device."
31812 "description": "Renderers must not do size adjustment when displaying on a small device."
31816 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
31823 "name": "-moz-transform",
31829 "name": "matrix()",
31830 "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]"
31833 "name": "matrix3d()",
31834 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
31840 "name": "perspective",
31841 "description": "Specifies a perspective projection matrix."
31844 "name": "rotate()",
31845 "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."
31848 "name": "rotate3d()",
31849 "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."
31852 "name": "rotateX('angle')",
31853 "description": "Specifies a clockwise rotation by the given angle about the X axis."
31856 "name": "rotateY('angle')",
31857 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
31860 "name": "rotateZ('angle')",
31861 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
31865 "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."
31868 "name": "scale3d()",
31869 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
31872 "name": "scaleX()",
31873 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
31876 "name": "scaleY()",
31877 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
31880 "name": "scaleZ()",
31881 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
31885 "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)."
31889 "description": "Specifies a skew transformation along the X axis by the given angle."
31893 "description": "Specifies a skew transformation along the Y axis by the given angle."
31896 "name": "translate()",
31897 "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."
31900 "name": "translate3d()",
31901 "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."
31904 "name": "translateX()",
31905 "description": "Specifies a translation by the given amount in the X direction."
31908 "name": "translateY()",
31909 "description": "Specifies a translation by the given amount in the Y direction."
31912 "name": "translateZ()",
31913 "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."
31917 "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.",
31923 "name": "-moz-transform-origin",
31928 "description": "Establishes the origin of transformation for an element.",
31936 "name": "-moz-transition",
31943 "description": "Every property that is able to undergo a transition will do so."
31947 "description": "No property will transition."
31951 "description": "Shorthand property combines four of the transition properties into a single property.",
31960 "name": "-moz-transition-delay",
31965 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
31971 "name": "-moz-transition-duration",
31976 "description": "Specifies how long the transition from the old value to the new value should take.",
31982 "name": "-moz-transition-property",
31989 "description": "Every property that is able to undergo a transition will do so."
31993 "description": "No property will transition."
31997 "description": "Specifies the name of the CSS property to which the transition is applied.",
32003 "name": "-moz-transition-timing-function",
32008 "description": "Describes how the intermediate values used during a transition will be calculated.",
32014 "name": "-moz-user-focus",
32026 "status": "nonstandard",
32027 "syntax": "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
32031 "name": "MDN Reference",
32032 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
32035 "description": "Used to indicate whether the element can have focus."
32038 "name": "-moz-user-select",
32056 "name": "-moz-none"
32069 "description": "Controls the appearance of selection.",
32075 "name": "-ms-accelerator",
32083 "description": "The element does not contain an accelerator key sequence."
32087 "description": "The element contains an accelerator key sequence."
32090 "status": "nonstandard",
32091 "syntax": "false | true",
32093 "description": "IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",
32099 "name": "-ms-behavior",
32104 "description": "IE only. Used to extend behaviors of the browser",
32110 "name": "-ms-block-progression",
32117 "description": "Bottom-to-top block flow. Layout is horizontal."
32121 "description": "Left-to-right direction. The flow orientation is vertical."
32125 "description": "Right-to-left direction. The flow orientation is vertical."
32129 "description": "Top-to-bottom direction. The flow orientation is horizontal."
32132 "status": "nonstandard",
32133 "syntax": "tb | rl | bt | lr",
32135 "description": "Sets the block-progression value and the flow orientation",
32141 "name": "-ms-content-zoom-chaining",
32149 "description": "The nearest zoomable parent element begins zooming when the user hits a zoom limit during a manipulation. No bounce effect is shown."
32153 "description": "A bounce effect is shown when the user hits a zoom limit during a manipulation."
32156 "status": "nonstandard",
32157 "syntax": "none | chained",
32159 "description": "Specifies the zoom behavior that occurs when a user hits the zoom limit during a manipulation."
32162 "name": "-ms-content-zooming",
32170 "description": "The element is not zoomable."
32174 "description": "The element is zoomable."
32177 "status": "nonstandard",
32178 "syntax": "none | zoom",
32180 "description": "Specifies whether zooming is enabled.",
32186 "name": "-ms-content-zoom-limit",
32191 "status": "nonstandard",
32192 "syntax": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
32194 "description": "Shorthand property for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.",
32200 "name": "-ms-content-zoom-limit-max",
32205 "status": "nonstandard",
32206 "syntax": "<percentage>",
32208 "description": "Specifies the maximum zoom factor.",
32214 "name": "-ms-content-zoom-limit-min",
32219 "status": "nonstandard",
32220 "syntax": "<percentage>",
32222 "description": "Specifies the minimum zoom factor.",
32228 "name": "-ms-content-zoom-snap",
32235 "name": "mandatory",
32236 "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."
32240 "description": "Indicates that zooming is unaffected by any defined snap-points."
32243 "name": "proximity",
32244 "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."
32247 "name": "snapInterval(100%, 100%)",
32248 "description": "Specifies where the snap-points will be placed."
32251 "name": "snapList()",
32252 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
32255 "status": "nonstandard",
32256 "syntax": "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
32258 "description": "Shorthand property for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties."
32261 "name": "-ms-content-zoom-snap-points",
32268 "name": "snapInterval(100%, 100%)",
32269 "description": "Specifies where the snap-points will be placed."
32272 "name": "snapList()",
32273 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
32276 "status": "nonstandard",
32277 "syntax": "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
32279 "description": "Defines where zoom snap-points are located."
32282 "name": "-ms-content-zoom-snap-type",
32289 "name": "mandatory",
32290 "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."
32294 "description": "Indicates that zooming is unaffected by any defined snap-points."
32297 "name": "proximity",
32298 "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."
32301 "status": "nonstandard",
32302 "syntax": "none | proximity | mandatory",
32304 "description": "Specifies how zooming is affected by defined snap-points.",
32310 "name": "-ms-filter",
32314 "status": "nonstandard",
32315 "syntax": "<string>",
32317 "description": "IE only. Used to produce visual effects.",
32323 "name": "-ms-flex",
32330 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
32334 "description": "Expands to '0 0 auto'."
32338 "description": "specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",
32346 "name": "-ms-flex-align",
32352 "name": "baseline",
32353 "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."
32357 "description": "The flex item’s margin box is centered in the cross axis within the line."
32361 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
32365 "description": "The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."
32369 "description": "If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."
32373 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
32379 "name": "-ms-flex-direction",
32386 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
32389 "name": "column-reverse",
32390 "description": "Same as 'column', except the main-start and main-end directions are swapped."
32394 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
32397 "name": "row-reverse",
32398 "description": "Same as 'row', except the main-start and main-end directions are swapped."
32402 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
32408 "name": "-ms-flex-flow",
32415 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
32418 "name": "column-reverse",
32419 "description": "Same as 'column', except the main-start and main-end directions are swapped."
32423 "description": "The flex container is single-line."
32427 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
32431 "description": "The flexbox is multi-line."
32434 "name": "wrap-reverse",
32435 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
32439 "description": "Specifies how flexbox items are placed in the flexbox.",
32445 "name": "-ms-flex-item-align",
32452 "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."
32455 "name": "baseline",
32456 "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."
32460 "description": "The flex item’s margin box is centered in the cross axis within the line."
32464 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
32468 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
32472 "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."
32476 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
32482 "name": "-ms-flex-line-pack",
32489 "description": "Lines are packed toward the center of the flex container."
32492 "name": "distribute",
32493 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
32497 "description": "Lines are packed toward the end of the flex container."
32501 "description": "Lines are evenly distributed in the flex container."
32505 "description": "Lines are packed toward the start of the flex container."
32509 "description": "Lines stretch to take up the remaining space."
32513 "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.",
32519 "name": "-ms-flex-order",
32524 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
32530 "name": "-ms-flex-pack",
32537 "description": "Flex items are packed toward the center of the line."
32540 "name": "distribute",
32541 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
32545 "description": "Flex items are packed toward the end of the line."
32549 "description": "Flex items are evenly distributed in the line."
32553 "description": "Flex items are packed toward the start of the line."
32557 "description": "Aligns flex items along the main axis of the current line of the flex container.",
32563 "name": "-ms-flex-wrap",
32570 "description": "The flex container is single-line."
32574 "description": "The flexbox is multi-line."
32577 "name": "wrap-reverse",
32578 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
32582 "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.",
32588 "name": "-ms-flow-from",
32596 "description": "The block container is not a CSS Region."
32599 "status": "nonstandard",
32600 "syntax": "[ none | <custom-ident> ]#",
32602 "description": "Makes a block container a region and associates it with a named flow.",
32608 "name": "-ms-flow-into",
32616 "description": "The element is not moved to a named flow and normal CSS processing takes place."
32619 "status": "nonstandard",
32620 "syntax": "[ none | <custom-ident> ]#",
32622 "description": "Places an element or its contents into a named flow.",
32628 "name": "-ms-grid-column",
32645 "description": "Used to place grid items and explicitly defined grid cells in the Grid.",
32653 "name": "-ms-grid-column-align",
32661 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's column."
32665 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."
32669 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."
32673 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."
32677 "description": "Aligns the columns in a grid.",
32683 "name": "-ms-grid-columns",
32689 "description": "Lays out the columns of the grid."
32692 "name": "-ms-grid-column-span",
32698 "description": "Specifies the number of columns to span.",
32704 "name": "-ms-grid-layer",
32710 "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.",
32716 "name": "-ms-grid-row",
32733 "description": "grid-row is used to place grid items and explicitly defined grid cells in the Grid.",
32741 "name": "-ms-grid-row-align",
32749 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's row."
32753 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."
32757 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."
32761 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."
32765 "description": "Aligns the rows in a grid.",
32771 "name": "-ms-grid-rows",
32777 "description": "Lays out the columns of the grid."
32780 "name": "-ms-grid-row-span",
32786 "description": "Specifies the number of rows to span.",
32792 "name": "-ms-high-contrast-adjust",
32800 "description": "Properties will be adjusted as applicable."
32804 "description": "No adjustments will be applied."
32807 "status": "nonstandard",
32808 "syntax": "auto | none",
32810 "description": "Specifies if properties should be adjusted in high contrast mode.",
32816 "name": "-ms-hyphenate-limit-chars",
32824 "description": "The user agent chooses a value that adapts to the current layout."
32827 "status": "nonstandard",
32828 "syntax": "auto | <integer>{1,3}",
32830 "description": "Specifies the minimum number of characters in a hyphenated word.",
32836 "name": "-ms-hyphenate-limit-lines",
32843 "name": "no-limit",
32844 "description": "There is no limit."
32847 "status": "nonstandard",
32848 "syntax": "no-limit | <integer>",
32850 "description": "Indicates the maximum number of successive hyphenated lines in an element.",
32856 "name": "-ms-hyphenate-limit-zone",
32861 "status": "nonstandard",
32862 "syntax": "<percentage> | <length>",
32864 "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.",
32871 "name": "-ms-hyphens",
32879 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
32883 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
32887 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
32891 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
32897 "name": "-ms-ime-mode",
32904 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
32908 "description": "No change is made to the current input method editor state. This is the default."
32911 "name": "disabled",
32912 "description": "The input method editor is disabled and may not be activated by the user."
32915 "name": "inactive",
32916 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
32920 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
32924 "description": "Controls the state of the input method editor for text fields.",
32930 "name": "-ms-interpolation-mode",
32939 "name": "nearest-neighbor"
32943 "description": "Gets or sets the interpolation (resampling) method used to stretch images.",
32949 "name": "-ms-layout-grid",
32957 "description": "Any of the range of character values available to the -ms-layout-grid-char property."
32961 "description": "Any of the range of line values available to the -ms-layout-grid-line property."
32965 "description": "Any of the range of mode values available to the -ms-layout-grid-mode property."
32969 "description": "Any of the range of type values available to the -ms-layout-grid-type property."
32973 "description": "Sets or retrieves the composite document grid properties that specify the layout of text characters."
32976 "name": "-ms-layout-grid-char",
32984 "description": "Largest character in the font of the element is used to set the character grid."
32988 "description": "Default. No character grid is set."
32992 "description": "Sets or retrieves the size of the character grid used for rendering the text content of an element.",
33000 "name": "-ms-layout-grid-line",
33008 "description": "Largest character in the font of the element is used to set the character grid."
33012 "description": "Default. No grid line is set."
33016 "description": "Sets or retrieves the gridline value used for rendering the text content of an element.",
33022 "name": "-ms-layout-grid-mode",
33030 "description": "Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."
33034 "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."
33038 "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."
33042 "description": "No grid is used."
33046 "description": "Gets or sets whether the text layout grid uses two dimensions.",
33052 "name": "-ms-layout-grid-type",
33060 "description": "Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."
33064 "description": "Default. Grid used for Japanese and Korean characters."
33068 "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."
33072 "description": "Sets or retrieves the type of grid used for rendering the text content of an element.",
33078 "name": "-ms-line-break",
33086 "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."
33089 "name": "keep-all",
33090 "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."
33093 "name": "newspaper",
33094 "description": "Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
33098 "description": "Breaks CJK scripts using a normal set of line-breaking rules."
33102 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
33106 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
33112 "name": "-ms-overflow-style",
33120 "description": "No preference, UA should use the first scrolling method in the list that it supports."
33123 "name": "-ms-autohiding-scrollbar",
33124 "description": "Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."
33128 "description": "Indicates the element does not display scrollbars or panning indicators, even when its content overflows."
33131 "name": "scrollbar",
33132 "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."
33135 "status": "nonstandard",
33136 "syntax": "auto | none | scrollbar | -ms-autohiding-scrollbar",
33138 "description": "Specify whether content is clipped when it overflows the element's content area.",
33144 "name": "-ms-perspective",
33151 "description": "No perspective transform is applied."
33155 "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.",
33161 "name": "-ms-perspective-origin",
33166 "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.",
33174 "name": "-ms-perspective-origin-x",
33179 "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.",
33187 "name": "-ms-perspective-origin-y",
33192 "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.",
33200 "name": "-ms-progress-appearance",
33213 "description": "Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",
33219 "name": "-ms-scrollbar-3dlight-color",
33223 "status": "nonstandard",
33224 "syntax": "<color>",
33226 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
33232 "name": "-ms-scrollbar-arrow-color",
33236 "status": "nonstandard",
33237 "syntax": "<color>",
33239 "description": "Determines the color of the arrow elements of a scroll arrow.",
33245 "name": "-ms-scrollbar-base-color",
33249 "status": "nonstandard",
33250 "syntax": "<color>",
33252 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
33258 "name": "-ms-scrollbar-darkshadow-color",
33262 "status": "nonstandard",
33263 "syntax": "<color>",
33265 "description": "Determines the color of the gutter of a scroll bar.",
33271 "name": "-ms-scrollbar-face-color",
33275 "status": "nonstandard",
33276 "syntax": "<color>",
33278 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
33284 "name": "-ms-scrollbar-highlight-color",
33288 "status": "nonstandard",
33289 "syntax": "<color>",
33291 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
33297 "name": "-ms-scrollbar-shadow-color",
33301 "status": "nonstandard",
33302 "syntax": "<color>",
33304 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
33310 "name": "-ms-scrollbar-track-color",
33314 "status": "nonstandard",
33315 "syntax": "<color>",
33319 "name": "MDN Reference",
33320 "url": "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
33323 "description": "Determines the color of the track element of a scroll bar.",
33329 "name": "-ms-scroll-chaining",
33342 "status": "nonstandard",
33343 "syntax": "chained | none",
33345 "description": "Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",
33352 "name": "-ms-scroll-limit",
33362 "status": "nonstandard",
33363 "syntax": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
33365 "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.",
33371 "name": "-ms-scroll-limit-x-max",
33381 "status": "nonstandard",
33382 "syntax": "auto | <length>",
33384 "description": "Gets or sets a value that specifies the maximum value for the scrollLeft property.",
33390 "name": "-ms-scroll-limit-x-min",
33395 "status": "nonstandard",
33396 "syntax": "<length>",
33398 "description": "Gets or sets a value that specifies the minimum value for the scrollLeft property.",
33404 "name": "-ms-scroll-limit-y-max",
33414 "status": "nonstandard",
33415 "syntax": "auto | <length>",
33417 "description": "Gets or sets a value that specifies the maximum value for the scrollTop property.",
33423 "name": "-ms-scroll-limit-y-min",
33428 "status": "nonstandard",
33429 "syntax": "<length>",
33431 "description": "Gets or sets a value that specifies the minimum value for the scrollTop property.",
33437 "name": "-ms-scroll-rails",
33450 "status": "nonstandard",
33451 "syntax": "none | railed",
33453 "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).",
33460 "name": "-ms-scroll-snap-points-x",
33467 "name": "snapInterval(100%, 100%)"
33470 "name": "snapList()"
33473 "status": "nonstandard",
33474 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
33476 "description": "Gets or sets a value that defines where snap-points will be located along the x-axis.",
33482 "name": "-ms-scroll-snap-points-y",
33489 "name": "snapInterval(100%, 100%)"
33492 "name": "snapList()"
33495 "status": "nonstandard",
33496 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
33498 "description": "Gets or sets a value that defines where snap-points will be located along the y-axis.",
33504 "name": "-ms-scroll-snap-type",
33512 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
33515 "name": "mandatory",
33516 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
33519 "name": "proximity",
33520 "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."
33523 "status": "nonstandard",
33524 "syntax": "none | proximity | mandatory",
33526 "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.",
33532 "name": "-ms-scroll-snap-x",
33539 "name": "mandatory"
33545 "name": "proximity"
33548 "name": "snapInterval(100%, 100%)"
33551 "name": "snapList()"
33554 "status": "nonstandard",
33555 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
33557 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",
33563 "name": "-ms-scroll-snap-y",
33570 "name": "mandatory"
33576 "name": "proximity"
33579 "name": "snapInterval(100%, 100%)"
33582 "name": "snapList()"
33585 "status": "nonstandard",
33586 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
33588 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",
33594 "name": "-ms-scroll-translation",
33604 "name": "vertical-to-horizontal"
33607 "status": "nonstandard",
33608 "syntax": "none | vertical-to-horizontal",
33610 "description": "Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",
33616 "name": "-ms-text-align-last",
33627 "description": "The inline contents are centered within the line box."
33631 "description": "The text is justified according to the method specified by the 'text-justify' property."
33635 "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."
33639 "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."
33643 "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'.",
33649 "name": "-ms-text-autospace",
33656 "name": "ideograph-alpha",
33657 "description": "Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."
33660 "name": "ideograph-numeric",
33661 "description": "Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."
33664 "name": "ideograph-parenthesis",
33665 "description": "Creates extra spacing between normal (non wide) parenthesis and ideographs."
33668 "name": "ideograph-space",
33669 "description": "Extends the width of the space character while surrounded by ideographs."
33673 "description": "No extra space is created."
33676 "name": "punctuation",
33677 "description": "Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."
33680 "status": "nonstandard",
33681 "syntax": "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
33683 "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.",
33689 "name": "-ms-text-combine-horizontal",
33697 "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."
33701 "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."
33705 "description": "No special processing."
33709 "description": "This property specifies the combination of multiple characters into the space of a single character.",
33716 "name": "-ms-text-justify",
33724 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
33727 "name": "distribute",
33728 "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."
33731 "name": "inter-cluster",
33732 "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."
33735 "name": "inter-ideograph",
33736 "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."
33739 "name": "inter-word",
33740 "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."
33744 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
33748 "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.",
33754 "name": "-ms-text-kashida-space",
33760 "description": "Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.",
33766 "name": "-ms-text-overflow",
33773 "description": "Clip inline content that overflows. Characters may be only partially rendered."
33776 "name": "ellipsis",
33777 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
33781 "description": "Text can overflow for example when it is prevented from wrapping",
33787 "name": "-ms-text-size-adjust",
33795 "description": "Renderers must use the default size adjustment when displaying on a small device."
33799 "description": "Renderers must not do size adjustment when displaying on a small device."
33803 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
33810 "name": "-ms-text-underline-position",
33817 "name": "alphabetic",
33818 "description": "The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."
33822 "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."
33826 "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."
33830 "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."
33834 "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",
33840 "name": "-ms-touch-action",
33847 "description": "The element is a passive element, with several exceptions."
33850 "name": "double-tap-zoom",
33851 "description": "The element will zoom on double-tap."
33854 "name": "manipulation",
33855 "description": "The element is a manipulation-causing element."
33859 "description": "The element is a manipulation-blocking element."
33863 "description": "The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."
33867 "description": "The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."
33870 "name": "pinch-zoom",
33871 "description": "The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."
33875 "description": "Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",
33881 "name": "-ms-touch-select",
33888 "name": "grippers",
33889 "description": "Grippers are always on."
33893 "description": "Grippers are always off."
33896 "status": "nonstandard",
33897 "syntax": "grippers | none",
33899 "description": "Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",
33905 "name": "-ms-transform",
33911 "name": "matrix()",
33912 "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]"
33915 "name": "matrix3d()",
33916 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
33922 "name": "rotate()",
33923 "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."
33926 "name": "rotate3d()",
33927 "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."
33930 "name": "rotateX('angle')",
33931 "description": "Specifies a clockwise rotation by the given angle about the X axis."
33934 "name": "rotateY('angle')",
33935 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
33938 "name": "rotateZ('angle')",
33939 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
33943 "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."
33946 "name": "scale3d()",
33947 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
33950 "name": "scaleX()",
33951 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
33954 "name": "scaleY()",
33955 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
33958 "name": "scaleZ()",
33959 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
33963 "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)."
33967 "description": "Specifies a skew transformation along the X axis by the given angle."
33971 "description": "Specifies a skew transformation along the Y axis by the given angle."
33974 "name": "translate()",
33975 "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."
33978 "name": "translate3d()",
33979 "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."
33982 "name": "translateX()",
33983 "description": "Specifies a translation by the given amount in the X direction."
33986 "name": "translateY()",
33987 "description": "Specifies a translation by the given amount in the Y direction."
33990 "name": "translateZ()",
33991 "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."
33995 "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.",
34001 "name": "-ms-transform-origin",
34006 "description": "Establishes the origin of transformation for an element.",
34014 "name": "-ms-transform-origin-x",
34019 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
34026 "name": "-ms-transform-origin-y",
34031 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
34038 "name": "-ms-transform-origin-z",
34043 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
34050 "name": "-ms-user-select",
34066 "status": "nonstandard",
34067 "syntax": "none | element | text",
34069 "description": "Controls the appearance of selection.",
34075 "name": "-ms-word-break",
34081 "name": "break-all",
34082 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
34085 "name": "keep-all",
34086 "description": "Block characters can no longer create implied break points."
34090 "description": "Breaks non-CJK scripts according to their own rules."
34094 "description": "Specifies line break opportunities for non-CJK scripts.",
34100 "name": "-ms-word-wrap",
34106 "name": "break-word",
34107 "description": "An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
34111 "description": "Lines may break only at allowed break points."
34115 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
34121 "name": "-ms-wrap-flow",
34129 "description": "For floats an exclusion is created, for all other elements an exclusion is not created."
34133 "description": "Inline flow content can flow on all sides of the exclusion."
34137 "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."
34141 "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."
34145 "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."
34149 "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."
34153 "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."
34156 "status": "nonstandard",
34157 "syntax": "auto | both | start | end | maximum | clear",
34159 "description": "An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",
34165 "name": "-ms-wrap-margin",
34170 "status": "nonstandard",
34171 "syntax": "<length>",
34173 "description": "Gets or sets a value that is used to offset the inner wrap shape from other shapes.",
34180 "name": "-ms-wrap-through",
34188 "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."
34192 "description": "The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."
34195 "status": "nonstandard",
34196 "syntax": "wrap | none",
34198 "description": "Specifies if an element inherits its parent wrapping context. In other words if it is subject to the exclusions defined outside the element.",
34204 "name": "-ms-writing-mode",
34235 "description": "Shorthand property for both 'direction' and 'block-progression'.",
34241 "name": "-ms-zoom",
34251 "description": "Sets or retrieves the magnification scale of the object.",
34260 "name": "-ms-zoom-animation",
34273 "description": "Gets or sets a value that indicates whether an animation is used when zooming.",
34279 "name": "nav-down",
34286 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
34290 "description": "Indicates that the user agent should target the frame that the element is in."
34294 "description": "Indicates that the user agent should target the full window."
34298 "description": "Provides an way to control directional focus navigation.",
34306 "name": "nav-index",
34313 "description": "The element's sequential navigation order is assigned automatically by the user agent."
34317 "description": "Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",
34323 "name": "nav-left",
34330 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
34334 "description": "Indicates that the user agent should target the frame that the element is in."
34338 "description": "Indicates that the user agent should target the full window."
34342 "description": "Provides an way to control directional focus navigation.",
34350 "name": "nav-right",
34357 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
34361 "description": "Indicates that the user agent should target the frame that the element is in."
34365 "description": "Indicates that the user agent should target the full window."
34369 "description": "Provides an way to control directional focus navigation.",
34384 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
34388 "description": "Indicates that the user agent should target the frame that the element is in."
34392 "description": "Indicates that the user agent should target the full window."
34396 "description": "Provides an way to control directional focus navigation.",
34404 "name": "negative",
34408 "syntax": "<symbol> <symbol>?",
34410 "description": "@counter-style descriptor. Defines how to alter the representation when the counter value is negative.",
34418 "name": "-o-animation",
34424 "name": "alternate",
34425 "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."
34428 "name": "alternate-reverse",
34429 "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."
34432 "name": "backwards",
34433 "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'."
34437 "description": "Both forwards and backwards fill modes are applied."
34440 "name": "forwards",
34441 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
34444 "name": "infinite",
34445 "description": "Causes the animation to repeat forever."
34449 "description": "No animation is performed"
34453 "description": "Normal playback."
34457 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
34461 "description": "Shorthand property combines six of the animation properties into a single property.",
34471 "name": "-o-animation-delay",
34476 "description": "Defines when the animation will start.",
34482 "name": "-o-animation-direction",
34488 "name": "alternate",
34489 "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."
34492 "name": "alternate-reverse",
34493 "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."
34497 "description": "Normal playback."
34501 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
34505 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
34511 "name": "-o-animation-duration",
34516 "description": "Defines the length of time that an animation takes to complete one cycle.",
34522 "name": "-o-animation-fill-mode",
34528 "name": "backwards",
34529 "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'."
34533 "description": "Both forwards and backwards fill modes are applied."
34536 "name": "forwards",
34537 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
34541 "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."
34545 "description": "Defines what values are applied by the animation outside the time it is executing.",
34551 "name": "-o-animation-iteration-count",
34557 "name": "infinite",
34558 "description": "Causes the animation to repeat forever."
34562 "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.",
34569 "name": "-o-animation-name",
34576 "description": "No animation is performed"
34580 "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.",
34587 "name": "-o-animation-play-state",
34594 "description": "A running animation will be paused."
34598 "description": "Resume playback of a paused animation."
34602 "description": "Defines whether the animation is running or paused.",
34608 "name": "-o-animation-timing-function",
34613 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
34619 "name": "object-fit",
34630 "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."
34634 "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."
34638 "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."
34642 "description": "The replaced content is not resized to fit inside the element's content box"
34645 "name": "scale-down",
34646 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
34649 "syntax": "fill | contain | cover | none | scale-down",
34653 "name": "MDN Reference",
34654 "url": "https://developer.mozilla.org/docs/Web/CSS/object-fit"
34657 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
34663 "name": "object-position",
34671 "syntax": "<position>",
34675 "name": "MDN Reference",
34676 "url": "https://developer.mozilla.org/docs/Web/CSS/object-position"
34679 "description": "Determines the alignment of the replaced element inside its box.",
34687 "name": "-o-border-image",
34694 "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."
34698 "description": "Causes the middle part of the border-image to be preserved."
34705 "description": "The image is tiled (repeated) to fill the area."
34709 "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."
34713 "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."
34717 "description": "The image is stretched to fill the area."
34721 "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.",
34731 "name": "-o-object-fit",
34738 "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."
34742 "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."
34746 "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."
34750 "description": "The replaced content is not resized to fit inside the element's content box"
34753 "name": "scale-down",
34754 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
34758 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
34764 "name": "-o-object-position",
34769 "description": "Determines the alignment of the replaced element inside its box.",
34778 "syntax": "<alpha-value>",
34782 "name": "MDN Reference",
34783 "url": "https://developer.mozilla.org/docs/Web/CSS/opacity"
34786 "description": "Opacity of an element's text, where 1 is opaque and 0 is entirely transparent.",
34793 "syntax": "<integer>",
34797 "name": "MDN Reference",
34798 "url": "https://developer.mozilla.org/docs/Web/CSS/order"
34801 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
34815 "syntax": "<integer>",
34819 "name": "MDN Reference",
34820 "url": "https://developer.mozilla.org/docs/Web/CSS/orphans"
34823 "description": "Specifies the minimum number of line boxes in a block container that must be left in a fragment before a fragmentation break.",
34829 "name": "-o-table-baseline",
34834 "description": "Determines which row of a inline-table should be used as baseline of inline-table.",
34840 "name": "-o-tab-size",
34845 "description": "This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
34852 "name": "-o-text-overflow",
34859 "description": "Clip inline content that overflows. Characters may be only partially rendered."
34862 "name": "ellipsis",
34863 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
34867 "description": "Text can overflow for example when it is prevented from wrapping",
34873 "name": "-o-transform",
34879 "name": "matrix()",
34880 "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]"
34883 "name": "matrix3d()",
34884 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
34890 "name": "rotate()",
34891 "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."
34894 "name": "rotate3d()",
34895 "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."
34898 "name": "rotateX('angle')",
34899 "description": "Specifies a clockwise rotation by the given angle about the X axis."
34902 "name": "rotateY('angle')",
34903 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
34906 "name": "rotateZ('angle')",
34907 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
34911 "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."
34914 "name": "scale3d()",
34915 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
34918 "name": "scaleX()",
34919 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
34922 "name": "scaleY()",
34923 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
34926 "name": "scaleZ()",
34927 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
34931 "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)."
34935 "description": "Specifies a skew transformation along the X axis by the given angle."
34939 "description": "Specifies a skew transformation along the Y axis by the given angle."
34942 "name": "translate()",
34943 "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."
34946 "name": "translate3d()",
34947 "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."
34950 "name": "translateX()",
34951 "description": "Specifies a translation by the given amount in the X direction."
34954 "name": "translateY()",
34955 "description": "Specifies a translation by the given amount in the Y direction."
34958 "name": "translateZ()",
34959 "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."
34963 "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.",
34969 "name": "-o-transform-origin",
34974 "description": "Establishes the origin of transformation for an element.",
34982 "name": "-o-transition",
34989 "description": "Every property that is able to undergo a transition will do so."
34993 "description": "No property will transition."
34997 "description": "Shorthand property combines four of the transition properties into a single property.",
35006 "name": "-o-transition-delay",
35011 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
35017 "name": "-o-transition-duration",
35022 "description": "Specifies how long the transition from the old value to the new value should take.",
35028 "name": "-o-transition-property",
35035 "description": "Every property that is able to undergo a transition will do so."
35039 "description": "No property will transition."
35043 "description": "Specifies the name of the CSS property to which the transition is applied.",
35049 "name": "-o-transition-timing-function",
35054 "description": "Describes how the intermediate values used during a transition will be calculated.",
35060 "name": "offset-block-end",
35067 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
35071 "description": "Logical 'bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35078 "name": "offset-block-start",
35085 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
35089 "description": "Logical 'top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35096 "name": "offset-inline-end",
35103 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
35107 "description": "Logical 'right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35114 "name": "offset-inline-start",
35121 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
35125 "description": "Logical 'left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35136 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
35140 "description": "Performs a color inversion on the pixels on the screen."
35143 "syntax": "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
35147 "name": "MDN Reference",
35148 "url": "https://developer.mozilla.org/docs/Web/CSS/outline"
35151 "description": "Shorthand property for 'outline-style', 'outline-width', and 'outline-color'.",
35161 "name": "outline-color",
35165 "description": "Performs a color inversion on the pixels on the screen."
35168 "syntax": "<color> | invert",
35172 "name": "MDN Reference",
35173 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-color"
35176 "description": "The color of the outline.",
35183 "name": "outline-offset",
35191 "syntax": "<length>",
35195 "name": "MDN Reference",
35196 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
35199 "description": "Offset the outline and draw it beyond the border edge.",
35205 "name": "outline-style",
35209 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
35212 "syntax": "auto | <'border-style'>",
35216 "name": "MDN Reference",
35217 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-style"
35220 "description": "Style of the outline.",
35227 "name": "outline-width",
35228 "syntax": "<line-width>",
35232 "name": "MDN Reference",
35233 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-width"
35236 "description": "Width of the outline.",
35243 "name": "overflow",
35247 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
35251 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
35254 "name": "-moz-hidden-unscrollable",
35255 "description": "Same as the standardized 'clip', except doesn’t establish a block formatting context."
35259 "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."
35263 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
35266 "syntax": "[ visible | hidden | clip | scroll | auto ]{1,2}",
35270 "name": "MDN Reference",
35271 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
35274 "description": "Shorthand for setting 'overflow-x' and 'overflow-y'.",
35280 "name": "overflow-wrap",
35283 "name": "break-word",
35284 "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."
35288 "description": "Lines may break only at allowed break points."
35291 "syntax": "normal | break-word | anywhere",
35295 "name": "MDN Reference",
35296 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
35299 "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.",
35305 "name": "overflow-x",
35309 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
35313 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
35317 "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."
35321 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
35324 "syntax": "visible | hidden | clip | scroll | auto",
35328 "name": "MDN Reference",
35329 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
35332 "description": "Specifies the handling of overflow in the horizontal direction.",
35338 "name": "overflow-y",
35342 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
35346 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
35350 "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."
35354 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
35357 "syntax": "visible | hidden | clip | scroll | auto",
35361 "name": "MDN Reference",
35362 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
35365 "description": "Specifies the handling of overflow in the vertical direction.",
35375 "syntax": "<integer> && <symbol>",
35377 "description": "@counter-style descriptor. Specifies a “fixed-width” counter style, where representations shorter than the pad value are padded with a particular <symbol>",
35388 "syntax": "[ <length> | <percentage> ]{1,4}",
35392 "name": "MDN Reference",
35393 "url": "https://developer.mozilla.org/docs/Web/CSS/padding"
35396 "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.",
35403 "name": "padding-bottom",
35404 "syntax": "<length> | <percentage>",
35408 "name": "MDN Reference",
35409 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
35412 "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.",
35419 "name": "padding-block-end",
35427 "syntax": "<'padding-left'>",
35431 "name": "MDN Reference",
35432 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
35435 "description": "Logical 'padding-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35442 "name": "padding-block-start",
35450 "syntax": "<'padding-left'>",
35454 "name": "MDN Reference",
35455 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
35458 "description": "Logical 'padding-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35465 "name": "padding-inline-end",
35473 "syntax": "<'padding-left'>",
35477 "name": "MDN Reference",
35478 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
35481 "description": "Logical 'padding-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35488 "name": "padding-inline-start",
35496 "syntax": "<'padding-left'>",
35500 "name": "MDN Reference",
35501 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
35504 "description": "Logical 'padding-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
35511 "name": "padding-left",
35512 "syntax": "<length> | <percentage>",
35516 "name": "MDN Reference",
35517 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
35520 "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.",
35527 "name": "padding-right",
35528 "syntax": "<length> | <percentage>",
35532 "name": "MDN Reference",
35533 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
35536 "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.",
35543 "name": "padding-top",
35544 "syntax": "<length> | <percentage>",
35548 "name": "MDN Reference",
35549 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
35552 "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.",
35559 "name": "page-break-after",
35563 "description": "Always force a page break after the generated box."
35567 "description": "Neither force nor forbid a page break after generated box."
35571 "description": "Avoid a page break after the generated box."
35575 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a left page."
35579 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a right page."
35582 "syntax": "auto | always | avoid | left | right | recto | verso",
35586 "name": "MDN Reference",
35587 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
35590 "description": "Defines rules for page breaks after an element.",
35596 "name": "page-break-before",
35600 "description": "Always force a page break before the generated box."
35604 "description": "Neither force nor forbid a page break before the generated box."
35608 "description": "Avoid a page break before the generated box."
35612 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a left page."
35616 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a right page."
35619 "syntax": "auto | always | avoid | left | right | recto | verso",
35623 "name": "MDN Reference",
35624 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
35627 "description": "Defines rules for page breaks before an element.",
35633 "name": "page-break-inside",
35637 "description": "Neither force nor forbid a page break inside the generated box."
35641 "description": "Avoid a page break inside the generated box."
35644 "syntax": "auto | avoid",
35648 "name": "MDN Reference",
35649 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
35652 "description": "Defines rules for page breaks inside an element.",
35658 "name": "paint-order",
35675 "description": "The element is painted with the standard order of painting operations: the 'fill' is painted first, then its 'stroke' and finally its markers."
35681 "syntax": "normal | [ fill || stroke || markers ]",
35685 "name": "MDN Reference",
35686 "url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
35689 "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.",
35695 "name": "perspective",
35699 "description": "No perspective transform is applied."
35702 "syntax": "none | <length>",
35706 "name": "MDN Reference",
35707 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective"
35710 "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.",
35717 "name": "perspective-origin",
35718 "syntax": "<position>",
35722 "name": "MDN Reference",
35723 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
35726 "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.",
35734 "name": "pointer-events",
35738 "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."
35742 "description": "The given element can be the target element for pointer events whenever the pointer is over the interior of the element."
35746 "description": "The given element does not receive pointer events."
35750 "description": "The given element can be the target element for pointer events when the pointer is over a \"painted\" area. "
35754 "description": "The given element can be the target element for pointer events whenever the pointer is over the perimeter of the element."
35758 "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."
35761 "name": "visibleFill",
35762 "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."
35765 "name": "visiblePainted",
35766 "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."
35769 "name": "visibleStroke",
35770 "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."
35773 "syntax": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
35777 "name": "MDN Reference",
35778 "url": "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
35781 "description": "Specifies under what circumstances a given element can be the target element for a pointer event.",
35787 "name": "position",
35790 "name": "absolute",
35791 "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'."
35795 "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."
35798 "name": "-ms-page",
35799 "description": "The box's position is calculated according to the 'absolute' model."
35802 "name": "relative",
35803 "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."
35807 "description": "The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."
35811 "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."
35814 "name": "-webkit-sticky",
35815 "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."
35818 "syntax": "static | relative | absolute | sticky | fixed",
35822 "name": "MDN Reference",
35823 "url": "https://developer.mozilla.org/docs/Web/CSS/position"
35826 "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.",
35836 "syntax": "<symbol>",
35838 "description": "@counter-style descriptor. Specifies a <symbol> that is prepended to the marker representation.",
35850 "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."
35853 "syntax": "none | auto | [ <string> <string> ]+",
35857 "name": "MDN Reference",
35858 "url": "https://developer.mozilla.org/docs/Web/CSS/quotes"
35861 "description": "Specifies quotation marks for any number of embedded quotations.",
35874 "description": "The range depends on the counter system."
35877 "name": "infinite",
35878 "description": "If used as the first value in a range, it represents negative infinity; if used as the second value, it represents positive infinity."
35881 "syntax": "[ [ <integer> | infinite ]{2} ]# | auto",
35883 "description": "@counter-style descriptor. Defines the ranges over which the counter style is defined.",
35901 "description": "The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."
35904 "name": "horizontal",
35905 "description": "The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."
35909 "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."
35912 "name": "vertical",
35913 "description": "The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."
35916 "syntax": "none | both | horizontal | vertical | block | inline",
35920 "name": "MDN Reference",
35921 "url": "https://developer.mozilla.org/docs/Web/CSS/resize"
35924 "description": "Specifies whether or not an element is resizable by the user, and if so, along which axis/axes.",
35934 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
35937 "syntax": "<length> | <percentage> | auto",
35941 "name": "MDN Reference",
35942 "url": "https://developer.mozilla.org/docs/Web/CSS/right"
35945 "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'.",
35952 "name": "ruby-align",
35962 "description": "The user agent determines how the ruby contents are aligned. This is the initial value."
35966 "description": "The ruby content is centered within its box."
35969 "name": "distribute-letter",
35973 "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."
35976 "name": "distribute-space",
35980 "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."
35984 "description": "The ruby text content is aligned with the start edge of the base."
35987 "name": "line-edge",
35991 "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."
35998 "description": "The ruby text content is aligned with the end edge of the base."
36005 "description": "The ruby text content is aligned with the start edge of the base."
36008 "name": "space-between",
36012 "description": "The ruby content expands as defined for normal text justification (as defined by 'text-justify'),"
36015 "name": "space-around",
36019 "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."
36022 "status": "experimental",
36023 "syntax": "start | center | space-between | space-around",
36027 "name": "MDN Reference",
36028 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
36031 "description": "Specifies how text is distributed within the various ruby boxes when their contents do not exactly fill their respective boxes.",
36037 "name": "ruby-overhang",
36045 "description": "The ruby text can overhang text adjacent to the base on either side. This is the initial value."
36049 "description": "The ruby text can overhang the text that follows it."
36053 "description": "The ruby text cannot overhang any text adjacent to its base, only its own base."
36057 "description": "The ruby text can overhang the text that precedes it."
36061 "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.",
36067 "name": "ruby-position",
36075 "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."
36079 "description": "The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."
36086 "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."
36089 "status": "experimental",
36090 "syntax": "over | under | inter-character",
36094 "name": "MDN Reference",
36095 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
36098 "description": "Used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",
36104 "name": "ruby-span",
36111 "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."
36115 "description": "No spanning. The computed value is '1'."
36119 "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.",
36125 "name": "scrollbar-3dlight-color",
36132 "name": "MDN Reference",
36133 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-3dlight-color"
36136 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
36142 "name": "scrollbar-arrow-color",
36149 "name": "MDN Reference",
36150 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-arrow-color"
36153 "description": "Determines the color of the arrow elements of a scroll arrow.",
36159 "name": "scrollbar-base-color",
36166 "name": "MDN Reference",
36167 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-base-color"
36170 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
36176 "name": "scrollbar-darkshadow-color",
36183 "name": "MDN Reference",
36184 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-darkshadow-color"
36187 "description": "Determines the color of the gutter of a scroll bar.",
36193 "name": "scrollbar-face-color",
36200 "name": "MDN Reference",
36201 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-face-color"
36204 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
36210 "name": "scrollbar-highlight-color",
36217 "name": "MDN Reference",
36218 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-highlight-color"
36221 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
36227 "name": "scrollbar-shadow-color",
36234 "name": "MDN Reference",
36235 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-shadow-color"
36238 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
36244 "name": "scrollbar-track-color",
36249 "description": "Determines the color of the track element of a scroll bar.",
36255 "name": "scroll-behavior",
36265 "description": "Scrolls in an instant fashion."
36269 "description": "Scrolls in a smooth fashion using a user-agent-defined timing function and time period."
36272 "syntax": "auto | smooth",
36276 "name": "MDN Reference",
36277 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
36280 "description": "Specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs.",
36286 "name": "scroll-snap-coordinate",
36293 "description": "Specifies that this element does not contribute a snap point."
36296 "status": "obsolete",
36297 "syntax": "none | <position>#",
36301 "name": "MDN Reference",
36302 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
36305 "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.",
36314 "name": "scroll-snap-destination",
36318 "status": "obsolete",
36319 "syntax": "<position>",
36323 "name": "MDN Reference",
36324 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
36327 "description": "Define the x and y coordinate within the scroll container’s visual viewport which element snap points will align with.",
36335 "name": "scroll-snap-points-x",
36343 "description": "No snap points are defined by this scroll container."
36346 "name": "repeat()",
36347 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
36350 "status": "obsolete",
36351 "syntax": "none | repeat( <length-percentage> )",
36355 "name": "MDN Reference",
36356 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
36359 "description": "Defines the positioning of snap points along the x axis of the scroll container it is applied to.",
36365 "name": "scroll-snap-points-y",
36373 "description": "No snap points are defined by this scroll container."
36376 "name": "repeat()",
36377 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
36380 "status": "obsolete",
36381 "syntax": "none | repeat( <length-percentage> )",
36385 "name": "MDN Reference",
36386 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
36389 "description": "Defines the positioning of snap points along the y axis of the scroll container it is applied to.",
36395 "name": "scroll-snap-type",
36399 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
36402 "name": "mandatory",
36403 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
36406 "name": "proximity",
36407 "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."
36410 "syntax": "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
36414 "name": "MDN Reference",
36415 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
36418 "description": "Defines how strictly snap points are enforced on the scroll container.",
36424 "name": "shape-image-threshold",
36432 "syntax": "<alpha-value>",
36436 "name": "MDN Reference",
36437 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
36440 "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.",
36446 "name": "shape-margin",
36454 "syntax": "<length-percentage>",
36458 "name": "MDN Reference",
36459 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
36462 "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.",
36470 "name": "shape-outside",
36480 "name": "margin-box",
36481 "description": "The background is painted within (clipped to) the margin box."
36485 "description": "The float area is unaffected."
36488 "syntax": "none | <shape-box> || <basic-shape> | <image>",
36492 "name": "MDN Reference",
36493 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
36496 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
36505 "name": "shape-rendering",
36509 "description": "Suppresses aural rendering."
36512 "name": "crispEdges",
36513 "description": "Emphasize the contrast between clean edges of artwork over rendering speed and geometric precision."
36516 "name": "geometricPrecision",
36517 "description": "Emphasize geometric precision over speed and crisp edges."
36520 "name": "optimizeSpeed",
36521 "description": "Emphasize rendering speed over geometric precision and crisp edges."
36525 "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.",
36536 "syntax": "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
36538 "description": "The size CSS at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page. Most of the time, this size corresponds to the target size of the printed page if applicable.",
36548 "description": "Reference font by URL"
36551 "name": "format()",
36552 "description": "Optional hint describing the format of the font resource."
36556 "description": "Format-specific string that identifies a locally available copy of a given font."
36559 "syntax": "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
36561 "description": "@font-face descriptor. Specifies the resource containing font data. It is required, whether the font is downloadable or locally installed.",
36569 "name": "stop-color",
36571 "description": "Indicates what color to use at that gradient stop.",
36577 "name": "stop-opacity",
36579 "description": "Defines the opacity of a given gradient stop.",
36589 "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’."
36593 "description": "No paint is applied in this layer."
36597 "description": "Paints along the outline of the given graphical element.",
36605 "name": "stroke-dasharray",
36609 "description": "Indicates that no dashing is used."
36613 "description": "Controls the pattern of dashes and gaps used to stroke paths.",
36622 "name": "stroke-dashoffset",
36624 "description": "Specifies the distance into the dash pattern to start the dash.",
36631 "name": "stroke-linecap",
36635 "description": "Indicates that the stroke for each subpath does not extend beyond its two endpoints."
36639 "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."
36643 "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."
36647 "description": "Specifies the shape to be used at the end of open subpaths when they are stroked.",
36653 "name": "stroke-linejoin",
36657 "description": "Indicates that a bevelled corner is to be used to join path segments."
36661 "description": "Indicates that a sharp corner is to be used to join path segments."
36665 "description": "Indicates that a round corner is to be used to join path segments."
36669 "description": "Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",
36675 "name": "stroke-miterlimit",
36677 "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.",
36683 "name": "stroke-opacity",
36685 "description": "Specifies the opacity of the painting operation used to stroke the current object.",
36691 "name": "stroke-width",
36693 "description": "Specifies the width of the stroke on the current object.",
36704 "syntax": "<symbol>",
36706 "description": "@counter-style descriptor. Specifies a <symbol> that is appended to the marker representation.",
36720 "name": "additive",
36721 "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."
36724 "name": "alphabetic",
36725 "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\"."
36729 "description": "Cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list."
36733 "description": "Use the algorithm of another counter style, but alter other aspects."
36737 "description": "Runs through its list of counter symbols once, then falls back."
36741 "description": "interprets the list of counter symbols as digits to a \"place-value\" numbering system, similar to the default 'decimal' counter style."
36744 "name": "symbolic",
36745 "description": "Cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."
36748 "syntax": "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
36750 "description": "@counter-style descriptor. Specifies which algorithm will be used to construct the counter’s representation based on the counter value.",
36761 "syntax": "<symbol>+",
36763 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor.",
36771 "name": "table-layout",
36775 "description": "Use any automatic table layout algorithm."
36779 "description": "Use the fixed table layout algorithm."
36782 "syntax": "auto | fixed",
36786 "name": "MDN Reference",
36787 "url": "https://developer.mozilla.org/docs/Web/CSS/table-layout"
36790 "description": "Controls the algorithm used to lay out the table cells, rows, and columns.",
36796 "name": "tab-size",
36804 "syntax": "<integer> | <length>",
36808 "name": "MDN Reference",
36809 "url": "https://developer.mozilla.org/docs/Web/CSS/tab-size"
36812 "description": "Determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
36819 "name": "text-align",
36823 "description": "The inline contents are centered within the line box."
36827 "description": "The inline contents are aligned to the end edge of the line box."
36831 "description": "The text is justified according to the method specified by the 'text-justify' property."
36835 "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."
36839 "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."
36843 "description": "The inline contents are aligned to the start edge of the line box."
36846 "syntax": "start | end | left | right | center | justify | match-parent",
36850 "name": "MDN Reference",
36851 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align"
36854 "description": "Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",
36860 "name": "text-align-last",
36871 "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'."
36875 "description": "The inline contents are centered within the line box."
36879 "description": "The text is justified according to the method specified by the 'text-justify' property."
36883 "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."
36887 "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."
36890 "syntax": "auto | start | end | left | right | center | justify",
36894 "name": "MDN Reference",
36895 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
36898 "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'.",
36904 "name": "text-anchor",
36908 "description": "The rendered characters are aligned such that the end of the resulting rendered text is at the initial current text position."
36912 "description": "The rendered characters are aligned such that the geometric middle of the resulting rendered text is at the initial current text position."
36916 "description": "The rendered characters are aligned such that the start of the resulting rendered text is at the initial current text position."
36920 "description": "Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",
36926 "name": "text-decoration",
36930 "description": "Produces a dashed line style."
36934 "description": "Produces a dotted line."
36938 "description": "Produces a double line."
36941 "name": "line-through",
36942 "description": "Each line of text has a line through the middle."
36946 "description": "Produces no line."
36949 "name": "overline",
36950 "description": "Each line of text has a line above it."
36954 "description": "Produces a solid line."
36957 "name": "underline",
36958 "description": "Each line of text is underlined."
36962 "description": "Produces a wavy line."
36965 "syntax": "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
36969 "name": "MDN Reference",
36970 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
36973 "description": "Decorations applied to font used for an element's text.",
36980 "name": "text-decoration-color",
36988 "syntax": "<color>",
36992 "name": "MDN Reference",
36993 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
36996 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
37002 "name": "text-decoration-line",
37012 "name": "line-through",
37013 "description": "Each line of text has a line through the middle."
37017 "description": "Neither produces nor inhibits text decoration."
37020 "name": "overline",
37021 "description": "Each line of text has a line above it."
37024 "name": "underline",
37025 "description": "Each line of text is underlined."
37028 "syntax": "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
37032 "name": "MDN Reference",
37033 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
37036 "description": "Specifies what line decorations, if any, are added to the element.",
37042 "name": "text-decoration-style",
37053 "description": "Produces a dashed line style."
37057 "description": "Produces a dotted line."
37061 "description": "Produces a double line."
37065 "description": "Produces no line."
37069 "description": "Produces a solid line."
37073 "description": "Produces a wavy line."
37076 "syntax": "solid | double | dotted | dashed | wavy",
37080 "name": "MDN Reference",
37081 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
37084 "description": "Specifies the line style for underline, line-through and overline text decoration.",
37090 "name": "text-indent",
37092 "syntax": "<length-percentage> && hanging? && each-line?",
37096 "name": "MDN Reference",
37097 "url": "https://developer.mozilla.org/docs/Web/CSS/text-indent"
37100 "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.",
37107 "name": "text-justify",
37118 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
37121 "name": "distribute",
37122 "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."
37125 "name": "distribute-all-lines"
37128 "name": "inter-cluster",
37129 "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."
37132 "name": "inter-ideograph",
37133 "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."
37136 "name": "inter-word",
37137 "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."
37141 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
37144 "name": "newspaper"
37147 "syntax": "auto | inter-character | inter-word | none",
37151 "name": "MDN Reference",
37152 "url": "https://developer.mozilla.org/docs/Web/CSS/text-justify"
37155 "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.",
37161 "name": "text-orientation",
37171 "name": "sideways",
37179 "description": "This value is equivalent to 'sideways-right' in 'vertical-rl' writing mode and equivalent to 'sideways-left' in 'vertical-lr' writing mode."
37182 "name": "sideways-right",
37190 "description": "In vertical writing modes, this causes text to be set as if in a horizontal layout, but rotated 90° clockwise."
37194 "description": "In vertical writing modes, characters from horizontal-only scripts are rendered upright, i.e. in their standard horizontal orientation."
37197 "syntax": "mixed | upright | sideways",
37201 "name": "MDN Reference",
37202 "url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
37205 "description": "Specifies the orientation of text within a line.",
37211 "name": "text-overflow",
37215 "description": "Clip inline content that overflows. Characters may be only partially rendered."
37218 "name": "ellipsis",
37219 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
37222 "syntax": "[ clip | ellipsis | <string> ]{1,2}",
37226 "name": "MDN Reference",
37227 "url": "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
37230 "description": "Text can overflow for example when it is prevented from wrapping.",
37237 "name": "text-rendering",
37250 "name": "geometricPrecision",
37251 "description": "Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed."
37254 "name": "optimizeLegibility",
37255 "description": "Indicates that the user agent shall emphasize legibility over rendering speed and geometric precision."
37258 "name": "optimizeSpeed",
37259 "description": "Indicates that the user agent shall emphasize rendering speed over legibility and geometric precision."
37262 "syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
37266 "name": "MDN Reference",
37267 "url": "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
37270 "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.",
37276 "name": "text-shadow",
37280 "description": "No shadow."
37283 "syntax": "none | <shadow-t>#",
37287 "name": "MDN Reference",
37288 "url": "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
37291 "description": "Enables shadow effects to be applied to the text of the element.",
37298 "name": "text-transform",
37301 "name": "capitalize",
37302 "description": "Puts the first typographic letter unit of each word in titlecase."
37305 "name": "lowercase",
37306 "description": "Puts all letters in lowercase."
37310 "description": "No effects."
37313 "name": "uppercase",
37314 "description": "Puts all letters in uppercase."
37317 "syntax": "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
37321 "name": "MDN Reference",
37322 "url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
37325 "description": "Controls capitalization effects of an element’s text.",
37331 "name": "text-underline-position",
37338 "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."
37342 "description": "The underline is aligned with the under edge of the element’s content box."
37345 "syntax": "auto | from-font | [ under || [ left | right ] ]",
37349 "name": "MDN Reference",
37350 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
37353 "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",
37363 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
37366 "syntax": "<length> | <percentage> | auto",
37370 "name": "MDN Reference",
37371 "url": "https://developer.mozilla.org/docs/Web/CSS/top"
37374 "description": "Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",
37381 "name": "touch-action",
37385 "description": "The user agent may determine any permitted touch behaviors for touches that begin on the element."
37388 "name": "cross-slide-x"
37391 "name": "cross-slide-y"
37394 "name": "double-tap-zoom"
37397 "name": "manipulation",
37398 "description": "The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming."
37402 "description": "Touches that begin on the element must not trigger default touch behaviors."
37406 "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."
37410 "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."
37413 "name": "pinch-zoom"
37416 "syntax": "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
37420 "name": "MDN Reference",
37421 "url": "https://developer.mozilla.org/docs/Web/CSS/touch-action"
37424 "description": "Determines whether touch input may trigger default behavior supplied by user agent.",
37430 "name": "transform",
37433 "name": "matrix()",
37434 "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]"
37437 "name": "matrix3d()",
37438 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
37444 "name": "perspective()",
37445 "description": "Specifies a perspective projection matrix."
37448 "name": "rotate()",
37449 "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."
37452 "name": "rotate3d()",
37453 "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."
37456 "name": "rotateX('angle')",
37457 "description": "Specifies a clockwise rotation by the given angle about the X axis."
37460 "name": "rotateY('angle')",
37461 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
37464 "name": "rotateZ('angle')",
37465 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
37469 "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."
37472 "name": "scale3d()",
37473 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
37476 "name": "scaleX()",
37477 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
37480 "name": "scaleY()",
37481 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
37484 "name": "scaleZ()",
37485 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
37489 "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)."
37493 "description": "Specifies a skew transformation along the X axis by the given angle."
37497 "description": "Specifies a skew transformation along the Y axis by the given angle."
37500 "name": "translate()",
37501 "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."
37504 "name": "translate3d()",
37505 "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."
37508 "name": "translateX()",
37509 "description": "Specifies a translation by the given amount in the X direction."
37512 "name": "translateY()",
37513 "description": "Specifies a translation by the given amount in the Y direction."
37516 "name": "translateZ()",
37517 "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."
37520 "syntax": "none | <transform-list>",
37524 "name": "MDN Reference",
37525 "url": "https://developer.mozilla.org/docs/Web/CSS/transform"
37528 "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.",
37534 "name": "transform-origin",
37535 "syntax": "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
37539 "name": "MDN Reference",
37540 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
37543 "description": "Establishes the origin of transformation for an element.",
37551 "name": "transform-style",
37562 "description": "All children of this element are rendered flattened into the 2D plane of the element."
37565 "name": "preserve-3d",
37573 "description": "Flattening is not performed, so children maintain their position in 3D space."
37576 "syntax": "flat | preserve-3d",
37580 "name": "MDN Reference",
37581 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-style"
37584 "description": "Defines how nested elements are rendered in 3D space.",
37590 "name": "transition",
37594 "description": "Every property that is able to undergo a transition will do so."
37598 "description": "No property will transition."
37601 "syntax": "<single-transition>#",
37605 "name": "MDN Reference",
37606 "url": "https://developer.mozilla.org/docs/Web/CSS/transition"
37609 "description": "Shorthand property combines four of the transition properties into a single property.",
37618 "name": "transition-delay",
37619 "syntax": "<time>#",
37623 "name": "MDN Reference",
37624 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
37627 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
37633 "name": "transition-duration",
37634 "syntax": "<time>#",
37638 "name": "MDN Reference",
37639 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
37642 "description": "Specifies how long the transition from the old value to the new value should take.",
37648 "name": "transition-property",
37652 "description": "Every property that is able to undergo a transition will do so."
37656 "description": "No property will transition."
37659 "syntax": "none | <single-transition-property>#",
37663 "name": "MDN Reference",
37664 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-property"
37667 "description": "Specifies the name of the CSS property to which the transition is applied.",
37673 "name": "transition-timing-function",
37674 "syntax": "<timing-function>#",
37678 "name": "MDN Reference",
37679 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
37682 "description": "Describes how the intermediate values used during a transition will be calculated.",
37688 "name": "unicode-bidi",
37691 "name": "bidi-override",
37692 "description": "Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."
37696 "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."
37700 "description": "The contents of the element are considered to be inside a separate, independent paragraph."
37703 "name": "isolate-override",
37704 "description": "This combines the isolation behavior of 'isolate' with the directional override behavior of 'bidi-override'"
37708 "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."
37711 "name": "plaintext",
37712 "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'."
37715 "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
37719 "name": "MDN Reference",
37720 "url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
37723 "description": "The level of embedding with respect to the bidirectional algorithm.",
37729 "name": "unicode-range",
37733 "description": "Ampersand."
37736 "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",
37737 "description": "WGL4 character set (Pan-European)."
37740 "name": "U+20-17F, U+2B0-2FF, U+2000-206F, U+20A0-20CF, U+2100-21FF, U+2600-26FF",
37741 "description": "The Multilingual European Subset No. 1. Latin. Covers ~44 languages."
37744 "name": "U+20-2FF, U+370-4FF, U+1E00-20CF, U+2100-23FF, U+2500-26FF, U+FB00-FB4F, U+FFF0-FFFD",
37745 "description": "The Multilingual European Subset No. 2. Latin, Greek, and Cyrillic. Covers ~128 language."
37748 "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",
37749 "description": "The Multilingual European Subset No. 3. Covers all characters belonging to European scripts."
37753 "description": "Basic Latin (ASCII)."
37757 "description": "Latin-1 Supplement. Accented characters for Western European languages, common punctuation characters, multiplication and division signs."
37760 "name": "U+100-17F",
37761 "description": "Latin Extended-A. Accented characters for for Czech, Dutch, Polish, and Turkish."
37764 "name": "U+180-24F",
37765 "description": "Latin Extended-B. Croatian, Slovenian, Romanian, Non-European and historic latin, Khoisan, Pinyin, Livonian, Sinology."
37768 "name": "U+1E00-1EFF",
37769 "description": "Latin Extended Additional. Vietnamese, German captial sharp s, Medievalist, Latin general use."
37772 "name": "U+250-2AF",
37773 "description": "International Phonetic Alphabet Extensions."
37776 "name": "U+370-3FF",
37777 "description": "Greek and Coptic."
37780 "name": "U+1F00-1FFF",
37781 "description": "Greek Extended. Accented characters for polytonic Greek."
37784 "name": "U+400-4FF",
37785 "description": "Cyrillic."
37788 "name": "U+500-52F",
37789 "description": "Cyrillic Supplement. Extra letters for Komi, Khanty, Chukchi, Mordvin, Kurdish, Aleut, Chuvash, Abkhaz, Azerbaijani, and Orok."
37792 "name": "U+00-52F, U+1E00-1FFF, U+2200–22FF",
37793 "description": "Latin, Greek, Cyrillic, some punctuation and symbols."
37796 "name": "U+530–58F",
37797 "description": "Armenian."
37800 "name": "U+590–5FF",
37801 "description": "Hebrew."
37804 "name": "U+600–6FF",
37805 "description": "Arabic."
37808 "name": "U+750–77F",
37809 "description": "Arabic Supplement. Additional letters for African languages, Khowar, Torwali, Burushaski, and early Persian."
37812 "name": "U+8A0–8FF",
37813 "description": "Arabic Extended-A. Additional letters for African languages, European and Central Asian languages, Rohingya, Tamazight, Arwi, and Koranic annotation signs."
37816 "name": "U+700–74F",
37817 "description": "Syriac."
37820 "name": "U+900–97F",
37821 "description": "Devanagari."
37824 "name": "U+980–9FF",
37825 "description": "Bengali."
37828 "name": "U+A00–A7F",
37829 "description": "Gurmukhi."
37832 "name": "U+A80–AFF",
37833 "description": "Gujarati."
37836 "name": "U+B00–B7F",
37837 "description": "Oriya."
37840 "name": "U+B80–BFF",
37841 "description": "Tamil."
37844 "name": "U+C00–C7F",
37845 "description": "Telugu."
37848 "name": "U+C80–CFF",
37849 "description": "Kannada."
37852 "name": "U+D00–D7F",
37853 "description": "Malayalam."
37856 "name": "U+D80–DFF",
37857 "description": "Sinhala."
37860 "name": "U+118A0–118FF",
37861 "description": "Warang Citi."
37864 "name": "U+E00–E7F",
37865 "description": "Thai."
37868 "name": "U+1A20–1AAF",
37869 "description": "Tai Tham."
37872 "name": "U+AA80–AADF",
37873 "description": "Tai Viet."
37876 "name": "U+E80–EFF",
37877 "description": "Lao."
37880 "name": "U+F00–FFF",
37881 "description": "Tibetan."
37884 "name": "U+1000–109F",
37885 "description": "Myanmar (Burmese)."
37888 "name": "U+10A0–10FF",
37889 "description": "Georgian."
37892 "name": "U+1200–137F",
37893 "description": "Ethiopic."
37896 "name": "U+1380–139F",
37897 "description": "Ethiopic Supplement. Extra Syllables for Sebatbeit, and Tonal marks"
37900 "name": "U+2D80–2DDF",
37901 "description": "Ethiopic Extended. Extra Syllables for Me'en, Blin, and Sebatbeit."
37904 "name": "U+AB00–AB2F",
37905 "description": "Ethiopic Extended-A. Extra characters for Gamo-Gofa-Dawro, Basketo, and Gumuz."
37908 "name": "U+1780–17FF",
37909 "description": "Khmer."
37912 "name": "U+1800–18AF",
37913 "description": "Mongolian."
37916 "name": "U+1B80–1BBF",
37917 "description": "Sundanese."
37920 "name": "U+1CC0–1CCF",
37921 "description": "Sundanese Supplement. Punctuation."
37924 "name": "U+4E00–9FD5",
37925 "description": "CJK (Chinese, Japanese, Korean) Unified Ideographs. Most common ideographs for modern Chinese and Japanese."
37928 "name": "U+3400–4DB5",
37929 "description": "CJK Unified Ideographs Extension A. Rare ideographs."
37932 "name": "U+2F00–2FDF",
37933 "description": "Kangxi Radicals."
37936 "name": "U+2E80–2EFF",
37937 "description": "CJK Radicals Supplement. Alternative forms of Kangxi Radicals."
37940 "name": "U+1100–11FF",
37941 "description": "Hangul Jamo."
37944 "name": "U+AC00–D7AF",
37945 "description": "Hangul Syllables."
37948 "name": "U+3040–309F",
37949 "description": "Hiragana."
37952 "name": "U+30A0–30FF",
37953 "description": "Katakana."
37956 "name": "U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F",
37957 "description": "Japanese Kanji, Hiragana and Katakana characters plus Yen/Yuan symbol."
37960 "name": "U+A4D0–A4FF",
37961 "description": "Lisu."
37964 "name": "U+A000–A48F",
37965 "description": "Yi Syllables."
37968 "name": "U+A490–A4CF",
37969 "description": "Yi Radicals."
37972 "name": "U+2000-206F",
37973 "description": "General Punctuation."
37976 "name": "U+3000–303F",
37977 "description": "CJK Symbols and Punctuation."
37980 "name": "U+2070–209F",
37981 "description": "Superscripts and Subscripts."
37984 "name": "U+20A0–20CF",
37985 "description": "Currency Symbols."
37988 "name": "U+2100–214F",
37989 "description": "Letterlike Symbols."
37992 "name": "U+2150–218F",
37993 "description": "Number Forms."
37996 "name": "U+2190–21FF",
37997 "description": "Arrows."
38000 "name": "U+2200–22FF",
38001 "description": "Mathematical Operators."
38004 "name": "U+2300–23FF",
38005 "description": "Miscellaneous Technical."
38008 "name": "U+E000-F8FF",
38009 "description": "Private Use Area."
38012 "name": "U+FB00–FB4F",
38013 "description": "Alphabetic Presentation Forms. Ligatures for latin, Armenian, and Hebrew."
38016 "name": "U+FB50–FDFF",
38017 "description": "Arabic Presentation Forms-A. Contextual forms / ligatures for Persian, Urdu, Sindhi, Central Asian languages, etc, Arabic pedagogical symbols, word ligatures."
38020 "name": "U+1F600–1F64F",
38021 "description": "Emoji: Emoticons."
38024 "name": "U+2600–26FF",
38025 "description": "Emoji: Miscellaneous Symbols."
38028 "name": "U+1F300–1F5FF",
38029 "description": "Emoji: Miscellaneous Symbols and Pictographs."
38032 "name": "U+1F900–1F9FF",
38033 "description": "Emoji: Supplemental Symbols and Pictographs."
38036 "name": "U+1F680–1F6FF",
38037 "description": "Emoji: Transport and Map Symbols."
38040 "syntax": "<unicode-range>#",
38042 "description": "@font-face descriptor. Defines the set of Unicode codepoints that may be supported by the font face for which it is declared.",
38048 "name": "user-select",
38052 "description": "The content of the element must be selected atomically"
38059 "description": "UAs must not allow a selection which is started in this element to be extended outside of this element."
38063 "description": "The UA must not allow selections to be started in this element."
38067 "description": "The element imposes no constraint on the selection."
38070 "status": "nonstandard",
38071 "syntax": "auto | text | none | contain | all",
38075 "name": "MDN Reference",
38076 "url": "https://developer.mozilla.org/docs/Web/CSS/user-select"
38079 "description": "Controls the appearance of selection.",
38085 "name": "vertical-align",
38089 "description": "Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."
38092 "name": "baseline",
38093 "description": "Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."
38097 "description": "Align the after edge of the extended inline box with the after-edge of the line box."
38101 "description": "Align the 'middle' baseline of the inline element with the middle baseline of the parent."
38105 "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.)"
38109 "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.)"
38112 "name": "text-bottom",
38113 "description": "Align the bottom of the box with the after-edge of the parent element's font."
38116 "name": "text-top",
38117 "description": "Align the top of the box with the before-edge of the parent element's font."
38121 "description": "Align the before edge of the extended inline box with the before-edge of the line box."
38124 "name": "-webkit-baseline-middle"
38127 "syntax": "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
38131 "name": "MDN Reference",
38132 "url": "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
38135 "description": "Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",
38142 "name": "visibility",
38145 "name": "collapse",
38146 "description": "Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."
38150 "description": "The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."
38154 "description": "The generated box is visible."
38157 "syntax": "visible | hidden | collapse",
38161 "name": "MDN Reference",
38162 "url": "https://developer.mozilla.org/docs/Web/CSS/visibility"
38165 "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).",
38171 "name": "-webkit-animation",
38178 "name": "alternate",
38179 "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."
38182 "name": "alternate-reverse",
38183 "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."
38186 "name": "backwards",
38187 "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'."
38191 "description": "Both forwards and backwards fill modes are applied."
38194 "name": "forwards",
38195 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
38198 "name": "infinite",
38199 "description": "Causes the animation to repeat forever."
38203 "description": "No animation is performed"
38207 "description": "Normal playback."
38211 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
38215 "description": "Shorthand property combines six of the animation properties into a single property.",
38225 "name": "-webkit-animation-delay",
38231 "description": "Defines when the animation will start.",
38237 "name": "-webkit-animation-direction",
38244 "name": "alternate",
38245 "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."
38248 "name": "alternate-reverse",
38249 "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."
38253 "description": "Normal playback."
38257 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
38261 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
38267 "name": "-webkit-animation-duration",
38273 "description": "Defines the length of time that an animation takes to complete one cycle.",
38279 "name": "-webkit-animation-fill-mode",
38286 "name": "backwards",
38287 "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'."
38291 "description": "Both forwards and backwards fill modes are applied."
38294 "name": "forwards",
38295 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
38299 "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."
38303 "description": "Defines what values are applied by the animation outside the time it is executing.",
38309 "name": "-webkit-animation-iteration-count",
38316 "name": "infinite",
38317 "description": "Causes the animation to repeat forever."
38321 "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.",
38328 "name": "-webkit-animation-name",
38336 "description": "No animation is performed"
38340 "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.",
38347 "name": "-webkit-animation-play-state",
38355 "description": "A running animation will be paused."
38359 "description": "Resume playback of a paused animation."
38363 "description": "Defines whether the animation is running or paused.",
38369 "name": "-webkit-animation-timing-function",
38375 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
38381 "name": "-webkit-appearance",
38391 "name": "button-bevel"
38394 "name": "caps-lock-indicator"
38403 "name": "default-button"
38412 "name": "media-fullscreen-button"
38415 "name": "media-mute-button"
38418 "name": "media-play-button"
38421 "name": "media-seek-back-button"
38424 "name": "media-seek-forward-button"
38427 "name": "media-slider"
38430 "name": "media-sliderthumb"
38436 "name": "menulist-button"
38439 "name": "menulist-text"
38442 "name": "menulist-textfield"
38448 "name": "push-button"
38454 "name": "scrollbarbutton-down"
38457 "name": "scrollbarbutton-left"
38460 "name": "scrollbarbutton-right"
38463 "name": "scrollbarbutton-up"
38466 "name": "scrollbargripper-horizontal"
38469 "name": "scrollbargripper-vertical"
38472 "name": "scrollbarthumb-horizontal"
38475 "name": "scrollbarthumb-vertical"
38478 "name": "scrollbartrack-horizontal"
38481 "name": "scrollbartrack-vertical"
38484 "name": "searchfield"
38487 "name": "searchfield-cancel-button"
38490 "name": "searchfield-decoration"
38493 "name": "searchfield-results-button"
38496 "name": "searchfield-results-decoration"
38499 "name": "slider-horizontal"
38502 "name": "sliderthumb-horizontal"
38505 "name": "sliderthumb-vertical"
38508 "name": "slider-vertical"
38511 "name": "square-button"
38517 "name": "textfield"
38520 "status": "nonstandard",
38521 "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",
38523 "description": "Changes the appearance of buttons and other controls to resemble native controls.",
38529 "name": "-webkit-backdrop-filter",
38536 "description": "No filter effects are applied."
38540 "description": "Applies a Gaussian blur to the input image."
38543 "name": "brightness()",
38544 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
38547 "name": "contrast()",
38548 "description": "Adjusts the contrast of the input."
38551 "name": "drop-shadow()",
38552 "description": "Applies a drop shadow effect to the input image."
38555 "name": "grayscale()",
38556 "description": "Converts the input image to grayscale."
38559 "name": "hue-rotate()",
38560 "description": "Applies a hue rotation on the input image. "
38563 "name": "invert()",
38564 "description": "Inverts the samples in the input image."
38567 "name": "opacity()",
38568 "description": "Applies transparency to the samples in the input image."
38571 "name": "saturate()",
38572 "description": "Saturates the input image."
38576 "description": "Converts the input image to sepia."
38580 "description": "A filter reference to a <filter> element."
38584 "description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image.",
38591 "name": "-webkit-backface-visibility",
38605 "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.",
38611 "name": "-webkit-background-clip",
38617 "description": "Determines the background painting area.",
38623 "name": "-webkit-background-composite",
38642 "name": "-webkit-background-origin",
38648 "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).",
38654 "name": "-webkit-border-image",
38662 "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."
38666 "description": "Causes the middle part of the border-image to be preserved."
38673 "description": "The image is tiled (repeated) to fill the area."
38677 "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."
38681 "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."
38685 "description": "The image is stretched to fill the area."
38692 "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.",
38702 "name": "-webkit-box-align",
38709 "name": "baseline",
38710 "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."
38714 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
38718 "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."
38722 "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."
38726 "description": "The height of each child is adjusted to that of the containing block."
38730 "description": "Specifies the alignment of nested elements within an outer flexible box element.",
38736 "name": "-webkit-box-direction",
38744 "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."
38748 "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."
38752 "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).",
38758 "name": "-webkit-box-flex",
38764 "description": "Specifies an element's flexibility.",
38770 "name": "-webkit-box-flex-group",
38776 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
38782 "name": "-webkit-box-ordinal-group",
38788 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
38794 "name": "-webkit-box-orient",
38801 "name": "block-axis",
38802 "description": "Elements are oriented along the box's axis."
38805 "name": "horizontal",
38806 "description": "The box displays its children from left to right in a horizontal line."
38809 "name": "inline-axis",
38810 "description": "Elements are oriented vertically."
38813 "name": "vertical",
38814 "description": "The box displays its children from stacked from top to bottom vertically."
38818 "description": "In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",
38824 "name": "-webkit-box-pack",
38832 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
38836 "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."
38840 "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."
38844 "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."
38848 "description": "Specifies alignment of child elements within the current element in the direction of orientation.",
38854 "name": "-webkit-box-reflect",
38864 "description": "The reflection appears above the border box."
38868 "description": "The reflection appears below the border box."
38872 "description": "The reflection appears to the left of the border box."
38876 "description": "The reflection appears to the right of the border box."
38879 "status": "nonstandard",
38880 "syntax": "[ above | below | right | left ]? <length>? <image>?",
38884 "name": "MDN Reference",
38885 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
38888 "description": "Defines a reflection of a border box."
38891 "name": "-webkit-box-sizing",
38898 "name": "border-box",
38899 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
38902 "name": "content-box",
38903 "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."
38907 "description": "Box Model addition in CSS3.",
38913 "name": "-webkit-break-after",
38920 "description": "Always force a page break before/after the generated box."
38924 "description": "Neither force nor forbid a page/column break before/after the generated box."
38928 "description": "Avoid a page/column break before/after the generated box."
38931 "name": "avoid-column",
38932 "description": "Avoid a column break before/after the generated box."
38935 "name": "avoid-page",
38936 "description": "Avoid a page break before/after the generated box."
38939 "name": "avoid-region"
38943 "description": "Always force a column break before/after the generated box."
38947 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
38951 "description": "Always force a page break before/after the generated box."
38958 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
38962 "description": "Describes the page/column break behavior before the generated box.",
38968 "name": "-webkit-break-before",
38975 "description": "Always force a page break before/after the generated box."
38979 "description": "Neither force nor forbid a page/column break before/after the generated box."
38983 "description": "Avoid a page/column break before/after the generated box."
38986 "name": "avoid-column",
38987 "description": "Avoid a column break before/after the generated box."
38990 "name": "avoid-page",
38991 "description": "Avoid a page break before/after the generated box."
38994 "name": "avoid-region"
38998 "description": "Always force a column break before/after the generated box."
39002 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
39006 "description": "Always force a page break before/after the generated box."
39013 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
39017 "description": "Describes the page/column break behavior before the generated box.",
39023 "name": "-webkit-break-inside",
39030 "description": "Neither force nor forbid a page/column break inside the generated box."
39034 "description": "Avoid a page/column break inside the generated box."
39037 "name": "avoid-column",
39038 "description": "Avoid a column break inside the generated box."
39041 "name": "avoid-page",
39042 "description": "Avoid a page break inside the generated box."
39045 "name": "avoid-region"
39049 "description": "Describes the page/column break behavior inside the generated box.",
39055 "name": "-webkit-column-break-after",
39063 "description": "Always force a page break before/after the generated box."
39067 "description": "Neither force nor forbid a page/column break before/after the generated box."
39071 "description": "Avoid a page/column break before/after the generated box."
39074 "name": "avoid-column",
39075 "description": "Avoid a column break before/after the generated box."
39078 "name": "avoid-page",
39079 "description": "Avoid a page break before/after the generated box."
39082 "name": "avoid-region"
39086 "description": "Always force a column break before/after the generated box."
39090 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
39094 "description": "Always force a page break before/after the generated box."
39101 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
39105 "description": "Describes the page/column break behavior before the generated box.",
39111 "name": "-webkit-column-break-before",
39119 "description": "Always force a page break before/after the generated box."
39123 "description": "Neither force nor forbid a page/column break before/after the generated box."
39127 "description": "Avoid a page/column break before/after the generated box."
39130 "name": "avoid-column",
39131 "description": "Avoid a column break before/after the generated box."
39134 "name": "avoid-page",
39135 "description": "Avoid a page break before/after the generated box."
39138 "name": "avoid-region"
39142 "description": "Always force a column break before/after the generated box."
39146 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
39150 "description": "Always force a page break before/after the generated box."
39157 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
39161 "description": "Describes the page/column break behavior before the generated box.",
39167 "name": "-webkit-column-break-inside",
39175 "description": "Neither force nor forbid a page/column break inside the generated box."
39179 "description": "Avoid a page/column break inside the generated box."
39182 "name": "avoid-column",
39183 "description": "Avoid a column break inside the generated box."
39186 "name": "avoid-page",
39187 "description": "Avoid a page break inside the generated box."
39190 "name": "avoid-region"
39194 "description": "Describes the page/column break behavior inside the generated box.",
39200 "name": "-webkit-column-count",
39208 "description": "Determines the number of columns by the 'column-width' property and the element width."
39212 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
39218 "name": "-webkit-column-gap",
39226 "description": "User agent specific and typically equivalent to 1em."
39230 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
39236 "name": "-webkit-column-rule",
39242 "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.",
39251 "name": "-webkit-column-rule-color",
39257 "description": "Sets the color of the column rule",
39263 "name": "-webkit-column-rule-style",
39269 "description": "Sets the style of the rule between columns of an element.",
39275 "name": "-webkit-column-rule-width",
39281 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
39288 "name": "-webkit-columns",
39296 "description": "The width depends on the values of other properties."
39300 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
39307 "name": "-webkit-column-span",
39315 "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."
39319 "description": "The element does not span multiple columns."
39323 "description": "Describes the page/column break behavior after the generated box.",
39329 "name": "-webkit-column-width",
39337 "description": "The width depends on the values of other properties."
39341 "description": "This property describes the width of columns in multicol elements.",
39347 "name": "-webkit-filter",
39356 "description": "No filter effects are applied."
39360 "description": "Applies a Gaussian blur to the input image."
39363 "name": "brightness()",
39364 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
39367 "name": "contrast()",
39368 "description": "Adjusts the contrast of the input."
39371 "name": "drop-shadow()",
39372 "description": "Applies a drop shadow effect to the input image."
39375 "name": "grayscale()",
39376 "description": "Converts the input image to grayscale."
39379 "name": "hue-rotate()",
39380 "description": "Applies a hue rotation on the input image. "
39383 "name": "invert()",
39384 "description": "Inverts the samples in the input image."
39387 "name": "opacity()",
39388 "description": "Applies transparency to the samples in the input image."
39391 "name": "saturate()",
39392 "description": "Saturates the input image."
39396 "description": "Converts the input image to sepia."
39400 "description": "A filter reference to a <filter> element."
39404 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
39411 "name": "-webkit-flow-from",
39418 "description": "The block container is not a CSS Region."
39422 "description": "Makes a block container a region and associates it with a named flow.",
39428 "name": "-webkit-flow-into",
39435 "description": "The element is not moved to a named flow and normal CSS processing takes place."
39439 "description": "Places an element or its contents into a named flow.",
39445 "name": "-webkit-font-feature-settings",
39479 "description": "No change in glyph substitution or positioning occurs."
39489 "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.",
39496 "name": "-webkit-hyphens",
39503 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
39507 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
39511 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
39515 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
39521 "name": "-webkit-line-break",
39528 "name": "after-white-space"
39535 "description": "Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text."
39538 "name": "-webkit-margin-bottom-collapse",
39560 "name": "-webkit-margin-collapse",
39582 "name": "-webkit-margin-start",
39599 "name": "-webkit-margin-top-collapse",
39621 "name": "-webkit-mask-clip",
39627 "status": "nonstandard",
39628 "syntax": "[ <box> | border | padding | content | text ]#",
39630 "description": "Determines the mask painting area, which determines the area that is affected by the mask.",
39636 "name": "-webkit-mask-image",
39645 "description": "Counts as a transparent black image layer."
39649 "description": "Reference to a <mask element or to a CSS image."
39652 "status": "nonstandard",
39653 "syntax": "<mask-reference>#",
39655 "description": "Sets the mask layer image of an element.",
39663 "name": "-webkit-mask-origin",
39669 "status": "nonstandard",
39670 "syntax": "[ <box> | border | padding | content ]#",
39672 "description": "Specifies the mask positioning area.",
39678 "name": "-webkit-mask-repeat",
39684 "status": "nonstandard",
39685 "syntax": "<repeat-style>#",
39687 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
39693 "name": "-webkit-mask-size",
39702 "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%."
39706 "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."
39710 "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."
39713 "status": "nonstandard",
39714 "syntax": "<bg-size>#",
39716 "description": "Specifies the size of the mask layer images.",
39724 "name": "-webkit-nbsp-mode",
39738 "description": "Defines the behavior of nonbreaking spaces within text."
39741 "name": "-webkit-overflow-scrolling",
39754 "status": "nonstandard",
39755 "syntax": "auto | touch",
39759 "name": "MDN Reference",
39760 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
39763 "description": "Specifies whether to use native-style scrolling in an overflow:scroll element."
39766 "name": "-webkit-padding-start",
39778 "name": "-webkit-perspective",
39786 "description": "No perspective transform is applied."
39790 "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.",
39796 "name": "-webkit-perspective-origin",
39802 "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.",
39810 "name": "-webkit-region-fragment",
39817 "description": "Content flows as it would in a regular content box."
39821 "description": "If the content fits within the CSS Region, then this property has no effect."
39825 "description": "The 'region-fragment' property controls the behavior of the last region associated with a named flow.",
39831 "name": "-webkit-tap-highlight-color",
39837 "status": "nonstandard",
39838 "syntax": "<color>",
39842 "name": "MDN Reference",
39843 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
39851 "name": "-webkit-text-fill-color",
39859 "status": "nonstandard",
39860 "syntax": "<color>",
39864 "name": "MDN Reference",
39865 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
39873 "name": "-webkit-text-size-adjust",
39882 "description": "Renderers must use the default size adjustment when displaying on a small device."
39886 "description": "Renderers must not do size adjustment when displaying on a small device."
39890 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
39896 "name": "-webkit-text-stroke",
39904 "status": "nonstandard",
39905 "syntax": "<length> || <color>",
39909 "name": "MDN Reference",
39910 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
39921 "name": "-webkit-text-stroke-color",
39929 "status": "nonstandard",
39930 "syntax": "<color>",
39934 "name": "MDN Reference",
39935 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
39943 "name": "-webkit-text-stroke-width",
39951 "status": "nonstandard",
39952 "syntax": "<length>",
39956 "name": "MDN Reference",
39957 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
39967 "name": "-webkit-touch-callout",
39976 "status": "nonstandard",
39977 "syntax": "default | none",
39981 "name": "MDN Reference",
39982 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
39990 "name": "-webkit-transform",
39998 "name": "matrix()",
39999 "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]"
40002 "name": "matrix3d()",
40003 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
40009 "name": "perspective()",
40010 "description": "Specifies a perspective projection matrix."
40013 "name": "rotate()",
40014 "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."
40017 "name": "rotate3d()",
40018 "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."
40021 "name": "rotateX('angle')",
40022 "description": "Specifies a clockwise rotation by the given angle about the X axis."
40025 "name": "rotateY('angle')",
40026 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
40029 "name": "rotateZ('angle')",
40030 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
40034 "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."
40037 "name": "scale3d()",
40038 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
40041 "name": "scaleX()",
40042 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
40045 "name": "scaleY()",
40046 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
40049 "name": "scaleZ()",
40050 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
40054 "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)."
40058 "description": "Specifies a skew transformation along the X axis by the given angle."
40062 "description": "Specifies a skew transformation along the Y axis by the given angle."
40065 "name": "translate()",
40066 "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."
40069 "name": "translate3d()",
40070 "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."
40073 "name": "translateX()",
40074 "description": "Specifies a translation by the given amount in the X direction."
40077 "name": "translateY()",
40078 "description": "Specifies a translation by the given amount in the Y direction."
40081 "name": "translateZ()",
40082 "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."
40086 "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.",
40092 "name": "-webkit-transform-origin",
40099 "description": "Establishes the origin of transformation for an element.",
40107 "name": "-webkit-transform-origin-x",
40113 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
40120 "name": "-webkit-transform-origin-y",
40126 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
40133 "name": "-webkit-transform-origin-z",
40139 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
40146 "name": "-webkit-transform-style",
40154 "description": "All children of this element are rendered flattened into the 2D plane of the element."
40158 "description": "Defines how nested elements are rendered in 3D space.",
40164 "name": "-webkit-transition",
40173 "description": "Every property that is able to undergo a transition will do so."
40177 "description": "No property will transition."
40181 "description": "Shorthand property combines four of the transition properties into a single property.",
40190 "name": "-webkit-transition-delay",
40197 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
40203 "name": "-webkit-transition-duration",
40210 "description": "Specifies how long the transition from the old value to the new value should take.",
40216 "name": "-webkit-transition-property",
40225 "description": "Every property that is able to undergo a transition will do so."
40229 "description": "No property will transition."
40233 "description": "Specifies the name of the CSS property to which the transition is applied.",
40239 "name": "-webkit-transition-timing-function",
40246 "description": "Describes how the intermediate values used during a transition will be calculated.",
40252 "name": "-webkit-user-drag",
40273 "name": "-webkit-user-modify",
40280 "name": "read-only"
40283 "name": "read-write"
40286 "name": "read-write-plaintext-only"
40289 "status": "nonstandard",
40290 "syntax": "read-only | read-write | read-write-plaintext-only",
40292 "description": "Determines whether a user can edit the content of an element.",
40298 "name": "-webkit-user-select",
40315 "description": "Controls the appearance of selection.",
40321 "name": "white-space",
40325 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'normal'."
40329 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'none'."
40333 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'none'."
40336 "name": "pre-line",
40337 "description": "Sets 'white-space-collapsing' to 'preserve-breaks' and 'text-wrap' to 'normal'."
40340 "name": "pre-wrap",
40341 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'normal'."
40344 "syntax": "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
40348 "name": "MDN Reference",
40349 "url": "https://developer.mozilla.org/docs/Web/CSS/white-space"
40352 "description": "Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.",
40366 "syntax": "<integer>",
40370 "name": "MDN Reference",
40371 "url": "https://developer.mozilla.org/docs/Web/CSS/widows"
40374 "description": "Specifies the minimum number of line boxes of a block container that must be left in a fragment after a break.",
40384 "description": "The width depends on the values of other properties."
40387 "name": "fit-content",
40388 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
40391 "name": "max-content",
40392 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
40395 "name": "min-content",
40396 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
40399 "syntax": "<viewport-length>{1,2}",
40403 "name": "MDN Reference",
40404 "url": "https://developer.mozilla.org/docs/Web/CSS/width"
40407 "description": "Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
40414 "name": "will-change",
40425 "description": "Expresses no particular intent."
40428 "name": "contents",
40429 "description": "Indicates that the author expects to animate or change something about the element’s contents in the near future."
40432 "name": "scroll-position",
40433 "description": "Indicates that the author expects to animate or change the scroll position of the element in the near future."
40436 "syntax": "auto | <animateable-feature>#",
40440 "name": "MDN Reference",
40441 "url": "https://developer.mozilla.org/docs/Web/CSS/will-change"
40444 "description": "Provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element.",
40451 "name": "word-break",
40454 "name": "break-all",
40455 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
40458 "name": "keep-all",
40459 "description": "Block characters can no longer create implied break points."
40463 "description": "Breaks non-CJK scripts according to their own rules."
40466 "syntax": "normal | break-all | keep-all | break-word",
40470 "name": "MDN Reference",
40471 "url": "https://developer.mozilla.org/docs/Web/CSS/word-break"
40474 "description": "Specifies line break opportunities for non-CJK scripts.",
40480 "name": "word-spacing",
40484 "description": "No additional spacing is applied. Computes to zero."
40487 "syntax": "normal | <length-percentage>",
40491 "name": "MDN Reference",
40492 "url": "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
40495 "description": "Specifies additional spacing between “words”.",
40502 "name": "word-wrap",
40505 "name": "break-word",
40506 "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."
40510 "description": "Lines may break only at allowed break points."
40513 "syntax": "normal | break-word",
40517 "name": "MDN Reference",
40518 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
40521 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
40527 "name": "writing-mode",
40530 "name": "horizontal-tb",
40531 "description": "Top-to-bottom block flow direction. The writing mode is horizontal."
40534 "name": "sideways-lr",
40535 "description": "Left-to-right block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
40538 "name": "sideways-rl",
40539 "description": "Right-to-left block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
40542 "name": "vertical-lr",
40543 "description": "Left-to-right block flow direction. The writing mode is vertical."
40546 "name": "vertical-rl",
40547 "description": "Right-to-left block flow direction. The writing mode is vertical."
40550 "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
40554 "name": "MDN Reference",
40555 "url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
40558 "description": "This is a shorthand property for both 'direction' and 'block-progression'.",
40568 "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."
40571 "syntax": "auto | <integer>",
40575 "name": "MDN Reference",
40576 "url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
40579 "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.",
40598 "syntax": "auto | <number> | <percentage>",
40602 "name": "MDN Reference",
40603 "url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
40606 "description": "Non-standard. Specifies the magnification scale of the object. See 'transform: scale()' for a standards-based alternative.",
40615 "name": "-ms-ime-align",
40616 "status": "nonstandard",
40617 "syntax": "auto | after",
40619 "description": "Aligns the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active."
40622 "name": "-moz-binding",
40623 "status": "nonstandard",
40624 "syntax": "<url> | none",
40631 "name": "MDN Reference",
40632 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
40635 "description": "The -moz-binding CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element."
40638 "name": "-moz-context-properties",
40639 "status": "nonstandard",
40640 "syntax": "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
40647 "name": "MDN Reference",
40648 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
40651 "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."
40654 "name": "-moz-float-edge",
40655 "status": "nonstandard",
40656 "syntax": "border-box | content-box | margin-box | padding-box",
40663 "name": "MDN Reference",
40664 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
40667 "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."
40670 "name": "-moz-force-broken-image-icon",
40671 "status": "nonstandard",
40672 "syntax": "<integer>",
40679 "name": "MDN Reference",
40680 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
40683 "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."
40686 "name": "-moz-image-region",
40687 "status": "nonstandard",
40688 "syntax": "<shape> | auto",
40695 "name": "MDN Reference",
40696 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
40699 "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."
40702 "name": "-moz-orient",
40703 "status": "nonstandard",
40704 "syntax": "inline | block | horizontal | vertical",
40711 "name": "MDN Reference",
40712 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
40715 "description": "The -moz-orient CSS property specifies the orientation of the element to which it's applied."
40718 "name": "-moz-outline-radius",
40719 "status": "nonstandard",
40720 "syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
40727 "name": "MDN Reference",
40728 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
40731 "description": "In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."
40734 "name": "-moz-outline-radius-bottomleft",
40735 "status": "nonstandard",
40736 "syntax": "<outline-radius>",
40743 "name": "MDN Reference",
40744 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
40747 "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."
40750 "name": "-moz-outline-radius-bottomright",
40751 "status": "nonstandard",
40752 "syntax": "<outline-radius>",
40759 "name": "MDN Reference",
40760 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
40763 "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."
40766 "name": "-moz-outline-radius-topleft",
40767 "status": "nonstandard",
40768 "syntax": "<outline-radius>",
40775 "name": "MDN Reference",
40776 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
40779 "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."
40782 "name": "-moz-outline-radius-topright",
40783 "status": "nonstandard",
40784 "syntax": "<outline-radius>",
40791 "name": "MDN Reference",
40792 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
40795 "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."
40798 "name": "-moz-stack-sizing",
40799 "status": "nonstandard",
40800 "syntax": "ignore | stretch-to-fit",
40802 "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."
40805 "name": "-moz-text-blink",
40806 "status": "nonstandard",
40807 "syntax": "none | blink",
40809 "description": "The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."
40812 "name": "-moz-user-input",
40813 "status": "nonstandard",
40814 "syntax": "auto | none | enabled | disabled",
40821 "name": "MDN Reference",
40822 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
40825 "description": "In Mozilla applications, -moz-user-input determines if an element will accept user input."
40828 "name": "-moz-user-modify",
40829 "status": "nonstandard",
40830 "syntax": "read-only | read-write | write-only",
40832 "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."
40835 "name": "-moz-window-dragging",
40836 "status": "nonstandard",
40837 "syntax": "drag | no-drag",
40839 "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."
40842 "name": "-moz-window-shadow",
40843 "status": "nonstandard",
40844 "syntax": "default | menu | tooltip | sheet | none",
40846 "description": "The -moz-window-shadow CSS property specifies whether a window will have a shadow. It only works on Mac OS X."
40849 "name": "-webkit-border-before",
40850 "status": "nonstandard",
40851 "syntax": "<'border-width'> || <'border-style'> || <'color'>",
40861 "name": "MDN Reference",
40862 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
40865 "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."
40868 "name": "-webkit-border-before-color",
40869 "status": "nonstandard",
40870 "syntax": "<'color'>",
40872 "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."
40875 "name": "-webkit-border-before-style",
40876 "status": "nonstandard",
40877 "syntax": "<'border-style'>",
40879 "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."
40882 "name": "-webkit-border-before-width",
40883 "status": "nonstandard",
40884 "syntax": "<'border-width'>",
40886 "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."
40889 "name": "-webkit-line-clamp",
40890 "syntax": "none | <integer>",
40901 "name": "MDN Reference",
40902 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
40905 "description": "The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines."
40908 "name": "-webkit-mask",
40909 "status": "nonstandard",
40910 "syntax": "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
40912 "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."
40915 "name": "-webkit-mask-attachment",
40916 "status": "nonstandard",
40917 "syntax": "<attachment>#",
40925 "name": "MDN Reference",
40926 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
40929 "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."
40932 "name": "-webkit-mask-composite",
40933 "status": "nonstandard",
40934 "syntax": "<composite-style>#",
40945 "name": "MDN Reference",
40946 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
40949 "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."
40952 "name": "-webkit-mask-position",
40953 "status": "nonstandard",
40954 "syntax": "<position>#",
40956 "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."
40959 "name": "-webkit-mask-position-x",
40960 "status": "nonstandard",
40961 "syntax": "[ <length-percentage> | left | center | right ]#",
40972 "name": "MDN Reference",
40973 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
40976 "description": "The -webkit-mask-position-x CSS property sets the initial horizontal position of a mask image."
40979 "name": "-webkit-mask-position-y",
40980 "status": "nonstandard",
40981 "syntax": "[ <length-percentage> | top | center | bottom ]#",
40992 "name": "MDN Reference",
40993 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
40996 "description": "The -webkit-mask-position-y CSS property sets the initial vertical position of a mask image."
40999 "name": "-webkit-mask-repeat-x",
41000 "status": "nonstandard",
41001 "syntax": "repeat | no-repeat | space | round",
41011 "name": "MDN Reference",
41012 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
41015 "description": "The -webkit-mask-repeat-x property specifies whether and how a mask image is repeated (tiled) horizontally."
41018 "name": "-webkit-mask-repeat-y",
41019 "status": "nonstandard",
41020 "syntax": "repeat | no-repeat | space | round",
41030 "name": "MDN Reference",
41031 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
41034 "description": "The -webkit-mask-repeat-y property specifies whether and how a mask image is repeated (tiled) vertically."
41037 "name": "appearance",
41038 "status": "experimental",
41039 "syntax": "none | auto | button | textfield | menulist-button | <compat-auto>",
41050 "name": "MDN Reference",
41051 "url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
41054 "description": "Changes the appearance of buttons and other controls to resemble native controls."
41057 "name": "aspect-ratio",
41058 "status": "experimental",
41059 "syntax": "auto | <ratio>",
41068 "name": "MDN Reference",
41069 "url": "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
41072 "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."
41076 "status": "obsolete",
41077 "syntax": "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
41081 "name": "MDN Reference",
41082 "url": "https://developer.mozilla.org/docs/Web/CSS/azimuth"
41085 "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."
41088 "name": "backdrop-filter",
41089 "syntax": "none | <filter-function-list>",
41100 "name": "MDN Reference",
41101 "url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
41104 "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."
41107 "name": "border-block",
41108 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
41118 "name": "MDN Reference",
41119 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block"
41122 "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."
41125 "name": "border-block-color",
41126 "syntax": "<'border-top-color'>{1,2}",
41136 "name": "MDN Reference",
41137 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
41140 "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."
41143 "name": "border-block-style",
41144 "syntax": "<'border-top-style'>",
41154 "name": "MDN Reference",
41155 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
41158 "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."
41161 "name": "border-block-width",
41162 "syntax": "<'border-top-width'>",
41172 "name": "MDN Reference",
41173 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
41176 "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."
41179 "name": "border-end-end-radius",
41180 "syntax": "<length-percentage>{1,2}",
41187 "name": "MDN Reference",
41188 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
41191 "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."
41194 "name": "border-end-start-radius",
41195 "syntax": "<length-percentage>{1,2}",
41202 "name": "MDN Reference",
41203 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
41206 "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."
41209 "name": "border-inline",
41210 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
41220 "name": "MDN Reference",
41221 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline"
41224 "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."
41227 "name": "border-inline-color",
41228 "syntax": "<'border-top-color'>{1,2}",
41238 "name": "MDN Reference",
41239 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
41242 "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."
41245 "name": "border-inline-style",
41246 "syntax": "<'border-top-style'>",
41256 "name": "MDN Reference",
41257 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
41260 "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."
41263 "name": "border-inline-width",
41264 "syntax": "<'border-top-width'>",
41274 "name": "MDN Reference",
41275 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
41278 "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."
41281 "name": "border-start-end-radius",
41282 "syntax": "<length-percentage>{1,2}",
41289 "name": "MDN Reference",
41290 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
41293 "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."
41296 "name": "border-start-start-radius",
41297 "syntax": "<length-percentage>{1,2}",
41304 "name": "MDN Reference",
41305 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
41308 "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."
41311 "name": "box-align",
41312 "status": "nonstandard",
41313 "syntax": "start | center | end | baseline | stretch",
41324 "name": "MDN Reference",
41325 "url": "https://developer.mozilla.org/docs/Web/CSS/box-align"
41328 "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."
41331 "name": "box-direction",
41332 "status": "nonstandard",
41333 "syntax": "normal | reverse | inherit",
41344 "name": "MDN Reference",
41345 "url": "https://developer.mozilla.org/docs/Web/CSS/box-direction"
41348 "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)."
41351 "name": "box-flex",
41352 "status": "nonstandard",
41353 "syntax": "<number>",
41364 "name": "MDN Reference",
41365 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex"
41368 "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."
41371 "name": "box-flex-group",
41372 "status": "nonstandard",
41373 "syntax": "<integer>",
41382 "name": "MDN Reference",
41383 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
41386 "description": "The box-flex-group CSS property assigns the flexbox's child elements to a flex group."
41389 "name": "box-lines",
41390 "status": "nonstandard",
41391 "syntax": "single | multiple",
41400 "name": "MDN Reference",
41401 "url": "https://developer.mozilla.org/docs/Web/CSS/box-lines"
41404 "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)."
41407 "name": "box-ordinal-group",
41408 "status": "nonstandard",
41409 "syntax": "<integer>",
41420 "name": "MDN Reference",
41421 "url": "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
41424 "description": "The box-ordinal-group CSS property assigns the flexbox's child elements to an ordinal group."
41427 "name": "box-orient",
41428 "status": "nonstandard",
41429 "syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
41440 "name": "MDN Reference",
41441 "url": "https://developer.mozilla.org/docs/Web/CSS/box-orient"
41444 "description": "The box-orient CSS property specifies whether an element lays out its contents horizontally or vertically."
41447 "name": "box-pack",
41448 "status": "nonstandard",
41449 "syntax": "start | center | end | justify",
41460 "name": "MDN Reference",
41461 "url": "https://developer.mozilla.org/docs/Web/CSS/box-pack"
41464 "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."
41467 "name": "color-adjust",
41468 "syntax": "economy | exact",
41479 "name": "MDN Reference",
41480 "url": "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
41483 "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."
41486 "name": "counter-set",
41487 "syntax": "[ <custom-ident> <integer>? ]+ | none",
41494 "name": "MDN Reference",
41495 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-set"
41498 "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."
41501 "name": "font-optical-sizing",
41502 "syntax": "auto | none",
41513 "name": "MDN Reference",
41514 "url": "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
41517 "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."
41520 "name": "font-variation-settings",
41521 "syntax": "normal | [ <string> <number> ]#",
41532 "name": "MDN Reference",
41533 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
41536 "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."
41539 "name": "font-smooth",
41540 "status": "nonstandard",
41541 "syntax": "auto | never | always | <absolute-size> | <length>",
41552 "name": "MDN Reference",
41553 "url": "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
41560 "syntax": "<'row-gap'> <'column-gap'>?",
41569 "description": "The gap CSS property is a shorthand property for row-gap and column-gap specifying the gutters between grid rows and columns."
41572 "name": "hanging-punctuation",
41573 "syntax": "none | [ first || [ force-end | allow-end ] || last ]",
41580 "name": "MDN Reference",
41581 "url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
41584 "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."
41587 "name": "image-resolution",
41588 "status": "experimental",
41589 "syntax": "[ from-image || <resolution> ] && snap?",
41591 "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."
41594 "name": "initial-letter",
41595 "status": "experimental",
41596 "syntax": "normal | [ <number> <integer>? ]",
41603 "name": "MDN Reference",
41604 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
41607 "description": "The initial-letter CSS property specifies styling for dropped, raised, and sunken initial letters."
41610 "name": "initial-letter-align",
41611 "status": "experimental",
41612 "syntax": "[ auto | alphabetic | hanging | ideographic ]",
41616 "name": "MDN Reference",
41617 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
41620 "description": "The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph."
41624 "syntax": "<'top'>{1,4}",
41631 "name": "MDN Reference",
41632 "url": "https://developer.mozilla.org/docs/Web/CSS/inset"
41635 "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."
41638 "name": "inset-block",
41639 "syntax": "<'top'>{1,2}",
41649 "name": "MDN Reference",
41650 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block"
41653 "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."
41656 "name": "inset-block-end",
41657 "syntax": "<'top'>",
41667 "name": "MDN Reference",
41668 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
41671 "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."
41674 "name": "inset-block-start",
41675 "syntax": "<'top'>",
41685 "name": "MDN Reference",
41686 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
41689 "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."
41692 "name": "inset-inline",
41693 "syntax": "<'top'>{1,2}",
41703 "name": "MDN Reference",
41704 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
41707 "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."
41710 "name": "inset-inline-end",
41711 "syntax": "<'top'>",
41721 "name": "MDN Reference",
41722 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
41725 "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."
41728 "name": "inset-inline-start",
41729 "syntax": "<'top'>",
41739 "name": "MDN Reference",
41740 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
41743 "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."
41746 "name": "line-clamp",
41747 "status": "experimental",
41748 "syntax": "none | <integer>",
41750 "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."
41753 "name": "line-height-step",
41754 "status": "experimental",
41755 "syntax": "<length>",
41764 "name": "MDN Reference",
41765 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
41768 "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."
41771 "name": "margin-block",
41772 "syntax": "<'margin-left'>{1,2}",
41782 "name": "MDN Reference",
41783 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block"
41786 "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."
41789 "name": "margin-inline",
41790 "syntax": "<'margin-left'>{1,2}",
41800 "name": "MDN Reference",
41801 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
41804 "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."
41807 "name": "margin-trim",
41808 "status": "experimental",
41809 "syntax": "none | in-flow | all",
41813 "name": "MDN Reference",
41814 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
41817 "description": "The margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges."
41821 "syntax": "<mask-layer>#",
41832 "name": "MDN Reference",
41833 "url": "https://developer.mozilla.org/docs/Web/CSS/mask"
41836 "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."
41839 "name": "mask-border",
41840 "syntax": "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
41842 "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."
41845 "name": "mask-border-mode",
41846 "syntax": "luminance | alpha",
41848 "description": "The mask-border-mode CSS property specifies the blending mode used in a mask border."
41851 "name": "mask-border-outset",
41852 "syntax": "[ <length> | <number> ]{1,4}",
41854 "description": "The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."
41857 "name": "mask-border-repeat",
41858 "syntax": "[ stretch | repeat | round | space ]{1,2}",
41860 "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."
41863 "name": "mask-border-slice",
41864 "syntax": "<number-percentage>{1,4} fill?",
41866 "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."
41869 "name": "mask-border-source",
41870 "syntax": "none | <image>",
41872 "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."
41875 "name": "mask-border-width",
41876 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
41878 "description": "The mask-border-width CSS property specifies the width of an element's mask border."
41881 "name": "mask-clip",
41882 "syntax": "[ <geometry-box> | no-clip ]#",
41893 "name": "MDN Reference",
41894 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
41897 "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."
41900 "name": "mask-composite",
41901 "syntax": "<compositing-operator>#",
41909 "name": "MDN Reference",
41910 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
41913 "description": "The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."
41916 "name": "max-lines",
41917 "status": "experimental",
41918 "syntax": "none | <integer>",
41920 "description": "The max-liens property forces a break after a set number of lines"
41924 "syntax": "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
41934 "name": "MDN Reference",
41935 "url": "https://developer.mozilla.org/docs/Web/CSS/offset"
41938 "description": "The offset CSS property is a shorthand property for animating an element along a defined path."
41941 "name": "offset-anchor",
41942 "syntax": "auto | <position>",
41951 "name": "MDN Reference",
41952 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
41955 "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."
41958 "name": "offset-distance",
41959 "syntax": "<length-percentage>",
41969 "name": "MDN Reference",
41970 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
41973 "description": "The offset-distance CSS property specifies a position along an offset-path."
41976 "name": "offset-path",
41977 "syntax": "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
41987 "name": "MDN Reference",
41988 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
41991 "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."
41994 "name": "offset-position",
41995 "status": "experimental",
41996 "syntax": "auto | <position>",
42000 "name": "MDN Reference",
42001 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-position"
42004 "description": "Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."
42007 "name": "offset-rotate",
42008 "syntax": "[ auto | reverse ] || <angle>",
42018 "name": "MDN Reference",
42019 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
42022 "description": "The offset-rotate CSS property defines the direction of the element while positioning along the offset path."
42025 "name": "overflow-anchor",
42026 "syntax": "auto | none",
42036 "name": "MDN Reference",
42037 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"
42040 "description": "The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."
42043 "name": "overflow-block",
42044 "syntax": "visible | hidden | clip | scroll | auto",
42051 "name": "MDN Reference",
42052 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-block"
42055 "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."
42058 "name": "overflow-clip-box",
42059 "status": "nonstandard",
42060 "syntax": "padding-box | content-box",
42067 "name": "MDN Reference",
42068 "url": "https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box"
42071 "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."
42074 "name": "overflow-inline",
42075 "syntax": "visible | hidden | clip | scroll | auto",
42082 "name": "MDN Reference",
42083 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-inline"
42086 "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."
42089 "name": "overscroll-behavior",
42090 "syntax": "[ contain | none | auto ]{1,2}",
42100 "name": "MDN Reference",
42101 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
42104 "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."
42107 "name": "overscroll-behavior-block",
42108 "syntax": "contain | none | auto",
42118 "name": "MDN Reference",
42119 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
42122 "description": "The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached."
42125 "name": "overscroll-behavior-inline",
42126 "syntax": "contain | none | auto",
42136 "name": "MDN Reference",
42137 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
42140 "description": "The overscroll-behavior-inline CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached."
42143 "name": "overscroll-behavior-x",
42144 "syntax": "contain | none | auto",
42154 "name": "MDN Reference",
42155 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
42158 "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."
42161 "name": "overscroll-behavior-y",
42162 "syntax": "contain | none | auto",
42172 "name": "MDN Reference",
42173 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
42176 "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."
42179 "name": "padding-block",
42180 "syntax": "<'padding-left'>{1,2}",
42190 "name": "MDN Reference",
42191 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block"
42194 "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."
42197 "name": "padding-inline",
42198 "syntax": "<'padding-left'>{1,2}",
42208 "name": "MDN Reference",
42209 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
42212 "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."
42215 "name": "place-content",
42216 "syntax": "<'align-content'> <'justify-content'>?",
42225 "description": "The place-content CSS shorthand property sets both the align-content and justify-content properties."
42228 "name": "place-items",
42229 "syntax": "<'align-items'> <'justify-items'>?",
42238 "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."
42241 "name": "place-self",
42242 "syntax": "<'align-self'> <'justify-self'>?",
42250 "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."
42254 "syntax": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
42261 "name": "MDN Reference",
42262 "url": "https://developer.mozilla.org/docs/Web/CSS/rotate"
42265 "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."
42269 "syntax": "normal | <length-percentage>",
42278 "description": "The row-gap CSS property specifies the gutter between grid rows."
42281 "name": "ruby-merge",
42282 "status": "experimental",
42283 "syntax": "separate | collapse | auto",
42285 "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."
42289 "syntax": "none | <number>{1,3}",
42296 "name": "MDN Reference",
42297 "url": "https://developer.mozilla.org/docs/Web/CSS/scale"
42300 "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."
42303 "name": "scrollbar-color",
42304 "syntax": "auto | dark | light | <color>{2}",
42311 "name": "MDN Reference",
42312 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
42315 "description": "The scrollbar-color CSS property sets the color of the scrollbar track and thumb."
42318 "name": "scrollbar-width",
42319 "syntax": "auto | thin | none",
42326 "name": "MDN Reference",
42327 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
42330 "description": "The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. "
42333 "name": "scroll-margin",
42334 "syntax": "<length>{1,4}",
42345 "name": "MDN Reference",
42346 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
42349 "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."
42352 "name": "scroll-margin-block",
42353 "syntax": "<length>{1,2}",
42363 "name": "MDN Reference",
42364 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
42367 "description": "The scroll-margin-block property is a shorthand property which sets the scroll-margin longhands in the block dimension."
42370 "name": "scroll-margin-block-start",
42371 "syntax": "<length>",
42381 "name": "MDN Reference",
42382 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
42385 "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."
42388 "name": "scroll-margin-block-end",
42389 "syntax": "<length>",
42399 "name": "MDN Reference",
42400 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
42403 "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."
42406 "name": "scroll-margin-bottom",
42407 "syntax": "<length>",
42418 "name": "MDN Reference",
42419 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
42422 "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."
42425 "name": "scroll-margin-inline",
42426 "syntax": "<length>{1,2}",
42433 "name": "MDN Reference",
42434 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
42437 "description": "The scroll-margin-inline property is a shorthand property which sets the scroll-margin longhands in the inline dimension."
42440 "name": "scroll-margin-inline-start",
42441 "syntax": "<length>",
42451 "name": "MDN Reference",
42452 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
42455 "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."
42458 "name": "scroll-margin-inline-end",
42459 "syntax": "<length>",
42469 "name": "MDN Reference",
42470 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
42473 "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."
42476 "name": "scroll-margin-left",
42477 "syntax": "<length>",
42488 "name": "MDN Reference",
42489 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
42492 "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."
42495 "name": "scroll-margin-right",
42496 "syntax": "<length>",
42507 "name": "MDN Reference",
42508 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
42511 "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."
42514 "name": "scroll-margin-top",
42515 "syntax": "<length>",
42526 "name": "MDN Reference",
42527 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
42530 "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."
42533 "name": "scroll-padding",
42534 "syntax": "[ auto | <length-percentage> ]{1,4}",
42545 "name": "MDN Reference",
42546 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
42549 "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."
42552 "name": "scroll-padding-block",
42553 "syntax": "[ auto | <length-percentage> ]{1,2}",
42563 "name": "MDN Reference",
42564 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
42567 "description": "The scroll-padding-block property is a shorthand property which sets the scroll-padding longhands for the block dimension."
42570 "name": "scroll-padding-block-start",
42571 "syntax": "auto | <length-percentage>",
42581 "name": "MDN Reference",
42582 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
42585 "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."
42588 "name": "scroll-padding-block-end",
42589 "syntax": "auto | <length-percentage>",
42599 "name": "MDN Reference",
42600 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
42603 "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."
42606 "name": "scroll-padding-bottom",
42607 "syntax": "auto | <length-percentage>",
42618 "name": "MDN Reference",
42619 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
42622 "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."
42625 "name": "scroll-padding-inline",
42626 "syntax": "[ auto | <length-percentage> ]{1,2}",
42636 "name": "MDN Reference",
42637 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
42640 "description": "The scroll-padding-inline property is a shorthand property which sets the scroll-padding longhands for the inline dimension."
42643 "name": "scroll-padding-inline-start",
42644 "syntax": "auto | <length-percentage>",
42654 "name": "MDN Reference",
42655 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
42658 "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."
42661 "name": "scroll-padding-inline-end",
42662 "syntax": "auto | <length-percentage>",
42672 "name": "MDN Reference",
42673 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
42676 "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."
42679 "name": "scroll-padding-left",
42680 "syntax": "auto | <length-percentage>",
42691 "name": "MDN Reference",
42692 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
42695 "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."
42698 "name": "scroll-padding-right",
42699 "syntax": "auto | <length-percentage>",
42710 "name": "MDN Reference",
42711 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
42714 "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."
42717 "name": "scroll-padding-top",
42718 "syntax": "auto | <length-percentage>",
42729 "name": "MDN Reference",
42730 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
42733 "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."
42736 "name": "scroll-snap-align",
42737 "syntax": "[ none | start | end | center ]{1,2}",
42748 "name": "MDN Reference",
42749 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
42752 "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."
42755 "name": "scroll-snap-stop",
42756 "syntax": "normal | always",
42765 "name": "MDN Reference",
42766 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
42769 "description": "The scroll-snap-stop CSS property defines whether the scroll container is allowed to \"pass over\" possible snap positions."
42772 "name": "scroll-snap-type-x",
42773 "status": "obsolete",
42774 "syntax": "none | mandatory | proximity",
42782 "name": "MDN Reference",
42783 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
42786 "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."
42789 "name": "scroll-snap-type-y",
42790 "status": "obsolete",
42791 "syntax": "none | mandatory | proximity",
42798 "name": "MDN Reference",
42799 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
42802 "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."
42805 "name": "text-combine-upright",
42806 "syntax": "none | all | [ digits <integer>? ]",
42810 "name": "MDN Reference",
42811 "url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
42814 "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."
42817 "name": "text-decoration-skip",
42818 "status": "experimental",
42819 "syntax": "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
42828 "name": "MDN Reference",
42829 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
42832 "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."
42835 "name": "text-decoration-skip-ink",
42836 "syntax": "auto | all | none",
42846 "name": "MDN Reference",
42847 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
42850 "description": "The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."
42853 "name": "text-decoration-thickness",
42854 "syntax": "auto | from-font | <length> | <percentage> ",
42862 "name": "MDN Reference",
42863 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
42866 "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."
42869 "name": "text-emphasis",
42870 "syntax": "<'text-emphasis-style'> || <'text-emphasis-color'>",
42881 "name": "MDN Reference",
42882 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
42885 "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."
42888 "name": "text-emphasis-color",
42889 "syntax": "<color>",
42900 "name": "MDN Reference",
42901 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
42904 "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."
42907 "name": "text-emphasis-position",
42908 "syntax": "[ over | under ] && [ right | left ]",
42919 "name": "MDN Reference",
42920 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
42923 "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."
42926 "name": "text-emphasis-style",
42927 "syntax": "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
42938 "name": "MDN Reference",
42939 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
42942 "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."
42945 "name": "text-size-adjust",
42946 "status": "experimental",
42947 "syntax": "none | auto | <percentage>",
42956 "name": "MDN Reference",
42957 "url": "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
42960 "description": "The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."
42963 "name": "text-underline-offset",
42964 "syntax": "auto | <length> | <percentage> ",
42972 "name": "MDN Reference",
42973 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
42976 "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."
42979 "name": "transform-box",
42980 "syntax": "content-box | border-box | fill-box | stroke-box | view-box",
42991 "name": "MDN Reference",
42992 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
42995 "description": "The transform-box CSS property defines the layout box to which the transform and transform-origin properties relate."
42998 "name": "translate",
42999 "syntax": "none | <length-percentage> [ <length-percentage> <length>? ]?",
43006 "name": "MDN Reference",
43007 "url": "https://developer.mozilla.org/docs/Web/CSS/translate"
43010 "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."
43013 "name": "speak-as",
43014 "syntax": "auto | bullets | numbers | words | spell-out | <counter-style-name>",
43016 "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."
43019 "name": "font-display",
43020 "status": "experimental",
43021 "syntax": "[ auto | block | swap | fallback | optional ]",
43023 "description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
43027 "syntax": "auto | <length>",
43029 "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."
43033 "syntax": "none | [ crop || cross ]",
43035 "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."
43038 "name": "max-zoom",
43039 "syntax": "auto | <number> | <percentage>",
43041 "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."
43044 "name": "min-zoom",
43045 "syntax": "auto | <number> | <percentage>",
43047 "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."
43050 "name": "orientation",
43051 "syntax": "auto | portrait | landscape",
43053 "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)."
43056 "name": "user-zoom",
43057 "syntax": "zoom | fixed",
43059 "description": "The user-zoom CSS descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport."
43062 "name": "viewport-fit",
43063 "syntax": "auto | contain | cover",
43065 "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."
43070 "name": "@charset",
43073 "name": "MDN Reference",
43074 "url": "https://developer.mozilla.org/docs/Web/CSS/@charset"
43077 "description": "Defines character set of the document."
43080 "name": "@counter-style",
43086 "name": "MDN Reference",
43087 "url": "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
43090 "description": "Defines a custom counter style."
43093 "name": "@font-face",
43096 "name": "MDN Reference",
43097 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-face"
43100 "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."
43103 "name": "@font-feature-values",
43110 "name": "MDN Reference",
43111 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
43114 "description": "Defines named values for the indices used to select alternate glyphs for a given font family."
43120 "name": "MDN Reference",
43121 "url": "https://developer.mozilla.org/docs/Web/CSS/@import"
43124 "description": "Includes content of another file."
43127 "name": "@keyframes",
43130 "name": "MDN Reference",
43131 "url": "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
43134 "description": "Defines set of animation key frames."
43140 "name": "MDN Reference",
43141 "url": "https://developer.mozilla.org/docs/Web/CSS/@media"
43144 "description": "Defines a stylesheet for a particular media type."
43147 "name": "@-moz-document",
43151 "description": "Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."
43154 "name": "@-moz-keyframes",
43158 "description": "Defines set of animation key frames."
43161 "name": "@-ms-viewport",
43166 "description": "Specifies the size, zoom factor, and orientation of the viewport."
43169 "name": "@namespace",
43172 "name": "MDN Reference",
43173 "url": "https://developer.mozilla.org/docs/Web/CSS/@namespace"
43176 "description": "Declares a prefix and associates it with a namespace name."
43179 "name": "@-o-keyframes",
43183 "description": "Defines set of animation key frames."
43186 "name": "@-o-viewport",
43190 "description": "Specifies the size, zoom factor, and orientation of the viewport."
43203 "name": "MDN Reference",
43204 "url": "https://developer.mozilla.org/docs/Web/CSS/@page"
43207 "description": "Directive defines various page parameters."
43210 "name": "@supports",
43220 "name": "MDN Reference",
43221 "url": "https://developer.mozilla.org/docs/Web/CSS/@supports"
43224 "description": "A conditional group rule whose condition tests whether the user agent supports CSS property:value pairs."
43227 "name": "@-webkit-keyframes",
43232 "description": "Defines set of animation key frames."
43240 "name": "MDN Reference",
43241 "url": "https://developer.mozilla.org/docs/Web/CSS/:active"
43244 "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."
43247 "name": ":any-link",
43257 "name": "MDN Reference",
43258 "url": "https://developer.mozilla.org/docs/Web/CSS/:any-link"
43261 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
43264 "name": ":checked",
43267 "name": "MDN Reference",
43268 "url": "https://developer.mozilla.org/docs/Web/CSS/:checked"
43271 "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."
43274 "name": ":corner-present",
43279 "description": "Non-standard. Indicates whether or not a scrollbar corner is present."
43282 "name": ":decrement",
43287 "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."
43290 "name": ":default",
43300 "name": "MDN Reference",
43301 "url": "https://developer.mozilla.org/docs/Web/CSS/:default"
43304 "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."
43307 "name": ":disabled",
43310 "name": "MDN Reference",
43311 "url": "https://developer.mozilla.org/docs/Web/CSS/:disabled"
43314 "description": "Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."
43317 "name": ":double-button",
43322 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar."
43328 "name": "MDN Reference",
43329 "url": "https://developer.mozilla.org/docs/Web/CSS/:empty"
43332 "description": "Represents an element that has no children at all."
43335 "name": ":enabled",
43338 "name": "MDN Reference",
43339 "url": "https://developer.mozilla.org/docs/Web/CSS/:enabled"
43342 "description": "Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."
43350 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb."
43363 "name": "MDN Reference",
43364 "url": "https://developer.mozilla.org/docs/Web/CSS/:first"
43367 "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."
43370 "name": ":first-child",
43373 "name": "MDN Reference",
43374 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-child"
43377 "description": "Same as :nth-child(1). Represents an element that is the first child of some other element."
43380 "name": ":first-of-type",
43383 "name": "MDN Reference",
43384 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-of-type"
43387 "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."
43393 "name": "MDN Reference",
43394 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus"
43397 "description": "Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."
43400 "name": ":fullscreen",
43403 "name": "MDN Reference",
43404 "url": "https://developer.mozilla.org/docs/Web/CSS/:fullscreen"
43407 "description": "Matches any element that has its fullscreen flag set."
43416 "description": "Represents any element that is defined to occur entirely after a :current element."
43419 "name": ":horizontal",
43424 "description": "Non-standard. Applies to any scrollbar pieces that have a horizontal orientation."
43437 "name": "MDN Reference",
43438 "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
43441 "description": "When evaluated in the context of a shadow tree, matches the shadow tree’s host element."
43449 "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."
43452 "name": ":host-context()",
43457 "description": "Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector."
43463 "name": "MDN Reference",
43464 "url": "https://developer.mozilla.org/docs/Web/CSS/:hover"
43467 "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."
43470 "name": ":increment",
43475 "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."
43478 "name": ":indeterminate",
43481 "name": "MDN Reference",
43482 "url": "https://developer.mozilla.org/docs/Web/CSS/:indeterminate"
43485 "description": "Applies to UI elements whose value is in an indeterminate state."
43488 "name": ":in-range",
43498 "name": "MDN Reference",
43499 "url": "https://developer.mozilla.org/docs/Web/CSS/:in-range"
43502 "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."
43505 "name": ":invalid",
43508 "name": "MDN Reference",
43509 "url": "https://developer.mozilla.org/docs/Web/CSS/:invalid"
43512 "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."
43524 "description": "Represents an element that is in language specified."
43527 "name": ":last-child",
43530 "name": "MDN Reference",
43531 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-child"
43534 "description": "Same as :nth-last-child(1). Represents an element that is the last child of some other element."
43537 "name": ":last-of-type",
43540 "name": "MDN Reference",
43541 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-of-type"
43544 "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."
43557 "name": "MDN Reference",
43558 "url": "https://developer.mozilla.org/docs/Web/CSS/:left"
43561 "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."
43567 "name": "MDN Reference",
43568 "url": "https://developer.mozilla.org/docs/Web/CSS/:link"
43571 "description": "Applies to links that have not yet been visited."
43574 "name": ":matches()",
43578 "description": "Takes a selector list as its argument. It represents an element that is represented by its argument."
43581 "name": ":-moz-any()",
43585 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
43588 "name": ":-moz-any-link",
43592 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
43595 "name": ":-moz-broken",
43601 "name": "MDN Reference",
43602 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-broken"
43605 "description": "Non-standard. Matches elements representing broken images."
43608 "name": ":-moz-drag-over",
43612 "description": "Non-standard. Matches elements when a drag-over event applies to it."
43615 "name": ":-moz-first-node",
43619 "description": "Non-standard. Represents an element that is the first child node of some other element."
43622 "name": ":-moz-focusring",
43626 "description": "Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser."
43629 "name": ":-moz-full-screen",
43633 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
43636 "name": ":-moz-last-node",
43640 "description": "Non-standard. Represents an element that is the last child node of some other element."
43643 "name": ":-moz-loading",
43647 "description": "Non-standard. Matches elements, such as images, that haven’t started loading yet."
43650 "name": ":-moz-only-whitespace",
43656 "name": "MDN Reference",
43657 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-only-whitespace"
43660 "description": "The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank."
43663 "name": ":-moz-placeholder",
43667 "description": "Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+."
43670 "name": ":-moz-submit-invalid",
43676 "name": "MDN Reference",
43677 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-submit-invalid"
43680 "description": "Non-standard. Represents any submit button when the contents of the associated form are not valid."
43683 "name": ":-moz-suppressed",
43687 "description": "Non-standard. Matches elements representing images that have been blocked from loading."
43690 "name": ":-moz-ui-invalid",
43696 "name": "MDN Reference",
43697 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-invalid"
43700 "description": "Non-standard. Represents any validated form element whose value isn't valid "
43703 "name": ":-moz-ui-valid",
43709 "name": "MDN Reference",
43710 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-valid"
43713 "description": "Non-standard. Represents any validated form element whose value is valid "
43716 "name": ":-moz-user-disabled",
43720 "description": "Non-standard. Matches elements representing images that have been disabled due to the user’s preferences."
43723 "name": ":-moz-window-inactive",
43729 "name": "MDN Reference",
43730 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-window-inactive"
43733 "description": "Non-standard. Matches elements in an inactive window."
43736 "name": ":-ms-fullscreen",
43740 "description": "Matches any element that has its fullscreen flag set."
43743 "name": ":-ms-input-placeholder",
43747 "description": "Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder."
43750 "name": ":-ms-keyboard-active",
43754 "description": "Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar."
43757 "name": ":-ms-lang()",
43762 "description": "Represents an element that is in the language specified. Accepts a comma separated list of language tokens."
43765 "name": ":no-button",
43770 "description": "Non-standard. Applies to track pieces. Applies when there is no button at that end of the track."
43782 "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."
43785 "name": ":nth-child()",
43794 "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."
43797 "name": ":nth-last-child()",
43806 "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."
43809 "name": ":nth-last-of-type()",
43818 "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."
43821 "name": ":nth-of-type()",
43830 "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."
43833 "name": ":only-child",
43836 "name": "MDN Reference",
43837 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-child"
43840 "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."
43843 "name": ":only-of-type",
43846 "name": "MDN Reference",
43847 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-of-type"
43850 "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."
43853 "name": ":optional",
43856 "name": "MDN Reference",
43857 "url": "https://developer.mozilla.org/docs/Web/CSS/:optional"
43860 "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."
43863 "name": ":out-of-range",
43873 "name": "MDN Reference",
43874 "url": "https://developer.mozilla.org/docs/Web/CSS/:out-of-range"
43877 "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."
43886 "description": "Represents any element that is defined to occur entirely prior to a :current element."
43889 "name": ":read-only",
43899 "name": "MDN Reference",
43900 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-only"
43903 "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."
43906 "name": ":read-write",
43916 "name": "MDN Reference",
43917 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-write"
43920 "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."
43923 "name": ":required",
43926 "name": "MDN Reference",
43927 "url": "https://developer.mozilla.org/docs/Web/CSS/:required"
43930 "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."
43943 "name": "MDN Reference",
43944 "url": "https://developer.mozilla.org/docs/Web/CSS/:right"
43947 "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."
43953 "name": "MDN Reference",
43954 "url": "https://developer.mozilla.org/docs/Web/CSS/:root"
43957 "description": "Represents an element that is the root of the document. In HTML 4, this is always the HTML element."
43970 "name": "MDN Reference",
43971 "url": "https://developer.mozilla.org/docs/Web/CSS/:scope"
43974 "description": "Represents any element that is in the contextual reference element set."
43977 "name": ":single-button",
43982 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar."
43990 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb."
43996 "name": "MDN Reference",
43997 "url": "https://developer.mozilla.org/docs/Web/CSS/:target"
44000 "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)."
44006 "name": "MDN Reference",
44007 "url": "https://developer.mozilla.org/docs/Web/CSS/:valid"
44010 "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."
44013 "name": ":vertical",
44018 "description": "Non-standard. Applies to any scrollbar pieces that have a vertical orientation."
44021 "name": ":visited",
44024 "name": "MDN Reference",
44025 "url": "https://developer.mozilla.org/docs/Web/CSS/:visited"
44028 "description": "Applies once the link has been visited by the user."
44031 "name": ":-webkit-any()",
44036 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
44039 "name": ":-webkit-full-screen",
44044 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
44047 "name": ":window-inactive",
44052 "description": "Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active."
44056 "status": "experimental",
44059 "name": "MDN Reference",
44060 "url": "https://developer.mozilla.org/docs/Web/CSS/:blank"
44063 "description": "The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>)."
44066 "name": ":defined",
44067 "status": "experimental",
44077 "name": "MDN Reference",
44078 "url": "https://developer.mozilla.org/docs/Web/CSS/:defined"
44081 "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)."
44090 "name": "MDN Reference",
44091 "url": "https://developer.mozilla.org/docs/Web/CSS/:dir"
44094 "description": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them."
44097 "name": ":focus-visible",
44098 "status": "experimental",
44107 "name": "MDN Reference",
44108 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-visible"
44111 "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."
44114 "name": ":focus-within",
44115 "status": "experimental",
44125 "name": "MDN Reference",
44126 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-within"
44129 "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."
44133 "status": "experimental",
44136 "name": "MDN Reference",
44137 "url": "https://developer.mozilla.org/docs/Web/CSS/:has"
44140 "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."
44144 "status": "experimental",
44154 "name": "MDN Reference",
44155 "url": "https://developer.mozilla.org/docs/Web/CSS/:is"
44158 "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."
44161 "name": ":placeholder-shown",
44162 "status": "experimental",
44165 "name": "MDN Reference",
44166 "url": "https://developer.mozilla.org/docs/Web/CSS/:placeholder-shown"
44169 "description": "The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."
44173 "status": "experimental",
44180 "name": "MDN Reference",
44181 "url": "https://developer.mozilla.org/docs/Web/CSS/:where"
44184 "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."
44187 "pseudoElements": [
44192 "name": "MDN Reference",
44193 "url": "https://developer.mozilla.org/docs/Web/CSS/::after"
44196 "description": "Represents a styleable child pseudo-element immediately after the originating element’s actual content."
44199 "name": "::backdrop",
44209 "name": "MDN Reference",
44210 "url": "https://developer.mozilla.org/docs/Web/CSS/::backdrop"
44213 "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)."
44216 "name": "::before",
44219 "name": "MDN Reference",
44220 "url": "https://developer.mozilla.org/docs/Web/CSS/::before"
44223 "description": "Represents a styleable child pseudo-element immediately before the originating element’s actual content."
44226 "name": "::content",
44231 "description": "Deprecated. Matches the distribution list itself, on elements that have one. Use ::slotted for forward compatibility."
44244 "name": "MDN Reference",
44245 "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
44258 "name": "::cue-region",
44266 "name": "::cue-region()",
44274 "name": "::first-letter",
44277 "name": "MDN Reference",
44278 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-letter"
44281 "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."
44284 "name": "::first-line",
44287 "name": "MDN Reference",
44288 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-line"
44291 "description": "Describes the contents of the first formatted line of its originating element."
44294 "name": "::-moz-focus-inner",
44300 "name": "::-moz-focus-outer",
44306 "name": "::-moz-list-bullet",
44310 "description": "Used to style the bullet of a list element. Similar to the standardized ::marker."
44313 "name": "::-moz-list-number",
44317 "description": "Used to style the numbers of a list element. Similar to the standardized ::marker."
44320 "name": "::-moz-placeholder",
44324 "description": "Represents placeholder text in an input field"
44327 "name": "::-moz-progress-bar",
44331 "description": "Represents the bar portion of a progress bar."
44334 "name": "::-moz-selection",
44338 "description": "Represents the portion of a document that has been highlighted by the user."
44341 "name": "::-ms-backdrop",
44345 "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)."
44348 "name": "::-ms-browse",
44353 "description": "Represents the browse button of an input type=file control."
44356 "name": "::-ms-check",
44361 "description": "Represents the check of a checkbox or radio button input control."
44364 "name": "::-ms-clear",
44369 "description": "Represents the clear button of a text input control"
44372 "name": "::-ms-expand",
44377 "description": "Represents the drop-down button of a select control."
44380 "name": "::-ms-fill",
44385 "description": "Represents the bar portion of a progress bar."
44388 "name": "::-ms-fill-lower",
44393 "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."
44396 "name": "::-ms-fill-upper",
44401 "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."
44404 "name": "::-ms-reveal",
44409 "description": "Represents the password reveal button of an input type=password control."
44412 "name": "::-ms-thumb",
44417 "description": "Represents the portion of range input control (also known as a slider control) that the user drags."
44420 "name": "::-ms-ticks-after",
44425 "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."
44428 "name": "::-ms-ticks-before",
44433 "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."
44436 "name": "::-ms-tooltip",
44441 "description": "Represents the tooltip of a slider (input type=range)."
44444 "name": "::-ms-track",
44449 "description": "Represents the track of a slider."
44452 "name": "::-ms-value",
44457 "description": "Represents the content of a text or password input control, or a select control."
44460 "name": "::selection",
44463 "name": "MDN Reference",
44464 "url": "https://developer.mozilla.org/docs/Web/CSS/::selection"
44467 "description": "Represents the portion of a document that has been highlighted by the user."
44470 "name": "::shadow",
44475 "description": "Matches the shadow root if an element has a shadow tree."
44478 "name": "::-webkit-file-upload-button",
44487 "name": "MDN Reference",
44488 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-file-upload-button"
44493 "name": "::-webkit-inner-spin-button",
44502 "name": "MDN Reference",
44503 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-inner-spin-button"
44508 "name": "::-webkit-input-placeholder",
44515 "name": "::-webkit-keygen-select",
44523 "name": "::-webkit-meter-bar",
44532 "name": "MDN Reference",
44533 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-bar"
44538 "name": "::-webkit-meter-even-less-good-value",
44547 "name": "MDN Reference",
44548 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-even-less-good-value"
44553 "name": "::-webkit-meter-optimum-value",
44562 "name": "MDN Reference",
44563 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-optimum-value"
44568 "name": "::-webkit-meter-suboptimum-value",
44577 "name": "MDN Reference",
44578 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-suboptimum-value"
44583 "name": "::-webkit-outer-spin-button",
44590 "name": "MDN Reference",
44591 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-outer-spin-button"
44596 "name": "::-webkit-progress-bar",
44605 "name": "MDN Reference",
44606 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-bar"
44611 "name": "::-webkit-progress-inner-element",
44620 "name": "MDN Reference",
44621 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-inner-element"
44626 "name": "::-webkit-progress-value",
44635 "name": "MDN Reference",
44636 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-value"
44641 "name": "::-webkit-resizer",
44650 "name": "MDN Reference",
44651 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44656 "name": "::-webkit-scrollbar",
44665 "name": "MDN Reference",
44666 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44671 "name": "::-webkit-scrollbar-button",
44680 "name": "MDN Reference",
44681 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44686 "name": "::-webkit-scrollbar-corner",
44695 "name": "MDN Reference",
44696 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44701 "name": "::-webkit-scrollbar-thumb",
44710 "name": "MDN Reference",
44711 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44716 "name": "::-webkit-scrollbar-track",
44725 "name": "MDN Reference",
44726 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44731 "name": "::-webkit-scrollbar-track-piece",
44740 "name": "MDN Reference",
44741 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
44746 "name": "::-webkit-search-cancel-button",
44755 "name": "MDN Reference",
44756 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-cancel-button"
44761 "name": "::-webkit-search-decoration",
44768 "name": "::-webkit-search-results-button",
44777 "name": "MDN Reference",
44778 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-results-button"
44783 "name": "::-webkit-search-results-decoration",
44790 "name": "::-webkit-slider-runnable-track",
44798 "name": "::-webkit-slider-thumb",
44806 "name": "::-webkit-textfield-decoration-container",
44814 "name": "::-webkit-validation-bubble",
44822 "name": "::-webkit-validation-bubble-arrow",
44830 "name": "::-webkit-validation-bubble-arrow-clipper",
44838 "name": "::-webkit-validation-bubble-heading",
44846 "name": "::-webkit-validation-bubble-message",
44854 "name": "::-webkit-validation-bubble-text-block",
44862 "name": "::-moz-range-progress",
44863 "status": "nonstandard",
44869 "name": "MDN Reference",
44870 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-progress"
44873 "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)."
44876 "name": "::-moz-range-thumb",
44877 "status": "nonstandard",
44883 "name": "MDN Reference",
44884 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-thumb"
44887 "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."
44890 "name": "::-moz-range-track",
44891 "status": "nonstandard",
44897 "name": "MDN Reference",
44898 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-track"
44901 "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\"."
44904 "name": "::-webkit-progress-inner-value",
44905 "status": "nonstandard",
44906 "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."
44909 "name": "::grammar-error",
44910 "status": "experimental",
44913 "name": "MDN Reference",
44914 "url": "https://developer.mozilla.org/docs/Web/CSS/::grammar-error"
44917 "description": "The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."
44920 "name": "::marker",
44929 "name": "MDN Reference",
44930 "url": "https://developer.mozilla.org/docs/Web/CSS/::marker"
44933 "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."
44937 "status": "experimental",
44947 "name": "MDN Reference",
44948 "url": "https://developer.mozilla.org/docs/Web/CSS/::part"
44951 "description": "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."
44954 "name": "::placeholder",
44964 "name": "MDN Reference",
44965 "url": "https://developer.mozilla.org/docs/Web/CSS/::placeholder"
44968 "description": "The ::placeholder CSS pseudo-element represents the placeholder text of a form element."
44971 "name": "::slotted",
44981 "name": "MDN Reference",
44982 "url": "https://developer.mozilla.org/docs/Web/CSS/::slotted"
44985 "description": "The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."
44988 "name": "::spelling-error",
44989 "status": "experimental",
44992 "name": "MDN Reference",
44993 "url": "https://developer.mozilla.org/docs/Web/CSS/::spelling-error"
44996 "description": "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."
45004 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45006 __webpack_require__.r(__webpack_exports__);
45007 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45008 /* harmony export */ "CSSDataProvider": () => /* binding */ CSSDataProvider
45009 /* harmony export */ });
45010 /*---------------------------------------------------------------------------------------------
45011 * Copyright (c) Microsoft Corporation. All rights reserved.
45012 * Licensed under the MIT License. See License.txt in the project root for license information.
45013 *--------------------------------------------------------------------------------------------*/
45015 var CSSDataProvider = /** @class */ (function () {
45017 * Currently, unversioned data uses the V1 implementation
45018 * In the future when the provider handles multiple versions of HTML custom data,
45019 * use the latest implementation for unversioned data
45021 function CSSDataProvider(data) {
45022 this._properties = [];
45023 this._atDirectives = [];
45024 this._pseudoClasses = [];
45025 this._pseudoElements = [];
45026 this.addData(data);
45028 CSSDataProvider.prototype.provideProperties = function () {
45029 return this._properties;
45031 CSSDataProvider.prototype.provideAtDirectives = function () {
45032 return this._atDirectives;
45034 CSSDataProvider.prototype.providePseudoClasses = function () {
45035 return this._pseudoClasses;
45037 CSSDataProvider.prototype.providePseudoElements = function () {
45038 return this._pseudoElements;
45040 CSSDataProvider.prototype.addData = function (data) {
45041 if (Array.isArray(data.properties)) {
45042 for (var _i = 0, _a = data.properties; _i < _a.length; _i++) {
45044 if (isPropertyData(prop)) {
45045 this._properties.push(prop);
45049 if (Array.isArray(data.atDirectives)) {
45050 for (var _b = 0, _c = data.atDirectives; _b < _c.length; _b++) {
45052 if (isAtDirective(prop)) {
45053 this._atDirectives.push(prop);
45057 if (Array.isArray(data.pseudoClasses)) {
45058 for (var _d = 0, _e = data.pseudoClasses; _d < _e.length; _d++) {
45060 if (isPseudoClassData(prop)) {
45061 this._pseudoClasses.push(prop);
45065 if (Array.isArray(data.pseudoElements)) {
45066 for (var _f = 0, _g = data.pseudoElements; _f < _g.length; _f++) {
45068 if (isPseudoElementData(prop)) {
45069 this._pseudoElements.push(prop);
45074 return CSSDataProvider;
45077 function isPropertyData(d) {
45078 return typeof d.name === 'string';
45080 function isAtDirective(d) {
45081 return typeof d.name === 'string';
45083 function isPseudoClassData(d) {
45084 return typeof d.name === 'string';
45086 function isPseudoElementData(d) {
45087 return typeof d.name === 'string';
45093 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45095 __webpack_require__.r(__webpack_exports__);
45096 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45097 /* harmony export */ "getSelectionRanges": () => /* binding */ getSelectionRanges
45098 /* harmony export */ });
45099 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
45100 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
45101 /*---------------------------------------------------------------------------------------------
45102 * Copyright (c) Microsoft Corporation. All rights reserved.
45103 * Licensed under the MIT License. See License.txt in the project root for license information.
45104 *--------------------------------------------------------------------------------------------*/
45108 function getSelectionRanges(document, positions, stylesheet) {
45109 function getSelectionRange(position) {
45110 var applicableRanges = getApplicableRanges(position);
45111 var current = undefined;
45112 for (var index = applicableRanges.length - 1; index >= 0; index--) {
45113 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);
45116 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SelectionRange.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(position, position));
45120 return positions.map(getSelectionRange);
45121 function getApplicableRanges(position) {
45122 var offset = document.offsetAt(position);
45123 var currNode = stylesheet.findChildAtOffset(offset, true);
45129 if (currNode.parent &&
45130 currNode.offset === currNode.parent.offset &&
45131 currNode.end === currNode.parent.end) {
45132 currNode = currNode.parent;
45135 // The `{ }` part of `.a { }`
45136 if (currNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Declarations) {
45137 if (offset > currNode.offset && offset < currNode.end) {
45138 // Return `{ }` and the range inside `{` and `}`
45139 result.push([currNode.offset + 1, currNode.end - 1]);
45142 result.push([currNode.offset, currNode.end]);
45143 currNode = currNode.parent;
45152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
45154 __webpack_require__.r(__webpack_exports__);
45155 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45156 /* harmony export */ "SCSSNavigation": () => /* binding */ SCSSNavigation
45157 /* harmony export */ });
45158 /* harmony import */ var _cssNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
45159 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
45160 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87);
45161 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92);
45162 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(109);
45163 /*---------------------------------------------------------------------------------------------
45164 * Copyright (c) Microsoft Corporation. All rights reserved.
45165 * Licensed under the MIT License. See License.txt in the project root for license information.
45166 *--------------------------------------------------------------------------------------------*/
45168 var __extends = (undefined && undefined.__extends) || (function () {
45169 var extendStatics = function (d, b) {
45170 extendStatics = Object.setPrototypeOf ||
45171 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
45172 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
45173 return extendStatics(d, b);
45175 return function (d, b) {
45176 extendStatics(d, b);
45177 function __() { this.constructor = d; }
45178 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45181 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
45182 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45183 return new (P || (P = Promise))(function (resolve, reject) {
45184 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45185 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45186 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45187 step((generator = generator.apply(thisArg, _arguments || [])).next());
45190 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
45191 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
45192 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45193 function verb(n) { return function (v) { return step([n, v]); }; }
45194 function step(op) {
45195 if (f) throw new TypeError("Generator is already executing.");
45197 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;
45198 if (y = 0, t) op = [op[0] & 2, t.value];
45200 case 0: case 1: t = op; break;
45201 case 4: _.label++; return { value: op[1], done: false };
45202 case 5: _.label++; y = op[1]; op = [0]; continue;
45203 case 7: op = _.ops.pop(); _.trys.pop(); continue;
45205 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
45206 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
45207 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
45208 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45209 if (t[2]) _.ops.pop();
45210 _.trys.pop(); continue;
45212 op = body.call(thisArg, _);
45213 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45214 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
45222 var SCSSNavigation = /** @class */ (function (_super) {
45223 __extends(SCSSNavigation, _super);
45224 function SCSSNavigation(fileSystemProvider) {
45225 return _super.call(this, fileSystemProvider) || this;
45227 SCSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
45228 return (_super.prototype.isRawStringDocumentLinkNode.call(this, node) ||
45229 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use ||
45230 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward);
45232 SCSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
45233 return __awaiter(this, void 0, void 0, function () {
45234 function toPathVariations(uri) {
45236 if (uri.path === '') {
45239 // No variation for links that ends with suffix
45240 if (uri.path.endsWith('.scss') || uri.path.endsWith('.css')) {
45243 // If a link is like a/, try resolving a/index.scss and a/_index.scss
45244 if (uri.path.endsWith('/')) {
45246 uri.with({ path: uri.path + 'index.scss' }).toString(),
45247 uri.with({ path: uri.path + '_index.scss' }).toString()
45250 // Use `uri.path` since it's normalized to use `/` in all platforms
45251 var pathFragments = uri.path.split('/');
45252 var basename = pathFragments[pathFragments.length - 1];
45253 var pathWithoutBasename = uri.path.slice(0, -basename.length);
45254 // No variation for links such as _a
45255 if (basename.startsWith('_')) {
45256 if (uri.path.endsWith('.scss')) {
45260 return [uri.with({ path: uri.path + '.scss' }).toString()];
45263 var normalizedBasename = basename + '.scss';
45264 var documentUriWithBasename = function (newBasename) {
45265 return uri.with({ path: pathWithoutBasename + newBasename }).toString();
45267 var normalizedPath = documentUriWithBasename(normalizedBasename);
45268 var underScorePath = documentUriWithBasename('_' + normalizedBasename);
45269 var indexPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/index.scss');
45270 var indexUnderscoreUri = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/_index.scss');
45271 var cssPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '.css');
45272 return [normalizedPath, underScorePath, indexPath, indexUnderscoreUri, cssPath];
45274 var target, parsedUri, pathVariations, j, e_1;
45275 return __generator(this, function (_a) {
45276 switch (_a.label) {
45278 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.startsWith)(ref, 'sass:')) {
45279 return [2 /*return*/, undefined]; // sass library
45281 return [4 /*yield*/, _super.prototype.resolveRelativeReference.call(this, ref, documentUri, documentContext)];
45283 target = _a.sent();
45284 if (!(this.fileSystemProvider && target && (0,_utils_resources__WEBPACK_IMPORTED_MODULE_3__.extname)(target).length === 0)) return [3 /*break*/, 8];
45287 _a.trys.push([2, 7, , 8]);
45288 parsedUri = vscode_uri__WEBPACK_IMPORTED_MODULE_2__.URI.parse(target);
45289 pathVariations = toPathVariations(parsedUri);
45290 if (!pathVariations) return [3 /*break*/, 6];
45294 if (!(j < pathVariations.length)) return [3 /*break*/, 6];
45295 return [4 /*yield*/, this.fileExists(pathVariations[j])];
45298 return [2 /*return*/, pathVariations[j]];
45303 return [3 /*break*/, 3];
45304 case 6: return [2 /*return*/, undefined];
45307 return [3 /*break*/, 8];
45308 case 8: return [2 /*return*/, target];
45313 return SCSSNavigation;
45314 }(_cssNavigation__WEBPACK_IMPORTED_MODULE_0__.CSSNavigation));
45320 /***/ ((__unused_webpack_module, exports) => {
45323 /*---------------------------------------------------------------------------------------------
45324 * Copyright (c) Microsoft Corporation. All rights reserved.
45325 * Licensed under the MIT License. See License.txt in the project root for license information.
45326 *--------------------------------------------------------------------------------------------*/
45327 Object.defineProperty(exports, "__esModule", ({ value: true }));
45328 exports.getLanguageModelCache = void 0;
45329 function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
45330 let languageModels = {};
45332 let cleanupInterval = undefined;
45333 if (cleanupIntervalTimeInSec > 0) {
45334 cleanupInterval = setInterval(() => {
45335 let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
45336 let uris = Object.keys(languageModels);
45337 for (let uri of uris) {
45338 let languageModelInfo = languageModels[uri];
45339 if (languageModelInfo.cTime < cutoffTime) {
45340 delete languageModels[uri];
45344 }, cleanupIntervalTimeInSec * 1000);
45348 let version = document.version;
45349 let languageId = document.languageId;
45350 let languageModelInfo = languageModels[document.uri];
45351 if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
45352 languageModelInfo.cTime = Date.now();
45353 return languageModelInfo.languageModel;
45355 let languageModel = parse(document);
45356 languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
45357 if (!languageModelInfo) {
45360 if (nModels === maxEntries) {
45361 let oldestTime = Number.MAX_VALUE;
45362 let oldestUri = null;
45363 for (let uri in languageModels) {
45364 let languageModelInfo = languageModels[uri];
45365 if (languageModelInfo.cTime < oldestTime) {
45367 oldestTime = languageModelInfo.cTime;
45371 delete languageModels[oldestUri];
45375 return languageModel;
45377 onDocumentRemoved(document) {
45378 let uri = document.uri;
45379 if (languageModels[uri]) {
45380 delete languageModels[uri];
45385 if (typeof cleanupInterval !== 'undefined') {
45386 clearInterval(cleanupInterval);
45387 cleanupInterval = undefined;
45388 languageModels = {};
45394 exports.getLanguageModelCache = getLanguageModelCache;
45399 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
45402 /*---------------------------------------------------------------------------------------------
45403 * Copyright (c) Microsoft Corporation. All rights reserved.
45404 * Licensed under the MIT License. See License.txt in the project root for license information.
45405 *--------------------------------------------------------------------------------------------*/
45406 Object.defineProperty(exports, "__esModule", ({ value: true }));
45407 exports.getDocumentContext = void 0;
45408 const strings_1 = __webpack_require__(133);
45409 const requests_1 = __webpack_require__(134);
45410 function getDocumentContext(documentUri, workspaceFolders) {
45411 function getRootFolder() {
45412 for (let folder of workspaceFolders) {
45413 let folderURI = folder.uri;
45414 if (!strings_1.endsWith(folderURI, '/')) {
45415 folderURI = folderURI + '/';
45417 if (strings_1.startsWith(documentUri, folderURI)) {
45424 resolveReference: (ref, base = documentUri) => {
45425 if (ref[0] === '/') { // resolve absolute path against the current workspace folder
45426 let folderUri = getRootFolder();
45428 return folderUri + ref.substr(1);
45431 base = base.substr(0, base.lastIndexOf('/') + 1);
45432 return requests_1.resolvePath(base, ref);
45436 exports.getDocumentContext = getDocumentContext;
45441 /***/ ((__unused_webpack_module, exports) => {
45444 /*---------------------------------------------------------------------------------------------
45445 * Copyright (c) Microsoft Corporation. All rights reserved.
45446 * Licensed under the MIT License. See License.txt in the project root for license information.
45447 *--------------------------------------------------------------------------------------------*/
45448 Object.defineProperty(exports, "__esModule", ({ value: true }));
45449 exports.endsWith = exports.startsWith = void 0;
45450 function startsWith(haystack, needle) {
45451 if (haystack.length < needle.length) {
45454 for (let i = 0; i < needle.length; i++) {
45455 if (haystack[i] !== needle[i]) {
45461 exports.startsWith = startsWith;
45463 * Determines if haystack ends with needle.
45465 function endsWith(haystack, needle) {
45466 let diff = haystack.length - needle.length;
45468 return haystack.lastIndexOf(needle) === diff;
45470 else if (diff === 0) {
45471 return haystack === needle;
45477 exports.endsWith = endsWith;
45482 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
45485 /*---------------------------------------------------------------------------------------------
45486 * Copyright (c) Microsoft Corporation. All rights reserved.
45487 * Licensed under the MIT License. See License.txt in the project root for license information.
45488 *--------------------------------------------------------------------------------------------*/
45489 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
45490 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45491 return new (P || (P = Promise))(function (resolve, reject) {
45492 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45493 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45494 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45495 step((generator = generator.apply(thisArg, _arguments || [])).next());
45498 Object.defineProperty(exports, "__esModule", ({ value: true }));
45499 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;
45500 const vscode_uri_1 = __webpack_require__(87);
45501 const vscode_languageserver_1 = __webpack_require__(36);
45502 var FsContentRequest;
45503 (function (FsContentRequest) {
45504 FsContentRequest.type = new vscode_languageserver_1.RequestType('fs/content');
45505 })(FsContentRequest = exports.FsContentRequest || (exports.FsContentRequest = {}));
45507 (function (FsStatRequest) {
45508 FsStatRequest.type = new vscode_languageserver_1.RequestType('fs/stat');
45509 })(FsStatRequest = exports.FsStatRequest || (exports.FsStatRequest = {}));
45510 var FsReadDirRequest;
45511 (function (FsReadDirRequest) {
45512 FsReadDirRequest.type = new vscode_languageserver_1.RequestType('fs/readDir');
45513 })(FsReadDirRequest = exports.FsReadDirRequest || (exports.FsReadDirRequest = {}));
45515 (function (FileType) {
45517 * The file type is unknown.
45519 FileType[FileType["Unknown"] = 0] = "Unknown";
45523 FileType[FileType["File"] = 1] = "File";
45527 FileType[FileType["Directory"] = 2] = "Directory";
45529 * A symbolic link to a file.
45531 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
45532 })(FileType = exports.FileType || (exports.FileType = {}));
45533 function getRequestService(handledSchemas, connection, runtime) {
45534 const builtInHandlers = {};
45535 for (let protocol of handledSchemas) {
45536 if (protocol === 'file') {
45537 builtInHandlers[protocol] = runtime.file;
45539 else if (protocol === 'http' || protocol === 'https') {
45540 builtInHandlers[protocol] = runtime.http;
45545 return __awaiter(this, void 0, void 0, function* () {
45546 const handler = builtInHandlers[getScheme(uri)];
45548 return handler.stat(uri);
45550 const res = yield connection.sendRequest(FsStatRequest.type, uri.toString());
45554 readDirectory(uri) {
45555 const handler = builtInHandlers[getScheme(uri)];
45557 return handler.readDirectory(uri);
45559 return connection.sendRequest(FsReadDirRequest.type, uri.toString());
45561 getContent(uri, encoding) {
45562 const handler = builtInHandlers[getScheme(uri)];
45564 return handler.getContent(uri, encoding);
45566 return connection.sendRequest(FsContentRequest.type, { uri: uri.toString(), encoding });
45570 exports.getRequestService = getRequestService;
45571 function getScheme(uri) {
45572 return uri.substr(0, uri.indexOf(':'));
45574 exports.getScheme = getScheme;
45575 function dirname(uri) {
45576 const lastIndexOfSlash = uri.lastIndexOf('/');
45577 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
45579 exports.dirname = dirname;
45580 function basename(uri) {
45581 const lastIndexOfSlash = uri.lastIndexOf('/');
45582 return uri.substr(lastIndexOfSlash + 1);
45584 exports.basename = basename;
45585 const Slash = '/'.charCodeAt(0);
45586 const Dot = '.'.charCodeAt(0);
45587 function extname(uri) {
45588 for (let i = uri.length - 1; i >= 0; i--) {
45589 const ch = uri.charCodeAt(i);
45591 if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
45592 return uri.substr(i);
45598 else if (ch === Slash) {
45604 exports.extname = extname;
45605 function isAbsolutePath(path) {
45606 return path.charCodeAt(0) === Slash;
45608 exports.isAbsolutePath = isAbsolutePath;
45609 function resolvePath(uriString, path) {
45610 if (isAbsolutePath(path)) {
45611 const uri = vscode_uri_1.URI.parse(uriString);
45612 const parts = path.split('/');
45613 return uri.with({ path: normalizePath(parts) }).toString();
45615 return joinPath(uriString, path);
45617 exports.resolvePath = resolvePath;
45618 function normalizePath(parts) {
45619 const newParts = [];
45620 for (const part of parts) {
45621 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
45624 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
45628 newParts.push(part);
45631 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
45634 let res = newParts.join('/');
45635 if (parts[0].length === 0) {
45640 exports.normalizePath = normalizePath;
45641 function joinPath(uriString, ...paths) {
45642 const uri = vscode_uri_1.URI.parse(uriString);
45643 const parts = uri.path.split('/');
45644 for (let path of paths) {
45645 parts.push(...path.split('/'));
45647 return uri.with({ path: normalizePath(parts) }).toString();
45649 exports.joinPath = joinPath;
45654 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
45657 /*---------------------------------------------------------------------------------------------
45658 * Copyright (c) Microsoft Corporation. All rights reserved.
45659 * Licensed under the MIT License. See License.txt in the project root for license information.
45660 *--------------------------------------------------------------------------------------------*/
45661 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
45662 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45663 return new (P || (P = Promise))(function (resolve, reject) {
45664 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45665 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45666 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45667 step((generator = generator.apply(thisArg, _arguments || [])).next());
45670 Object.defineProperty(exports, "__esModule", ({ value: true }));
45671 exports.fetchDataProviders = void 0;
45672 const vscode_css_languageservice_1 = __webpack_require__(88);
45673 function fetchDataProviders(dataPaths, requestService) {
45674 const providers = dataPaths.map((p) => __awaiter(this, void 0, void 0, function* () {
45676 const content = yield requestService.getContent(p);
45677 return parseCSSData(content);
45680 return vscode_css_languageservice_1.newCSSDataProvider({ version: 1 });
45683 return Promise.all(providers);
45685 exports.fetchDataProviders = fetchDataProviders;
45686 function parseCSSData(source) {
45689 rawData = JSON.parse(source);
45692 return vscode_css_languageservice_1.newCSSDataProvider({ version: 1 });
45694 return vscode_css_languageservice_1.newCSSDataProvider({
45695 version: rawData.version || 1,
45696 properties: rawData.properties || [],
45697 atDirectives: rawData.atDirectives || [],
45698 pseudoClasses: rawData.pseudoClasses || [],
45699 pseudoElements: rawData.pseudoElements || []
45706 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
45709 /*---------------------------------------------------------------------------------------------
45710 * Copyright (c) Microsoft Corporation. All rights reserved.
45711 * Licensed under the MIT License. See License.txt in the project root for license information.
45712 *--------------------------------------------------------------------------------------------*/
45713 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
45714 if (k2 === undefined) k2 = k;
45715 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
45716 }) : (function(o, m, k, k2) {
45717 if (k2 === undefined) k2 = k;
45720 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
45721 Object.defineProperty(o, "default", { enumerable: true, value: v });
45722 }) : function(o, v) {
45725 var __importStar = (this && this.__importStar) || function (mod) {
45726 if (mod && mod.__esModule) return mod;
45728 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
45729 __setModuleDefault(result, mod);
45732 Object.defineProperty(exports, "__esModule", ({ value: true }));
45733 exports.getNodeFSRequestService = void 0;
45734 const requests_1 = __webpack_require__(134);
45735 const vscode_uri_1 = __webpack_require__(87);
45736 const fs = __importStar(__webpack_require__(80));
45737 const vscode_css_languageservice_1 = __webpack_require__(88);
45738 function getNodeFSRequestService() {
45739 function ensureFileUri(location) {
45740 if (requests_1.getScheme(location) !== 'file') {
45741 throw new Error('fileRequestService can only handle file URLs');
45745 getContent(location, encoding) {
45746 ensureFileUri(location);
45747 return new Promise((c, e) => {
45748 const uri = vscode_uri_1.URI.parse(location);
45749 fs.readFile(uri.fsPath, encoding, (err, buf) => {
45758 ensureFileUri(location);
45759 return new Promise((c, e) => {
45760 const uri = vscode_uri_1.URI.parse(location);
45761 fs.stat(uri.fsPath, (err, stats) => {
45763 if (err.code === 'ENOENT') {
45764 return c({ type: vscode_css_languageservice_1.FileType.Unknown, ctime: -1, mtime: -1, size: -1 });
45770 let type = vscode_css_languageservice_1.FileType.Unknown;
45771 if (stats.isFile()) {
45772 type = vscode_css_languageservice_1.FileType.File;
45774 else if (stats.isDirectory()) {
45775 type = vscode_css_languageservice_1.FileType.Directory;
45777 else if (stats.isSymbolicLink()) {
45778 type = vscode_css_languageservice_1.FileType.SymbolicLink;
45782 ctime: stats.ctime.getTime(),
45783 mtime: stats.mtime.getTime(),
45789 readDirectory(location) {
45790 ensureFileUri(location);
45791 return new Promise((c, e) => {
45792 const path = vscode_uri_1.URI.parse(location).fsPath;
45793 fs.readdir(path, { withFileTypes: true }, (err, children) => {
45797 c(children.map(stat => {
45798 if (stat.isSymbolicLink()) {
45799 return [stat.name, vscode_css_languageservice_1.FileType.SymbolicLink];
45801 else if (stat.isDirectory()) {
45802 return [stat.name, vscode_css_languageservice_1.FileType.Directory];
45804 else if (stat.isFile()) {
45805 return [stat.name, vscode_css_languageservice_1.FileType.File];
45808 return [stat.name, vscode_css_languageservice_1.FileType.Unknown];
45816 exports.getNodeFSRequestService = getNodeFSRequestService;
45821 /************************************************************************/
45822 /******/ // The module cache
45823 /******/ var __webpack_module_cache__ = {};
45825 /******/ // The require function
45826 /******/ function __webpack_require__(moduleId) {
45827 /******/ // Check if module is in cache
45828 /******/ if(__webpack_module_cache__[moduleId]) {
45829 /******/ return __webpack_module_cache__[moduleId].exports;
45831 /******/ // Create a new module (and put it into the cache)
45832 /******/ var module = __webpack_module_cache__[moduleId] = {
45833 /******/ // no module.id needed
45834 /******/ // no module.loaded needed
45835 /******/ exports: {}
45838 /******/ // Execute the module function
45839 /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
45841 /******/ // Return the exports of the module
45842 /******/ return module.exports;
45845 /************************************************************************/
45846 /******/ /* webpack/runtime/define property getters */
45848 /******/ // define getter functions for harmony exports
45849 /******/ __webpack_require__.d = (exports, definition) => {
45850 /******/ for(var key in definition) {
45851 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
45852 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
45858 /******/ /* webpack/runtime/hasOwnProperty shorthand */
45860 /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
45863 /******/ /* webpack/runtime/make namespace object */
45865 /******/ // define __esModule on exports
45866 /******/ __webpack_require__.r = (exports) => {
45867 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
45868 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
45870 /******/ Object.defineProperty(exports, '__esModule', { value: true });
45874 /************************************************************************/
45875 /******/ // module exports must be returned from runtime so entry inlining is disabled
45876 /******/ // startup
45877 /******/ // Load entry module and return exports
45878 /******/ return __webpack_require__(34);