1 (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2 /******/ // The module cache
3 /******/ var installedModules = {};
5 /******/ // The require function
6 /******/ function __webpack_require__(moduleId) {
8 /******/ // Check if module is in cache
9 /******/ if(installedModules[moduleId]) {
10 /******/ return installedModules[moduleId].exports;
12 /******/ // Create a new module (and put it into the cache)
13 /******/ var module = installedModules[moduleId] = {
19 /******/ // Execute the module function
20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22 /******/ // Flag the module as loaded
23 /******/ module.l = true;
25 /******/ // Return the exports of the module
26 /******/ return module.exports;
30 /******/ // expose the modules object (__webpack_modules__)
31 /******/ __webpack_require__.m = modules;
33 /******/ // expose the module cache
34 /******/ __webpack_require__.c = installedModules;
36 /******/ // define getter function for harmony exports
37 /******/ __webpack_require__.d = function(exports, name, getter) {
38 /******/ if(!__webpack_require__.o(exports, name)) {
39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
43 /******/ // define __esModule on exports
44 /******/ __webpack_require__.r = function(exports) {
45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48 /******/ Object.defineProperty(exports, '__esModule', { value: true });
51 /******/ // create a fake namespace object
52 /******/ // mode & 1: value is a module id, require it
53 /******/ // mode & 2: merge all properties of value into the ns
54 /******/ // mode & 4: return value when already ns object
55 /******/ // mode & 8|1: behave like require
56 /******/ __webpack_require__.t = function(value, mode) {
57 /******/ if(mode & 1) value = __webpack_require__(value);
58 /******/ if(mode & 8) return value;
59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60 /******/ var ns = Object.create(null);
61 /******/ __webpack_require__.r(ns);
62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
67 /******/ // getDefaultExport function for compatibility with non-harmony modules
68 /******/ __webpack_require__.n = function(module) {
69 /******/ var getter = module && module.__esModule ?
70 /******/ function getDefault() { return module['default']; } :
71 /******/ function getModuleExports() { return module; };
72 /******/ __webpack_require__.d(getter, 'a', getter);
73 /******/ return getter;
76 /******/ // Object.prototype.hasOwnProperty.call
77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79 /******/ // __webpack_public_path__
80 /******/ __webpack_require__.p = "";
83 /******/ // Load entry module and return exports
84 /******/ return __webpack_require__(__webpack_require__.s = 32);
86 /************************************************************************/
92 /***/ (function(module, exports) {
94 module.exports = require("path");
108 /***/ (function(module, exports) {
110 module.exports = require("os");
114 /***/ (function(module, exports) {
116 module.exports = require("crypto");
120 /***/ (function(module, exports) {
122 module.exports = require("net");
141 /***/ (function(module, exports, __webpack_require__) {
145 /*---------------------------------------------------------------------------------------------
146 * Copyright (c) Microsoft Corporation. All rights reserved.
147 * Licensed under the MIT License. See License.txt in the project root for license information.
148 *--------------------------------------------------------------------------------------------*/
149 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
150 return new (P || (P = Promise))(function (resolve, reject) {
151 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
152 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
153 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
154 step((generator = generator.apply(thisArg, _arguments || [])).next());
157 Object.defineProperty(exports, "__esModule", { value: true });
158 const vscode_languageserver_1 = __webpack_require__(33);
159 const languageModes_1 = __webpack_require__(71);
160 const formatting_1 = __webpack_require__(147);
161 const arrays_1 = __webpack_require__(143);
162 const documentContext_1 = __webpack_require__(148);
163 const vscode_uri_1 = __webpack_require__(110);
164 const runner_1 = __webpack_require__(149);
165 const htmlFolding_1 = __webpack_require__(150);
166 const customData_1 = __webpack_require__(151);
167 const selectionRanges_1 = __webpack_require__(152);
168 const semanticTokens_1 = __webpack_require__(154);
170 (function (TagCloseRequest) {
171 TagCloseRequest.type = new vscode_languageserver_1.RequestType('html/tag');
172 })(TagCloseRequest || (TagCloseRequest = {}));
173 var MatchingTagPositionRequest;
174 (function (MatchingTagPositionRequest) {
175 MatchingTagPositionRequest.type = new vscode_languageserver_1.RequestType('html/matchingTagPosition');
176 })(MatchingTagPositionRequest || (MatchingTagPositionRequest = {}));
177 var SemanticTokenRequest;
178 (function (SemanticTokenRequest) {
179 SemanticTokenRequest.type = new vscode_languageserver_1.RequestType('html/semanticTokens');
180 })(SemanticTokenRequest || (SemanticTokenRequest = {}));
181 var SemanticTokenLegendRequest;
182 (function (SemanticTokenLegendRequest) {
183 SemanticTokenLegendRequest.type = new vscode_languageserver_1.RequestType('html/semanticTokenLegend');
184 })(SemanticTokenLegendRequest || (SemanticTokenLegendRequest = {}));
185 // Create a connection for the server
186 const connection = vscode_languageserver_1.createConnection();
187 console.log = connection.console.log.bind(connection.console);
188 console.error = connection.console.error.bind(connection.console);
189 process.on('unhandledRejection', (e) => {
190 console.error(runner_1.formatError(`Unhandled exception`, e));
192 process.on('uncaughtException', (e) => {
193 console.error(runner_1.formatError(`Unhandled exception`, e));
195 // Create a text document manager.
196 const documents = new vscode_languageserver_1.TextDocuments(languageModes_1.TextDocument);
197 // Make the text document manager listen on the connection
198 // for open, change and close text document events
199 documents.listen(connection);
200 let workspaceFolders = [];
202 let clientSnippetSupport = false;
203 let dynamicFormatterRegistration = false;
204 let scopedSettingsSupport = false;
205 let workspaceFoldersSupport = false;
206 let foldingRangeLimit = Number.MAX_VALUE;
207 let globalSettings = {};
208 let documentSettings = {};
209 // remove document settings on close
210 documents.onDidClose(e => {
211 delete documentSettings[e.document.uri];
213 function getDocumentSettings(textDocument, needsDocumentSettings) {
214 if (scopedSettingsSupport && needsDocumentSettings()) {
215 let promise = documentSettings[textDocument.uri];
217 const scopeUri = textDocument.uri;
218 const configRequestParam = { items: [{ scopeUri, section: 'css' }, { scopeUri, section: 'html' }, { scopeUri, section: 'javascript' }] };
219 promise = connection.sendRequest(vscode_languageserver_1.ConfigurationRequest.type, configRequestParam).then(s => ({ css: s[0], html: s[1], javascript: s[2] }));
220 documentSettings[textDocument.uri] = promise;
224 return Promise.resolve(undefined);
226 // After the server has started the client sends an initialize request. The server receives
227 // in the passed params the rootPath of the workspace plus the client capabilities
228 connection.onInitialize((params) => {
229 const initializationOptions = params.initializationOptions;
230 workspaceFolders = params.workspaceFolders;
231 if (!Array.isArray(workspaceFolders)) {
232 workspaceFolders = [];
233 if (params.rootPath) {
234 workspaceFolders.push({ name: '', uri: vscode_uri_1.URI.file(params.rootPath).toString() });
237 const dataPaths = params.initializationOptions.dataPaths;
238 const providers = customData_1.getDataProviders(dataPaths);
240 get settings() { return globalSettings; },
241 get folders() { return workspaceFolders; }
243 languageModes = languageModes_1.getLanguageModes(initializationOptions ? initializationOptions.embeddedLanguages : { css: true, javascript: true }, workspace, params.capabilities, providers);
244 documents.onDidClose(e => {
245 languageModes.onDocumentRemoved(e.document);
247 connection.onShutdown(() => {
248 languageModes.dispose();
250 function getClientCapability(name, def) {
251 const keys = name.split('.');
252 let c = params.capabilities;
253 for (let i = 0; c && i < keys.length; i++) {
254 if (!c.hasOwnProperty(keys[i])) {
261 clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
262 dynamicFormatterRegistration = getClientCapability('textDocument.rangeFormatting.dynamicRegistration', false) && (typeof params.initializationOptions.provideFormatter !== 'boolean');
263 scopedSettingsSupport = getClientCapability('workspace.configuration', false);
264 workspaceFoldersSupport = getClientCapability('workspace.workspaceFolders', false);
265 foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
266 const capabilities = {
267 textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
268 completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/'] } : undefined,
270 documentHighlightProvider: true,
271 documentRangeFormattingProvider: params.initializationOptions.provideFormatter === true,
272 documentLinkProvider: { resolveProvider: false },
273 documentSymbolProvider: true,
274 definitionProvider: true,
275 signatureHelpProvider: { triggerCharacters: ['('] },
276 referencesProvider: true,
278 foldingRangeProvider: true,
279 selectionRangeProvider: true,
282 return { capabilities };
284 connection.onInitialized(() => {
285 if (workspaceFoldersSupport) {
286 connection.client.register(vscode_languageserver_1.DidChangeWorkspaceFoldersNotification.type);
287 connection.onNotification(vscode_languageserver_1.DidChangeWorkspaceFoldersNotification.type, e => {
288 const toAdd = e.event.added;
289 const toRemove = e.event.removed;
290 const updatedFolders = [];
291 if (workspaceFolders) {
292 for (const folder of workspaceFolders) {
293 if (!toRemove.some(r => r.uri === folder.uri) && !toAdd.some(r => r.uri === folder.uri)) {
294 updatedFolders.push(folder);
298 workspaceFolders = updatedFolders.concat(toAdd);
299 documents.all().forEach(triggerValidation);
303 let formatterRegistration = null;
304 // The settings have changed. Is send on server activation as well.
305 connection.onDidChangeConfiguration((change) => {
306 globalSettings = change.settings;
307 documentSettings = {}; // reset all document settings
308 documents.all().forEach(triggerValidation);
309 // dynamically enable & disable the formatter
310 if (dynamicFormatterRegistration) {
311 const enableFormatter = globalSettings && globalSettings.html && globalSettings.html.format && globalSettings.html.format.enable;
312 if (enableFormatter) {
313 if (!formatterRegistration) {
314 const documentSelector = [{ language: 'html' }, { language: 'handlebars' }, { language: 'htmldjango' }];
315 formatterRegistration = connection.client.register(vscode_languageserver_1.DocumentRangeFormattingRequest.type, { documentSelector });
318 else if (formatterRegistration) {
319 formatterRegistration.then(r => r.dispose());
320 formatterRegistration = null;
324 const pendingValidationRequests = {};
325 const validationDelayMs = 500;
326 // The content of a text document has changed. This event is emitted
327 // when the text document first opened or when its content has changed.
328 documents.onDidChangeContent(change => {
329 triggerValidation(change.document);
331 // a document has closed: clear all diagnostics
332 documents.onDidClose(event => {
333 cleanPendingValidation(event.document);
334 connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
336 function cleanPendingValidation(textDocument) {
337 const request = pendingValidationRequests[textDocument.uri];
339 clearTimeout(request);
340 delete pendingValidationRequests[textDocument.uri];
343 function triggerValidation(textDocument) {
344 cleanPendingValidation(textDocument);
345 pendingValidationRequests[textDocument.uri] = setTimeout(() => {
346 delete pendingValidationRequests[textDocument.uri];
347 validateTextDocument(textDocument);
348 }, validationDelayMs);
350 function isValidationEnabled(languageId, settings = globalSettings) {
351 const validationSettings = settings && settings.html && settings.html.validate;
352 if (validationSettings) {
353 return languageId === 'css' && validationSettings.styles !== false || languageId === 'javascript' && validationSettings.scripts !== false;
357 function validateTextDocument(textDocument) {
358 return __awaiter(this, void 0, void 0, function* () {
360 const version = textDocument.version;
361 const diagnostics = [];
362 if (textDocument.languageId === 'html') {
363 const modes = languageModes.getAllModesInDocument(textDocument);
364 const settings = yield getDocumentSettings(textDocument, () => modes.some(m => !!m.doValidation));
365 const latestTextDocument = documents.get(textDocument.uri);
366 if (latestTextDocument && latestTextDocument.version === version) { // check no new version has come in after in after the async op
367 modes.forEach(mode => {
368 if (mode.doValidation && isValidationEnabled(mode.getId(), settings)) {
369 arrays_1.pushAll(diagnostics, mode.doValidation(latestTextDocument, settings));
372 connection.sendDiagnostics({ uri: latestTextDocument.uri, diagnostics });
377 connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, e));
381 connection.onCompletion((textDocumentPosition, token) => __awaiter(this, void 0, void 0, function* () {
382 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
383 const document = documents.get(textDocumentPosition.textDocument.uri);
387 const mode = languageModes.getModeAtPosition(document, textDocumentPosition.position);
388 if (!mode || !mode.doComplete) {
389 return { isIncomplete: true, items: [] };
391 const doComplete = mode.doComplete;
392 if (mode.getId() !== 'html') {
394 "html.embbedded.complete" : {
395 "languageId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
398 connection.telemetry.logEvent({ key: 'html.embbedded.complete', value: { languageId: mode.getId() } });
400 const settings = yield getDocumentSettings(document, () => doComplete.length > 2);
401 const result = doComplete(document, textDocumentPosition.position, settings);
403 }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
405 connection.onCompletionResolve((item, token) => {
406 return runner_1.runSafe(() => {
407 const data = item.data;
408 if (data && data.languageId && data.uri) {
409 const mode = languageModes.getMode(data.languageId);
410 const document = documents.get(data.uri);
411 if (mode && mode.doResolve && document) {
412 return mode.doResolve(document, item);
416 }, item, `Error while resolving completion proposal`, token);
418 connection.onHover((textDocumentPosition, token) => {
419 return runner_1.runSafe(() => {
420 const document = documents.get(textDocumentPosition.textDocument.uri);
422 const mode = languageModes.getModeAtPosition(document, textDocumentPosition.position);
423 if (mode && mode.doHover) {
424 return mode.doHover(document, textDocumentPosition.position);
428 }, null, `Error while computing hover for ${textDocumentPosition.textDocument.uri}`, token);
430 connection.onDocumentHighlight((documentHighlightParams, token) => {
431 return runner_1.runSafe(() => {
432 const document = documents.get(documentHighlightParams.textDocument.uri);
434 const mode = languageModes.getModeAtPosition(document, documentHighlightParams.position);
435 if (mode && mode.findDocumentHighlight) {
436 return mode.findDocumentHighlight(document, documentHighlightParams.position);
440 }, [], `Error while computing document highlights for ${documentHighlightParams.textDocument.uri}`, token);
442 connection.onDefinition((definitionParams, token) => {
443 return runner_1.runSafe(() => {
444 const document = documents.get(definitionParams.textDocument.uri);
446 const mode = languageModes.getModeAtPosition(document, definitionParams.position);
447 if (mode && mode.findDefinition) {
448 return mode.findDefinition(document, definitionParams.position);
452 }, null, `Error while computing definitions for ${definitionParams.textDocument.uri}`, token);
454 connection.onReferences((referenceParams, token) => {
455 return runner_1.runSafe(() => {
456 const document = documents.get(referenceParams.textDocument.uri);
458 const mode = languageModes.getModeAtPosition(document, referenceParams.position);
459 if (mode && mode.findReferences) {
460 return mode.findReferences(document, referenceParams.position);
464 }, [], `Error while computing references for ${referenceParams.textDocument.uri}`, token);
466 connection.onSignatureHelp((signatureHelpParms, token) => {
467 return runner_1.runSafe(() => {
468 const document = documents.get(signatureHelpParms.textDocument.uri);
470 const mode = languageModes.getModeAtPosition(document, signatureHelpParms.position);
471 if (mode && mode.doSignatureHelp) {
472 return mode.doSignatureHelp(document, signatureHelpParms.position);
476 }, null, `Error while computing signature help for ${signatureHelpParms.textDocument.uri}`, token);
478 connection.onDocumentRangeFormatting((formatParams, token) => __awaiter(this, void 0, void 0, function* () {
479 return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
480 const document = documents.get(formatParams.textDocument.uri);
482 let settings = yield getDocumentSettings(document, () => true);
484 settings = globalSettings;
486 const unformattedTags = settings && settings.html && settings.html.format && settings.html.format.unformatted || '';
487 const enabledModes = { css: !unformattedTags.match(/\bstyle\b/), javascript: !unformattedTags.match(/\bscript\b/) };
488 return formatting_1.format(languageModes, document, formatParams.range, formatParams.options, settings, enabledModes);
491 }), [], `Error while formatting range for ${formatParams.textDocument.uri}`, token);
493 connection.onDocumentLinks((documentLinkParam, token) => {
494 return runner_1.runSafe(() => {
495 const document = documents.get(documentLinkParam.textDocument.uri);
498 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
499 languageModes.getAllModesInDocument(document).forEach(m => {
500 if (m.findDocumentLinks) {
501 arrays_1.pushAll(links, m.findDocumentLinks(document, documentContext));
506 }, [], `Error while document links for ${documentLinkParam.textDocument.uri}`, token);
508 connection.onDocumentSymbol((documentSymbolParms, token) => {
509 return runner_1.runSafe(() => {
510 const document = documents.get(documentSymbolParms.textDocument.uri);
513 languageModes.getAllModesInDocument(document).forEach(m => {
514 if (m.findDocumentSymbols) {
515 arrays_1.pushAll(symbols, m.findDocumentSymbols(document));
520 }, [], `Error while computing document symbols for ${documentSymbolParms.textDocument.uri}`, token);
522 connection.onRequest(vscode_languageserver_1.DocumentColorRequest.type, (params, token) => {
523 return runner_1.runSafe(() => {
525 const document = documents.get(params.textDocument.uri);
527 languageModes.getAllModesInDocument(document).forEach(m => {
528 if (m.findDocumentColors) {
529 arrays_1.pushAll(infos, m.findDocumentColors(document));
534 }, [], `Error while computing document colors for ${params.textDocument.uri}`, token);
536 connection.onRequest(vscode_languageserver_1.ColorPresentationRequest.type, (params, token) => {
537 return runner_1.runSafe(() => {
538 const document = documents.get(params.textDocument.uri);
540 const mode = languageModes.getModeAtPosition(document, params.range.start);
541 if (mode && mode.getColorPresentations) {
542 return mode.getColorPresentations(document, params.color, params.range);
546 }, [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
548 connection.onRequest(TagCloseRequest.type, (params, token) => {
549 return runner_1.runSafe(() => {
550 const document = documents.get(params.textDocument.uri);
552 const pos = params.position;
553 if (pos.character > 0) {
554 const mode = languageModes.getModeAtPosition(document, languageModes_1.Position.create(pos.line, pos.character - 1));
555 if (mode && mode.doAutoClose) {
556 return mode.doAutoClose(document, pos);
561 }, null, `Error while computing tag close actions for ${params.textDocument.uri}`, token);
563 connection.onFoldingRanges((params, token) => {
564 return runner_1.runSafe(() => {
565 const document = documents.get(params.textDocument.uri);
567 return htmlFolding_1.getFoldingRanges(languageModes, document, foldingRangeLimit, token);
570 }, null, `Error while computing folding regions for ${params.textDocument.uri}`, token);
572 connection.onSelectionRanges((params, token) => {
573 return runner_1.runSafe(() => {
574 const document = documents.get(params.textDocument.uri);
576 return selectionRanges_1.getSelectionRanges(languageModes, document, params.positions);
579 }, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
581 connection.onRenameRequest((params, token) => {
582 return runner_1.runSafe(() => {
583 const document = documents.get(params.textDocument.uri);
584 const position = params.position;
586 const htmlMode = languageModes.getMode('html');
587 if (htmlMode && htmlMode.doRename) {
588 return htmlMode.doRename(document, position, params.newName);
592 }, null, `Error while computing rename for ${params.textDocument.uri}`, token);
594 connection.onRequest(MatchingTagPositionRequest.type, (params, token) => {
595 return runner_1.runSafe(() => {
596 const document = documents.get(params.textDocument.uri);
598 const pos = params.position;
599 if (pos.character > 0) {
600 const mode = languageModes.getModeAtPosition(document, languageModes_1.Position.create(pos.line, pos.character - 1));
601 if (mode && mode.findMatchingTagPosition) {
602 return mode.findMatchingTagPosition(document, pos);
607 }, null, `Error while computing matching tag position for ${params.textDocument.uri}`, token);
609 connection.onRequest(MatchingTagPositionRequest.type, (params, token) => {
610 return runner_1.runSafe(() => {
611 const document = documents.get(params.textDocument.uri);
613 const pos = params.position;
614 if (pos.character > 0) {
615 const mode = languageModes.getModeAtPosition(document, languageModes_1.Position.create(pos.line, pos.character - 1));
616 if (mode && mode.findMatchingTagPosition) {
617 return mode.findMatchingTagPosition(document, pos);
622 }, null, `Error while computing matching tag position for ${params.textDocument.uri}`, token);
624 let semanticTokensProvider;
625 function getSemanticTokenProvider() {
626 if (!semanticTokensProvider) {
627 semanticTokensProvider = semanticTokens_1.newSemanticTokenProvider(languageModes);
629 return semanticTokensProvider;
631 connection.onRequest(SemanticTokenRequest.type, (params, token) => {
632 return runner_1.runSafe(() => {
633 const document = documents.get(params.textDocument.uri);
635 return getSemanticTokenProvider().getSemanticTokens(document, params.ranges);
638 }, null, `Error while computing semantic tokens for ${params.textDocument.uri}`, token);
640 connection.onRequest(SemanticTokenLegendRequest.type, (_params, token) => {
641 return runner_1.runSafe(() => {
642 return getSemanticTokenProvider().legend;
643 }, null, `Error while computing semantic tokens legend`, token);
645 // Listen on the connection
651 /***/ (function(module, exports, __webpack_require__) {
654 /* --------------------------------------------------------------------------------------------
\r
655 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
656 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
657 * ------------------------------------------------------------------------------------------ */
\r
658 /// <reference path="../typings/thenable.d.ts" />
\r
660 function __export(m) {
\r
661 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
\r
663 Object.defineProperty(exports, "__esModule", { value: true });
\r
664 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
665 exports.Event = vscode_languageserver_protocol_1.Event;
\r
666 const configuration_1 = __webpack_require__(60);
\r
667 const workspaceFolders_1 = __webpack_require__(62);
\r
668 const progress_1 = __webpack_require__(63);
\r
669 const Is = __webpack_require__(61);
\r
670 const UUID = __webpack_require__(64);
\r
671 // ------------- Reexport the API surface of the language worker API ----------------------
\r
672 __export(__webpack_require__(34));
\r
673 const fm = __webpack_require__(65);
\r
675 (function (Files) {
\r
676 Files.uriToFilePath = fm.uriToFilePath;
\r
677 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
\r
678 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
\r
679 Files.resolve = fm.resolve;
\r
680 Files.resolveModulePath = fm.resolveModulePath;
\r
681 })(Files = exports.Files || (exports.Files = {}));
\r
682 let shutdownReceived = false;
\r
683 let exitTimer = undefined;
\r
684 function setupExitTimer() {
\r
685 const argName = '--clientProcessId';
\r
686 function runTimer(value) {
\r
688 let processId = parseInt(value);
\r
689 if (!isNaN(processId)) {
\r
690 exitTimer = setInterval(() => {
\r
692 process.kill(processId, 0);
\r
695 // Parent process doesn't exist anymore. Exit the server.
\r
696 process.exit(shutdownReceived ? 0 : 1);
\r
705 for (let i = 2; i < process.argv.length; i++) {
\r
706 let arg = process.argv[i];
\r
707 if (arg === argName && i + 1 < process.argv.length) {
\r
708 runTimer(process.argv[i + 1]);
\r
712 let args = arg.split('=');
\r
713 if (args[0] === argName) {
\r
720 function null2Undefined(value) {
\r
721 if (value === null) {
\r
727 * A manager for simple text documents
\r
729 class TextDocuments {
\r
731 * Create a new text document manager.
\r
733 constructor(configuration) {
\r
734 this._documents = Object.create(null);
\r
735 this._configuration = configuration;
\r
736 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
\r
737 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
\r
738 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
\r
739 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
\r
740 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
\r
743 * An event that fires when a text document managed by this manager
\r
744 * has been opened or the content changes.
\r
746 get onDidChangeContent() {
\r
747 return this._onDidChangeContent.event;
\r
750 * An event that fires when a text document managed by this manager
\r
754 return this._onDidOpen.event;
\r
757 * An event that fires when a text document managed by this manager
\r
761 return this._onWillSave.event;
\r
764 * Sets a handler that will be called if a participant wants to provide
\r
765 * edits during a text document save.
\r
767 onWillSaveWaitUntil(handler) {
\r
768 this._willSaveWaitUntil = handler;
\r
771 * An event that fires when a text document managed by this manager
\r
775 return this._onDidSave.event;
\r
778 * An event that fires when a text document managed by this manager
\r
782 return this._onDidClose.event;
\r
785 * Returns the document for the given URI. Returns undefined if
\r
786 * the document is not mananged by this instance.
\r
788 * @param uri The text document's URI to retrieve.
\r
789 * @return the text document or `undefined`.
\r
792 return this._documents[uri];
\r
795 * Returns all text documents managed by this instance.
\r
797 * @return all text documents.
\r
800 return Object.keys(this._documents).map(key => this._documents[key]);
\r
803 * Returns the URIs of all text documents managed by this instance.
\r
805 * @return the URI's of all text documents.
\r
808 return Object.keys(this._documents);
\r
811 * Listens for `low level` notification on the given connection to
\r
812 * update the text documents managed by this instance.
\r
814 * @param connection The connection to listen on.
\r
816 listen(connection) {
\r
817 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
\r
818 connection.onDidOpenTextDocument((event) => {
\r
819 let td = event.textDocument;
\r
820 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
\r
821 this._documents[td.uri] = document;
\r
822 let toFire = Object.freeze({ document });
\r
823 this._onDidOpen.fire(toFire);
\r
824 this._onDidChangeContent.fire(toFire);
\r
826 connection.onDidChangeTextDocument((event) => {
\r
827 let td = event.textDocument;
\r
828 let changes = event.contentChanges;
\r
829 if (changes.length === 0) {
\r
832 let document = this._documents[td.uri];
\r
833 const { version } = td;
\r
834 if (version === null || version === void 0) {
\r
835 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
\r
837 document = this._configuration.update(document, changes, version);
\r
838 this._documents[td.uri] = document;
\r
839 this._onDidChangeContent.fire(Object.freeze({ document }));
\r
841 connection.onDidCloseTextDocument((event) => {
\r
842 let document = this._documents[event.textDocument.uri];
\r
844 delete this._documents[event.textDocument.uri];
\r
845 this._onDidClose.fire(Object.freeze({ document }));
\r
848 connection.onWillSaveTextDocument((event) => {
\r
849 let document = this._documents[event.textDocument.uri];
\r
851 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
\r
854 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
\r
855 let document = this._documents[event.textDocument.uri];
\r
856 if (document && this._willSaveWaitUntil) {
\r
857 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
\r
863 connection.onDidSaveTextDocument((event) => {
\r
864 let document = this._documents[event.textDocument.uri];
\r
866 this._onDidSave.fire(Object.freeze({ document }));
\r
871 exports.TextDocuments = TextDocuments;
\r
873 * Helps tracking error message. Equal occurences of the same
\r
874 * message are only stored once. This class is for example
\r
875 * useful if text documents are validated in a loop and equal
\r
876 * error message should be folded into one.
\r
878 class ErrorMessageTracker {
\r
880 this._messages = Object.create(null);
\r
883 * Add a message to the tracker.
\r
885 * @param message The message to add.
\r
888 let count = this._messages[message];
\r
893 this._messages[message] = count;
\r
896 * Send all tracked messages to the connection's window.
\r
898 * @param connection The connection established between client and server.
\r
900 sendErrors(connection) {
\r
901 Object.keys(this._messages).forEach(message => {
\r
902 connection.window.showErrorMessage(message);
\r
906 exports.ErrorMessageTracker = ErrorMessageTracker;
\r
907 class RemoteConsoleImpl {
\r
910 rawAttach(connection) {
\r
911 this._rawConnection = connection;
\r
913 attach(connection) {
\r
914 this._connection = connection;
\r
917 if (!this._connection) {
\r
918 throw new Error('Remote is not attached to a connection yet.');
\r
920 return this._connection;
\r
922 fillServerCapabilities(_capabilities) {
\r
924 initialize(_capabilities) {
\r
927 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
\r
930 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
\r
933 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
\r
936 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
\r
938 send(type, message) {
\r
939 if (this._rawConnection) {
\r
940 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
\r
944 class _RemoteWindowImpl {
\r
947 attach(connection) {
\r
948 this._connection = connection;
\r
951 if (!this._connection) {
\r
952 throw new Error('Remote is not attached to a connection yet.');
\r
954 return this._connection;
\r
956 initialize(_capabilities) {
\r
958 fillServerCapabilities(_capabilities) {
\r
960 showErrorMessage(message, ...actions) {
\r
961 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
\r
962 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
\r
964 showWarningMessage(message, ...actions) {
\r
965 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
\r
966 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
\r
968 showInformationMessage(message, ...actions) {
\r
969 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
\r
970 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
\r
973 const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
\r
974 var BulkRegistration;
\r
975 (function (BulkRegistration) {
\r
977 * Creates a new bulk registration.
\r
978 * @return an empty bulk registration.
\r
980 function create() {
\r
981 return new BulkRegistrationImpl();
\r
983 BulkRegistration.create = create;
\r
984 })(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
\r
985 class BulkRegistrationImpl {
\r
987 this._registrations = [];
\r
988 this._registered = new Set();
\r
990 add(type, registerOptions) {
\r
991 const method = Is.string(type) ? type : type.method;
\r
992 if (this._registered.has(method)) {
\r
993 throw new Error(`${method} is already added to this registration`);
\r
995 const id = UUID.generateUuid();
\r
996 this._registrations.push({
\r
999 registerOptions: registerOptions || {}
\r
1001 this._registered.add(method);
\r
1003 asRegistrationParams() {
\r
1005 registrations: this._registrations
\r
1009 var BulkUnregistration;
\r
1010 (function (BulkUnregistration) {
\r
1011 function create() {
\r
1012 return new BulkUnregistrationImpl(undefined, []);
\r
1014 BulkUnregistration.create = create;
\r
1015 })(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
\r
1016 class BulkUnregistrationImpl {
\r
1017 constructor(_connection, unregistrations) {
\r
1018 this._connection = _connection;
\r
1019 this._unregistrations = new Map();
\r
1020 unregistrations.forEach(unregistration => {
\r
1021 this._unregistrations.set(unregistration.method, unregistration);
\r
1024 get isAttached() {
\r
1025 return !!this._connection;
\r
1027 attach(connection) {
\r
1028 this._connection = connection;
\r
1030 add(unregistration) {
\r
1031 this._unregistrations.set(unregistration.method, unregistration);
\r
1034 let unregistrations = [];
\r
1035 for (let unregistration of this._unregistrations.values()) {
\r
1036 unregistrations.push(unregistration);
\r
1039 unregisterations: unregistrations
\r
1041 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
\r
1042 this._connection.console.info(`Bulk unregistration failed.`);
\r
1045 disposeSingle(arg) {
\r
1046 const method = Is.string(arg) ? arg : arg.method;
\r
1047 const unregistration = this._unregistrations.get(method);
\r
1048 if (!unregistration) {
\r
1052 unregisterations: [unregistration]
\r
1054 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
\r
1055 this._unregistrations.delete(method);
\r
1057 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
\r
1062 class RemoteClientImpl {
\r
1063 attach(connection) {
\r
1064 this._connection = connection;
\r
1066 get connection() {
\r
1067 if (!this._connection) {
\r
1068 throw new Error('Remote is not attached to a connection yet.');
\r
1070 return this._connection;
\r
1072 initialize(_capabilities) {
\r
1074 fillServerCapabilities(_capabilities) {
\r
1076 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
\r
1077 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
\r
1078 return this.registerMany(typeOrRegistrations);
\r
1080 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
\r
1081 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
\r
1084 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
\r
1087 registerSingle1(unregistration, type, registerOptions) {
\r
1088 const method = Is.string(type) ? type : type.method;
\r
1089 const id = UUID.generateUuid();
\r
1091 registrations: [{ id, method, registerOptions: registerOptions || {} }]
\r
1093 if (!unregistration.isAttached) {
\r
1094 unregistration.attach(this._connection);
\r
1096 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
\r
1097 unregistration.add({ id: id, method: method });
\r
1098 return unregistration;
\r
1100 this.connection.console.info(`Registering request handler for ${method} failed.`);
\r
1101 return Promise.reject(_error);
\r
1104 registerSingle2(type, registerOptions) {
\r
1105 const method = Is.string(type) ? type : type.method;
\r
1106 const id = UUID.generateUuid();
\r
1108 registrations: [{ id, method, registerOptions: registerOptions || {} }]
\r
1110 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
\r
1111 return vscode_languageserver_protocol_1.Disposable.create(() => {
\r
1112 this.unregisterSingle(id, method);
\r
1115 this.connection.console.info(`Registering request handler for ${method} failed.`);
\r
1116 return Promise.reject(_error);
\r
1119 unregisterSingle(id, method) {
\r
1121 unregisterations: [{ id, method }]
\r
1123 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
\r
1124 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
\r
1127 registerMany(registrations) {
\r
1128 let params = registrations.asRegistrationParams();
\r
1129 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
\r
1130 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
\r
1132 this.connection.console.info(`Bulk registration failed.`);
\r
1133 return Promise.reject(_error);
\r
1137 class _RemoteWorkspaceImpl {
\r
1140 attach(connection) {
\r
1141 this._connection = connection;
\r
1143 get connection() {
\r
1144 if (!this._connection) {
\r
1145 throw new Error('Remote is not attached to a connection yet.');
\r
1147 return this._connection;
\r
1149 initialize(_capabilities) {
\r
1151 fillServerCapabilities(_capabilities) {
\r
1153 applyEdit(paramOrEdit) {
\r
1154 function isApplyWorkspaceEditParams(value) {
\r
1155 return value && !!value.edit;
\r
1157 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
\r
1158 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
\r
1161 const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
\r
1162 class TelemetryImpl {
\r
1165 attach(connection) {
\r
1166 this._connection = connection;
\r
1168 get connection() {
\r
1169 if (!this._connection) {
\r
1170 throw new Error('Remote is not attached to a connection yet.');
\r
1172 return this._connection;
\r
1174 initialize(_capabilities) {
\r
1176 fillServerCapabilities(_capabilities) {
\r
1179 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
\r
1182 class TracerImpl {
\r
1184 this._trace = vscode_languageserver_protocol_1.Trace.Off;
\r
1186 attach(connection) {
\r
1187 this._connection = connection;
\r
1189 get connection() {
\r
1190 if (!this._connection) {
\r
1191 throw new Error('Remote is not attached to a connection yet.');
\r
1193 return this._connection;
\r
1195 initialize(_capabilities) {
\r
1197 fillServerCapabilities(_capabilities) {
\r
1199 set trace(value) {
\r
1200 this._trace = value;
\r
1202 log(message, verbose) {
\r
1203 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
\r
1206 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
\r
1208 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
\r
1212 class LanguagesImpl {
\r
1215 attach(connection) {
\r
1216 this._connection = connection;
\r
1218 get connection() {
\r
1219 if (!this._connection) {
\r
1220 throw new Error('Remote is not attached to a connection yet.');
\r
1222 return this._connection;
\r
1224 initialize(_capabilities) {
\r
1226 fillServerCapabilities(_capabilities) {
\r
1228 attachWorkDoneProgress(params) {
\r
1229 return progress_1.attachWorkDone(this.connection, params);
\r
1231 attachPartialResultProgress(_type, params) {
\r
1232 return progress_1.attachPartialResult(this.connection, params);
\r
1235 exports.LanguagesImpl = LanguagesImpl;
\r
1236 function combineConsoleFeatures(one, two) {
\r
1237 return function (Base) {
\r
1238 return two(one(Base));
\r
1241 exports.combineConsoleFeatures = combineConsoleFeatures;
\r
1242 function combineTelemetryFeatures(one, two) {
\r
1243 return function (Base) {
\r
1244 return two(one(Base));
\r
1247 exports.combineTelemetryFeatures = combineTelemetryFeatures;
\r
1248 function combineTracerFeatures(one, two) {
\r
1249 return function (Base) {
\r
1250 return two(one(Base));
\r
1253 exports.combineTracerFeatures = combineTracerFeatures;
\r
1254 function combineClientFeatures(one, two) {
\r
1255 return function (Base) {
\r
1256 return two(one(Base));
\r
1259 exports.combineClientFeatures = combineClientFeatures;
\r
1260 function combineWindowFeatures(one, two) {
\r
1261 return function (Base) {
\r
1262 return two(one(Base));
\r
1265 exports.combineWindowFeatures = combineWindowFeatures;
\r
1266 function combineWorkspaceFeatures(one, two) {
\r
1267 return function (Base) {
\r
1268 return two(one(Base));
\r
1271 exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
\r
1272 function combineLanguagesFeatures(one, two) {
\r
1273 return function (Base) {
\r
1274 return two(one(Base));
\r
1277 exports.combineLanguagesFeatures = combineLanguagesFeatures;
\r
1278 function combineFeatures(one, two) {
\r
1279 function combine(one, two, func) {
\r
1281 return func(one, two);
\r
1291 __brand: 'features',
\r
1292 console: combine(one.console, two.console, combineConsoleFeatures),
\r
1293 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
\r
1294 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
\r
1295 client: combine(one.client, two.client, combineClientFeatures),
\r
1296 window: combine(one.window, two.window, combineWindowFeatures),
\r
1297 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
\r
1301 exports.combineFeatures = combineFeatures;
\r
1302 function createConnection(arg1, arg2, arg3, arg4) {
\r
1307 if (arg1 !== void 0 && arg1.__brand === 'features') {
\r
1313 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
\r
1321 return _createConnection(input, output, strategy, factories);
\r
1323 exports.createConnection = createConnection;
\r
1324 function _createConnection(input, output, strategy, factories) {
\r
1325 if (!input && !output && process.argv.length > 2) {
\r
1326 let port = void 0;
\r
1327 let pipeName = void 0;
\r
1328 let argv = process.argv.slice(2);
\r
1329 for (let i = 0; i < argv.length; i++) {
\r
1330 let arg = argv[i];
\r
1331 if (arg === '--node-ipc') {
\r
1332 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
\r
1333 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
\r
1336 else if (arg === '--stdio') {
\r
1337 input = process.stdin;
\r
1338 output = process.stdout;
\r
1341 else if (arg === '--socket') {
\r
1342 port = parseInt(argv[i + 1]);
\r
1345 else if (arg === '--pipe') {
\r
1346 pipeName = argv[i + 1];
\r
1350 var args = arg.split('=');
\r
1351 if (args[0] === '--socket') {
\r
1352 port = parseInt(args[1]);
\r
1355 else if (args[0] === '--pipe') {
\r
1356 pipeName = args[1];
\r
1362 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
\r
1363 input = transport[0];
\r
1364 output = transport[1];
\r
1366 else if (pipeName) {
\r
1367 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
\r
1368 input = transport[0];
\r
1369 output = transport[1];
\r
1372 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
\r
1374 throw new Error('Connection input stream is not set. ' + commandLineMessage);
\r
1377 throw new Error('Connection output stream is not set. ' + commandLineMessage);
\r
1379 // Backwards compatibility
\r
1380 if (Is.func(input.read) && Is.func(input.on)) {
\r
1381 let inputStream = input;
\r
1382 inputStream.on('end', () => {
\r
1383 process.exit(shutdownReceived ? 0 : 1);
\r
1385 inputStream.on('close', () => {
\r
1386 process.exit(shutdownReceived ? 0 : 1);
\r
1389 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
\r
1390 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
\r
1391 logger.rawAttach(connection);
\r
1392 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
\r
1393 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
\r
1394 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
\r
1395 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
\r
1396 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
\r
1397 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
\r
1398 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
\r
1399 function asPromise(value) {
\r
1400 if (value instanceof Promise) {
\r
1403 else if (Is.thenable(value)) {
\r
1404 return new Promise((resolve, reject) => {
\r
1405 value.then((resolved) => resolve(resolved), (error) => reject(error));
\r
1409 return Promise.resolve(value);
\r
1412 let shutdownHandler = undefined;
\r
1413 let initializeHandler = undefined;
\r
1414 let exitHandler = undefined;
\r
1415 let protocolConnection = {
\r
1416 listen: () => connection.listen(),
\r
1417 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
\r
1418 onRequest: (type, handler) => connection.onRequest(type, handler),
\r
1419 sendNotification: (type, param) => {
\r
1420 const method = Is.string(type) ? type : type.method;
\r
1421 if (arguments.length === 1) {
\r
1422 connection.sendNotification(method);
\r
1425 connection.sendNotification(method, param);
\r
1428 onNotification: (type, handler) => connection.onNotification(type, handler),
\r
1429 onProgress: connection.onProgress,
\r
1430 sendProgress: connection.sendProgress,
\r
1431 onInitialize: (handler) => initializeHandler = handler,
\r
1432 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
\r
1433 onShutdown: (handler) => shutdownHandler = handler,
\r
1434 onExit: (handler) => exitHandler = handler,
\r
1435 get console() { return logger; },
\r
1436 get telemetry() { return telemetry; },
\r
1437 get tracer() { return tracer; },
\r
1438 get client() { return client; },
\r
1439 get window() { return remoteWindow; },
\r
1440 get workspace() { return workspace; },
\r
1441 get languages() { return languages; },
\r
1442 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
\r
1443 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
\r
1444 __textDocumentSync: undefined,
\r
1445 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
\r
1446 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
\r
1447 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
\r
1448 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
\r
1449 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
\r
1450 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
\r
1451 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
\r
1452 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
\r
1453 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1455 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
\r
1456 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1458 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
\r
1459 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
\r
1460 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1462 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
\r
1463 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1465 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
\r
1466 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1468 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
\r
1469 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1471 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
\r
1472 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1474 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
\r
1475 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1477 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
\r
1478 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1480 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
\r
1481 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1483 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
\r
1484 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1486 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
\r
1487 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1489 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
\r
1490 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1492 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
\r
1493 return handler(params, cancel);
\r
1495 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
\r
1496 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1498 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
\r
1499 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1501 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
\r
1502 return handler(params, cancel);
\r
1504 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
\r
1505 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1507 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
\r
1508 return handler(params, cancel);
\r
1510 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
\r
1511 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1513 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
\r
1514 return handler(params, cancel);
\r
1516 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
\r
1517 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1519 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
\r
1520 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1522 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
\r
1523 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1525 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
\r
1526 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
\r
1528 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
\r
1529 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
\r
1531 dispose: () => connection.dispose()
\r
1533 for (let remote of allRemotes) {
\r
1534 remote.attach(protocolConnection);
\r
1536 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
\r
1537 const processId = params.processId;
\r
1538 if (Is.number(processId) && exitTimer === void 0) {
\r
1539 // We received a parent process id. Set up a timer to periodically check
\r
1540 // if the parent is still alive.
\r
1541 setInterval(() => {
\r
1543 process.kill(processId, 0);
\r
1546 // Parent process doesn't exist anymore. Exit the server.
\r
1547 process.exit(shutdownReceived ? 0 : 1);
\r
1551 if (Is.string(params.trace)) {
\r
1552 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
\r
1554 for (let remote of allRemotes) {
\r
1555 remote.initialize(params.capabilities);
\r
1557 if (initializeHandler) {
\r
1558 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
\r
1559 return asPromise(result).then((value) => {
\r
1560 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
\r
1563 let result = value;
\r
1565 result = { capabilities: {} };
\r
1567 let capabilities = result.capabilities;
\r
1568 if (!capabilities) {
\r
1569 capabilities = {};
\r
1570 result.capabilities = capabilities;
\r
1572 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
\r
1573 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
\r
1575 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
\r
1576 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
\r
1578 for (let remote of allRemotes) {
\r
1579 remote.fillServerCapabilities(capabilities);
\r
1585 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
\r
1586 for (let remote of allRemotes) {
\r
1587 remote.fillServerCapabilities(result.capabilities);
\r
1592 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
\r
1593 shutdownReceived = true;
\r
1594 if (shutdownHandler) {
\r
1595 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
\r
1601 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
\r
1603 if (exitHandler) {
\r
1608 if (shutdownReceived) {
\r
1616 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
\r
1617 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
\r
1619 return protocolConnection;
\r
1621 // Export the protocol currently in proposed state.
\r
1622 const callHierarchy_proposed_1 = __webpack_require__(69);
\r
1623 const st = __webpack_require__(70);
\r
1624 var ProposedFeatures;
\r
1625 (function (ProposedFeatures) {
\r
1626 ProposedFeatures.all = {
\r
1627 __brand: 'features',
\r
1628 languages: combineLanguagesFeatures(callHierarchy_proposed_1.CallHierarchyFeature, st.SemanticTokensFeature)
\r
1630 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
\r
1631 })(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
\r
1632 //# sourceMappingURL=main.js.map
1636 /***/ (function(module, exports, __webpack_require__) {
1639 /* --------------------------------------------------------------------------------------------
\r
1640 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
1641 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
1642 * ------------------------------------------------------------------------------------------ */
\r
1644 function __export(m) {
\r
1645 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
\r
1647 Object.defineProperty(exports, "__esModule", { value: true });
\r
1648 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
1649 exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
\r
1650 exports.ResponseError = vscode_jsonrpc_1.ResponseError;
\r
1651 exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
\r
1652 exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
\r
1653 exports.Disposable = vscode_jsonrpc_1.Disposable;
\r
1654 exports.Event = vscode_jsonrpc_1.Event;
\r
1655 exports.Emitter = vscode_jsonrpc_1.Emitter;
\r
1656 exports.Trace = vscode_jsonrpc_1.Trace;
\r
1657 exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
\r
1658 exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
\r
1659 exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
\r
1660 exports.RequestType = vscode_jsonrpc_1.RequestType;
\r
1661 exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
\r
1662 exports.NotificationType = vscode_jsonrpc_1.NotificationType;
\r
1663 exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
\r
1664 exports.MessageReader = vscode_jsonrpc_1.MessageReader;
\r
1665 exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
\r
1666 exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
\r
1667 exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
\r
1668 exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
\r
1669 exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
\r
1670 exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
\r
1671 exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
\r
1672 exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
\r
1673 exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
\r
1674 exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
\r
1675 exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
\r
1676 exports.ProgressType = vscode_jsonrpc_1.ProgressType;
\r
1677 __export(__webpack_require__(45));
\r
1678 __export(__webpack_require__(46));
\r
1679 const callHierarchy = __webpack_require__(58);
\r
1680 const st = __webpack_require__(59);
\r
1682 (function (Proposed) {
\r
1683 let CallHierarchyPrepareRequest;
\r
1684 (function (CallHierarchyPrepareRequest) {
\r
1685 CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;
\r
1686 CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;
\r
1687 })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));
\r
1688 let CallHierarchyIncomingCallsRequest;
\r
1689 (function (CallHierarchyIncomingCallsRequest) {
\r
1690 CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
\r
1691 CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
\r
1692 })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
\r
1693 let CallHierarchyOutgoingCallsRequest;
\r
1694 (function (CallHierarchyOutgoingCallsRequest) {
\r
1695 CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
\r
1696 CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
\r
1697 })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
\r
1698 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
\r
1699 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
\r
1700 Proposed.SemanticTokens = st.SemanticTokens;
\r
1701 let SemanticTokensRequest;
\r
1702 (function (SemanticTokensRequest) {
\r
1703 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
\r
1704 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
\r
1705 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
\r
1706 let SemanticTokensEditsRequest;
\r
1707 (function (SemanticTokensEditsRequest) {
\r
1708 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
\r
1709 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
\r
1710 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
\r
1711 let SemanticTokensRangeRequest;
\r
1712 (function (SemanticTokensRangeRequest) {
\r
1713 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
\r
1714 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
\r
1715 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
\r
1716 })(Proposed = exports.Proposed || (exports.Proposed = {}));
\r
1717 function createProtocolConnection(reader, writer, logger, strategy) {
\r
1718 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
\r
1720 exports.createProtocolConnection = createProtocolConnection;
\r
1725 /***/ (function(module, exports, __webpack_require__) {
1728 /* --------------------------------------------------------------------------------------------
\r
1729 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
1730 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
1731 * ------------------------------------------------------------------------------------------ */
\r
1732 /// <reference path="../typings/thenable.d.ts" />
\r
1734 function __export(m) {
\r
1735 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
\r
1737 Object.defineProperty(exports, "__esModule", { value: true });
\r
1738 const Is = __webpack_require__(36);
\r
1739 const messages_1 = __webpack_require__(37);
\r
1740 exports.RequestType = messages_1.RequestType;
\r
1741 exports.RequestType0 = messages_1.RequestType0;
\r
1742 exports.RequestType1 = messages_1.RequestType1;
\r
1743 exports.RequestType2 = messages_1.RequestType2;
\r
1744 exports.RequestType3 = messages_1.RequestType3;
\r
1745 exports.RequestType4 = messages_1.RequestType4;
\r
1746 exports.RequestType5 = messages_1.RequestType5;
\r
1747 exports.RequestType6 = messages_1.RequestType6;
\r
1748 exports.RequestType7 = messages_1.RequestType7;
\r
1749 exports.RequestType8 = messages_1.RequestType8;
\r
1750 exports.RequestType9 = messages_1.RequestType9;
\r
1751 exports.ResponseError = messages_1.ResponseError;
\r
1752 exports.ErrorCodes = messages_1.ErrorCodes;
\r
1753 exports.NotificationType = messages_1.NotificationType;
\r
1754 exports.NotificationType0 = messages_1.NotificationType0;
\r
1755 exports.NotificationType1 = messages_1.NotificationType1;
\r
1756 exports.NotificationType2 = messages_1.NotificationType2;
\r
1757 exports.NotificationType3 = messages_1.NotificationType3;
\r
1758 exports.NotificationType4 = messages_1.NotificationType4;
\r
1759 exports.NotificationType5 = messages_1.NotificationType5;
\r
1760 exports.NotificationType6 = messages_1.NotificationType6;
\r
1761 exports.NotificationType7 = messages_1.NotificationType7;
\r
1762 exports.NotificationType8 = messages_1.NotificationType8;
\r
1763 exports.NotificationType9 = messages_1.NotificationType9;
\r
1764 const messageReader_1 = __webpack_require__(38);
\r
1765 exports.MessageReader = messageReader_1.MessageReader;
\r
1766 exports.StreamMessageReader = messageReader_1.StreamMessageReader;
\r
1767 exports.IPCMessageReader = messageReader_1.IPCMessageReader;
\r
1768 exports.SocketMessageReader = messageReader_1.SocketMessageReader;
\r
1769 const messageWriter_1 = __webpack_require__(40);
\r
1770 exports.MessageWriter = messageWriter_1.MessageWriter;
\r
1771 exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
\r
1772 exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
\r
1773 exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
\r
1774 const events_1 = __webpack_require__(39);
\r
1775 exports.Disposable = events_1.Disposable;
\r
1776 exports.Event = events_1.Event;
\r
1777 exports.Emitter = events_1.Emitter;
\r
1778 const cancellation_1 = __webpack_require__(41);
\r
1779 exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
\r
1780 exports.CancellationToken = cancellation_1.CancellationToken;
\r
1781 const linkedMap_1 = __webpack_require__(42);
\r
1782 __export(__webpack_require__(43));
\r
1783 __export(__webpack_require__(44));
\r
1784 var CancelNotification;
\r
1785 (function (CancelNotification) {
\r
1786 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
\r
1787 })(CancelNotification || (CancelNotification = {}));
\r
1788 var ProgressNotification;
\r
1789 (function (ProgressNotification) {
\r
1790 ProgressNotification.type = new messages_1.NotificationType('$/progress');
\r
1791 })(ProgressNotification || (ProgressNotification = {}));
\r
1792 class ProgressType {
\r
1796 exports.ProgressType = ProgressType;
\r
1797 exports.NullLogger = Object.freeze({
\r
1804 (function (Trace) {
\r
1805 Trace[Trace["Off"] = 0] = "Off";
\r
1806 Trace[Trace["Messages"] = 1] = "Messages";
\r
1807 Trace[Trace["Verbose"] = 2] = "Verbose";
\r
1808 })(Trace = exports.Trace || (exports.Trace = {}));
\r
1809 (function (Trace) {
\r
1810 function fromString(value) {
\r
1811 if (!Is.string(value)) {
\r
1814 value = value.toLowerCase();
\r
1819 return Trace.Messages;
\r
1821 return Trace.Verbose;
\r
1826 Trace.fromString = fromString;
\r
1827 function toString(value) {
\r
1831 case Trace.Messages:
\r
1832 return 'messages';
\r
1833 case Trace.Verbose:
\r
1839 Trace.toString = toString;
\r
1840 })(Trace = exports.Trace || (exports.Trace = {}));
\r
1842 (function (TraceFormat) {
\r
1843 TraceFormat["Text"] = "text";
\r
1844 TraceFormat["JSON"] = "json";
\r
1845 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
\r
1846 (function (TraceFormat) {
\r
1847 function fromString(value) {
\r
1848 value = value.toLowerCase();
\r
1849 if (value === 'json') {
\r
1850 return TraceFormat.JSON;
\r
1853 return TraceFormat.Text;
\r
1856 TraceFormat.fromString = fromString;
\r
1857 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
\r
1858 var SetTraceNotification;
\r
1859 (function (SetTraceNotification) {
\r
1860 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
\r
1861 })(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
\r
1862 var LogTraceNotification;
\r
1863 (function (LogTraceNotification) {
\r
1864 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
\r
1865 })(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
\r
1866 var ConnectionErrors;
\r
1867 (function (ConnectionErrors) {
\r
1869 * The connection is closed.
\r
1871 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
\r
1873 * The connection got disposed.
\r
1875 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
\r
1877 * The connection is already in listening mode.
\r
1879 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
\r
1880 })(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
\r
1881 class ConnectionError extends Error {
\r
1882 constructor(code, message) {
\r
1885 Object.setPrototypeOf(this, ConnectionError.prototype);
\r
1888 exports.ConnectionError = ConnectionError;
\r
1889 var ConnectionStrategy;
\r
1890 (function (ConnectionStrategy) {
\r
1891 function is(value) {
\r
1892 let candidate = value;
\r
1893 return candidate && Is.func(candidate.cancelUndispatched);
\r
1895 ConnectionStrategy.is = is;
\r
1896 })(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
\r
1897 var ConnectionState;
\r
1898 (function (ConnectionState) {
\r
1899 ConnectionState[ConnectionState["New"] = 1] = "New";
\r
1900 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
\r
1901 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
\r
1902 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
\r
1903 })(ConnectionState || (ConnectionState = {}));
\r
1904 function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
\r
1905 let sequenceNumber = 0;
\r
1906 let notificationSquenceNumber = 0;
\r
1907 let unknownResponseSquenceNumber = 0;
\r
1908 const version = '2.0';
\r
1909 let starRequestHandler = undefined;
\r
1910 let requestHandlers = Object.create(null);
\r
1911 let starNotificationHandler = undefined;
\r
1912 let notificationHandlers = Object.create(null);
\r
1913 let progressHandlers = new Map();
\r
1915 let messageQueue = new linkedMap_1.LinkedMap();
\r
1916 let responsePromises = Object.create(null);
\r
1917 let requestTokens = Object.create(null);
\r
1918 let trace = Trace.Off;
\r
1919 let traceFormat = TraceFormat.Text;
\r
1921 let state = ConnectionState.New;
\r
1922 let errorEmitter = new events_1.Emitter();
\r
1923 let closeEmitter = new events_1.Emitter();
\r
1924 let unhandledNotificationEmitter = new events_1.Emitter();
\r
1925 let unhandledProgressEmitter = new events_1.Emitter();
\r
1926 let disposeEmitter = new events_1.Emitter();
\r
1927 function createRequestQueueKey(id) {
\r
1928 return 'req-' + id.toString();
\r
1930 function createResponseQueueKey(id) {
\r
1931 if (id === null) {
\r
1932 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
\r
1935 return 'res-' + id.toString();
\r
1938 function createNotificationQueueKey() {
\r
1939 return 'not-' + (++notificationSquenceNumber).toString();
\r
1941 function addMessageToQueue(queue, message) {
\r
1942 if (messages_1.isRequestMessage(message)) {
\r
1943 queue.set(createRequestQueueKey(message.id), message);
\r
1945 else if (messages_1.isResponseMessage(message)) {
\r
1946 queue.set(createResponseQueueKey(message.id), message);
\r
1949 queue.set(createNotificationQueueKey(), message);
\r
1952 function cancelUndispatched(_message) {
\r
1955 function isListening() {
\r
1956 return state === ConnectionState.Listening;
\r
1958 function isClosed() {
\r
1959 return state === ConnectionState.Closed;
\r
1961 function isDisposed() {
\r
1962 return state === ConnectionState.Disposed;
\r
1964 function closeHandler() {
\r
1965 if (state === ConnectionState.New || state === ConnectionState.Listening) {
\r
1966 state = ConnectionState.Closed;
\r
1967 closeEmitter.fire(undefined);
\r
1969 // If the connection is disposed don't sent close events.
\r
1971 function readErrorHandler(error) {
\r
1972 errorEmitter.fire([error, undefined, undefined]);
\r
1974 function writeErrorHandler(data) {
\r
1975 errorEmitter.fire(data);
\r
1977 messageReader.onClose(closeHandler);
\r
1978 messageReader.onError(readErrorHandler);
\r
1979 messageWriter.onClose(closeHandler);
\r
1980 messageWriter.onError(writeErrorHandler);
\r
1981 function triggerMessageQueue() {
\r
1982 if (timer || messageQueue.size === 0) {
\r
1985 timer = setImmediate(() => {
\r
1986 timer = undefined;
\r
1987 processMessageQueue();
\r
1990 function processMessageQueue() {
\r
1991 if (messageQueue.size === 0) {
\r
1994 let message = messageQueue.shift();
\r
1996 if (messages_1.isRequestMessage(message)) {
\r
1997 handleRequest(message);
\r
1999 else if (messages_1.isNotificationMessage(message)) {
\r
2000 handleNotification(message);
\r
2002 else if (messages_1.isResponseMessage(message)) {
\r
2003 handleResponse(message);
\r
2006 handleInvalidMessage(message);
\r
2010 triggerMessageQueue();
\r
2013 let callback = (message) => {
\r
2015 // We have received a cancellation message. Check if the message is still in the queue
\r
2016 // and cancel it if allowed to do so.
\r
2017 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
\r
2018 let key = createRequestQueueKey(message.params.id);
\r
2019 let toCancel = messageQueue.get(key);
\r
2020 if (messages_1.isRequestMessage(toCancel)) {
\r
2021 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
\r
2022 if (response && (response.error !== void 0 || response.result !== void 0)) {
\r
2023 messageQueue.delete(key);
\r
2024 response.id = toCancel.id;
\r
2025 traceSendingResponse(response, message.method, Date.now());
\r
2026 messageWriter.write(response);
\r
2031 addMessageToQueue(messageQueue, message);
\r
2034 triggerMessageQueue();
\r
2037 function handleRequest(requestMessage) {
\r
2038 if (isDisposed()) {
\r
2039 // we return here silently since we fired an event when the
\r
2040 // connection got disposed.
\r
2043 function reply(resultOrError, method, startTime) {
\r
2046 id: requestMessage.id
\r
2048 if (resultOrError instanceof messages_1.ResponseError) {
\r
2049 message.error = resultOrError.toJson();
\r
2052 message.result = resultOrError === void 0 ? null : resultOrError;
\r
2054 traceSendingResponse(message, method, startTime);
\r
2055 messageWriter.write(message);
\r
2057 function replyError(error, method, startTime) {
\r
2060 id: requestMessage.id,
\r
2061 error: error.toJson()
\r
2063 traceSendingResponse(message, method, startTime);
\r
2064 messageWriter.write(message);
\r
2066 function replySuccess(result, method, startTime) {
\r
2067 // The JSON RPC defines that a response must either have a result or an error
\r
2068 // So we can't treat undefined as a valid response result.
\r
2069 if (result === void 0) {
\r
2074 id: requestMessage.id,
\r
2077 traceSendingResponse(message, method, startTime);
\r
2078 messageWriter.write(message);
\r
2080 traceReceivedRequest(requestMessage);
\r
2081 let element = requestHandlers[requestMessage.method];
\r
2083 let requestHandler;
\r
2085 type = element.type;
\r
2086 requestHandler = element.handler;
\r
2088 let startTime = Date.now();
\r
2089 if (requestHandler || starRequestHandler) {
\r
2090 let cancellationSource = new cancellation_1.CancellationTokenSource();
\r
2091 let tokenKey = String(requestMessage.id);
\r
2092 requestTokens[tokenKey] = cancellationSource;
\r
2094 let handlerResult;
\r
2095 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
\r
2096 handlerResult = requestHandler
\r
2097 ? requestHandler(cancellationSource.token)
\r
2098 : starRequestHandler(requestMessage.method, cancellationSource.token);
\r
2100 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
\r
2101 handlerResult = requestHandler
\r
2102 ? requestHandler(...requestMessage.params, cancellationSource.token)
\r
2103 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
\r
2106 handlerResult = requestHandler
\r
2107 ? requestHandler(requestMessage.params, cancellationSource.token)
\r
2108 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
\r
2110 let promise = handlerResult;
\r
2111 if (!handlerResult) {
\r
2112 delete requestTokens[tokenKey];
\r
2113 replySuccess(handlerResult, requestMessage.method, startTime);
\r
2115 else if (promise.then) {
\r
2116 promise.then((resultOrError) => {
\r
2117 delete requestTokens[tokenKey];
\r
2118 reply(resultOrError, requestMessage.method, startTime);
\r
2120 delete requestTokens[tokenKey];
\r
2121 if (error instanceof messages_1.ResponseError) {
\r
2122 replyError(error, requestMessage.method, startTime);
\r
2124 else if (error && Is.string(error.message)) {
\r
2125 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
\r
2128 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
\r
2133 delete requestTokens[tokenKey];
\r
2134 reply(handlerResult, requestMessage.method, startTime);
\r
2138 delete requestTokens[tokenKey];
\r
2139 if (error instanceof messages_1.ResponseError) {
\r
2140 reply(error, requestMessage.method, startTime);
\r
2142 else if (error && Is.string(error.message)) {
\r
2143 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
\r
2146 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
\r
2151 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
\r
2154 function handleResponse(responseMessage) {
\r
2155 if (isDisposed()) {
\r
2156 // See handle request.
\r
2159 if (responseMessage.id === null) {
\r
2160 if (responseMessage.error) {
\r
2161 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
\r
2164 logger.error(`Received response message without id. No further error information provided.`);
\r
2168 let key = String(responseMessage.id);
\r
2169 let responsePromise = responsePromises[key];
\r
2170 traceReceivedResponse(responseMessage, responsePromise);
\r
2171 if (responsePromise) {
\r
2172 delete responsePromises[key];
\r
2174 if (responseMessage.error) {
\r
2175 let error = responseMessage.error;
\r
2176 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
\r
2178 else if (responseMessage.result !== void 0) {
\r
2179 responsePromise.resolve(responseMessage.result);
\r
2182 throw new Error('Should never happen.');
\r
2186 if (error.message) {
\r
2187 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
\r
2190 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
\r
2196 function handleNotification(message) {
\r
2197 if (isDisposed()) {
\r
2198 // See handle request.
\r
2201 let type = undefined;
\r
2202 let notificationHandler;
\r
2203 if (message.method === CancelNotification.type.method) {
\r
2204 notificationHandler = (params) => {
\r
2205 let id = params.id;
\r
2206 let source = requestTokens[String(id)];
\r
2213 let element = notificationHandlers[message.method];
\r
2215 notificationHandler = element.handler;
\r
2216 type = element.type;
\r
2219 if (notificationHandler || starNotificationHandler) {
\r
2221 traceReceivedNotification(message);
\r
2222 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
\r
2223 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
\r
2225 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
\r
2226 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
\r
2229 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
\r
2233 if (error.message) {
\r
2234 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
\r
2237 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
\r
2242 unhandledNotificationEmitter.fire(message);
\r
2245 function handleInvalidMessage(message) {
\r
2247 logger.error('Received empty message.');
\r
2250 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
\r
2251 // Test whether we find an id to reject the promise
\r
2252 let responseMessage = message;
\r
2253 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
\r
2254 let key = String(responseMessage.id);
\r
2255 let responseHandler = responsePromises[key];
\r
2256 if (responseHandler) {
\r
2257 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
\r
2261 function traceSendingRequest(message) {
\r
2262 if (trace === Trace.Off || !tracer) {
\r
2265 if (traceFormat === TraceFormat.Text) {
\r
2266 let data = undefined;
\r
2267 if (trace === Trace.Verbose && message.params) {
\r
2268 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
2270 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
\r
2273 logLSPMessage('send-request', message);
\r
2276 function traceSendingNotification(message) {
\r
2277 if (trace === Trace.Off || !tracer) {
\r
2280 if (traceFormat === TraceFormat.Text) {
\r
2281 let data = undefined;
\r
2282 if (trace === Trace.Verbose) {
\r
2283 if (message.params) {
\r
2284 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
2287 data = 'No parameters provided.\n\n';
\r
2290 tracer.log(`Sending notification '${message.method}'.`, data);
\r
2293 logLSPMessage('send-notification', message);
\r
2296 function traceSendingResponse(message, method, startTime) {
\r
2297 if (trace === Trace.Off || !tracer) {
\r
2300 if (traceFormat === TraceFormat.Text) {
\r
2301 let data = undefined;
\r
2302 if (trace === Trace.Verbose) {
\r
2303 if (message.error && message.error.data) {
\r
2304 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
\r
2307 if (message.result) {
\r
2308 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
\r
2310 else if (message.error === void 0) {
\r
2311 data = 'No result returned.\n\n';
\r
2315 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
\r
2318 logLSPMessage('send-response', message);
\r
2321 function traceReceivedRequest(message) {
\r
2322 if (trace === Trace.Off || !tracer) {
\r
2325 if (traceFormat === TraceFormat.Text) {
\r
2326 let data = undefined;
\r
2327 if (trace === Trace.Verbose && message.params) {
\r
2328 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
2330 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
\r
2333 logLSPMessage('receive-request', message);
\r
2336 function traceReceivedNotification(message) {
\r
2337 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
\r
2340 if (traceFormat === TraceFormat.Text) {
\r
2341 let data = undefined;
\r
2342 if (trace === Trace.Verbose) {
\r
2343 if (message.params) {
\r
2344 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
2347 data = 'No parameters provided.\n\n';
\r
2350 tracer.log(`Received notification '${message.method}'.`, data);
\r
2353 logLSPMessage('receive-notification', message);
\r
2356 function traceReceivedResponse(message, responsePromise) {
\r
2357 if (trace === Trace.Off || !tracer) {
\r
2360 if (traceFormat === TraceFormat.Text) {
\r
2361 let data = undefined;
\r
2362 if (trace === Trace.Verbose) {
\r
2363 if (message.error && message.error.data) {
\r
2364 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
\r
2367 if (message.result) {
\r
2368 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
\r
2370 else if (message.error === void 0) {
\r
2371 data = 'No result returned.\n\n';
\r
2375 if (responsePromise) {
\r
2376 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
\r
2377 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
\r
2380 tracer.log(`Received response ${message.id} without active response promise.`, data);
\r
2384 logLSPMessage('receive-response', message);
\r
2387 function logLSPMessage(type, message) {
\r
2388 if (!tracer || trace === Trace.Off) {
\r
2391 const lspMessage = {
\r
2392 isLSPMessage: true,
\r
2395 timestamp: Date.now()
\r
2397 tracer.log(lspMessage);
\r
2399 function throwIfClosedOrDisposed() {
\r
2401 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
\r
2403 if (isDisposed()) {
\r
2404 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
\r
2407 function throwIfListening() {
\r
2408 if (isListening()) {
\r
2409 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
\r
2412 function throwIfNotListening() {
\r
2413 if (!isListening()) {
\r
2414 throw new Error('Call listen() first.');
\r
2417 function undefinedToNull(param) {
\r
2418 if (param === void 0) {
\r
2425 function computeMessageParams(type, params) {
\r
2427 let numberOfParams = type.numberOfParams;
\r
2428 switch (numberOfParams) {
\r
2433 result = undefinedToNull(params[0]);
\r
2437 for (let i = 0; i < params.length && i < numberOfParams; i++) {
\r
2438 result.push(undefinedToNull(params[i]));
\r
2440 if (params.length < numberOfParams) {
\r
2441 for (let i = params.length; i < numberOfParams; i++) {
\r
2442 result.push(null);
\r
2449 let connection = {
\r
2450 sendNotification: (type, ...params) => {
\r
2451 throwIfClosedOrDisposed();
\r
2453 let messageParams;
\r
2454 if (Is.string(type)) {
\r
2456 switch (params.length) {
\r
2458 messageParams = null;
\r
2461 messageParams = params[0];
\r
2464 messageParams = params;
\r
2469 method = type.method;
\r
2470 messageParams = computeMessageParams(type, params);
\r
2472 let notificationMessage = {
\r
2475 params: messageParams
\r
2477 traceSendingNotification(notificationMessage);
\r
2478 messageWriter.write(notificationMessage);
\r
2480 onNotification: (type, handler) => {
\r
2481 throwIfClosedOrDisposed();
\r
2482 if (Is.func(type)) {
\r
2483 starNotificationHandler = type;
\r
2485 else if (handler) {
\r
2486 if (Is.string(type)) {
\r
2487 notificationHandlers[type] = { type: undefined, handler };
\r
2490 notificationHandlers[type.method] = { type, handler };
\r
2494 onProgress: (_type, token, handler) => {
\r
2495 if (progressHandlers.has(token)) {
\r
2496 throw new Error(`Progress handler for token ${token} already registered`);
\r
2498 progressHandlers.set(token, handler);
\r
2501 progressHandlers.delete(token);
\r
2505 sendProgress: (_type, token, value) => {
\r
2506 connection.sendNotification(ProgressNotification.type, { token, value });
\r
2508 onUnhandledProgress: unhandledProgressEmitter.event,
\r
2509 sendRequest: (type, ...params) => {
\r
2510 throwIfClosedOrDisposed();
\r
2511 throwIfNotListening();
\r
2513 let messageParams;
\r
2514 let token = undefined;
\r
2515 if (Is.string(type)) {
\r
2517 switch (params.length) {
\r
2519 messageParams = null;
\r
2522 // The cancellation token is optional so it can also be undefined.
\r
2523 if (cancellation_1.CancellationToken.is(params[0])) {
\r
2524 messageParams = null;
\r
2525 token = params[0];
\r
2528 messageParams = undefinedToNull(params[0]);
\r
2532 const last = params.length - 1;
\r
2533 if (cancellation_1.CancellationToken.is(params[last])) {
\r
2534 token = params[last];
\r
2535 if (params.length === 2) {
\r
2536 messageParams = undefinedToNull(params[0]);
\r
2539 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
\r
2543 messageParams = params.map(value => undefinedToNull(value));
\r
2549 method = type.method;
\r
2550 messageParams = computeMessageParams(type, params);
\r
2551 let numberOfParams = type.numberOfParams;
\r
2552 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
\r
2554 let id = sequenceNumber++;
\r
2555 let result = new Promise((resolve, reject) => {
\r
2556 let requestMessage = {
\r
2560 params: messageParams
\r
2562 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
\r
2563 traceSendingRequest(requestMessage);
\r
2565 messageWriter.write(requestMessage);
\r
2568 // Writing the message failed. So we need to reject the promise.
\r
2569 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
\r
2570 responsePromise = null;
\r
2572 if (responsePromise) {
\r
2573 responsePromises[String(id)] = responsePromise;
\r
2577 token.onCancellationRequested(() => {
\r
2578 connection.sendNotification(CancelNotification.type, { id });
\r
2583 onRequest: (type, handler) => {
\r
2584 throwIfClosedOrDisposed();
\r
2585 if (Is.func(type)) {
\r
2586 starRequestHandler = type;
\r
2588 else if (handler) {
\r
2589 if (Is.string(type)) {
\r
2590 requestHandlers[type] = { type: undefined, handler };
\r
2593 requestHandlers[type.method] = { type, handler };
\r
2597 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
\r
2598 let _sendNotification = false;
\r
2599 let _traceFormat = TraceFormat.Text;
\r
2600 if (sendNotificationOrTraceOptions !== void 0) {
\r
2601 if (Is.boolean(sendNotificationOrTraceOptions)) {
\r
2602 _sendNotification = sendNotificationOrTraceOptions;
\r
2605 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
\r
2606 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
\r
2610 traceFormat = _traceFormat;
\r
2611 if (trace === Trace.Off) {
\r
2612 tracer = undefined;
\r
2617 if (_sendNotification && !isClosed() && !isDisposed()) {
\r
2618 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
\r
2621 onError: errorEmitter.event,
\r
2622 onClose: closeEmitter.event,
\r
2623 onUnhandledNotification: unhandledNotificationEmitter.event,
\r
2624 onDispose: disposeEmitter.event,
\r
2626 if (isDisposed()) {
\r
2629 state = ConnectionState.Disposed;
\r
2630 disposeEmitter.fire(undefined);
\r
2631 let error = new Error('Connection got disposed.');
\r
2632 Object.keys(responsePromises).forEach((key) => {
\r
2633 responsePromises[key].reject(error);
\r
2635 responsePromises = Object.create(null);
\r
2636 requestTokens = Object.create(null);
\r
2637 messageQueue = new linkedMap_1.LinkedMap();
\r
2638 // Test for backwards compatibility
\r
2639 if (Is.func(messageWriter.dispose)) {
\r
2640 messageWriter.dispose();
\r
2642 if (Is.func(messageReader.dispose)) {
\r
2643 messageReader.dispose();
\r
2647 throwIfClosedOrDisposed();
\r
2648 throwIfListening();
\r
2649 state = ConnectionState.Listening;
\r
2650 messageReader.listen(callback);
\r
2653 // eslint-disable-next-line no-console
\r
2654 console.log('inspect');
\r
2657 connection.onNotification(LogTraceNotification.type, (params) => {
\r
2658 if (trace === Trace.Off || !tracer) {
\r
2661 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
\r
2663 connection.onNotification(ProgressNotification.type, (params) => {
\r
2664 const handler = progressHandlers.get(params.token);
\r
2666 handler(params.value);
\r
2669 unhandledProgressEmitter.fire(params);
\r
2672 return connection;
\r
2674 function isMessageReader(value) {
\r
2675 return value.listen !== void 0 && value.read === void 0;
\r
2677 function isMessageWriter(value) {
\r
2678 return value.write !== void 0 && value.end === void 0;
\r
2680 function createMessageConnection(input, output, logger, strategy) {
\r
2682 logger = exports.NullLogger;
\r
2684 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
\r
2685 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
\r
2686 return _createMessageConnection(reader, writer, logger, strategy);
\r
2688 exports.createMessageConnection = createMessageConnection;
\r
2693 /***/ (function(module, exports, __webpack_require__) {
2696 /* --------------------------------------------------------------------------------------------
\r
2697 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2698 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2699 * ------------------------------------------------------------------------------------------ */
\r
2701 Object.defineProperty(exports, "__esModule", { value: true });
\r
2702 function boolean(value) {
\r
2703 return value === true || value === false;
\r
2705 exports.boolean = boolean;
\r
2706 function string(value) {
\r
2707 return typeof value === 'string' || value instanceof String;
\r
2709 exports.string = string;
\r
2710 function number(value) {
\r
2711 return typeof value === 'number' || value instanceof Number;
\r
2713 exports.number = number;
\r
2714 function error(value) {
\r
2715 return value instanceof Error;
\r
2717 exports.error = error;
\r
2718 function func(value) {
\r
2719 return typeof value === 'function';
\r
2721 exports.func = func;
\r
2722 function array(value) {
\r
2723 return Array.isArray(value);
\r
2725 exports.array = array;
\r
2726 function stringArray(value) {
\r
2727 return array(value) && value.every(elem => string(elem));
\r
2729 exports.stringArray = stringArray;
\r
2734 /***/ (function(module, exports, __webpack_require__) {
2737 /* --------------------------------------------------------------------------------------------
\r
2738 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2739 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2740 * ------------------------------------------------------------------------------------------ */
\r
2742 Object.defineProperty(exports, "__esModule", { value: true });
\r
2743 const is = __webpack_require__(36);
\r
2745 * Predefined error codes.
\r
2748 (function (ErrorCodes) {
\r
2749 // Defined by JSON RPC
\r
2750 ErrorCodes.ParseError = -32700;
\r
2751 ErrorCodes.InvalidRequest = -32600;
\r
2752 ErrorCodes.MethodNotFound = -32601;
\r
2753 ErrorCodes.InvalidParams = -32602;
\r
2754 ErrorCodes.InternalError = -32603;
\r
2755 ErrorCodes.serverErrorStart = -32099;
\r
2756 ErrorCodes.serverErrorEnd = -32000;
\r
2757 ErrorCodes.ServerNotInitialized = -32002;
\r
2758 ErrorCodes.UnknownErrorCode = -32001;
\r
2759 // Defined by the protocol.
\r
2760 ErrorCodes.RequestCancelled = -32800;
\r
2761 ErrorCodes.ContentModified = -32801;
\r
2762 // Defined by VSCode library.
\r
2763 ErrorCodes.MessageWriteError = 1;
\r
2764 ErrorCodes.MessageReadError = 2;
\r
2765 })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
\r
2767 * An error object return in a response in case a request
\r
2770 class ResponseError extends Error {
\r
2771 constructor(code, message, data) {
\r
2773 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
\r
2775 Object.setPrototypeOf(this, ResponseError.prototype);
\r
2780 message: this.message,
\r
2785 exports.ResponseError = ResponseError;
\r
2787 * An abstract implementation of a MessageType.
\r
2789 class AbstractMessageType {
\r
2790 constructor(_method, _numberOfParams) {
\r
2791 this._method = _method;
\r
2792 this._numberOfParams = _numberOfParams;
\r
2795 return this._method;
\r
2797 get numberOfParams() {
\r
2798 return this._numberOfParams;
\r
2801 exports.AbstractMessageType = AbstractMessageType;
\r
2803 * Classes to type request response pairs
\r
2805 * The type parameter RO will be removed in the next major version
\r
2806 * of the JSON RPC library since it is a LSP concept and doesn't
\r
2807 * belong here. For now it is tagged as default never.
\r
2809 class RequestType0 extends AbstractMessageType {
\r
2810 constructor(method) {
\r
2814 exports.RequestType0 = RequestType0;
\r
2815 class RequestType extends AbstractMessageType {
\r
2816 constructor(method) {
\r
2820 exports.RequestType = RequestType;
\r
2821 class RequestType1 extends AbstractMessageType {
\r
2822 constructor(method) {
\r
2826 exports.RequestType1 = RequestType1;
\r
2827 class RequestType2 extends AbstractMessageType {
\r
2828 constructor(method) {
\r
2832 exports.RequestType2 = RequestType2;
\r
2833 class RequestType3 extends AbstractMessageType {
\r
2834 constructor(method) {
\r
2838 exports.RequestType3 = RequestType3;
\r
2839 class RequestType4 extends AbstractMessageType {
\r
2840 constructor(method) {
\r
2844 exports.RequestType4 = RequestType4;
\r
2845 class RequestType5 extends AbstractMessageType {
\r
2846 constructor(method) {
\r
2850 exports.RequestType5 = RequestType5;
\r
2851 class RequestType6 extends AbstractMessageType {
\r
2852 constructor(method) {
\r
2856 exports.RequestType6 = RequestType6;
\r
2857 class RequestType7 extends AbstractMessageType {
\r
2858 constructor(method) {
\r
2862 exports.RequestType7 = RequestType7;
\r
2863 class RequestType8 extends AbstractMessageType {
\r
2864 constructor(method) {
\r
2868 exports.RequestType8 = RequestType8;
\r
2869 class RequestType9 extends AbstractMessageType {
\r
2870 constructor(method) {
\r
2874 exports.RequestType9 = RequestType9;
\r
2876 * The type parameter RO will be removed in the next major version
\r
2877 * of the JSON RPC library since it is a LSP concept and doesn't
\r
2878 * belong here. For now it is tagged as default never.
\r
2880 class NotificationType extends AbstractMessageType {
\r
2881 constructor(method) {
\r
2883 this._ = undefined;
\r
2886 exports.NotificationType = NotificationType;
\r
2887 class NotificationType0 extends AbstractMessageType {
\r
2888 constructor(method) {
\r
2892 exports.NotificationType0 = NotificationType0;
\r
2893 class NotificationType1 extends AbstractMessageType {
\r
2894 constructor(method) {
\r
2898 exports.NotificationType1 = NotificationType1;
\r
2899 class NotificationType2 extends AbstractMessageType {
\r
2900 constructor(method) {
\r
2904 exports.NotificationType2 = NotificationType2;
\r
2905 class NotificationType3 extends AbstractMessageType {
\r
2906 constructor(method) {
\r
2910 exports.NotificationType3 = NotificationType3;
\r
2911 class NotificationType4 extends AbstractMessageType {
\r
2912 constructor(method) {
\r
2916 exports.NotificationType4 = NotificationType4;
\r
2917 class NotificationType5 extends AbstractMessageType {
\r
2918 constructor(method) {
\r
2922 exports.NotificationType5 = NotificationType5;
\r
2923 class NotificationType6 extends AbstractMessageType {
\r
2924 constructor(method) {
\r
2928 exports.NotificationType6 = NotificationType6;
\r
2929 class NotificationType7 extends AbstractMessageType {
\r
2930 constructor(method) {
\r
2934 exports.NotificationType7 = NotificationType7;
\r
2935 class NotificationType8 extends AbstractMessageType {
\r
2936 constructor(method) {
\r
2940 exports.NotificationType8 = NotificationType8;
\r
2941 class NotificationType9 extends AbstractMessageType {
\r
2942 constructor(method) {
\r
2946 exports.NotificationType9 = NotificationType9;
\r
2948 * Tests if the given message is a request message
\r
2950 function isRequestMessage(message) {
\r
2951 let candidate = message;
\r
2952 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
\r
2954 exports.isRequestMessage = isRequestMessage;
\r
2956 * Tests if the given message is a notification message
\r
2958 function isNotificationMessage(message) {
\r
2959 let candidate = message;
\r
2960 return candidate && is.string(candidate.method) && message.id === void 0;
\r
2962 exports.isNotificationMessage = isNotificationMessage;
\r
2964 * Tests if the given message is a response message
\r
2966 function isResponseMessage(message) {
\r
2967 let candidate = message;
\r
2968 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
\r
2970 exports.isResponseMessage = isResponseMessage;
\r
2975 /***/ (function(module, exports, __webpack_require__) {
2978 /* --------------------------------------------------------------------------------------------
\r
2979 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2980 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2981 * ------------------------------------------------------------------------------------------ */
\r
2983 Object.defineProperty(exports, "__esModule", { value: true });
\r
2984 const events_1 = __webpack_require__(39);
\r
2985 const Is = __webpack_require__(36);
\r
2986 let DefaultSize = 8192;
\r
2987 let CR = Buffer.from('\r', 'ascii')[0];
\r
2988 let LF = Buffer.from('\n', 'ascii')[0];
\r
2989 let CRLF = '\r\n';
\r
2990 class MessageBuffer {
\r
2991 constructor(encoding = 'utf8') {
\r
2992 this.encoding = encoding;
\r
2994 this.buffer = Buffer.allocUnsafe(DefaultSize);
\r
2997 var toAppend = chunk;
\r
2998 if (typeof (chunk) === 'string') {
\r
3000 var bufferLen = Buffer.byteLength(str, this.encoding);
\r
3001 toAppend = Buffer.allocUnsafe(bufferLen);
\r
3002 toAppend.write(str, 0, bufferLen, this.encoding);
\r
3004 if (this.buffer.length - this.index >= toAppend.length) {
\r
3005 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
\r
3008 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
\r
3009 if (this.index === 0) {
\r
3010 this.buffer = Buffer.allocUnsafe(newSize);
\r
3011 toAppend.copy(this.buffer, 0, 0, toAppend.length);
\r
3014 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
\r
3017 this.index += toAppend.length;
\r
3019 tryReadHeaders() {
\r
3020 let result = undefined;
\r
3022 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
\r
3025 // No header / body separator found (e.g CRLFCRLF)
\r
3026 if (current + 3 >= this.index) {
\r
3029 result = Object.create(null);
\r
3030 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
\r
3031 headers.forEach((header) => {
\r
3032 let index = header.indexOf(':');
\r
3033 if (index === -1) {
\r
3034 throw new Error('Message header must separate key and value using :');
\r
3036 let key = header.substr(0, index);
\r
3037 let value = header.substr(index + 1).trim();
\r
3038 result[key] = value;
\r
3040 let nextStart = current + 4;
\r
3041 this.buffer = this.buffer.slice(nextStart);
\r
3042 this.index = this.index - nextStart;
\r
3045 tryReadContent(length) {
\r
3046 if (this.index < length) {
\r
3049 let result = this.buffer.toString(this.encoding, 0, length);
\r
3050 let nextStart = length;
\r
3051 this.buffer.copy(this.buffer, 0, nextStart);
\r
3052 this.index = this.index - nextStart;
\r
3055 get numberOfBytes() {
\r
3056 return this.index;
\r
3059 var MessageReader;
\r
3060 (function (MessageReader) {
\r
3061 function is(value) {
\r
3062 let candidate = value;
\r
3063 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
\r
3064 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
\r
3066 MessageReader.is = is;
\r
3067 })(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
\r
3068 class AbstractMessageReader {
\r
3070 this.errorEmitter = new events_1.Emitter();
\r
3071 this.closeEmitter = new events_1.Emitter();
\r
3072 this.partialMessageEmitter = new events_1.Emitter();
\r
3075 this.errorEmitter.dispose();
\r
3076 this.closeEmitter.dispose();
\r
3079 return this.errorEmitter.event;
\r
3081 fireError(error) {
\r
3082 this.errorEmitter.fire(this.asError(error));
\r
3085 return this.closeEmitter.event;
\r
3088 this.closeEmitter.fire(undefined);
\r
3090 get onPartialMessage() {
\r
3091 return this.partialMessageEmitter.event;
\r
3093 firePartialMessage(info) {
\r
3094 this.partialMessageEmitter.fire(info);
\r
3097 if (error instanceof Error) {
\r
3101 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
\r
3105 exports.AbstractMessageReader = AbstractMessageReader;
\r
3106 class StreamMessageReader extends AbstractMessageReader {
\r
3107 constructor(readable, encoding = 'utf8') {
\r
3109 this.readable = readable;
\r
3110 this.buffer = new MessageBuffer(encoding);
\r
3111 this._partialMessageTimeout = 10000;
\r
3113 set partialMessageTimeout(timeout) {
\r
3114 this._partialMessageTimeout = timeout;
\r
3116 get partialMessageTimeout() {
\r
3117 return this._partialMessageTimeout;
\r
3119 listen(callback) {
\r
3120 this.nextMessageLength = -1;
\r
3121 this.messageToken = 0;
\r
3122 this.partialMessageTimer = undefined;
\r
3123 this.callback = callback;
\r
3124 this.readable.on('data', (data) => {
\r
3125 this.onData(data);
\r
3127 this.readable.on('error', (error) => this.fireError(error));
\r
3128 this.readable.on('close', () => this.fireClose());
\r
3131 this.buffer.append(data);
\r
3133 if (this.nextMessageLength === -1) {
\r
3134 let headers = this.buffer.tryReadHeaders();
\r
3138 let contentLength = headers['Content-Length'];
\r
3139 if (!contentLength) {
\r
3140 throw new Error('Header must provide a Content-Length property.');
\r
3142 let length = parseInt(contentLength);
\r
3143 if (isNaN(length)) {
\r
3144 throw new Error('Content-Length value must be a number.');
\r
3146 this.nextMessageLength = length;
\r
3147 // Take the encoding form the header. For compatibility
\r
3148 // treat both utf-8 and utf8 as node utf8
\r
3150 var msg = this.buffer.tryReadContent(this.nextMessageLength);
\r
3151 if (msg === null) {
\r
3152 /** We haven't received the full message yet. */
\r
3153 this.setPartialMessageTimer();
\r
3156 this.clearPartialMessageTimer();
\r
3157 this.nextMessageLength = -1;
\r
3158 this.messageToken++;
\r
3159 var json = JSON.parse(msg);
\r
3160 this.callback(json);
\r
3163 clearPartialMessageTimer() {
\r
3164 if (this.partialMessageTimer) {
\r
3165 clearTimeout(this.partialMessageTimer);
\r
3166 this.partialMessageTimer = undefined;
\r
3169 setPartialMessageTimer() {
\r
3170 this.clearPartialMessageTimer();
\r
3171 if (this._partialMessageTimeout <= 0) {
\r
3174 this.partialMessageTimer = setTimeout((token, timeout) => {
\r
3175 this.partialMessageTimer = undefined;
\r
3176 if (token === this.messageToken) {
\r
3177 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
\r
3178 this.setPartialMessageTimer();
\r
3180 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
\r
3183 exports.StreamMessageReader = StreamMessageReader;
\r
3184 class IPCMessageReader extends AbstractMessageReader {
\r
3185 constructor(process) {
\r
3187 this.process = process;
\r
3188 let eventEmitter = this.process;
\r
3189 eventEmitter.on('error', (error) => this.fireError(error));
\r
3190 eventEmitter.on('close', () => this.fireClose());
\r
3192 listen(callback) {
\r
3193 this.process.on('message', callback);
\r
3196 exports.IPCMessageReader = IPCMessageReader;
\r
3197 class SocketMessageReader extends StreamMessageReader {
\r
3198 constructor(socket, encoding = 'utf-8') {
\r
3199 super(socket, encoding);
\r
3202 exports.SocketMessageReader = SocketMessageReader;
\r
3207 /***/ (function(module, exports, __webpack_require__) {
3210 /* --------------------------------------------------------------------------------------------
\r
3211 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
3212 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
3213 * ------------------------------------------------------------------------------------------ */
\r
3215 Object.defineProperty(exports, "__esModule", { value: true });
\r
3217 (function (Disposable) {
\r
3218 function create(func) {
\r
3223 Disposable.create = create;
\r
3224 })(Disposable = exports.Disposable || (exports.Disposable = {}));
\r
3226 (function (Event) {
\r
3227 const _disposable = { dispose() { } };
\r
3228 Event.None = function () { return _disposable; };
\r
3229 })(Event = exports.Event || (exports.Event = {}));
\r
3230 class CallbackList {
\r
3231 add(callback, context = null, bucket) {
\r
3232 if (!this._callbacks) {
\r
3233 this._callbacks = [];
\r
3234 this._contexts = [];
\r
3236 this._callbacks.push(callback);
\r
3237 this._contexts.push(context);
\r
3238 if (Array.isArray(bucket)) {
\r
3239 bucket.push({ dispose: () => this.remove(callback, context) });
\r
3242 remove(callback, context = null) {
\r
3243 if (!this._callbacks) {
\r
3246 var foundCallbackWithDifferentContext = false;
\r
3247 for (var i = 0, len = this._callbacks.length; i < len; i++) {
\r
3248 if (this._callbacks[i] === callback) {
\r
3249 if (this._contexts[i] === context) {
\r
3250 // callback & context match => remove it
\r
3251 this._callbacks.splice(i, 1);
\r
3252 this._contexts.splice(i, 1);
\r
3256 foundCallbackWithDifferentContext = true;
\r
3260 if (foundCallbackWithDifferentContext) {
\r
3261 throw new Error('When adding a listener with a context, you should remove it with the same context');
\r
3265 if (!this._callbacks) {
\r
3268 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
\r
3269 for (var i = 0, len = callbacks.length; i < len; i++) {
\r
3271 ret.push(callbacks[i].apply(contexts[i], args));
\r
3274 // eslint-disable-next-line no-console
\r
3281 return !this._callbacks || this._callbacks.length === 0;
\r
3284 this._callbacks = undefined;
\r
3285 this._contexts = undefined;
\r
3289 constructor(_options) {
\r
3290 this._options = _options;
\r
3293 * For the public to allow to subscribe
\r
3294 * to events from this Emitter
\r
3297 if (!this._event) {
\r
3298 this._event = (listener, thisArgs, disposables) => {
\r
3299 if (!this._callbacks) {
\r
3300 this._callbacks = new CallbackList();
\r
3302 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
\r
3303 this._options.onFirstListenerAdd(this);
\r
3305 this._callbacks.add(listener, thisArgs);
\r
3309 this._callbacks.remove(listener, thisArgs);
\r
3310 result.dispose = Emitter._noop;
\r
3311 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
\r
3312 this._options.onLastListenerRemove(this);
\r
3316 if (Array.isArray(disposables)) {
\r
3317 disposables.push(result);
\r
3322 return this._event;
\r
3325 * To be kept private to fire an event to
\r
3329 if (this._callbacks) {
\r
3330 this._callbacks.invoke.call(this._callbacks, event);
\r
3334 if (this._callbacks) {
\r
3335 this._callbacks.dispose();
\r
3336 this._callbacks = undefined;
\r
3340 exports.Emitter = Emitter;
\r
3341 Emitter._noop = function () { };
\r
3346 /***/ (function(module, exports, __webpack_require__) {
3349 /* --------------------------------------------------------------------------------------------
\r
3350 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
3351 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
3352 * ------------------------------------------------------------------------------------------ */
\r
3354 Object.defineProperty(exports, "__esModule", { value: true });
\r
3355 const events_1 = __webpack_require__(39);
\r
3356 const Is = __webpack_require__(36);
\r
3357 let ContentLength = 'Content-Length: ';
\r
3358 let CRLF = '\r\n';
\r
3359 var MessageWriter;
\r
3360 (function (MessageWriter) {
\r
3361 function is(value) {
\r
3362 let candidate = value;
\r
3363 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
\r
3364 Is.func(candidate.onError) && Is.func(candidate.write);
\r
3366 MessageWriter.is = is;
\r
3367 })(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
\r
3368 class AbstractMessageWriter {
\r
3370 this.errorEmitter = new events_1.Emitter();
\r
3371 this.closeEmitter = new events_1.Emitter();
\r
3374 this.errorEmitter.dispose();
\r
3375 this.closeEmitter.dispose();
\r
3378 return this.errorEmitter.event;
\r
3380 fireError(error, message, count) {
\r
3381 this.errorEmitter.fire([this.asError(error), message, count]);
\r
3384 return this.closeEmitter.event;
\r
3387 this.closeEmitter.fire(undefined);
\r
3390 if (error instanceof Error) {
\r
3394 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
\r
3398 exports.AbstractMessageWriter = AbstractMessageWriter;
\r
3399 class StreamMessageWriter extends AbstractMessageWriter {
\r
3400 constructor(writable, encoding = 'utf8') {
\r
3402 this.writable = writable;
\r
3403 this.encoding = encoding;
\r
3404 this.errorCount = 0;
\r
3405 this.writable.on('error', (error) => this.fireError(error));
\r
3406 this.writable.on('close', () => this.fireClose());
\r
3409 let json = JSON.stringify(msg);
\r
3410 let contentLength = Buffer.byteLength(json, this.encoding);
\r
3412 ContentLength, contentLength.toString(), CRLF,
\r
3416 // Header must be written in ASCII encoding
\r
3417 this.writable.write(headers.join(''), 'ascii');
\r
3418 // Now write the content. This can be written in any encoding
\r
3419 this.writable.write(json, this.encoding);
\r
3420 this.errorCount = 0;
\r
3423 this.errorCount++;
\r
3424 this.fireError(error, msg, this.errorCount);
\r
3428 exports.StreamMessageWriter = StreamMessageWriter;
\r
3429 class IPCMessageWriter extends AbstractMessageWriter {
\r
3430 constructor(process) {
\r
3432 this.process = process;
\r
3433 this.errorCount = 0;
\r
3435 this.sending = false;
\r
3436 let eventEmitter = this.process;
\r
3437 eventEmitter.on('error', (error) => this.fireError(error));
\r
3438 eventEmitter.on('close', () => this.fireClose);
\r
3441 if (!this.sending && this.queue.length === 0) {
\r
3442 // See https://github.com/nodejs/node/issues/7657
\r
3443 this.doWriteMessage(msg);
\r
3446 this.queue.push(msg);
\r
3449 doWriteMessage(msg) {
\r
3451 if (this.process.send) {
\r
3452 this.sending = true;
\r
3453 this.process.send(msg, undefined, undefined, (error) => {
\r
3454 this.sending = false;
\r
3456 this.errorCount++;
\r
3457 this.fireError(error, msg, this.errorCount);
\r
3460 this.errorCount = 0;
\r
3462 if (this.queue.length > 0) {
\r
3463 this.doWriteMessage(this.queue.shift());
\r
3469 this.errorCount++;
\r
3470 this.fireError(error, msg, this.errorCount);
\r
3474 exports.IPCMessageWriter = IPCMessageWriter;
\r
3475 class SocketMessageWriter extends AbstractMessageWriter {
\r
3476 constructor(socket, encoding = 'utf8') {
\r
3478 this.socket = socket;
\r
3480 this.sending = false;
\r
3481 this.encoding = encoding;
\r
3482 this.errorCount = 0;
\r
3483 this.socket.on('error', (error) => this.fireError(error));
\r
3484 this.socket.on('close', () => this.fireClose());
\r
3488 this.socket.destroy();
\r
3491 if (!this.sending && this.queue.length === 0) {
\r
3492 // See https://github.com/nodejs/node/issues/7657
\r
3493 this.doWriteMessage(msg);
\r
3496 this.queue.push(msg);
\r
3499 doWriteMessage(msg) {
\r
3500 let json = JSON.stringify(msg);
\r
3501 let contentLength = Buffer.byteLength(json, this.encoding);
\r
3503 ContentLength, contentLength.toString(), CRLF,
\r
3507 // Header must be written in ASCII encoding
\r
3508 this.sending = true;
\r
3509 this.socket.write(headers.join(''), 'ascii', (error) => {
\r
3511 this.handleError(error, msg);
\r
3514 // Now write the content. This can be written in any encoding
\r
3515 this.socket.write(json, this.encoding, (error) => {
\r
3516 this.sending = false;
\r
3518 this.handleError(error, msg);
\r
3521 this.errorCount = 0;
\r
3523 if (this.queue.length > 0) {
\r
3524 this.doWriteMessage(this.queue.shift());
\r
3529 this.handleError(error, msg);
\r
3534 this.handleError(error, msg);
\r
3537 handleError(error, msg) {
\r
3538 this.errorCount++;
\r
3539 this.fireError(error, msg, this.errorCount);
\r
3542 exports.SocketMessageWriter = SocketMessageWriter;
\r
3547 /***/ (function(module, exports, __webpack_require__) {
3550 /*---------------------------------------------------------------------------------------------
\r
3551 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
3552 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
3553 *--------------------------------------------------------------------------------------------*/
\r
3555 Object.defineProperty(exports, "__esModule", { value: true });
\r
3556 const events_1 = __webpack_require__(39);
\r
3557 const Is = __webpack_require__(36);
\r
3558 var CancellationToken;
\r
3559 (function (CancellationToken) {
\r
3560 CancellationToken.None = Object.freeze({
\r
3561 isCancellationRequested: false,
\r
3562 onCancellationRequested: events_1.Event.None
\r
3564 CancellationToken.Cancelled = Object.freeze({
\r
3565 isCancellationRequested: true,
\r
3566 onCancellationRequested: events_1.Event.None
\r
3568 function is(value) {
\r
3569 let candidate = value;
\r
3570 return candidate && (candidate === CancellationToken.None
\r
3571 || candidate === CancellationToken.Cancelled
\r
3572 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
\r
3574 CancellationToken.is = is;
\r
3575 })(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
\r
3576 const shortcutEvent = Object.freeze(function (callback, context) {
\r
3577 let handle = setTimeout(callback.bind(context), 0);
\r
3578 return { dispose() { clearTimeout(handle); } };
\r
3580 class MutableToken {
\r
3582 this._isCancelled = false;
\r
3585 if (!this._isCancelled) {
\r
3586 this._isCancelled = true;
\r
3587 if (this._emitter) {
\r
3588 this._emitter.fire(undefined);
\r
3593 get isCancellationRequested() {
\r
3594 return this._isCancelled;
\r
3596 get onCancellationRequested() {
\r
3597 if (this._isCancelled) {
\r
3598 return shortcutEvent;
\r
3600 if (!this._emitter) {
\r
3601 this._emitter = new events_1.Emitter();
\r
3603 return this._emitter.event;
\r
3606 if (this._emitter) {
\r
3607 this._emitter.dispose();
\r
3608 this._emitter = undefined;
\r
3612 class CancellationTokenSource {
\r
3614 if (!this._token) {
\r
3615 // be lazy and create the token only when
\r
3616 // actually needed
\r
3617 this._token = new MutableToken();
\r
3619 return this._token;
\r
3622 if (!this._token) {
\r
3623 // save an object by returning the default
\r
3624 // cancelled token when cancellation happens
\r
3625 // before someone asks for the token
\r
3626 this._token = CancellationToken.Cancelled;
\r
3629 this._token.cancel();
\r
3633 if (!this._token) {
\r
3634 // ensure to initialize with an empty token if we had none
\r
3635 this._token = CancellationToken.None;
\r
3637 else if (this._token instanceof MutableToken) {
\r
3638 // actually dispose
\r
3639 this._token.dispose();
\r
3643 exports.CancellationTokenSource = CancellationTokenSource;
\r
3648 /***/ (function(module, exports, __webpack_require__) {
3652 /*---------------------------------------------------------------------------------------------
\r
3653 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
3654 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
3655 *--------------------------------------------------------------------------------------------*/
\r
3656 Object.defineProperty(exports, "__esModule", { value: true });
\r
3658 (function (Touch) {
\r
3662 })(Touch = exports.Touch || (exports.Touch = {}));
\r
3665 this._map = new Map();
\r
3666 this._head = undefined;
\r
3667 this._tail = undefined;
\r
3671 this._map.clear();
\r
3672 this._head = undefined;
\r
3673 this._tail = undefined;
\r
3677 return !this._head && !this._tail;
\r
3680 return this._size;
\r
3683 return this._map.has(key);
\r
3686 const item = this._map.get(key);
\r
3690 return item.value;
\r
3692 set(key, value, touch = Touch.None) {
\r
3693 let item = this._map.get(key);
\r
3695 item.value = value;
\r
3696 if (touch !== Touch.None) {
\r
3697 this.touch(item, touch);
\r
3701 item = { key, value, next: undefined, previous: undefined };
\r
3704 this.addItemLast(item);
\r
3707 this.addItemFirst(item);
\r
3710 this.addItemLast(item);
\r
3713 this.addItemLast(item);
\r
3716 this._map.set(key, item);
\r
3721 const item = this._map.get(key);
\r
3725 this._map.delete(key);
\r
3726 this.removeItem(item);
\r
3731 if (!this._head && !this._tail) {
\r
3734 if (!this._head || !this._tail) {
\r
3735 throw new Error('Invalid list');
\r
3737 const item = this._head;
\r
3738 this._map.delete(item.key);
\r
3739 this.removeItem(item);
\r
3741 return item.value;
\r
3743 forEach(callbackfn, thisArg) {
\r
3744 let current = this._head;
\r
3747 callbackfn.bind(thisArg)(current.value, current.key, this);
\r
3750 callbackfn(current.value, current.key, this);
\r
3752 current = current.next;
\r
3755 forEachReverse(callbackfn, thisArg) {
\r
3756 let current = this._tail;
\r
3759 callbackfn.bind(thisArg)(current.value, current.key, this);
\r
3762 callbackfn(current.value, current.key, this);
\r
3764 current = current.previous;
\r
3769 let current = this._head;
\r
3771 result.push(current.value);
\r
3772 current = current.next;
\r
3778 let current = this._head;
\r
3780 result.push(current.key);
\r
3781 current = current.next;
\r
3785 /* JSON RPC run on es5 which has no Symbol.iterator
\r
3786 public keys(): IterableIterator<K> {
\r
3787 let current = this._head;
\r
3788 let iterator: IterableIterator<K> = {
\r
3789 [Symbol.iterator]() {
\r
3792 next():IteratorResult<K> {
\r
3794 let result = { value: current.key, done: false };
\r
3795 current = current.next;
\r
3798 return { value: undefined, done: true };
\r
3805 public values(): IterableIterator<V> {
\r
3806 let current = this._head;
\r
3807 let iterator: IterableIterator<V> = {
\r
3808 [Symbol.iterator]() {
\r
3811 next():IteratorResult<V> {
\r
3813 let result = { value: current.value, done: false };
\r
3814 current = current.next;
\r
3817 return { value: undefined, done: true };
\r
3824 addItemFirst(item) {
\r
3825 // First time Insert
\r
3826 if (!this._head && !this._tail) {
\r
3827 this._tail = item;
\r
3829 else if (!this._head) {
\r
3830 throw new Error('Invalid list');
\r
3833 item.next = this._head;
\r
3834 this._head.previous = item;
\r
3836 this._head = item;
\r
3838 addItemLast(item) {
\r
3839 // First time Insert
\r
3840 if (!this._head && !this._tail) {
\r
3841 this._head = item;
\r
3843 else if (!this._tail) {
\r
3844 throw new Error('Invalid list');
\r
3847 item.previous = this._tail;
\r
3848 this._tail.next = item;
\r
3850 this._tail = item;
\r
3852 removeItem(item) {
\r
3853 if (item === this._head && item === this._tail) {
\r
3854 this._head = undefined;
\r
3855 this._tail = undefined;
\r
3857 else if (item === this._head) {
\r
3858 this._head = item.next;
\r
3860 else if (item === this._tail) {
\r
3861 this._tail = item.previous;
\r
3864 const next = item.next;
\r
3865 const previous = item.previous;
\r
3866 if (!next || !previous) {
\r
3867 throw new Error('Invalid list');
\r
3869 next.previous = previous;
\r
3870 previous.next = next;
\r
3873 touch(item, touch) {
\r
3874 if (!this._head || !this._tail) {
\r
3875 throw new Error('Invalid list');
\r
3877 if ((touch !== Touch.First && touch !== Touch.Last)) {
\r
3880 if (touch === Touch.First) {
\r
3881 if (item === this._head) {
\r
3884 const next = item.next;
\r
3885 const previous = item.previous;
\r
3886 // Unlink the item
\r
3887 if (item === this._tail) {
\r
3888 // previous must be defined since item was not head but is tail
\r
3889 // So there are more than on item in the map
\r
3890 previous.next = undefined;
\r
3891 this._tail = previous;
\r
3894 // Both next and previous are not undefined since item was neither head nor tail.
\r
3895 next.previous = previous;
\r
3896 previous.next = next;
\r
3898 // Insert the node at head
\r
3899 item.previous = undefined;
\r
3900 item.next = this._head;
\r
3901 this._head.previous = item;
\r
3902 this._head = item;
\r
3904 else if (touch === Touch.Last) {
\r
3905 if (item === this._tail) {
\r
3908 const next = item.next;
\r
3909 const previous = item.previous;
\r
3910 // Unlink the item.
\r
3911 if (item === this._head) {
\r
3912 // next must be defined since item was not tail but is head
\r
3913 // So there are more than on item in the map
\r
3914 next.previous = undefined;
\r
3915 this._head = next;
\r
3918 // Both next and previous are not undefined since item was neither head nor tail.
\r
3919 next.previous = previous;
\r
3920 previous.next = next;
\r
3922 item.next = undefined;
\r
3923 item.previous = this._tail;
\r
3924 this._tail.next = item;
\r
3925 this._tail = item;
\r
3929 exports.LinkedMap = LinkedMap;
\r
3934 /***/ (function(module, exports, __webpack_require__) {
3937 /* --------------------------------------------------------------------------------------------
\r
3938 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
3939 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
3940 * ------------------------------------------------------------------------------------------ */
\r
3942 Object.defineProperty(exports, "__esModule", { value: true });
\r
3943 const path_1 = __webpack_require__(3);
\r
3944 const os_1 = __webpack_require__(14);
\r
3945 const crypto_1 = __webpack_require__(15);
\r
3946 const net_1 = __webpack_require__(16);
\r
3947 const messageReader_1 = __webpack_require__(38);
\r
3948 const messageWriter_1 = __webpack_require__(40);
\r
3949 function generateRandomPipeName() {
\r
3950 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
\r
3951 if (process.platform === 'win32') {
\r
3952 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
\r
3955 // Mac/Unix: use socket file
\r
3956 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
\r
3959 exports.generateRandomPipeName = generateRandomPipeName;
\r
3960 function createClientPipeTransport(pipeName, encoding = 'utf-8') {
\r
3961 let connectResolve;
\r
3962 let connected = new Promise((resolve, _reject) => {
\r
3963 connectResolve = resolve;
\r
3965 return new Promise((resolve, reject) => {
\r
3966 let server = net_1.createServer((socket) => {
\r
3969 new messageReader_1.SocketMessageReader(socket, encoding),
\r
3970 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
3973 server.on('error', reject);
\r
3974 server.listen(pipeName, () => {
\r
3975 server.removeListener('error', reject);
\r
3977 onConnected: () => { return connected; }
\r
3982 exports.createClientPipeTransport = createClientPipeTransport;
\r
3983 function createServerPipeTransport(pipeName, encoding = 'utf-8') {
\r
3984 const socket = net_1.createConnection(pipeName);
\r
3986 new messageReader_1.SocketMessageReader(socket, encoding),
\r
3987 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
3990 exports.createServerPipeTransport = createServerPipeTransport;
\r
3995 /***/ (function(module, exports, __webpack_require__) {
3998 /* --------------------------------------------------------------------------------------------
\r
3999 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
4000 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
4001 * ------------------------------------------------------------------------------------------ */
\r
4003 Object.defineProperty(exports, "__esModule", { value: true });
\r
4004 const net_1 = __webpack_require__(16);
\r
4005 const messageReader_1 = __webpack_require__(38);
\r
4006 const messageWriter_1 = __webpack_require__(40);
\r
4007 function createClientSocketTransport(port, encoding = 'utf-8') {
\r
4008 let connectResolve;
\r
4009 let connected = new Promise((resolve, _reject) => {
\r
4010 connectResolve = resolve;
\r
4012 return new Promise((resolve, reject) => {
\r
4013 let server = net_1.createServer((socket) => {
\r
4016 new messageReader_1.SocketMessageReader(socket, encoding),
\r
4017 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
4020 server.on('error', reject);
\r
4021 server.listen(port, '127.0.0.1', () => {
\r
4022 server.removeListener('error', reject);
\r
4024 onConnected: () => { return connected; }
\r
4029 exports.createClientSocketTransport = createClientSocketTransport;
\r
4030 function createServerSocketTransport(port, encoding = 'utf-8') {
\r
4031 const socket = net_1.createConnection(port, '127.0.0.1');
\r
4033 new messageReader_1.SocketMessageReader(socket, encoding),
\r
4034 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
4037 exports.createServerSocketTransport = createServerSocketTransport;
\r
4042 /***/ (function(module, __webpack_exports__, __webpack_require__) {
4045 __webpack_require__.r(__webpack_exports__);
4046 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
4047 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
4048 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
4049 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
4050 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
4051 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
4052 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
4053 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
4054 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
4055 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
4056 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
4057 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
4058 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
4059 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
4060 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
4061 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
4062 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
4063 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
4064 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
4065 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
4066 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
4067 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
4068 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
4069 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
4070 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
4071 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
4072 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
4073 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
4074 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
4075 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
4076 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
4077 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
4078 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
4079 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
4080 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
4081 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
4082 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
4083 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
4084 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
4085 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
4086 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
4087 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
4088 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
4089 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
4090 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
4091 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
4092 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
4093 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
4094 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
4095 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
4096 /* --------------------------------------------------------------------------------------------
\r
4097 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
4098 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
4099 * ------------------------------------------------------------------------------------------ */
\r
4102 * The Position namespace provides helper functions to work with
\r
4103 * [Position](#Position) literals.
\r
4106 (function (Position) {
\r
4108 * Creates a new Position literal from the given line and character.
\r
4109 * @param line The position's line.
\r
4110 * @param character The position's character.
\r
4112 function create(line, character) {
\r
4113 return { line: line, character: character };
\r
4115 Position.create = create;
\r
4117 * Checks whether the given liternal conforms to the [Position](#Position) interface.
\r
4119 function is(value) {
\r
4120 var candidate = value;
\r
4121 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
\r
4124 })(Position || (Position = {}));
\r
4126 * The Range namespace provides helper functions to work with
\r
4127 * [Range](#Range) literals.
\r
4130 (function (Range) {
\r
4131 function create(one, two, three, four) {
\r
4132 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
\r
4133 return { start: Position.create(one, two), end: Position.create(three, four) };
\r
4135 else if (Position.is(one) && Position.is(two)) {
\r
4136 return { start: one, end: two };
\r
4139 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
\r
4142 Range.create = create;
\r
4144 * Checks whether the given literal conforms to the [Range](#Range) interface.
\r
4146 function is(value) {
\r
4147 var candidate = value;
\r
4148 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
\r
4151 })(Range || (Range = {}));
\r
4153 * The Location namespace provides helper functions to work with
\r
4154 * [Location](#Location) literals.
\r
4157 (function (Location) {
\r
4159 * Creates a Location literal.
\r
4160 * @param uri The location's uri.
\r
4161 * @param range The location's range.
\r
4163 function create(uri, range) {
\r
4164 return { uri: uri, range: range };
\r
4166 Location.create = create;
\r
4168 * Checks whether the given literal conforms to the [Location](#Location) interface.
\r
4170 function is(value) {
\r
4171 var candidate = value;
\r
4172 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
\r
4175 })(Location || (Location = {}));
\r
4177 * The LocationLink namespace provides helper functions to work with
\r
4178 * [LocationLink](#LocationLink) literals.
\r
4181 (function (LocationLink) {
\r
4183 * Creates a LocationLink literal.
\r
4184 * @param targetUri The definition's uri.
\r
4185 * @param targetRange The full range of the definition.
\r
4186 * @param targetSelectionRange The span of the symbol definition at the target.
\r
4187 * @param originSelectionRange The span of the symbol being defined in the originating source file.
\r
4189 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
\r
4190 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
\r
4192 LocationLink.create = create;
\r
4194 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
\r
4196 function is(value) {
\r
4197 var candidate = value;
\r
4198 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
\r
4199 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
\r
4200 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
\r
4202 LocationLink.is = is;
\r
4203 })(LocationLink || (LocationLink = {}));
\r
4205 * The Color namespace provides helper functions to work with
\r
4206 * [Color](#Color) literals.
\r
4209 (function (Color) {
\r
4211 * Creates a new Color literal.
\r
4213 function create(red, green, blue, alpha) {
\r
4221 Color.create = create;
\r
4223 * Checks whether the given literal conforms to the [Color](#Color) interface.
\r
4225 function is(value) {
\r
4226 var candidate = value;
\r
4227 return Is.number(candidate.red)
\r
4228 && Is.number(candidate.green)
\r
4229 && Is.number(candidate.blue)
\r
4230 && Is.number(candidate.alpha);
\r
4233 })(Color || (Color = {}));
\r
4235 * The ColorInformation namespace provides helper functions to work with
\r
4236 * [ColorInformation](#ColorInformation) literals.
\r
4238 var ColorInformation;
\r
4239 (function (ColorInformation) {
\r
4241 * Creates a new ColorInformation literal.
\r
4243 function create(range, color) {
\r
4249 ColorInformation.create = create;
\r
4251 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
\r
4253 function is(value) {
\r
4254 var candidate = value;
\r
4255 return Range.is(candidate.range) && Color.is(candidate.color);
\r
4257 ColorInformation.is = is;
\r
4258 })(ColorInformation || (ColorInformation = {}));
\r
4260 * The Color namespace provides helper functions to work with
\r
4261 * [ColorPresentation](#ColorPresentation) literals.
\r
4263 var ColorPresentation;
\r
4264 (function (ColorPresentation) {
\r
4266 * Creates a new ColorInformation literal.
\r
4268 function create(label, textEdit, additionalTextEdits) {
\r
4271 textEdit: textEdit,
\r
4272 additionalTextEdits: additionalTextEdits,
\r
4275 ColorPresentation.create = create;
\r
4277 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
\r
4279 function is(value) {
\r
4280 var candidate = value;
\r
4281 return Is.string(candidate.label)
\r
4282 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
\r
4283 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
\r
4285 ColorPresentation.is = is;
\r
4286 })(ColorPresentation || (ColorPresentation = {}));
\r
4288 * Enum of known range kinds
\r
4290 var FoldingRangeKind;
\r
4291 (function (FoldingRangeKind) {
\r
4293 * Folding range for a comment
\r
4295 FoldingRangeKind["Comment"] = "comment";
\r
4297 * Folding range for a imports or includes
\r
4299 FoldingRangeKind["Imports"] = "imports";
\r
4301 * Folding range for a region (e.g. `#region`)
\r
4303 FoldingRangeKind["Region"] = "region";
\r
4304 })(FoldingRangeKind || (FoldingRangeKind = {}));
\r
4306 * The folding range namespace provides helper functions to work with
\r
4307 * [FoldingRange](#FoldingRange) literals.
\r
4310 (function (FoldingRange) {
\r
4312 * Creates a new FoldingRange literal.
\r
4314 function create(startLine, endLine, startCharacter, endCharacter, kind) {
\r
4316 startLine: startLine,
\r
4319 if (Is.defined(startCharacter)) {
\r
4320 result.startCharacter = startCharacter;
\r
4322 if (Is.defined(endCharacter)) {
\r
4323 result.endCharacter = endCharacter;
\r
4325 if (Is.defined(kind)) {
\r
4326 result.kind = kind;
\r
4330 FoldingRange.create = create;
\r
4332 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
\r
4334 function is(value) {
\r
4335 var candidate = value;
\r
4336 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
\r
4337 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
\r
4338 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
\r
4339 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
\r
4341 FoldingRange.is = is;
\r
4342 })(FoldingRange || (FoldingRange = {}));
\r
4344 * The DiagnosticRelatedInformation namespace provides helper functions to work with
\r
4345 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
\r
4347 var DiagnosticRelatedInformation;
\r
4348 (function (DiagnosticRelatedInformation) {
\r
4350 * Creates a new DiagnosticRelatedInformation literal.
\r
4352 function create(location, message) {
\r
4354 location: location,
\r
4358 DiagnosticRelatedInformation.create = create;
\r
4360 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
\r
4362 function is(value) {
\r
4363 var candidate = value;
\r
4364 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
\r
4366 DiagnosticRelatedInformation.is = is;
\r
4367 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
\r
4369 * The diagnostic's severity.
\r
4371 var DiagnosticSeverity;
\r
4372 (function (DiagnosticSeverity) {
\r
4374 * Reports an error.
\r
4376 DiagnosticSeverity.Error = 1;
\r
4378 * Reports a warning.
\r
4380 DiagnosticSeverity.Warning = 2;
\r
4382 * Reports an information.
\r
4384 DiagnosticSeverity.Information = 3;
\r
4388 DiagnosticSeverity.Hint = 4;
\r
4389 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
\r
4391 * The diagnostic tags.
\r
4395 var DiagnosticTag;
\r
4396 (function (DiagnosticTag) {
\r
4398 * Unused or unnecessary code.
\r
4400 * Clients are allowed to render diagnostics with this tag faded out instead of having
\r
4401 * an error squiggle.
\r
4403 DiagnosticTag.Unnecessary = 1;
\r
4405 * Deprecated or obsolete code.
\r
4407 * Clients are allowed to rendered diagnostics with this tag strike through.
\r
4409 DiagnosticTag.Deprecated = 2;
\r
4410 })(DiagnosticTag || (DiagnosticTag = {}));
\r
4412 * The Diagnostic namespace provides helper functions to work with
\r
4413 * [Diagnostic](#Diagnostic) literals.
\r
4416 (function (Diagnostic) {
\r
4418 * Creates a new Diagnostic literal.
\r
4420 function create(range, message, severity, code, source, relatedInformation) {
\r
4421 var result = { range: range, message: message };
\r
4422 if (Is.defined(severity)) {
\r
4423 result.severity = severity;
\r
4425 if (Is.defined(code)) {
\r
4426 result.code = code;
\r
4428 if (Is.defined(source)) {
\r
4429 result.source = source;
\r
4431 if (Is.defined(relatedInformation)) {
\r
4432 result.relatedInformation = relatedInformation;
\r
4436 Diagnostic.create = create;
\r
4438 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
\r
4440 function is(value) {
\r
4441 var candidate = value;
\r
4442 return Is.defined(candidate)
\r
4443 && Range.is(candidate.range)
\r
4444 && Is.string(candidate.message)
\r
4445 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
\r
4446 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
\r
4447 && (Is.string(candidate.source) || Is.undefined(candidate.source))
\r
4448 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
\r
4450 Diagnostic.is = is;
\r
4451 })(Diagnostic || (Diagnostic = {}));
\r
4453 * The Command namespace provides helper functions to work with
\r
4454 * [Command](#Command) literals.
\r
4457 (function (Command) {
\r
4459 * Creates a new Command literal.
\r
4461 function create(title, command) {
\r
4463 for (var _i = 2; _i < arguments.length; _i++) {
\r
4464 args[_i - 2] = arguments[_i];
\r
4466 var result = { title: title, command: command };
\r
4467 if (Is.defined(args) && args.length > 0) {
\r
4468 result.arguments = args;
\r
4472 Command.create = create;
\r
4474 * Checks whether the given literal conforms to the [Command](#Command) interface.
\r
4476 function is(value) {
\r
4477 var candidate = value;
\r
4478 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
\r
4481 })(Command || (Command = {}));
\r
4483 * The TextEdit namespace provides helper function to create replace,
\r
4484 * insert and delete edits more easily.
\r
4487 (function (TextEdit) {
\r
4489 * Creates a replace text edit.
\r
4490 * @param range The range of text to be replaced.
\r
4491 * @param newText The new text.
\r
4493 function replace(range, newText) {
\r
4494 return { range: range, newText: newText };
\r
4496 TextEdit.replace = replace;
\r
4498 * Creates a insert text edit.
\r
4499 * @param position The position to insert the text at.
\r
4500 * @param newText The text to be inserted.
\r
4502 function insert(position, newText) {
\r
4503 return { range: { start: position, end: position }, newText: newText };
\r
4505 TextEdit.insert = insert;
\r
4507 * Creates a delete text edit.
\r
4508 * @param range The range of text to be deleted.
\r
4510 function del(range) {
\r
4511 return { range: range, newText: '' };
\r
4513 TextEdit.del = del;
\r
4514 function is(value) {
\r
4515 var candidate = value;
\r
4516 return Is.objectLiteral(candidate)
\r
4517 && Is.string(candidate.newText)
\r
4518 && Range.is(candidate.range);
\r
4521 })(TextEdit || (TextEdit = {}));
\r
4523 * The TextDocumentEdit namespace provides helper function to create
\r
4524 * an edit that manipulates a text document.
\r
4526 var TextDocumentEdit;
\r
4527 (function (TextDocumentEdit) {
\r
4529 * Creates a new `TextDocumentEdit`
\r
4531 function create(textDocument, edits) {
\r
4532 return { textDocument: textDocument, edits: edits };
\r
4534 TextDocumentEdit.create = create;
\r
4535 function is(value) {
\r
4536 var candidate = value;
\r
4537 return Is.defined(candidate)
\r
4538 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
\r
4539 && Array.isArray(candidate.edits);
\r
4541 TextDocumentEdit.is = is;
\r
4542 })(TextDocumentEdit || (TextDocumentEdit = {}));
\r
4544 (function (CreateFile) {
\r
4545 function create(uri, options) {
\r
4550 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
\r
4551 result.options = options;
\r
4555 CreateFile.create = create;
\r
4556 function is(value) {
\r
4557 var candidate = value;
\r
4558 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
\r
4559 (candidate.options === void 0 ||
\r
4560 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
\r
4562 CreateFile.is = is;
\r
4563 })(CreateFile || (CreateFile = {}));
\r
4565 (function (RenameFile) {
\r
4566 function create(oldUri, newUri, options) {
\r
4572 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
\r
4573 result.options = options;
\r
4577 RenameFile.create = create;
\r
4578 function is(value) {
\r
4579 var candidate = value;
\r
4580 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
\r
4581 (candidate.options === void 0 ||
\r
4582 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
\r
4584 RenameFile.is = is;
\r
4585 })(RenameFile || (RenameFile = {}));
\r
4587 (function (DeleteFile) {
\r
4588 function create(uri, options) {
\r
4593 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
\r
4594 result.options = options;
\r
4598 DeleteFile.create = create;
\r
4599 function is(value) {
\r
4600 var candidate = value;
\r
4601 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
\r
4602 (candidate.options === void 0 ||
\r
4603 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
\r
4605 DeleteFile.is = is;
\r
4606 })(DeleteFile || (DeleteFile = {}));
\r
4607 var WorkspaceEdit;
\r
4608 (function (WorkspaceEdit) {
\r
4609 function is(value) {
\r
4610 var candidate = value;
\r
4611 return candidate &&
\r
4612 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
\r
4613 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
\r
4614 if (Is.string(change.kind)) {
\r
4615 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
\r
4618 return TextDocumentEdit.is(change);
\r
4622 WorkspaceEdit.is = is;
\r
4623 })(WorkspaceEdit || (WorkspaceEdit = {}));
\r
4624 var TextEditChangeImpl = /** @class */ (function () {
\r
4625 function TextEditChangeImpl(edits) {
\r
4626 this.edits = edits;
\r
4628 TextEditChangeImpl.prototype.insert = function (position, newText) {
\r
4629 this.edits.push(TextEdit.insert(position, newText));
\r
4631 TextEditChangeImpl.prototype.replace = function (range, newText) {
\r
4632 this.edits.push(TextEdit.replace(range, newText));
\r
4634 TextEditChangeImpl.prototype.delete = function (range) {
\r
4635 this.edits.push(TextEdit.del(range));
\r
4637 TextEditChangeImpl.prototype.add = function (edit) {
\r
4638 this.edits.push(edit);
\r
4640 TextEditChangeImpl.prototype.all = function () {
\r
4641 return this.edits;
\r
4643 TextEditChangeImpl.prototype.clear = function () {
\r
4644 this.edits.splice(0, this.edits.length);
\r
4646 return TextEditChangeImpl;
\r
4649 * A workspace change helps constructing changes to a workspace.
\r
4651 var WorkspaceChange = /** @class */ (function () {
\r
4652 function WorkspaceChange(workspaceEdit) {
\r
4654 this._textEditChanges = Object.create(null);
\r
4655 if (workspaceEdit) {
\r
4656 this._workspaceEdit = workspaceEdit;
\r
4657 if (workspaceEdit.documentChanges) {
\r
4658 workspaceEdit.documentChanges.forEach(function (change) {
\r
4659 if (TextDocumentEdit.is(change)) {
\r
4660 var textEditChange = new TextEditChangeImpl(change.edits);
\r
4661 _this._textEditChanges[change.textDocument.uri] = textEditChange;
\r
4665 else if (workspaceEdit.changes) {
\r
4666 Object.keys(workspaceEdit.changes).forEach(function (key) {
\r
4667 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
\r
4668 _this._textEditChanges[key] = textEditChange;
\r
4673 Object.defineProperty(WorkspaceChange.prototype, "edit", {
\r
4675 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
\r
4676 * use to be returned from a workspace edit operation like rename.
\r
4678 get: function () {
\r
4679 return this._workspaceEdit;
\r
4682 configurable: true
\r
4684 WorkspaceChange.prototype.getTextEditChange = function (key) {
\r
4685 if (VersionedTextDocumentIdentifier.is(key)) {
\r
4686 if (!this._workspaceEdit) {
\r
4687 this._workspaceEdit = {
\r
4688 documentChanges: []
\r
4691 if (!this._workspaceEdit.documentChanges) {
\r
4692 throw new Error('Workspace edit is not configured for document changes.');
\r
4694 var textDocument = key;
\r
4695 var result = this._textEditChanges[textDocument.uri];
\r
4698 var textDocumentEdit = {
\r
4699 textDocument: textDocument,
\r
4702 this._workspaceEdit.documentChanges.push(textDocumentEdit);
\r
4703 result = new TextEditChangeImpl(edits);
\r
4704 this._textEditChanges[textDocument.uri] = result;
\r
4709 if (!this._workspaceEdit) {
\r
4710 this._workspaceEdit = {
\r
4711 changes: Object.create(null)
\r
4714 if (!this._workspaceEdit.changes) {
\r
4715 throw new Error('Workspace edit is not configured for normal text edit changes.');
\r
4717 var result = this._textEditChanges[key];
\r
4720 this._workspaceEdit.changes[key] = edits;
\r
4721 result = new TextEditChangeImpl(edits);
\r
4722 this._textEditChanges[key] = result;
\r
4727 WorkspaceChange.prototype.createFile = function (uri, options) {
\r
4728 this.checkDocumentChanges();
\r
4729 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
\r
4731 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
\r
4732 this.checkDocumentChanges();
\r
4733 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
\r
4735 WorkspaceChange.prototype.deleteFile = function (uri, options) {
\r
4736 this.checkDocumentChanges();
\r
4737 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
\r
4739 WorkspaceChange.prototype.checkDocumentChanges = function () {
\r
4740 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
\r
4741 throw new Error('Workspace edit is not configured for document changes.');
\r
4744 return WorkspaceChange;
\r
4748 * The TextDocumentIdentifier namespace provides helper functions to work with
\r
4749 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
\r
4751 var TextDocumentIdentifier;
\r
4752 (function (TextDocumentIdentifier) {
\r
4754 * Creates a new TextDocumentIdentifier literal.
\r
4755 * @param uri The document's uri.
\r
4757 function create(uri) {
\r
4758 return { uri: uri };
\r
4760 TextDocumentIdentifier.create = create;
\r
4762 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
\r
4764 function is(value) {
\r
4765 var candidate = value;
\r
4766 return Is.defined(candidate) && Is.string(candidate.uri);
\r
4768 TextDocumentIdentifier.is = is;
\r
4769 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
\r
4771 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
\r
4772 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
\r
4774 var VersionedTextDocumentIdentifier;
\r
4775 (function (VersionedTextDocumentIdentifier) {
\r
4777 * Creates a new VersionedTextDocumentIdentifier literal.
\r
4778 * @param uri The document's uri.
\r
4779 * @param uri The document's text.
\r
4781 function create(uri, version) {
\r
4782 return { uri: uri, version: version };
\r
4784 VersionedTextDocumentIdentifier.create = create;
\r
4786 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
\r
4788 function is(value) {
\r
4789 var candidate = value;
\r
4790 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
\r
4792 VersionedTextDocumentIdentifier.is = is;
\r
4793 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
\r
4795 * The TextDocumentItem namespace provides helper functions to work with
\r
4796 * [TextDocumentItem](#TextDocumentItem) literals.
\r
4798 var TextDocumentItem;
\r
4799 (function (TextDocumentItem) {
\r
4801 * Creates a new TextDocumentItem literal.
\r
4802 * @param uri The document's uri.
\r
4803 * @param languageId The document's language identifier.
\r
4804 * @param version The document's version number.
\r
4805 * @param text The document's text.
\r
4807 function create(uri, languageId, version, text) {
\r
4808 return { uri: uri, languageId: languageId, version: version, text: text };
\r
4810 TextDocumentItem.create = create;
\r
4812 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
\r
4814 function is(value) {
\r
4815 var candidate = value;
\r
4816 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
\r
4818 TextDocumentItem.is = is;
\r
4819 })(TextDocumentItem || (TextDocumentItem = {}));
\r
4821 * Describes the content type that a client supports in various
\r
4822 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
\r
4824 * Please note that `MarkupKinds` must not start with a `$`. This kinds
\r
4825 * are reserved for internal usage.
\r
4828 (function (MarkupKind) {
\r
4830 * Plain text is supported as a content format
\r
4832 MarkupKind.PlainText = 'plaintext';
\r
4834 * Markdown is supported as a content format
\r
4836 MarkupKind.Markdown = 'markdown';
\r
4837 })(MarkupKind || (MarkupKind = {}));
\r
4838 (function (MarkupKind) {
\r
4840 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
\r
4842 function is(value) {
\r
4843 var candidate = value;
\r
4844 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
\r
4846 MarkupKind.is = is;
\r
4847 })(MarkupKind || (MarkupKind = {}));
\r
4848 var MarkupContent;
\r
4849 (function (MarkupContent) {
\r
4851 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
\r
4853 function is(value) {
\r
4854 var candidate = value;
\r
4855 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
\r
4857 MarkupContent.is = is;
\r
4858 })(MarkupContent || (MarkupContent = {}));
\r
4860 * The kind of a completion entry.
\r
4862 var CompletionItemKind;
\r
4863 (function (CompletionItemKind) {
\r
4864 CompletionItemKind.Text = 1;
\r
4865 CompletionItemKind.Method = 2;
\r
4866 CompletionItemKind.Function = 3;
\r
4867 CompletionItemKind.Constructor = 4;
\r
4868 CompletionItemKind.Field = 5;
\r
4869 CompletionItemKind.Variable = 6;
\r
4870 CompletionItemKind.Class = 7;
\r
4871 CompletionItemKind.Interface = 8;
\r
4872 CompletionItemKind.Module = 9;
\r
4873 CompletionItemKind.Property = 10;
\r
4874 CompletionItemKind.Unit = 11;
\r
4875 CompletionItemKind.Value = 12;
\r
4876 CompletionItemKind.Enum = 13;
\r
4877 CompletionItemKind.Keyword = 14;
\r
4878 CompletionItemKind.Snippet = 15;
\r
4879 CompletionItemKind.Color = 16;
\r
4880 CompletionItemKind.File = 17;
\r
4881 CompletionItemKind.Reference = 18;
\r
4882 CompletionItemKind.Folder = 19;
\r
4883 CompletionItemKind.EnumMember = 20;
\r
4884 CompletionItemKind.Constant = 21;
\r
4885 CompletionItemKind.Struct = 22;
\r
4886 CompletionItemKind.Event = 23;
\r
4887 CompletionItemKind.Operator = 24;
\r
4888 CompletionItemKind.TypeParameter = 25;
\r
4889 })(CompletionItemKind || (CompletionItemKind = {}));
\r
4891 * Defines whether the insert text in a completion item should be interpreted as
\r
4892 * plain text or a snippet.
\r
4894 var InsertTextFormat;
\r
4895 (function (InsertTextFormat) {
\r
4897 * The primary text to be inserted is treated as a plain string.
\r
4899 InsertTextFormat.PlainText = 1;
\r
4901 * The primary text to be inserted is treated as a snippet.
\r
4903 * A snippet can define tab stops and placeholders with `$1`, `$2`
\r
4904 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
\r
4905 * the end of the snippet. Placeholders with equal identifiers are linked,
\r
4906 * that is typing in one will update others too.
\r
4908 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
\r
4910 InsertTextFormat.Snippet = 2;
\r
4911 })(InsertTextFormat || (InsertTextFormat = {}));
\r
4913 * Completion item tags are extra annotations that tweak the rendering of a completion
\r
4918 var CompletionItemTag;
\r
4919 (function (CompletionItemTag) {
\r
4921 * Render a completion as obsolete, usually using a strike-out.
\r
4923 CompletionItemTag.Deprecated = 1;
\r
4924 })(CompletionItemTag || (CompletionItemTag = {}));
\r
4926 * The CompletionItem namespace provides functions to deal with
\r
4927 * completion items.
\r
4929 var CompletionItem;
\r
4930 (function (CompletionItem) {
\r
4932 * Create a completion item and seed it with a label.
\r
4933 * @param label The completion item's label
\r
4935 function create(label) {
\r
4936 return { label: label };
\r
4938 CompletionItem.create = create;
\r
4939 })(CompletionItem || (CompletionItem = {}));
\r
4941 * The CompletionList namespace provides functions to deal with
\r
4942 * completion lists.
\r
4944 var CompletionList;
\r
4945 (function (CompletionList) {
\r
4947 * Creates a new completion list.
\r
4949 * @param items The completion items.
\r
4950 * @param isIncomplete The list is not complete.
\r
4952 function create(items, isIncomplete) {
\r
4953 return { items: items ? items : [], isIncomplete: !!isIncomplete };
\r
4955 CompletionList.create = create;
\r
4956 })(CompletionList || (CompletionList = {}));
\r
4958 (function (MarkedString) {
\r
4960 * Creates a marked string from plain text.
\r
4962 * @param plainText The plain text.
\r
4964 function fromPlainText(plainText) {
\r
4965 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
\r
4967 MarkedString.fromPlainText = fromPlainText;
\r
4969 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
\r
4971 function is(value) {
\r
4972 var candidate = value;
\r
4973 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
\r
4975 MarkedString.is = is;
\r
4976 })(MarkedString || (MarkedString = {}));
\r
4978 (function (Hover) {
\r
4980 * Checks whether the given value conforms to the [Hover](#Hover) interface.
\r
4982 function is(value) {
\r
4983 var candidate = value;
\r
4984 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
\r
4985 MarkedString.is(candidate.contents) ||
\r
4986 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
\r
4989 })(Hover || (Hover = {}));
\r
4991 * The ParameterInformation namespace provides helper functions to work with
\r
4992 * [ParameterInformation](#ParameterInformation) literals.
\r
4994 var ParameterInformation;
\r
4995 (function (ParameterInformation) {
\r
4997 * Creates a new parameter information literal.
\r
4999 * @param label A label string.
\r
5000 * @param documentation A doc string.
\r
5002 function create(label, documentation) {
\r
5003 return documentation ? { label: label, documentation: documentation } : { label: label };
\r
5005 ParameterInformation.create = create;
\r
5006 })(ParameterInformation || (ParameterInformation = {}));
\r
5008 * The SignatureInformation namespace provides helper functions to work with
\r
5009 * [SignatureInformation](#SignatureInformation) literals.
\r
5011 var SignatureInformation;
\r
5012 (function (SignatureInformation) {
\r
5013 function create(label, documentation) {
\r
5014 var parameters = [];
\r
5015 for (var _i = 2; _i < arguments.length; _i++) {
\r
5016 parameters[_i - 2] = arguments[_i];
\r
5018 var result = { label: label };
\r
5019 if (Is.defined(documentation)) {
\r
5020 result.documentation = documentation;
\r
5022 if (Is.defined(parameters)) {
\r
5023 result.parameters = parameters;
\r
5026 result.parameters = [];
\r
5030 SignatureInformation.create = create;
\r
5031 })(SignatureInformation || (SignatureInformation = {}));
\r
5033 * A document highlight kind.
\r
5035 var DocumentHighlightKind;
\r
5036 (function (DocumentHighlightKind) {
\r
5038 * A textual occurrence.
\r
5040 DocumentHighlightKind.Text = 1;
\r
5042 * Read-access of a symbol, like reading a variable.
\r
5044 DocumentHighlightKind.Read = 2;
\r
5046 * Write-access of a symbol, like writing to a variable.
\r
5048 DocumentHighlightKind.Write = 3;
\r
5049 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
\r
5051 * DocumentHighlight namespace to provide helper functions to work with
\r
5052 * [DocumentHighlight](#DocumentHighlight) literals.
\r
5054 var DocumentHighlight;
\r
5055 (function (DocumentHighlight) {
\r
5057 * Create a DocumentHighlight object.
\r
5058 * @param range The range the highlight applies to.
\r
5060 function create(range, kind) {
\r
5061 var result = { range: range };
\r
5062 if (Is.number(kind)) {
\r
5063 result.kind = kind;
\r
5067 DocumentHighlight.create = create;
\r
5068 })(DocumentHighlight || (DocumentHighlight = {}));
\r
5073 (function (SymbolKind) {
\r
5074 SymbolKind.File = 1;
\r
5075 SymbolKind.Module = 2;
\r
5076 SymbolKind.Namespace = 3;
\r
5077 SymbolKind.Package = 4;
\r
5078 SymbolKind.Class = 5;
\r
5079 SymbolKind.Method = 6;
\r
5080 SymbolKind.Property = 7;
\r
5081 SymbolKind.Field = 8;
\r
5082 SymbolKind.Constructor = 9;
\r
5083 SymbolKind.Enum = 10;
\r
5084 SymbolKind.Interface = 11;
\r
5085 SymbolKind.Function = 12;
\r
5086 SymbolKind.Variable = 13;
\r
5087 SymbolKind.Constant = 14;
\r
5088 SymbolKind.String = 15;
\r
5089 SymbolKind.Number = 16;
\r
5090 SymbolKind.Boolean = 17;
\r
5091 SymbolKind.Array = 18;
\r
5092 SymbolKind.Object = 19;
\r
5093 SymbolKind.Key = 20;
\r
5094 SymbolKind.Null = 21;
\r
5095 SymbolKind.EnumMember = 22;
\r
5096 SymbolKind.Struct = 23;
\r
5097 SymbolKind.Event = 24;
\r
5098 SymbolKind.Operator = 25;
\r
5099 SymbolKind.TypeParameter = 26;
\r
5100 })(SymbolKind || (SymbolKind = {}));
\r
5102 * Symbol tags are extra annotations that tweak the rendering of a symbol.
\r
5106 (function (SymbolTag) {
\r
5108 * Render a symbol as obsolete, usually using a strike-out.
\r
5110 SymbolTag.Deprecated = 1;
\r
5111 })(SymbolTag || (SymbolTag = {}));
\r
5112 var SymbolInformation;
\r
5113 (function (SymbolInformation) {
\r
5115 * Creates a new symbol information literal.
\r
5117 * @param name The name of the symbol.
\r
5118 * @param kind The kind of the symbol.
\r
5119 * @param range The range of the location of the symbol.
\r
5120 * @param uri The resource of the location of symbol, defaults to the current document.
\r
5121 * @param containerName The name of the symbol containing the symbol.
\r
5123 function create(name, kind, range, uri, containerName) {
\r
5127 location: { uri: uri, range: range }
\r
5129 if (containerName) {
\r
5130 result.containerName = containerName;
\r
5134 SymbolInformation.create = create;
\r
5135 })(SymbolInformation || (SymbolInformation = {}));
\r
5136 var DocumentSymbol;
\r
5137 (function (DocumentSymbol) {
\r
5139 * Creates a new symbol information literal.
\r
5141 * @param name The name of the symbol.
\r
5142 * @param detail The detail of the symbol.
\r
5143 * @param kind The kind of the symbol.
\r
5144 * @param range The range of the symbol.
\r
5145 * @param selectionRange The selectionRange of the symbol.
\r
5146 * @param children Children of the symbol.
\r
5148 function create(name, detail, kind, range, selectionRange, children) {
\r
5154 selectionRange: selectionRange
\r
5156 if (children !== void 0) {
\r
5157 result.children = children;
\r
5161 DocumentSymbol.create = create;
\r
5163 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
\r
5165 function is(value) {
\r
5166 var candidate = value;
\r
5167 return candidate &&
\r
5168 Is.string(candidate.name) && Is.number(candidate.kind) &&
\r
5169 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
\r
5170 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
\r
5171 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
\r
5172 (candidate.children === void 0 || Array.isArray(candidate.children));
\r
5174 DocumentSymbol.is = is;
\r
5175 })(DocumentSymbol || (DocumentSymbol = {}));
\r
5177 * A set of predefined code action kinds
\r
5179 var CodeActionKind;
\r
5180 (function (CodeActionKind) {
\r
5184 CodeActionKind.Empty = '';
\r
5186 * Base kind for quickfix actions: 'quickfix'
\r
5188 CodeActionKind.QuickFix = 'quickfix';
\r
5190 * Base kind for refactoring actions: 'refactor'
\r
5192 CodeActionKind.Refactor = 'refactor';
\r
5194 * Base kind for refactoring extraction actions: 'refactor.extract'
\r
5196 * Example extract actions:
\r
5198 * - Extract method
\r
5199 * - Extract function
\r
5200 * - Extract variable
\r
5201 * - Extract interface from class
\r
5204 CodeActionKind.RefactorExtract = 'refactor.extract';
\r
5206 * Base kind for refactoring inline actions: 'refactor.inline'
\r
5208 * Example inline actions:
\r
5210 * - Inline function
\r
5211 * - Inline variable
\r
5212 * - Inline constant
\r
5215 CodeActionKind.RefactorInline = 'refactor.inline';
\r
5217 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
\r
5219 * Example rewrite actions:
\r
5221 * - Convert JavaScript function to class
\r
5222 * - Add or remove parameter
\r
5223 * - Encapsulate field
\r
5224 * - Make method static
\r
5225 * - Move method to base class
\r
5228 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
\r
5230 * Base kind for source actions: `source`
\r
5232 * Source code actions apply to the entire file.
\r
5234 CodeActionKind.Source = 'source';
\r
5236 * Base kind for an organize imports source action: `source.organizeImports`
\r
5238 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
\r
5240 * Base kind for auto-fix source actions: `source.fixAll`.
\r
5242 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
\r
5243 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
\r
5247 CodeActionKind.SourceFixAll = 'source.fixAll';
\r
5248 })(CodeActionKind || (CodeActionKind = {}));
\r
5250 * The CodeActionContext namespace provides helper functions to work with
\r
5251 * [CodeActionContext](#CodeActionContext) literals.
\r
5253 var CodeActionContext;
\r
5254 (function (CodeActionContext) {
\r
5256 * Creates a new CodeActionContext literal.
\r
5258 function create(diagnostics, only) {
\r
5259 var result = { diagnostics: diagnostics };
\r
5260 if (only !== void 0 && only !== null) {
\r
5261 result.only = only;
\r
5265 CodeActionContext.create = create;
\r
5267 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
\r
5269 function is(value) {
\r
5270 var candidate = value;
\r
5271 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
\r
5273 CodeActionContext.is = is;
\r
5274 })(CodeActionContext || (CodeActionContext = {}));
\r
5276 (function (CodeAction) {
\r
5277 function create(title, commandOrEdit, kind) {
\r
5278 var result = { title: title };
\r
5279 if (Command.is(commandOrEdit)) {
\r
5280 result.command = commandOrEdit;
\r
5283 result.edit = commandOrEdit;
\r
5285 if (kind !== void 0) {
\r
5286 result.kind = kind;
\r
5290 CodeAction.create = create;
\r
5291 function is(value) {
\r
5292 var candidate = value;
\r
5293 return candidate && Is.string(candidate.title) &&
\r
5294 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
\r
5295 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
\r
5296 (candidate.edit !== void 0 || candidate.command !== void 0) &&
\r
5297 (candidate.command === void 0 || Command.is(candidate.command)) &&
\r
5298 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
\r
5299 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
\r
5301 CodeAction.is = is;
\r
5302 })(CodeAction || (CodeAction = {}));
\r
5304 * The CodeLens namespace provides helper functions to work with
\r
5305 * [CodeLens](#CodeLens) literals.
\r
5308 (function (CodeLens) {
\r
5310 * Creates a new CodeLens literal.
\r
5312 function create(range, data) {
\r
5313 var result = { range: range };
\r
5314 if (Is.defined(data)) {
\r
5315 result.data = data;
\r
5319 CodeLens.create = create;
\r
5321 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
\r
5323 function is(value) {
\r
5324 var candidate = value;
\r
5325 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
\r
5328 })(CodeLens || (CodeLens = {}));
\r
5330 * The FormattingOptions namespace provides helper functions to work with
\r
5331 * [FormattingOptions](#FormattingOptions) literals.
\r
5333 var FormattingOptions;
\r
5334 (function (FormattingOptions) {
\r
5336 * Creates a new FormattingOptions literal.
\r
5338 function create(tabSize, insertSpaces) {
\r
5339 return { tabSize: tabSize, insertSpaces: insertSpaces };
\r
5341 FormattingOptions.create = create;
\r
5343 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
\r
5345 function is(value) {
\r
5346 var candidate = value;
\r
5347 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
\r
5349 FormattingOptions.is = is;
\r
5350 })(FormattingOptions || (FormattingOptions = {}));
\r
5352 * The DocumentLink namespace provides helper functions to work with
\r
5353 * [DocumentLink](#DocumentLink) literals.
\r
5356 (function (DocumentLink) {
\r
5358 * Creates a new DocumentLink literal.
\r
5360 function create(range, target, data) {
\r
5361 return { range: range, target: target, data: data };
\r
5363 DocumentLink.create = create;
\r
5365 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
\r
5367 function is(value) {
\r
5368 var candidate = value;
\r
5369 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
\r
5371 DocumentLink.is = is;
\r
5372 })(DocumentLink || (DocumentLink = {}));
\r
5374 * The SelectionRange namespace provides helper function to work with
\r
5375 * SelectionRange literals.
\r
5377 var SelectionRange;
\r
5378 (function (SelectionRange) {
\r
5380 * Creates a new SelectionRange
\r
5381 * @param range the range.
\r
5382 * @param parent an optional parent.
\r
5384 function create(range, parent) {
\r
5385 return { range: range, parent: parent };
\r
5387 SelectionRange.create = create;
\r
5388 function is(value) {
\r
5389 var candidate = value;
\r
5390 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
\r
5392 SelectionRange.is = is;
\r
5393 })(SelectionRange || (SelectionRange = {}));
\r
5394 var EOL = ['\n', '\r\n', '\r'];
\r
5396 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
\r
5399 (function (TextDocument) {
\r
5401 * Creates a new ITextDocument literal from the given uri and content.
\r
5402 * @param uri The document's uri.
\r
5403 * @param languageId The document's language Id.
\r
5404 * @param content The document's content.
\r
5406 function create(uri, languageId, version, content) {
\r
5407 return new FullTextDocument(uri, languageId, version, content);
\r
5409 TextDocument.create = create;
\r
5411 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
\r
5413 function is(value) {
\r
5414 var candidate = value;
\r
5415 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
\r
5416 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
\r
5418 TextDocument.is = is;
\r
5419 function applyEdits(document, edits) {
\r
5420 var text = document.getText();
\r
5421 var sortedEdits = mergeSort(edits, function (a, b) {
\r
5422 var diff = a.range.start.line - b.range.start.line;
\r
5424 return a.range.start.character - b.range.start.character;
\r
5428 var lastModifiedOffset = text.length;
\r
5429 for (var i = sortedEdits.length - 1; i >= 0; i--) {
\r
5430 var e = sortedEdits[i];
\r
5431 var startOffset = document.offsetAt(e.range.start);
\r
5432 var endOffset = document.offsetAt(e.range.end);
\r
5433 if (endOffset <= lastModifiedOffset) {
\r
5434 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
\r
5437 throw new Error('Overlapping edit');
\r
5439 lastModifiedOffset = startOffset;
\r
5443 TextDocument.applyEdits = applyEdits;
\r
5444 function mergeSort(data, compare) {
\r
5445 if (data.length <= 1) {
\r
5449 var p = (data.length / 2) | 0;
\r
5450 var left = data.slice(0, p);
\r
5451 var right = data.slice(p);
\r
5452 mergeSort(left, compare);
\r
5453 mergeSort(right, compare);
\r
5457 while (leftIdx < left.length && rightIdx < right.length) {
\r
5458 var ret = compare(left[leftIdx], right[rightIdx]);
\r
5460 // smaller_equal -> take left to preserve order
\r
5461 data[i++] = left[leftIdx++];
\r
5464 // greater -> take right
\r
5465 data[i++] = right[rightIdx++];
\r
5468 while (leftIdx < left.length) {
\r
5469 data[i++] = left[leftIdx++];
\r
5471 while (rightIdx < right.length) {
\r
5472 data[i++] = right[rightIdx++];
\r
5476 })(TextDocument || (TextDocument = {}));
\r
5477 var FullTextDocument = /** @class */ (function () {
\r
5478 function FullTextDocument(uri, languageId, version, content) {
\r
5480 this._languageId = languageId;
\r
5481 this._version = version;
\r
5482 this._content = content;
\r
5483 this._lineOffsets = undefined;
\r
5485 Object.defineProperty(FullTextDocument.prototype, "uri", {
\r
5486 get: function () {
\r
5490 configurable: true
\r
5492 Object.defineProperty(FullTextDocument.prototype, "languageId", {
\r
5493 get: function () {
\r
5494 return this._languageId;
\r
5497 configurable: true
\r
5499 Object.defineProperty(FullTextDocument.prototype, "version", {
\r
5500 get: function () {
\r
5501 return this._version;
\r
5504 configurable: true
\r
5506 FullTextDocument.prototype.getText = function (range) {
\r
5508 var start = this.offsetAt(range.start);
\r
5509 var end = this.offsetAt(range.end);
\r
5510 return this._content.substring(start, end);
\r
5512 return this._content;
\r
5514 FullTextDocument.prototype.update = function (event, version) {
\r
5515 this._content = event.text;
\r
5516 this._version = version;
\r
5517 this._lineOffsets = undefined;
\r
5519 FullTextDocument.prototype.getLineOffsets = function () {
\r
5520 if (this._lineOffsets === undefined) {
\r
5521 var lineOffsets = [];
\r
5522 var text = this._content;
\r
5523 var isLineStart = true;
\r
5524 for (var i = 0; i < text.length; i++) {
\r
5525 if (isLineStart) {
\r
5526 lineOffsets.push(i);
\r
5527 isLineStart = false;
\r
5529 var ch = text.charAt(i);
\r
5530 isLineStart = (ch === '\r' || ch === '\n');
\r
5531 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
\r
5535 if (isLineStart && text.length > 0) {
\r
5536 lineOffsets.push(text.length);
\r
5538 this._lineOffsets = lineOffsets;
\r
5540 return this._lineOffsets;
\r
5542 FullTextDocument.prototype.positionAt = function (offset) {
\r
5543 offset = Math.max(Math.min(offset, this._content.length), 0);
\r
5544 var lineOffsets = this.getLineOffsets();
\r
5545 var low = 0, high = lineOffsets.length;
\r
5547 return Position.create(0, offset);
\r
5549 while (low < high) {
\r
5550 var mid = Math.floor((low + high) / 2);
\r
5551 if (lineOffsets[mid] > offset) {
\r
5558 // low is the least x for which the line offset is larger than the current offset
\r
5559 // or array.length if no line offset is larger than the current offset
\r
5560 var line = low - 1;
\r
5561 return Position.create(line, offset - lineOffsets[line]);
\r
5563 FullTextDocument.prototype.offsetAt = function (position) {
\r
5564 var lineOffsets = this.getLineOffsets();
\r
5565 if (position.line >= lineOffsets.length) {
\r
5566 return this._content.length;
\r
5568 else if (position.line < 0) {
\r
5571 var lineOffset = lineOffsets[position.line];
\r
5572 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
\r
5573 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
\r
5575 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
\r
5576 get: function () {
\r
5577 return this.getLineOffsets().length;
\r
5580 configurable: true
\r
5582 return FullTextDocument;
\r
5586 var toString = Object.prototype.toString;
\r
5587 function defined(value) {
\r
5588 return typeof value !== 'undefined';
\r
5590 Is.defined = defined;
\r
5591 function undefined(value) {
\r
5592 return typeof value === 'undefined';
\r
5594 Is.undefined = undefined;
\r
5595 function boolean(value) {
\r
5596 return value === true || value === false;
\r
5598 Is.boolean = boolean;
\r
5599 function string(value) {
\r
5600 return toString.call(value) === '[object String]';
\r
5602 Is.string = string;
\r
5603 function number(value) {
\r
5604 return toString.call(value) === '[object Number]';
\r
5606 Is.number = number;
\r
5607 function func(value) {
\r
5608 return toString.call(value) === '[object Function]';
\r
5611 function objectLiteral(value) {
\r
5612 // Strictly speaking class instances pass this check as well. Since the LSP
\r
5613 // doesn't use classes we ignore this for now. If we do we need to add something
\r
5614 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
\r
5615 return value !== null && typeof value === 'object';
\r
5617 Is.objectLiteral = objectLiteral;
\r
5618 function typedArray(value, check) {
\r
5619 return Array.isArray(value) && value.every(check);
\r
5621 Is.typedArray = typedArray;
\r
5622 })(Is || (Is = {}));
\r
5627 /***/ (function(module, exports, __webpack_require__) {
5630 /* --------------------------------------------------------------------------------------------
\r
5631 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5632 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5633 * ------------------------------------------------------------------------------------------ */
\r
5635 Object.defineProperty(exports, "__esModule", { value: true });
\r
5636 const Is = __webpack_require__(47);
\r
5637 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
5638 const messages_1 = __webpack_require__(48);
\r
5639 const protocol_implementation_1 = __webpack_require__(49);
\r
5640 exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
\r
5641 const protocol_typeDefinition_1 = __webpack_require__(50);
\r
5642 exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
\r
5643 const protocol_workspaceFolders_1 = __webpack_require__(51);
\r
5644 exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
\r
5645 exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
\r
5646 const protocol_configuration_1 = __webpack_require__(52);
\r
5647 exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
\r
5648 const protocol_colorProvider_1 = __webpack_require__(53);
\r
5649 exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
\r
5650 exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
\r
5651 const protocol_foldingRange_1 = __webpack_require__(54);
\r
5652 exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
\r
5653 const protocol_declaration_1 = __webpack_require__(55);
\r
5654 exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
\r
5655 const protocol_selectionRange_1 = __webpack_require__(56);
\r
5656 exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
\r
5657 const protocol_progress_1 = __webpack_require__(57);
\r
5658 exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
\r
5659 exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
\r
5660 exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
\r
5661 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
5662 let __noDynamicImport;
\r
5664 * The DocumentFilter namespace provides helper functions to work with
\r
5665 * [DocumentFilter](#DocumentFilter) literals.
\r
5667 var DocumentFilter;
\r
5668 (function (DocumentFilter) {
\r
5669 function is(value) {
\r
5670 const candidate = value;
\r
5671 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
\r
5673 DocumentFilter.is = is;
\r
5674 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
\r
5676 * The DocumentSelector namespace provides helper functions to work with
\r
5677 * [DocumentSelector](#DocumentSelector)s.
\r
5679 var DocumentSelector;
\r
5680 (function (DocumentSelector) {
\r
5681 function is(value) {
\r
5682 if (!Array.isArray(value)) {
\r
5685 for (let elem of value) {
\r
5686 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
\r
5692 DocumentSelector.is = is;
\r
5693 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
\r
5695 * The `client/registerCapability` request is sent from the server to the client to register a new capability
\r
5696 * handler on the client side.
\r
5698 var RegistrationRequest;
\r
5699 (function (RegistrationRequest) {
\r
5700 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
\r
5701 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
\r
5703 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
\r
5704 * handler on the client side.
\r
5706 var UnregistrationRequest;
\r
5707 (function (UnregistrationRequest) {
\r
5708 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
\r
5709 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
\r
5710 var ResourceOperationKind;
\r
5711 (function (ResourceOperationKind) {
\r
5713 * Supports creating new files and folders.
\r
5715 ResourceOperationKind.Create = 'create';
\r
5717 * Supports renaming existing files and folders.
\r
5719 ResourceOperationKind.Rename = 'rename';
\r
5721 * Supports deleting existing files and folders.
\r
5723 ResourceOperationKind.Delete = 'delete';
\r
5724 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
\r
5725 var FailureHandlingKind;
\r
5726 (function (FailureHandlingKind) {
\r
5728 * Applying the workspace change is simply aborted if one of the changes provided
\r
5729 * fails. All operations executed before the failing operation stay executed.
\r
5731 FailureHandlingKind.Abort = 'abort';
\r
5733 * All operations are executed transactional. That means they either all
\r
5734 * succeed or no changes at all are applied to the workspace.
\r
5736 FailureHandlingKind.Transactional = 'transactional';
\r
5738 * If the workspace edit contains only textual file changes they are executed transactional.
\r
5739 * If resource changes (create, rename or delete file) are part of the change the failure
\r
5740 * handling startegy is abort.
\r
5742 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
\r
5744 * The client tries to undo the operations already executed. But there is no
\r
5745 * guarantee that this is succeeding.
\r
5747 FailureHandlingKind.Undo = 'undo';
\r
5748 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
\r
5750 * The StaticRegistrationOptions namespace provides helper functions to work with
\r
5751 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
\r
5753 var StaticRegistrationOptions;
\r
5754 (function (StaticRegistrationOptions) {
\r
5755 function hasId(value) {
\r
5756 const candidate = value;
\r
5757 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
\r
5759 StaticRegistrationOptions.hasId = hasId;
\r
5760 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
\r
5762 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
\r
5763 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
\r
5765 var TextDocumentRegistrationOptions;
\r
5766 (function (TextDocumentRegistrationOptions) {
\r
5767 function is(value) {
\r
5768 const candidate = value;
\r
5769 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
\r
5771 TextDocumentRegistrationOptions.is = is;
\r
5772 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
\r
5774 * The WorkDoneProgressOptions namespace provides helper functions to work with
\r
5775 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
\r
5777 var WorkDoneProgressOptions;
\r
5778 (function (WorkDoneProgressOptions) {
\r
5779 function is(value) {
\r
5780 const candidate = value;
\r
5781 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
\r
5783 WorkDoneProgressOptions.is = is;
\r
5784 function hasWorkDoneProgress(value) {
\r
5785 const candidate = value;
\r
5786 return candidate && Is.boolean(candidate.workDoneProgress);
\r
5788 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
\r
5789 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
\r
5791 * The initialize request is sent from the client to the server.
\r
5792 * It is sent once as the request after starting up the server.
\r
5793 * The requests parameter is of type [InitializeParams](#InitializeParams)
\r
5794 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
\r
5795 * resolves to such.
\r
5797 var InitializeRequest;
\r
5798 (function (InitializeRequest) {
\r
5799 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
\r
5800 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
\r
5802 * Known error codes for an `InitializeError`;
\r
5804 var InitializeError;
\r
5805 (function (InitializeError) {
\r
5807 * If the protocol version provided by the client can't be handled by the server.
\r
5808 * @deprecated This initialize error got replaced by client capabilities. There is
\r
5809 * no version handshake in version 3.0x
\r
5811 InitializeError.unknownProtocolVersion = 1;
\r
5812 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
\r
5814 * The intialized notification is sent from the client to the
\r
5815 * server after the client is fully initialized and the server
\r
5816 * is allowed to send requests from the server to the client.
\r
5818 var InitializedNotification;
\r
5819 (function (InitializedNotification) {
\r
5820 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
\r
5821 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
\r
5822 //---- Shutdown Method ----
\r
5824 * A shutdown request is sent from the client to the server.
\r
5825 * It is sent once when the client decides to shutdown the
\r
5826 * server. The only notification that is sent after a shutdown request
\r
5827 * is the exit event.
\r
5829 var ShutdownRequest;
\r
5830 (function (ShutdownRequest) {
\r
5831 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
\r
5832 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
\r
5833 //---- Exit Notification ----
\r
5835 * The exit event is sent from the client to the server to
\r
5836 * ask the server to exit its process.
\r
5838 var ExitNotification;
\r
5839 (function (ExitNotification) {
\r
5840 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
\r
5841 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
\r
5843 * The configuration change notification is sent from the client to the server
\r
5844 * when the client's configuration has changed. The notification contains
\r
5845 * the changed configuration as defined by the language client.
\r
5847 var DidChangeConfigurationNotification;
\r
5848 (function (DidChangeConfigurationNotification) {
\r
5849 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
\r
5850 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
\r
5851 //---- Message show and log notifications ----
\r
5853 * The message type
\r
5856 (function (MessageType) {
\r
5858 * An error message.
\r
5860 MessageType.Error = 1;
\r
5862 * A warning message.
\r
5864 MessageType.Warning = 2;
\r
5866 * An information message.
\r
5868 MessageType.Info = 3;
\r
5872 MessageType.Log = 4;
\r
5873 })(MessageType = exports.MessageType || (exports.MessageType = {}));
\r
5875 * The show message notification is sent from a server to a client to ask
\r
5876 * the client to display a particular message in the user interface.
\r
5878 var ShowMessageNotification;
\r
5879 (function (ShowMessageNotification) {
\r
5880 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
\r
5881 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
\r
5883 * The show message request is sent from the server to the client to show a message
\r
5884 * and a set of options actions to the user.
\r
5886 var ShowMessageRequest;
\r
5887 (function (ShowMessageRequest) {
\r
5888 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
\r
5889 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
\r
5891 * The log message notification is sent from the server to the client to ask
\r
5892 * the client to log a particular message.
\r
5894 var LogMessageNotification;
\r
5895 (function (LogMessageNotification) {
\r
5896 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
\r
5897 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
\r
5898 //---- Telemetry notification
\r
5900 * The telemetry event notification is sent from the server to the client to ask
\r
5901 * the client to log telemetry data.
\r
5903 var TelemetryEventNotification;
\r
5904 (function (TelemetryEventNotification) {
\r
5905 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
\r
5906 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
\r
5908 * Defines how the host (editor) should sync
\r
5909 * document changes to the language server.
\r
5911 var TextDocumentSyncKind;
\r
5912 (function (TextDocumentSyncKind) {
\r
5914 * Documents should not be synced at all.
\r
5916 TextDocumentSyncKind.None = 0;
\r
5918 * Documents are synced by always sending the full content
\r
5919 * of the document.
\r
5921 TextDocumentSyncKind.Full = 1;
\r
5923 * Documents are synced by sending the full content on open.
\r
5924 * After that only incremental updates to the document are
\r
5927 TextDocumentSyncKind.Incremental = 2;
\r
5928 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
\r
5930 * The document open notification is sent from the client to the server to signal
\r
5931 * newly opened text documents. The document's truth is now managed by the client
\r
5932 * and the server must not try to read the document's truth using the document's
\r
5933 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
\r
5934 * mean that its content is presented in an editor. An open notification must not
\r
5935 * be sent more than once without a corresponding close notification send before.
\r
5936 * This means open and close notification must be balanced and the max open count
\r
5939 var DidOpenTextDocumentNotification;
\r
5940 (function (DidOpenTextDocumentNotification) {
\r
5941 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
\r
5942 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
\r
5943 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
\r
5945 * The document change notification is sent from the client to the server to signal
\r
5946 * changes to a text document.
\r
5948 var DidChangeTextDocumentNotification;
\r
5949 (function (DidChangeTextDocumentNotification) {
\r
5950 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
\r
5951 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
\r
5952 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
\r
5954 * The document close notification is sent from the client to the server when
\r
5955 * the document got closed in the client. The document's truth now exists where
\r
5956 * the document's uri points to (e.g. if the document's uri is a file uri the
\r
5957 * truth now exists on disk). As with the open notification the close notification
\r
5958 * is about managing the document's content. Receiving a close notification
\r
5959 * doesn't mean that the document was open in an editor before. A close
\r
5960 * notification requires a previous open notification to be sent.
\r
5962 var DidCloseTextDocumentNotification;
\r
5963 (function (DidCloseTextDocumentNotification) {
\r
5964 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
\r
5965 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
\r
5966 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
\r
5968 * The document save notification is sent from the client to the server when
\r
5969 * the document got saved in the client.
\r
5971 var DidSaveTextDocumentNotification;
\r
5972 (function (DidSaveTextDocumentNotification) {
\r
5973 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
\r
5974 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
\r
5975 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
\r
5977 * Represents reasons why a text document is saved.
\r
5979 var TextDocumentSaveReason;
\r
5980 (function (TextDocumentSaveReason) {
\r
5982 * Manually triggered, e.g. by the user pressing save, by starting debugging,
\r
5983 * or by an API call.
\r
5985 TextDocumentSaveReason.Manual = 1;
\r
5987 * Automatic after a delay.
\r
5989 TextDocumentSaveReason.AfterDelay = 2;
\r
5991 * When the editor lost focus.
\r
5993 TextDocumentSaveReason.FocusOut = 3;
\r
5994 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
\r
5996 * A document will save notification is sent from the client to the server before
\r
5997 * the document is actually saved.
\r
5999 var WillSaveTextDocumentNotification;
\r
6000 (function (WillSaveTextDocumentNotification) {
\r
6001 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
\r
6002 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
\r
6003 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
\r
6005 * A document will save request is sent from the client to the server before
\r
6006 * the document is actually saved. The request can return an array of TextEdits
\r
6007 * which will be applied to the text document before it is saved. Please note that
\r
6008 * clients might drop results if computing the text edits took too long or if a
\r
6009 * server constantly fails on this request. This is done to keep the save fast and
\r
6012 var WillSaveTextDocumentWaitUntilRequest;
\r
6013 (function (WillSaveTextDocumentWaitUntilRequest) {
\r
6014 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
\r
6015 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
\r
6016 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
\r
6018 * The watched files notification is sent from the client to the server when
\r
6019 * the client detects changes to file watched by the language client.
\r
6021 var DidChangeWatchedFilesNotification;
\r
6022 (function (DidChangeWatchedFilesNotification) {
\r
6023 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
\r
6024 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
\r
6026 * The file event type
\r
6028 var FileChangeType;
\r
6029 (function (FileChangeType) {
\r
6031 * The file got created.
\r
6033 FileChangeType.Created = 1;
\r
6035 * The file got changed.
\r
6037 FileChangeType.Changed = 2;
\r
6039 * The file got deleted.
\r
6041 FileChangeType.Deleted = 3;
\r
6042 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
\r
6044 (function (WatchKind) {
\r
6046 * Interested in create events.
\r
6048 WatchKind.Create = 1;
\r
6050 * Interested in change events
\r
6052 WatchKind.Change = 2;
\r
6054 * Interested in delete events
\r
6056 WatchKind.Delete = 4;
\r
6057 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
\r
6059 * Diagnostics notification are sent from the server to the client to signal
\r
6060 * results of validation runs.
\r
6062 var PublishDiagnosticsNotification;
\r
6063 (function (PublishDiagnosticsNotification) {
\r
6064 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
\r
6065 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
\r
6067 * How a completion was triggered
\r
6069 var CompletionTriggerKind;
\r
6070 (function (CompletionTriggerKind) {
\r
6072 * Completion was triggered by typing an identifier (24x7 code
\r
6073 * complete), manual invocation (e.g Ctrl+Space) or via API.
\r
6075 CompletionTriggerKind.Invoked = 1;
\r
6077 * Completion was triggered by a trigger character specified by
\r
6078 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
\r
6080 CompletionTriggerKind.TriggerCharacter = 2;
\r
6082 * Completion was re-triggered as current completion list is incomplete
\r
6084 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
\r
6085 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
\r
6087 * Request to request completion at a given text document position. The request's
\r
6088 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
\r
6089 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
\r
6090 * or a Thenable that resolves to such.
\r
6092 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
\r
6093 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
\r
6094 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
\r
6095 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
\r
6097 var CompletionRequest;
\r
6098 (function (CompletionRequest) {
\r
6099 CompletionRequest.method = 'textDocument/completion';
\r
6100 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
\r
6101 /** @deprecated Use CompletionRequest.type */
\r
6102 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6103 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
\r
6105 * Request to resolve additional information for a given completion item.The request's
\r
6106 * parameter is of type [CompletionItem](#CompletionItem) the response
\r
6107 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
\r
6109 var CompletionResolveRequest;
\r
6110 (function (CompletionResolveRequest) {
\r
6111 CompletionResolveRequest.method = 'completionItem/resolve';
\r
6112 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
\r
6113 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
\r
6115 * Request to request hover information at a given text document position. The request's
\r
6116 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
\r
6117 * type [Hover](#Hover) or a Thenable that resolves to such.
\r
6120 (function (HoverRequest) {
\r
6121 HoverRequest.method = 'textDocument/hover';
\r
6122 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
\r
6123 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
\r
6125 * How a signature help was triggered.
\r
6129 var SignatureHelpTriggerKind;
\r
6130 (function (SignatureHelpTriggerKind) {
\r
6132 * Signature help was invoked manually by the user or by a command.
\r
6134 SignatureHelpTriggerKind.Invoked = 1;
\r
6136 * Signature help was triggered by a trigger character.
\r
6138 SignatureHelpTriggerKind.TriggerCharacter = 2;
\r
6140 * Signature help was triggered by the cursor moving or by the document content changing.
\r
6142 SignatureHelpTriggerKind.ContentChange = 3;
\r
6143 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
\r
6144 var SignatureHelpRequest;
\r
6145 (function (SignatureHelpRequest) {
\r
6146 SignatureHelpRequest.method = 'textDocument/signatureHelp';
\r
6147 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
\r
6148 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
\r
6150 * A request to resolve the definition location of a symbol at a given text
\r
6151 * document position. The request's parameter is of type [TextDocumentPosition]
\r
6152 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
\r
6153 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
\r
6156 var DefinitionRequest;
\r
6157 (function (DefinitionRequest) {
\r
6158 DefinitionRequest.method = 'textDocument/definition';
\r
6159 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
\r
6160 /** @deprecated Use DefinitionRequest.type */
\r
6161 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6162 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
\r
6164 * A request to resolve project-wide references for the symbol denoted
\r
6165 * by the given text document position. The request's parameter is of
\r
6166 * type [ReferenceParams](#ReferenceParams) the response is of type
\r
6167 * [Location[]](#Location) or a Thenable that resolves to such.
\r
6169 var ReferencesRequest;
\r
6170 (function (ReferencesRequest) {
\r
6171 ReferencesRequest.method = 'textDocument/references';
\r
6172 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
\r
6173 /** @deprecated Use ReferencesRequest.type */
\r
6174 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6175 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
\r
6177 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
\r
6178 * text document position. The request's parameter is of type [TextDocumentPosition]
\r
6179 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
\r
6180 * (#DocumentHighlight) or a Thenable that resolves to such.
\r
6182 var DocumentHighlightRequest;
\r
6183 (function (DocumentHighlightRequest) {
\r
6184 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
\r
6185 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
\r
6186 /** @deprecated Use DocumentHighlightRequest.type */
\r
6187 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6188 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
\r
6190 * A request to list all symbols found in a given text document. The request's
\r
6191 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
\r
6192 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
\r
6193 * that resolves to such.
\r
6195 var DocumentSymbolRequest;
\r
6196 (function (DocumentSymbolRequest) {
\r
6197 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
\r
6198 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
\r
6199 /** @deprecated Use DocumentSymbolRequest.type */
\r
6200 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6201 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
\r
6203 * A request to provide commands for the given text document and range.
\r
6205 var CodeActionRequest;
\r
6206 (function (CodeActionRequest) {
\r
6207 CodeActionRequest.method = 'textDocument/codeAction';
\r
6208 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
\r
6209 /** @deprecated Use CodeActionRequest.type */
\r
6210 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6211 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
\r
6213 * A request to list project-wide symbols matching the query string given
\r
6214 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
\r
6215 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
\r
6216 * resolves to such.
\r
6218 var WorkspaceSymbolRequest;
\r
6219 (function (WorkspaceSymbolRequest) {
\r
6220 WorkspaceSymbolRequest.method = 'workspace/symbol';
\r
6221 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
\r
6222 /** @deprecated Use WorkspaceSymbolRequest.type */
\r
6223 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6224 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
\r
6226 * A request to provide code lens for the given text document.
\r
6228 var CodeLensRequest;
\r
6229 (function (CodeLensRequest) {
\r
6230 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
\r
6231 /** @deprecated Use CodeLensRequest.type */
\r
6232 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6233 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
\r
6235 * A request to resolve a command for a given code lens.
\r
6237 var CodeLensResolveRequest;
\r
6238 (function (CodeLensResolveRequest) {
\r
6239 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
\r
6240 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
\r
6242 * A request to provide document links
\r
6244 var DocumentLinkRequest;
\r
6245 (function (DocumentLinkRequest) {
\r
6246 DocumentLinkRequest.method = 'textDocument/documentLink';
\r
6247 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
\r
6248 /** @deprecated Use DocumentLinkRequest.type */
\r
6249 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6250 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
\r
6252 * Request to resolve additional information for a given document link. The request's
\r
6253 * parameter is of type [DocumentLink](#DocumentLink) the response
\r
6254 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
\r
6256 var DocumentLinkResolveRequest;
\r
6257 (function (DocumentLinkResolveRequest) {
\r
6258 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
\r
6259 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
\r
6261 * A request to to format a whole document.
\r
6263 var DocumentFormattingRequest;
\r
6264 (function (DocumentFormattingRequest) {
\r
6265 DocumentFormattingRequest.method = 'textDocument/formatting';
\r
6266 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
\r
6267 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
\r
6269 * A request to to format a range in a document.
\r
6271 var DocumentRangeFormattingRequest;
\r
6272 (function (DocumentRangeFormattingRequest) {
\r
6273 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
\r
6274 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
\r
6275 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
\r
6277 * A request to format a document on type.
\r
6279 var DocumentOnTypeFormattingRequest;
\r
6280 (function (DocumentOnTypeFormattingRequest) {
\r
6281 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
\r
6282 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
\r
6283 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
\r
6285 * A request to rename a symbol.
\r
6287 var RenameRequest;
\r
6288 (function (RenameRequest) {
\r
6289 RenameRequest.method = 'textDocument/rename';
\r
6290 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
\r
6291 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
\r
6293 * A request to test and perform the setup necessary for a rename.
\r
6295 var PrepareRenameRequest;
\r
6296 (function (PrepareRenameRequest) {
\r
6297 PrepareRenameRequest.method = 'textDocument/prepareRename';
\r
6298 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
\r
6299 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
\r
6301 * A request send from the client to the server to execute a command. The request might return
\r
6302 * a workspace edit which the client will apply to the workspace.
\r
6304 var ExecuteCommandRequest;
\r
6305 (function (ExecuteCommandRequest) {
\r
6306 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
\r
6307 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
\r
6309 * A request sent from the server to the client to modified certain resources.
\r
6311 var ApplyWorkspaceEditRequest;
\r
6312 (function (ApplyWorkspaceEditRequest) {
\r
6313 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
\r
6314 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
\r
6319 /***/ (function(module, exports, __webpack_require__) {
6322 /* --------------------------------------------------------------------------------------------
\r
6323 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6324 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6325 * ------------------------------------------------------------------------------------------ */
\r
6327 Object.defineProperty(exports, "__esModule", { value: true });
\r
6328 function boolean(value) {
\r
6329 return value === true || value === false;
\r
6331 exports.boolean = boolean;
\r
6332 function string(value) {
\r
6333 return typeof value === 'string' || value instanceof String;
\r
6335 exports.string = string;
\r
6336 function number(value) {
\r
6337 return typeof value === 'number' || value instanceof Number;
\r
6339 exports.number = number;
\r
6340 function error(value) {
\r
6341 return value instanceof Error;
\r
6343 exports.error = error;
\r
6344 function func(value) {
\r
6345 return typeof value === 'function';
\r
6347 exports.func = func;
\r
6348 function array(value) {
\r
6349 return Array.isArray(value);
\r
6351 exports.array = array;
\r
6352 function stringArray(value) {
\r
6353 return array(value) && value.every(elem => string(elem));
\r
6355 exports.stringArray = stringArray;
\r
6356 function typedArray(value, check) {
\r
6357 return Array.isArray(value) && value.every(check);
\r
6359 exports.typedArray = typedArray;
\r
6360 function objectLiteral(value) {
\r
6361 // Strictly speaking class instances pass this check as well. Since the LSP
\r
6362 // doesn't use classes we ignore this for now. If we do we need to add something
\r
6363 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
\r
6364 return value !== null && typeof value === 'object';
\r
6366 exports.objectLiteral = objectLiteral;
\r
6371 /***/ (function(module, exports, __webpack_require__) {
6374 /* --------------------------------------------------------------------------------------------
\r
6375 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6376 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6377 * ------------------------------------------------------------------------------------------ */
\r
6379 Object.defineProperty(exports, "__esModule", { value: true });
\r
6380 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6381 class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
\r
6382 constructor(method) {
\r
6386 exports.ProtocolRequestType0 = ProtocolRequestType0;
\r
6387 class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
\r
6388 constructor(method) {
\r
6392 exports.ProtocolRequestType = ProtocolRequestType;
\r
6393 class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
\r
6394 constructor(method) {
\r
6398 exports.ProtocolNotificationType = ProtocolNotificationType;
\r
6399 class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
\r
6400 constructor(method) {
\r
6404 exports.ProtocolNotificationType0 = ProtocolNotificationType0;
\r
6409 /***/ (function(module, exports, __webpack_require__) {
6412 /* --------------------------------------------------------------------------------------------
\r
6413 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6414 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6415 * ------------------------------------------------------------------------------------------ */
\r
6417 Object.defineProperty(exports, "__esModule", { value: true });
\r
6418 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6419 const messages_1 = __webpack_require__(48);
\r
6420 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
6421 let __noDynamicImport;
\r
6423 * A request to resolve the implementation locations of a symbol at a given text
\r
6424 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
6425 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
\r
6426 * Thenable that resolves to such.
\r
6428 var ImplementationRequest;
\r
6429 (function (ImplementationRequest) {
\r
6430 ImplementationRequest.method = 'textDocument/implementation';
\r
6431 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
\r
6432 /** @deprecated Use ImplementationRequest.type */
\r
6433 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6434 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
\r
6439 /***/ (function(module, exports, __webpack_require__) {
6442 /* --------------------------------------------------------------------------------------------
\r
6443 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6444 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6445 * ------------------------------------------------------------------------------------------ */
\r
6447 Object.defineProperty(exports, "__esModule", { value: true });
\r
6448 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6449 const messages_1 = __webpack_require__(48);
\r
6450 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
6451 let __noDynamicImport;
\r
6453 * A request to resolve the type definition locations of a symbol at a given text
\r
6454 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
6455 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
\r
6456 * Thenable that resolves to such.
\r
6458 var TypeDefinitionRequest;
\r
6459 (function (TypeDefinitionRequest) {
\r
6460 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
\r
6461 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
\r
6462 /** @deprecated Use TypeDefinitionRequest.type */
\r
6463 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6464 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
\r
6469 /***/ (function(module, exports, __webpack_require__) {
6472 /* --------------------------------------------------------------------------------------------
\r
6473 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6474 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6475 * ------------------------------------------------------------------------------------------ */
\r
6477 Object.defineProperty(exports, "__esModule", { value: true });
\r
6478 const messages_1 = __webpack_require__(48);
\r
6480 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
\r
6482 var WorkspaceFoldersRequest;
\r
6483 (function (WorkspaceFoldersRequest) {
\r
6484 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
\r
6485 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
\r
6487 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
\r
6488 * folder configuration changes.
\r
6490 var DidChangeWorkspaceFoldersNotification;
\r
6491 (function (DidChangeWorkspaceFoldersNotification) {
\r
6492 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
\r
6493 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
\r
6498 /***/ (function(module, exports, __webpack_require__) {
6501 /* --------------------------------------------------------------------------------------------
\r
6502 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6503 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6504 * ------------------------------------------------------------------------------------------ */
\r
6506 Object.defineProperty(exports, "__esModule", { value: true });
\r
6507 const messages_1 = __webpack_require__(48);
\r
6509 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
\r
6510 * configuration setting.
\r
6512 * This pull model replaces the old push model were the client signaled configuration change via an
\r
6513 * event. If the server still needs to react to configuration changes (since the server caches the
\r
6514 * result of `workspace/configuration` requests) the server should register for an empty configuration
\r
6515 * change event and empty the cache if such an event is received.
\r
6517 var ConfigurationRequest;
\r
6518 (function (ConfigurationRequest) {
\r
6519 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
\r
6520 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
\r
6525 /***/ (function(module, exports, __webpack_require__) {
6528 /* --------------------------------------------------------------------------------------------
\r
6529 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6530 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6531 * ------------------------------------------------------------------------------------------ */
\r
6533 Object.defineProperty(exports, "__esModule", { value: true });
\r
6534 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6535 const messages_1 = __webpack_require__(48);
\r
6537 * A request to list all color symbols found in a given text document. The request's
\r
6538 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
\r
6539 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
\r
6540 * that resolves to such.
\r
6542 var DocumentColorRequest;
\r
6543 (function (DocumentColorRequest) {
\r
6544 DocumentColorRequest.method = 'textDocument/documentColor';
\r
6545 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
\r
6546 /** @deprecated Use DocumentColorRequest.type */
\r
6547 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6548 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
\r
6550 * A request to list all presentation for a color. The request's
\r
6551 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
\r
6552 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
\r
6553 * that resolves to such.
\r
6555 var ColorPresentationRequest;
\r
6556 (function (ColorPresentationRequest) {
\r
6557 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
\r
6558 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
\r
6563 /***/ (function(module, exports, __webpack_require__) {
6567 /*---------------------------------------------------------------------------------------------
\r
6568 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6569 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6570 *--------------------------------------------------------------------------------------------*/
\r
6571 Object.defineProperty(exports, "__esModule", { value: true });
\r
6572 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6573 const messages_1 = __webpack_require__(48);
\r
6575 * Enum of known range kinds
\r
6577 var FoldingRangeKind;
\r
6578 (function (FoldingRangeKind) {
\r
6580 * Folding range for a comment
\r
6582 FoldingRangeKind["Comment"] = "comment";
\r
6584 * Folding range for a imports or includes
\r
6586 FoldingRangeKind["Imports"] = "imports";
\r
6588 * Folding range for a region (e.g. `#region`)
\r
6590 FoldingRangeKind["Region"] = "region";
\r
6591 })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
\r
6593 * A request to provide folding ranges in a document. The request's
\r
6594 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
\r
6595 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
\r
6596 * that resolves to such.
\r
6598 var FoldingRangeRequest;
\r
6599 (function (FoldingRangeRequest) {
\r
6600 FoldingRangeRequest.method = 'textDocument/foldingRange';
\r
6601 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
\r
6602 /** @deprecated Use FoldingRangeRequest.type */
\r
6603 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6604 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
\r
6609 /***/ (function(module, exports, __webpack_require__) {
6612 /* --------------------------------------------------------------------------------------------
\r
6613 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6614 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6615 * ------------------------------------------------------------------------------------------ */
\r
6617 Object.defineProperty(exports, "__esModule", { value: true });
\r
6618 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6619 const messages_1 = __webpack_require__(48);
\r
6620 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
6621 let __noDynamicImport;
\r
6623 * A request to resolve the type definition locations of a symbol at a given text
\r
6624 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
6625 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
\r
6626 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
\r
6629 var DeclarationRequest;
\r
6630 (function (DeclarationRequest) {
\r
6631 DeclarationRequest.method = 'textDocument/declaration';
\r
6632 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
\r
6633 /** @deprecated Use DeclarationRequest.type */
\r
6634 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6635 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
\r
6640 /***/ (function(module, exports, __webpack_require__) {
6644 /*---------------------------------------------------------------------------------------------
\r
6645 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6646 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6647 *--------------------------------------------------------------------------------------------*/
\r
6648 Object.defineProperty(exports, "__esModule", { value: true });
\r
6649 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6650 const messages_1 = __webpack_require__(48);
\r
6652 * A request to provide selection ranges in a document. The request's
\r
6653 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
\r
6654 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
\r
6655 * that resolves to such.
\r
6657 var SelectionRangeRequest;
\r
6658 (function (SelectionRangeRequest) {
\r
6659 SelectionRangeRequest.method = 'textDocument/selectionRange';
\r
6660 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
\r
6661 /** @deprecated Use SelectionRangeRequest.type */
\r
6662 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
6663 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
\r
6668 /***/ (function(module, exports, __webpack_require__) {
6671 /* --------------------------------------------------------------------------------------------
\r
6672 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6673 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6674 * ------------------------------------------------------------------------------------------ */
\r
6676 Object.defineProperty(exports, "__esModule", { value: true });
\r
6677 const vscode_jsonrpc_1 = __webpack_require__(35);
\r
6678 const messages_1 = __webpack_require__(48);
\r
6679 var WorkDoneProgress;
\r
6680 (function (WorkDoneProgress) {
\r
6681 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
\r
6682 })(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
\r
6684 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
\r
6685 * reporting from the server.
\r
6687 var WorkDoneProgressCreateRequest;
\r
6688 (function (WorkDoneProgressCreateRequest) {
\r
6689 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
\r
6690 })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
\r
6692 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
\r
6693 * initiated on the server side.
\r
6695 var WorkDoneProgressCancelNotification;
\r
6696 (function (WorkDoneProgressCancelNotification) {
\r
6697 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
\r
6698 })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
\r
6703 /***/ (function(module, exports, __webpack_require__) {
6706 /* --------------------------------------------------------------------------------------------
\r
6707 * Copyright (c) TypeFox and others. All rights reserved.
\r
6708 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6709 * ------------------------------------------------------------------------------------------ */
\r
6711 Object.defineProperty(exports, "__esModule", { value: true });
\r
6712 const messages_1 = __webpack_require__(48);
\r
6714 * A request to result a `CallHierarchyItem` in a document at a given position.
\r
6715 * Can be used as an input to a incoming or outgoing call hierarchy.
\r
6717 * @since 3.16.0 - Proposed state
\r
6719 var CallHierarchyPrepareRequest;
\r
6720 (function (CallHierarchyPrepareRequest) {
\r
6721 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
\r
6722 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
\r
6723 })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
\r
6725 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
\r
6727 * @since 3.16.0 - Proposed state
\r
6729 var CallHierarchyIncomingCallsRequest;
\r
6730 (function (CallHierarchyIncomingCallsRequest) {
\r
6731 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
\r
6732 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
\r
6733 })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
\r
6735 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
\r
6737 * @since 3.16.0 - Proposed state
\r
6739 var CallHierarchyOutgoingCallsRequest;
\r
6740 (function (CallHierarchyOutgoingCallsRequest) {
\r
6741 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
\r
6742 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
\r
6743 })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
\r
6748 /***/ (function(module, exports, __webpack_require__) {
6751 /* --------------------------------------------------------------------------------------------
\r
6752 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6753 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6754 * ------------------------------------------------------------------------------------------ */
\r
6756 Object.defineProperty(exports, "__esModule", { value: true });
\r
6757 const messages_1 = __webpack_require__(48);
\r
6759 * A set of predefined token types. This set is not fixed
\r
6760 * an clients can specify additional token types via the
\r
6761 * corresponding client capabilities.
\r
6763 * @since 3.16.0 - Proposed state
\r
6765 var SemanticTokenTypes;
\r
6766 (function (SemanticTokenTypes) {
\r
6767 SemanticTokenTypes["comment"] = "comment";
\r
6768 SemanticTokenTypes["keyword"] = "keyword";
\r
6769 SemanticTokenTypes["string"] = "string";
\r
6770 SemanticTokenTypes["number"] = "number";
\r
6771 SemanticTokenTypes["regexp"] = "regexp";
\r
6772 SemanticTokenTypes["operator"] = "operator";
\r
6773 SemanticTokenTypes["namespace"] = "namespace";
\r
6774 SemanticTokenTypes["type"] = "type";
\r
6775 SemanticTokenTypes["struct"] = "struct";
\r
6776 SemanticTokenTypes["class"] = "class";
\r
6777 SemanticTokenTypes["interface"] = "interface";
\r
6778 SemanticTokenTypes["enum"] = "enum";
\r
6779 SemanticTokenTypes["typeParameter"] = "typeParameter";
\r
6780 SemanticTokenTypes["function"] = "function";
\r
6781 SemanticTokenTypes["member"] = "member";
\r
6782 SemanticTokenTypes["property"] = "property";
\r
6783 SemanticTokenTypes["marco"] = "marco";
\r
6784 SemanticTokenTypes["variable"] = "variable";
\r
6785 SemanticTokenTypes["parameter"] = "parameter";
\r
6786 SemanticTokenTypes["label"] = "label";
\r
6787 })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
\r
6789 * A set of predefined token modifiers. This set is not fixed
\r
6790 * an clients can specify additional token types via the
\r
6791 * corresponding client capabilities.
\r
6793 * @since 3.16.0 - Proposed state
\r
6795 var SemanticTokenModifiers;
\r
6796 (function (SemanticTokenModifiers) {
\r
6797 SemanticTokenModifiers["documentation"] = "documentation";
\r
6798 SemanticTokenModifiers["declaration"] = "declaration";
\r
6799 SemanticTokenModifiers["definition"] = "definition";
\r
6800 SemanticTokenModifiers["reference"] = "reference";
\r
6801 SemanticTokenModifiers["static"] = "static";
\r
6802 SemanticTokenModifiers["abstract"] = "abstract";
\r
6803 SemanticTokenModifiers["deprecated"] = "deprected";
\r
6804 SemanticTokenModifiers["async"] = "async";
\r
6805 SemanticTokenModifiers["volatile"] = "volatile";
\r
6806 SemanticTokenModifiers["final"] = "final";
\r
6807 })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
\r
6809 * @since 3.16.0 - Proposed state
\r
6811 var SemanticTokens;
\r
6812 (function (SemanticTokens) {
\r
6813 function is(value) {
\r
6814 const candidate = value;
\r
6815 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
\r
6816 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
\r
6818 SemanticTokens.is = is;
\r
6819 })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
\r
6821 * @since 3.16.0 - Proposed state
\r
6823 var SemanticTokensRequest;
\r
6824 (function (SemanticTokensRequest) {
\r
6825 SemanticTokensRequest.method = 'textDocument/semanticTokens';
\r
6826 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
\r
6827 })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
\r
6829 * @since 3.16.0 - Proposed state
\r
6831 var SemanticTokensEditsRequest;
\r
6832 (function (SemanticTokensEditsRequest) {
\r
6833 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
\r
6834 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
\r
6835 })(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
\r
6837 * @since 3.16.0 - Proposed state
\r
6839 var SemanticTokensRangeRequest;
\r
6840 (function (SemanticTokensRangeRequest) {
\r
6841 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
\r
6842 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
\r
6843 })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
\r
6848 /***/ (function(module, exports, __webpack_require__) {
6851 /* --------------------------------------------------------------------------------------------
\r
6852 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6853 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6854 * ------------------------------------------------------------------------------------------ */
\r
6856 Object.defineProperty(exports, "__esModule", { value: true });
\r
6857 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
6858 const Is = __webpack_require__(61);
\r
6859 exports.ConfigurationFeature = (Base) => {
\r
6860 return class extends Base {
\r
6861 getConfiguration(arg) {
\r
6863 return this._getConfiguration({});
\r
6865 else if (Is.string(arg)) {
\r
6866 return this._getConfiguration({ section: arg });
\r
6869 return this._getConfiguration(arg);
\r
6872 _getConfiguration(arg) {
\r
6874 items: Array.isArray(arg) ? arg : [arg]
\r
6876 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
\r
6877 return Array.isArray(arg) ? result : result[0];
\r
6882 //# sourceMappingURL=configuration.js.map
6886 /***/ (function(module, exports, __webpack_require__) {
6889 /* --------------------------------------------------------------------------------------------
\r
6890 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6891 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6892 * ------------------------------------------------------------------------------------------ */
\r
6894 Object.defineProperty(exports, "__esModule", { value: true });
\r
6895 function boolean(value) {
\r
6896 return value === true || value === false;
\r
6898 exports.boolean = boolean;
\r
6899 function string(value) {
\r
6900 return typeof value === 'string' || value instanceof String;
\r
6902 exports.string = string;
\r
6903 function number(value) {
\r
6904 return typeof value === 'number' || value instanceof Number;
\r
6906 exports.number = number;
\r
6907 function error(value) {
\r
6908 return value instanceof Error;
\r
6910 exports.error = error;
\r
6911 function func(value) {
\r
6912 return typeof value === 'function';
\r
6914 exports.func = func;
\r
6915 function array(value) {
\r
6916 return Array.isArray(value);
\r
6918 exports.array = array;
\r
6919 function stringArray(value) {
\r
6920 return array(value) && value.every(elem => string(elem));
\r
6922 exports.stringArray = stringArray;
\r
6923 function typedArray(value, check) {
\r
6924 return Array.isArray(value) && value.every(check);
\r
6926 exports.typedArray = typedArray;
\r
6927 function thenable(value) {
\r
6928 return value && func(value.then);
\r
6930 exports.thenable = thenable;
\r
6931 //# sourceMappingURL=is.js.map
6935 /***/ (function(module, exports, __webpack_require__) {
6938 /* --------------------------------------------------------------------------------------------
\r
6939 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6940 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6941 * ------------------------------------------------------------------------------------------ */
\r
6943 Object.defineProperty(exports, "__esModule", { value: true });
\r
6944 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
6945 exports.WorkspaceFoldersFeature = (Base) => {
\r
6946 return class extends Base {
\r
6947 initialize(capabilities) {
\r
6948 let workspaceCapabilities = capabilities.workspace;
\r
6949 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
\r
6950 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
\r
6951 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
\r
6952 this._onDidChangeWorkspaceFolders.fire(params.event);
\r
6956 getWorkspaceFolders() {
\r
6957 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
\r
6959 get onDidChangeWorkspaceFolders() {
\r
6960 if (!this._onDidChangeWorkspaceFolders) {
\r
6961 throw new Error('Client doesn\'t support sending workspace folder change events.');
\r
6963 if (!this._unregistration) {
\r
6964 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
\r
6966 return this._onDidChangeWorkspaceFolders.event;
\r
6970 //# sourceMappingURL=workspaceFolders.js.map
6974 /***/ (function(module, exports, __webpack_require__) {
6977 /* --------------------------------------------------------------------------------------------
\r
6978 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
6979 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
6980 * ------------------------------------------------------------------------------------------ */
\r
6982 Object.defineProperty(exports, "__esModule", { value: true });
\r
6983 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
6984 const uuid_1 = __webpack_require__(64);
\r
6985 class WorkDoneProgressImpl {
\r
6986 constructor(_connection, _token) {
\r
6987 this._connection = _connection;
\r
6988 this._token = _token;
\r
6989 WorkDoneProgressImpl.Instances.set(this._token, this);
\r
6990 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
\r
6993 return this._source.token;
\r
6995 begin(title, percentage, message, cancellable) {
\r
7003 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
\r
7005 report(arg0, arg1) {
\r
7009 if (typeof arg0 === 'number') {
\r
7010 param.percentage = arg0;
\r
7011 if (arg1 !== undefined) {
\r
7012 param.message = arg1;
\r
7016 param.message = arg0;
\r
7018 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
\r
7021 WorkDoneProgressImpl.Instances.delete(this._token);
\r
7022 this._source.dispose();
\r
7023 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
\r
7026 this._source.cancel();
\r
7029 WorkDoneProgressImpl.Instances = new Map();
\r
7030 class NullProgress {
\r
7032 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
\r
7035 return this._source.token;
\r
7044 function attachWorkDone(connection, params) {
\r
7045 if (params === undefined || params.workDoneToken === undefined) {
\r
7046 return new NullProgress();
\r
7048 const token = params.workDoneToken;
\r
7049 delete params.workDoneToken;
\r
7050 return new WorkDoneProgressImpl(connection, token);
\r
7052 exports.attachWorkDone = attachWorkDone;
\r
7053 exports.ProgressFeature = (Base) => {
\r
7054 return class extends Base {
\r
7055 initialize(capabilities) {
\r
7057 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
\r
7058 this._progressSupported = true;
\r
7059 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
\r
7060 let progress = WorkDoneProgressImpl.Instances.get(params.token);
\r
7061 if (progress !== undefined) {
\r
7062 progress.cancel();
\r
7067 attachWorkDoneProgress(token) {
\r
7068 if (token === undefined) {
\r
7069 return new NullProgress();
\r
7072 return new WorkDoneProgressImpl(this.connection, token);
\r
7075 createWorkDoneProgress() {
\r
7076 if (this._progressSupported) {
\r
7077 const token = uuid_1.generateUuid();
\r
7078 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
\r
7079 const result = new WorkDoneProgressImpl(this.connection, token);
\r
7084 return Promise.resolve(new NullProgress());
\r
7089 var ResultProgress;
\r
7090 (function (ResultProgress) {
\r
7091 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
\r
7092 })(ResultProgress || (ResultProgress = {}));
\r
7093 class ResultProgressImpl {
\r
7094 constructor(_connection, _token) {
\r
7095 this._connection = _connection;
\r
7096 this._token = _token;
\r
7099 this._connection.sendProgress(ResultProgress.type, this._token, data);
\r
7102 function attachPartialResult(connection, params) {
\r
7103 if (params === undefined || params.partialResultToken === undefined) {
\r
7106 const token = params.partialResultToken;
\r
7107 delete params.partialResultToken;
\r
7108 return new ResultProgressImpl(connection, token);
\r
7110 exports.attachPartialResult = attachPartialResult;
\r
7111 //# sourceMappingURL=progress.js.map
7115 /***/ (function(module, exports, __webpack_require__) {
7118 /*---------------------------------------------------------------------------------------------
\r
7119 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
7120 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
7121 *--------------------------------------------------------------------------------------------*/
\r
7123 Object.defineProperty(exports, "__esModule", { value: true });
\r
7125 constructor(_value) {
\r
7126 this._value = _value;
\r
7130 return this._value;
\r
7133 return this.asHex() === other.asHex();
\r
7136 class V4UUID extends ValueUUID {
\r
7139 V4UUID._randomHex(),
\r
7140 V4UUID._randomHex(),
\r
7141 V4UUID._randomHex(),
\r
7142 V4UUID._randomHex(),
\r
7143 V4UUID._randomHex(),
\r
7144 V4UUID._randomHex(),
\r
7145 V4UUID._randomHex(),
\r
7146 V4UUID._randomHex(),
\r
7148 V4UUID._randomHex(),
\r
7149 V4UUID._randomHex(),
\r
7150 V4UUID._randomHex(),
\r
7151 V4UUID._randomHex(),
\r
7154 V4UUID._randomHex(),
\r
7155 V4UUID._randomHex(),
\r
7156 V4UUID._randomHex(),
\r
7158 V4UUID._oneOf(V4UUID._timeHighBits),
\r
7159 V4UUID._randomHex(),
\r
7160 V4UUID._randomHex(),
\r
7161 V4UUID._randomHex(),
\r
7163 V4UUID._randomHex(),
\r
7164 V4UUID._randomHex(),
\r
7165 V4UUID._randomHex(),
\r
7166 V4UUID._randomHex(),
\r
7167 V4UUID._randomHex(),
\r
7168 V4UUID._randomHex(),
\r
7169 V4UUID._randomHex(),
\r
7170 V4UUID._randomHex(),
\r
7171 V4UUID._randomHex(),
\r
7172 V4UUID._randomHex(),
\r
7173 V4UUID._randomHex(),
\r
7174 V4UUID._randomHex(),
\r
7177 static _oneOf(array) {
\r
7178 return array[Math.floor(array.length * Math.random())];
\r
7180 static _randomHex() {
\r
7181 return V4UUID._oneOf(V4UUID._chars);
\r
7184 V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
\r
7185 V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
\r
7187 * An empty UUID that contains only zeros.
\r
7189 exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
\r
7191 return new V4UUID();
\r
7194 const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
\r
7195 function isUUID(value) {
\r
7196 return _UUIDPattern.test(value);
\r
7198 exports.isUUID = isUUID;
\r
7200 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
\r
7201 * @param value A uuid string.
\r
7203 function parse(value) {
\r
7204 if (!isUUID(value)) {
\r
7205 throw new Error('invalid uuid');
\r
7207 return new ValueUUID(value);
\r
7209 exports.parse = parse;
\r
7210 function generateUuid() {
\r
7211 return v4().asHex();
\r
7213 exports.generateUuid = generateUuid;
\r
7214 //# sourceMappingURL=uuid.js.map
7218 /***/ (function(module, exports, __webpack_require__) {
7221 /* WEBPACK VAR INJECTION */(function(__filename) {/* --------------------------------------------------------------------------------------------
\r
7222 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
7223 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
7224 * ------------------------------------------------------------------------------------------ */
\r
7226 Object.defineProperty(exports, "__esModule", { value: true });
\r
7227 const url = __webpack_require__(66);
\r
7228 const path = __webpack_require__(3);
\r
7229 const fs = __webpack_require__(67);
\r
7230 const child_process_1 = __webpack_require__(68);
\r
7232 * @deprecated Use the `vscode-uri` npm module which provides a more
\r
7233 * complete implementation of handling VS Code URIs.
\r
7235 function uriToFilePath(uri) {
\r
7236 let parsed = url.parse(uri);
\r
7237 if (parsed.protocol !== 'file:' || !parsed.path) {
\r
7240 let segments = parsed.path.split('/');
\r
7241 for (var i = 0, len = segments.length; i < len; i++) {
\r
7242 segments[i] = decodeURIComponent(segments[i]);
\r
7244 if (process.platform === 'win32' && segments.length > 1) {
\r
7245 let first = segments[0];
\r
7246 let second = segments[1];
\r
7247 // Do we have a drive letter and we started with a / which is the
\r
7248 // case if the first segement is empty (see split above)
\r
7249 if (first.length === 0 && second.length > 1 && second[1] === ':') {
\r
7250 // Remove first slash
\r
7254 return path.normalize(segments.join('/'));
\r
7256 exports.uriToFilePath = uriToFilePath;
\r
7257 function isWindows() {
\r
7258 return process.platform === 'win32';
\r
7260 function resolve(moduleName, nodePath, cwd, tracer) {
\r
7261 const nodePathKey = 'NODE_PATH';
\r
7263 'var p = process;',
\r
7264 'p.on(\'message\',function(m){',
\r
7265 'if(m.c===\'e\'){',
\r
7268 'else if(m.c===\'rs\'){',
\r
7270 'var r=require.resolve(m.a);',
\r
7271 'p.send({c:\'r\',s:true,r:r});',
\r
7274 'p.send({c:\'r\',s:false});',
\r
7279 return new Promise((resolve, reject) => {
\r
7280 let env = process.env;
\r
7281 let newEnv = Object.create(null);
\r
7282 Object.keys(env).forEach(key => newEnv[key] = env[key]);
\r
7283 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
\r
7284 if (newEnv[nodePathKey]) {
\r
7285 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
\r
7288 newEnv[nodePathKey] = nodePath;
\r
7291 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
\r
7294 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
\r
7296 let cp = child_process_1.fork('', [], {
\r
7299 execArgv: ['-e', app]
\r
7301 if (cp.pid === void 0) {
\r
7302 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
\r
7305 cp.on('error', (error) => {
\r
7308 cp.on('message', (message) => {
\r
7309 if (message.c === 'r') {
\r
7310 cp.send({ c: 'e' });
\r
7312 resolve(message.r);
\r
7315 reject(new Error(`Failed to resolve module: ${moduleName}`));
\r
7330 exports.resolve = resolve;
\r
7332 * Resolve the global npm package path.
\r
7333 * @deprecated Since this depends on the used package manager and their version the best is that servers
\r
7334 * implement this themselves since they know best what kind of package managers to support.
\r
7335 * @param tracer the tracer to use
\r
7337 function resolveGlobalNodePath(tracer) {
\r
7338 let npmCommand = 'npm';
\r
7339 const env = Object.create(null);
\r
7340 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
\r
7341 env['NO_UPDATE_NOTIFIER'] = 'true';
\r
7346 if (isWindows()) {
\r
7347 npmCommand = 'npm.cmd';
\r
7348 options.shell = true;
\r
7350 let handler = () => { };
\r
7352 process.on('SIGPIPE', handler);
\r
7353 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
\r
7356 tracer(`'npm config get prefix' didn't return a value.`);
\r
7360 let prefix = stdout.trim();
\r
7362 tracer(`'npm config get prefix' value is: ${prefix}`);
\r
7364 if (prefix.length > 0) {
\r
7365 if (isWindows()) {
\r
7366 return path.join(prefix, 'node_modules');
\r
7369 return path.join(prefix, 'lib', 'node_modules');
\r
7378 process.removeListener('SIGPIPE', handler);
\r
7381 exports.resolveGlobalNodePath = resolveGlobalNodePath;
\r
7383 * Resolve the global yarn pakage path.
\r
7384 * @deprecated Since this depends on the used package manager and their version the best is that servers
\r
7385 * implement this themselves since they know best what kind of package managers to support.
\r
7386 * @param tracer the tracer to use
\r
7388 function resolveGlobalYarnPath(tracer) {
\r
7389 let yarnCommand = 'yarn';
\r
7393 if (isWindows()) {
\r
7394 yarnCommand = 'yarn.cmd';
\r
7395 options.shell = true;
\r
7397 let handler = () => { };
\r
7399 process.on('SIGPIPE', handler);
\r
7400 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
\r
7401 let stdout = results.stdout;
\r
7404 tracer(`'yarn global dir' didn't return a value.`);
\r
7405 if (results.stderr) {
\r
7406 tracer(results.stderr);
\r
7411 let lines = stdout.trim().split(/\r?\n/);
\r
7412 for (let line of lines) {
\r
7414 let yarn = JSON.parse(line);
\r
7415 if (yarn.type === 'log') {
\r
7416 return path.join(yarn.data, 'node_modules');
\r
7420 // Do nothing. Ignore the line
\r
7429 process.removeListener('SIGPIPE', handler);
\r
7432 exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
\r
7434 (function (FileSystem) {
\r
7435 let _isCaseSensitive = undefined;
\r
7436 function isCaseSensitive() {
\r
7437 if (_isCaseSensitive !== void 0) {
\r
7438 return _isCaseSensitive;
\r
7440 if (process.platform === 'win32') {
\r
7441 _isCaseSensitive = false;
\r
7444 // convert current file name to upper case / lower case and check if file exists
\r
7445 // (guards against cases when name is already all uppercase or lowercase)
\r
7446 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
\r
7448 return _isCaseSensitive;
\r
7450 FileSystem.isCaseSensitive = isCaseSensitive;
\r
7451 function isParent(parent, child) {
\r
7452 if (isCaseSensitive()) {
\r
7453 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
\r
7456 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
\r
7459 FileSystem.isParent = isParent;
\r
7460 })(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
\r
7461 function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
\r
7463 if (!path.isAbsolute(nodePath)) {
\r
7464 nodePath = path.join(workspaceRoot, nodePath);
\r
7466 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
\r
7467 if (FileSystem.isParent(nodePath, value)) {
\r
7471 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
\r
7473 }).then(undefined, (_error) => {
\r
7474 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
\r
7478 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
\r
7481 exports.resolveModulePath = resolveModulePath;
\r
7482 //# sourceMappingURL=files.js.map
7483 /* WEBPACK VAR INJECTION */}.call(this, "/index.js"))
7487 /***/ (function(module, exports) {
7489 module.exports = require("url");
7493 /***/ (function(module, exports) {
7495 module.exports = require("fs");
7499 /***/ (function(module, exports) {
7501 module.exports = require("child_process");
7505 /***/ (function(module, exports, __webpack_require__) {
7508 /* --------------------------------------------------------------------------------------------
\r
7509 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
7510 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
7511 * ------------------------------------------------------------------------------------------ */
\r
7513 Object.defineProperty(exports, "__esModule", { value: true });
\r
7514 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
7515 exports.CallHierarchyFeature = (Base) => {
\r
7516 return class extends Base {
\r
7517 get callHierarchy() {
\r
7519 onPrepare: (handler) => {
\r
7520 this.connection.onRequest(vscode_languageserver_protocol_1.Proposed.CallHierarchyPrepareRequest.type, (params, cancel) => {
\r
7521 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
\r
7524 onIncomingCalls: (handler) => {
\r
7525 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyIncomingCallsRequest.type;
\r
7526 this.connection.onRequest(type, (params, cancel) => {
\r
7527 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
\r
7530 onOutgoingCalls: (handler) => {
\r
7531 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyOutgoingCallsRequest.type;
\r
7532 this.connection.onRequest(type, (params, cancel) => {
\r
7533 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
\r
7540 //# sourceMappingURL=callHierarchy.proposed.js.map
7544 /***/ (function(module, exports, __webpack_require__) {
7547 /* --------------------------------------------------------------------------------------------
\r
7548 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
7549 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
7550 * ------------------------------------------------------------------------------------------ */
\r
7552 Object.defineProperty(exports, "__esModule", { value: true });
\r
7553 const vscode_languageserver_protocol_1 = __webpack_require__(34);
\r
7554 exports.SemanticTokensFeature = (Base) => {
\r
7555 return class extends Base {
\r
7556 get semanticTokens() {
\r
7558 on: (handler) => {
\r
7559 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
\r
7560 this.connection.onRequest(type, (params, cancel) => {
\r
7561 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
\r
7564 onEdits: (handler) => {
\r
7565 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
\r
7566 this.connection.onRequest(type, (params, cancel) => {
\r
7567 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
\r
7570 onRange: (handler) => {
\r
7571 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
\r
7572 this.connection.onRequest(type, (params, cancel) => {
\r
7573 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
\r
7580 class SemanticTokensBuilder {
\r
7582 this._prevData = undefined;
\r
7583 this.initialize();
\r
7586 this._id = Date.now();
\r
7587 this._prevLine = 0;
\r
7588 this._prevChar = 0;
\r
7590 this._dataLen = 0;
\r
7592 push(line, char, length, tokenType, tokenModifiers) {
\r
7593 let pushLine = line;
\r
7594 let pushChar = char;
\r
7595 if (this._dataLen > 0) {
\r
7596 pushLine -= this._prevLine;
\r
7597 if (pushLine === 0) {
\r
7598 pushChar -= this._prevChar;
\r
7601 this._data[this._dataLen++] = pushLine;
\r
7602 this._data[this._dataLen++] = pushChar;
\r
7603 this._data[this._dataLen++] = length;
\r
7604 this._data[this._dataLen++] = tokenType;
\r
7605 this._data[this._dataLen++] = tokenModifiers;
\r
7606 this._prevLine = line;
\r
7607 this._prevChar = char;
\r
7610 return this._id.toString();
\r
7612 previousResult(id) {
\r
7613 if (this.id === id) {
\r
7614 this._prevData = this._data;
\r
7616 this.initialize();
\r
7619 this._prevData = undefined;
\r
7621 resultId: this.id,
\r
7626 return this._prevData !== undefined;
\r
7629 if (this._prevData !== undefined) {
\r
7630 const prevDataLength = this._prevData.length;
\r
7631 const dataLength = this._data.length;
\r
7632 let startIndex = 0;
\r
7633 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
\r
7636 if (startIndex < dataLength && startIndex < prevDataLength) {
\r
7639 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
\r
7642 const newData = this._data.slice(startIndex, dataLength - endIndex);
\r
7644 resultId: this.id,
\r
7646 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
\r
7651 else if (startIndex < dataLength) {
\r
7652 return { resultId: this.id, edits: [
\r
7653 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
\r
7656 else if (startIndex < prevDataLength) {
\r
7657 return { resultId: this.id, edits: [
\r
7658 { start: startIndex, deleteCount: prevDataLength - startIndex }
\r
7662 return { resultId: this.id, edits: [] };
\r
7666 return this.build();
\r
7670 exports.SemanticTokensBuilder = SemanticTokensBuilder;
\r
7671 //# sourceMappingURL=sematicTokens.proposed.js.map
7675 /***/ (function(module, exports, __webpack_require__) {
7679 /*---------------------------------------------------------------------------------------------
7680 * Copyright (c) Microsoft Corporation. All rights reserved.
7681 * Licensed under the MIT License. See License.txt in the project root for license information.
7682 *--------------------------------------------------------------------------------------------*/
7683 function __export(m) {
7684 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
7686 Object.defineProperty(exports, "__esModule", { value: true });
7687 const vscode_css_languageservice_1 = __webpack_require__(72);
7688 const vscode_html_languageservice_1 = __webpack_require__(111);
7689 const languageModelCache_1 = __webpack_require__(137);
7690 const cssMode_1 = __webpack_require__(138);
7691 const embeddedSupport_1 = __webpack_require__(139);
7692 const htmlMode_1 = __webpack_require__(140);
7693 const javascriptMode_1 = __webpack_require__(144);
7694 __export(__webpack_require__(111));
7695 function getLanguageModes(supportedLanguages, workspace, clientCapabilities, customDataProviders) {
7696 const htmlLanguageService = vscode_html_languageservice_1.getLanguageService({ customDataProviders, clientCapabilities });
7697 const cssLanguageService = vscode_css_languageservice_1.getCSSLanguageService({ clientCapabilities });
7698 let documentRegions = languageModelCache_1.getLanguageModelCache(10, 60, document => embeddedSupport_1.getDocumentRegions(htmlLanguageService, document));
7699 let modelCaches = [];
7700 modelCaches.push(documentRegions);
7701 let modes = Object.create(null);
7702 modes['html'] = htmlMode_1.getHTMLMode(htmlLanguageService, workspace);
7703 if (supportedLanguages['css']) {
7704 modes['css'] = cssMode_1.getCSSMode(cssLanguageService, documentRegions, workspace);
7706 if (supportedLanguages['javascript']) {
7707 modes['javascript'] = javascriptMode_1.getJavaScriptMode(documentRegions, 'javascript');
7708 modes['typescript'] = javascriptMode_1.getJavaScriptMode(documentRegions, 'typescript');
7711 getModeAtPosition(document, position) {
7712 let languageId = documentRegions.get(document).getLanguageAtPosition(position);
7714 return modes[languageId];
7718 getModesInRange(document, range) {
7719 return documentRegions.get(document).getLanguageRanges(range).map(r => {
7723 mode: r.languageId && modes[r.languageId],
7724 attributeValue: r.attributeValue
7728 getAllModesInDocument(document) {
7730 for (let languageId of documentRegions.get(document).getLanguagesInDocument()) {
7731 let mode = modes[languageId];
7740 for (let languageId in modes) {
7741 let mode = modes[languageId];
7748 getMode(languageId) {
7749 return modes[languageId];
7751 onDocumentRemoved(document) {
7752 modelCaches.forEach(mc => mc.onDocumentRemoved(document));
7753 for (let mode in modes) {
7754 modes[mode].onDocumentRemoved(document);
7758 modelCaches.forEach(mc => mc.dispose());
7760 for (let mode in modes) {
7761 modes[mode].dispose();
7767 exports.getLanguageModes = getLanguageModes;
7772 /***/ (function(module, __webpack_exports__, __webpack_require__) {
7775 __webpack_require__.r(__webpack_exports__);
7776 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCSSLanguageService", function() { return getCSSLanguageService; });
7777 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSCSSLanguageService", function() { return getSCSSLanguageService; });
7778 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLESSLanguageService", function() { return getLESSLanguageService; });
7779 /* harmony import */ var _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
7780 /* harmony import */ var _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86);
7781 /* harmony import */ var _services_cssHover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92);
7782 /* harmony import */ var _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94);
7783 /* harmony import */ var _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95);
7784 /* harmony import */ var _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97);
7785 /* harmony import */ var _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(100);
7786 /* harmony import */ var _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(103);
7787 /* harmony import */ var _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(104);
7788 /* harmony import */ var _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(106);
7789 /* harmony import */ var _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(107);
7790 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(78);
7791 /* harmony import */ var _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(108);
7792 /* harmony import */ var _services_scssNavigation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(109);
7793 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(90);
7794 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TextDocument"]; });
7796 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Position"]; });
7798 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Range"]; });
7800 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Location"]; });
7802 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["LocationLink"]; });
7804 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Color"]; });
7806 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ColorInformation"]; });
7808 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ColorPresentation"]; });
7810 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeKind"]; });
7812 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["FoldingRange"]; });
7814 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DiagnosticRelatedInformation"]; });
7816 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DiagnosticSeverity"]; });
7818 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DiagnosticTag"]; });
7820 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Diagnostic"]; });
7822 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Command"]; });
7824 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TextEdit"]; });
7826 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TextDocumentEdit"]; });
7828 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CreateFile"]; });
7830 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["RenameFile"]; });
7832 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DeleteFile"]; });
7834 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["WorkspaceEdit"]; });
7836 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["WorkspaceChange"]; });
7838 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TextDocumentIdentifier"]; });
7840 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["VersionedTextDocumentIdentifier"]; });
7842 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TextDocumentItem"]; });
7844 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["MarkupKind"]; });
7846 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["MarkupContent"]; });
7848 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CompletionItemKind"]; });
7850 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["InsertTextFormat"]; });
7852 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CompletionItemTag"]; });
7854 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CompletionItem"]; });
7856 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CompletionList"]; });
7858 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["MarkedString"]; });
7860 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["Hover"]; });
7862 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ParameterInformation"]; });
7864 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["SignatureInformation"]; });
7866 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DocumentHighlightKind"]; });
7868 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DocumentHighlight"]; });
7870 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["SymbolKind"]; });
7872 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["SymbolTag"]; });
7874 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["SymbolInformation"]; });
7876 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DocumentSymbol"]; });
7878 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CodeActionKind"]; });
7880 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CodeActionContext"]; });
7882 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CodeAction"]; });
7884 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["CodeLens"]; });
7886 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["FormattingOptions"]; });
7888 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["DocumentLink"]; });
7890 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["SelectionRange"]; });
7892 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["EOL"]; });
7894 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ClientCapabilities"]; });
7896 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FileType", function() { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["FileType"]; });
7898 /*---------------------------------------------------------------------------------------------
7899 * Copyright (c) Microsoft Corporation. All rights reserved.
7900 * Licensed under the MIT License. See License.txt in the project root for license information.
7901 *--------------------------------------------------------------------------------------------*/
7918 function createFacade(parser, completion, hover, navigation, codeActions, validation) {
7920 configure: function (settings) {
7921 validation.configure(settings);
7922 completion.configure(settings);
7924 doValidation: validation.doValidation.bind(validation),
7925 parseStylesheet: parser.parseStylesheet.bind(parser),
7926 doComplete: completion.doComplete.bind(completion),
7927 setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
7928 doHover: hover.doHover.bind(hover),
7929 findDefinition: navigation.findDefinition.bind(navigation),
7930 findReferences: navigation.findReferences.bind(navigation),
7931 findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
7932 findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
7933 findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
7934 findDocumentSymbols: navigation.findDocumentSymbols.bind(navigation),
7935 doCodeActions: codeActions.doCodeActions.bind(codeActions),
7936 doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
7937 findColorSymbols: function (d, s) { return navigation.findDocumentColors(d, s).map(function (s) { return s.range; }); },
7938 findDocumentColors: navigation.findDocumentColors.bind(navigation),
7939 getColorPresentations: navigation.getColorPresentations.bind(navigation),
7940 doRename: navigation.doRename.bind(navigation),
7941 getFoldingRanges: _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__["getFoldingRanges"],
7942 getSelectionRanges: _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_12__["getSelectionRanges"]
7945 function handleCustomData(options) {
7946 if (options && options.customDataProviders) {
7947 _languageFacts_facts__WEBPACK_IMPORTED_MODULE_11__["cssDataManager"].addDataProviders(options.customDataProviders);
7950 function getCSSLanguageService(options) {
7951 handleCustomData(options);
7952 return createFacade(new _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__["Parser"](), new _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__["CSSCompletion"](null, options && options.clientCapabilities), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__["CSSNavigation"](), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"]());
7954 function getSCSSLanguageService(options) {
7955 handleCustomData(options);
7956 return createFacade(new _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__["SCSSParser"](), new _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__["SCSSCompletion"](options && options.clientCapabilities), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities), new _services_scssNavigation__WEBPACK_IMPORTED_MODULE_13__["SCSSNavigation"](options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"]());
7958 function getLESSLanguageService(options) {
7959 handleCustomData(options);
7960 return createFacade(new _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__["LESSParser"](), new _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__["LESSCompletion"](options && options.clientCapabilities), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__["CSSHover"](options && options.clientCapabilities), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__["CSSNavigation"](), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__["CSSCodeActions"](), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__["CSSValidation"]());
7966 /***/ (function(module, __webpack_exports__, __webpack_require__) {
7969 __webpack_require__.r(__webpack_exports__);
7970 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
7971 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
7972 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75);
7973 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76);
7974 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78);
7975 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81);
7976 /*---------------------------------------------------------------------------------------------
7977 * Copyright (c) Microsoft Corporation. All rights reserved.
7978 * Licensed under the MIT License. See License.txt in the project root for license information.
7979 *--------------------------------------------------------------------------------------------*/
7981 var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
7982 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7983 for (var r = Array(s), k = 0, i = 0; i < il; i++)
7984 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7994 /// A parser for the css core specification. See for reference:
7995 /// https://www.w3.org/TR/CSS21/grammar.html
7996 /// http://www.w3.org/TR/CSS21/syndata.html#tokenization
7998 var Parser = /** @class */ (function () {
7999 function Parser(scnr) {
8000 if (scnr === void 0) { scnr = new _cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"](); }
8001 this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i;
8002 this.scanner = scnr;
8003 this.token = { type: _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF, offset: -1, len: 0, text: '' };
8004 this.prevToken = undefined;
8006 Parser.prototype.peekIdent = function (text) {
8007 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
8009 Parser.prototype.peekKeyword = function (text) {
8010 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
8012 Parser.prototype.peekDelim = function (text) {
8013 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim === this.token.type && text === this.token.text;
8015 Parser.prototype.peek = function (type) {
8016 return type === this.token.type;
8018 Parser.prototype.peekRegExp = function (type, regEx) {
8019 if (type !== this.token.type) {
8022 return regEx.test(this.token.text);
8024 Parser.prototype.hasWhitespace = function () {
8025 return !!this.prevToken && (this.prevToken.offset + this.prevToken.len !== this.token.offset);
8027 Parser.prototype.consumeToken = function () {
8028 this.prevToken = this.token;
8029 this.token = this.scanner.scan();
8031 Parser.prototype.mark = function () {
8033 prev: this.prevToken,
8035 pos: this.scanner.pos()
8038 Parser.prototype.restoreAtMark = function (mark) {
8039 this.prevToken = mark.prev;
8040 this.token = mark.curr;
8041 this.scanner.goBackTo(mark.pos);
8043 Parser.prototype.try = function (func) {
8044 var pos = this.mark();
8047 this.restoreAtMark(pos);
8052 Parser.prototype.acceptOneKeyword = function (keywords) {
8053 if (_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword === this.token.type) {
8054 for (var _i = 0, keywords_1 = keywords; _i < keywords_1.length; _i++) {
8055 var keyword = keywords_1[_i];
8056 if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) {
8057 this.consumeToken();
8064 Parser.prototype.accept = function (type) {
8065 if (type === this.token.type) {
8066 this.consumeToken();
8071 Parser.prototype.acceptIdent = function (text) {
8072 if (this.peekIdent(text)) {
8073 this.consumeToken();
8078 Parser.prototype.acceptKeyword = function (text) {
8079 if (this.peekKeyword(text)) {
8080 this.consumeToken();
8085 Parser.prototype.acceptDelim = function (text) {
8086 if (this.peekDelim(text)) {
8087 this.consumeToken();
8092 Parser.prototype.acceptRegexp = function (regEx) {
8093 if (regEx.test(this.token.text)) {
8094 this.consumeToken();
8099 Parser.prototype._parseRegexp = function (regEx) {
8100 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Identifier);
8101 do { } while (this.acceptRegexp(regEx));
8102 return this.finish(node);
8104 Parser.prototype.acceptUnquotedString = function () {
8105 var pos = this.scanner.pos();
8106 this.scanner.goBackTo(this.token.offset);
8107 var unquoted = this.scanner.scanUnquotedString();
8109 this.token = unquoted;
8110 this.consumeToken();
8113 this.scanner.goBackTo(pos);
8116 Parser.prototype.resync = function (resyncTokens, resyncStopTokens) {
8118 if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) {
8119 this.consumeToken();
8122 else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) {
8126 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) {
8129 this.token = this.scanner.scan();
8133 Parser.prototype.createNode = function (nodeType) {
8134 return new _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"](this.token.offset, this.token.len, nodeType);
8136 Parser.prototype.create = function (ctor) {
8137 return new ctor(this.token.offset, this.token.len);
8139 Parser.prototype.finish = function (node, error, resyncTokens, resyncStopTokens) {
8140 // parseNumeric misuses error for boolean flagging (however the real error mustn't be a false)
8141 // + nodelist offsets mustn't be modified, because there is a offset hack in rulesets for smartselection
8142 if (!(node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_1__["Nodelist"])) {
8144 this.markError(node, error, resyncTokens, resyncStopTokens);
8146 // set the node end position
8147 if (this.prevToken) {
8148 // length with more elements belonging together
8149 var prevEnd = this.prevToken.offset + this.prevToken.len;
8150 node.length = prevEnd > node.offset ? prevEnd - node.offset : 0; // offset is taken from current token, end from previous: Use 0 for empty nodes
8155 Parser.prototype.markError = function (node, error, resyncTokens, resyncStopTokens) {
8156 if (this.token !== this.lastErrorToken) { // do not report twice on the same token
8157 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));
8158 this.lastErrorToken = this.token;
8160 if (resyncTokens || resyncStopTokens) {
8161 this.resync(resyncTokens, resyncStopTokens);
8164 Parser.prototype.parseStylesheet = function (textDocument) {
8165 var versionId = textDocument.version;
8166 var text = textDocument.getText();
8167 var textProvider = function (offset, length) {
8168 if (textDocument.version !== versionId) {
8169 throw new Error('Underlying model has changed, AST is no longer valid');
8171 return text.substr(offset, length);
8173 return this.internalParse(text, this._parseStylesheet, textProvider);
8175 Parser.prototype.internalParse = function (input, parseFunc, textProvider) {
8176 this.scanner.setSource(input);
8177 this.token = this.scanner.scan();
8178 var node = parseFunc.bind(this)();
8181 node.textProvider = textProvider;
8184 node.textProvider = function (offset, length) { return input.substr(offset, length); };
8189 Parser.prototype._parseStylesheet = function () {
8190 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"]);
8191 while (node.addChild(this._parseStylesheetStart())) {
8192 // Parse statements only valid at the beginning of stylesheets.
8194 var inRecovery = false;
8196 var hasMatch = false;
8199 var statement = this._parseStylesheetStatement();
8201 node.addChild(statement);
8204 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) && this._needsSemicolonAfter(statement) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8205 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
8208 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)) {
8209 // accept empty statements
8214 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF)) {
8218 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
8219 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownAtRule);
8222 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RuleOrSelectorExpected);
8226 this.consumeToken();
8227 } while (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF));
8228 return this.finish(node);
8230 Parser.prototype._parseStylesheetStart = function () {
8231 return this._parseCharset();
8233 Parser.prototype._parseStylesheetStatement = function (isNested) {
8234 if (isNested === void 0) { isNested = false; }
8235 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
8236 return this._parseStylesheetAtStatement(isNested);
8238 return this._parseRuleset(isNested);
8240 Parser.prototype._parseStylesheetAtStatement = function (isNested) {
8241 if (isNested === void 0) { isNested = false; }
8242 return this._parseImport()
8243 || this._parseMedia(isNested)
8244 || this._parsePage()
8245 || this._parseFontFace()
8246 || this._parseKeyframe()
8247 || this._parseSupports(isNested)
8248 || this._parseViewPort()
8249 || this._parseNamespace()
8250 || this._parseDocument()
8251 || this._parseUnknownAtRule();
8253 Parser.prototype._tryParseRuleset = function (isNested) {
8254 var mark = this.mark();
8255 if (this._parseSelector(isNested)) {
8256 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma) && this._parseSelector(isNested)) {
8259 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
8260 this.restoreAtMark(mark);
8261 return this._parseRuleset(isNested);
8264 this.restoreAtMark(mark);
8267 Parser.prototype._parseRuleset = function (isNested) {
8268 if (isNested === void 0) { isNested = false; }
8269 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["RuleSet"]);
8270 var selectors = node.getSelectors();
8271 if (!selectors.addChild(this._parseSelector(isNested))) {
8274 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
8275 if (!selectors.addChild(this._parseSelector(isNested))) {
8276 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SelectorExpected);
8279 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8281 Parser.prototype._parseRuleSetDeclaration = function () {
8282 // https://www.w3.org/TR/css-syntax-3/#consume-a-list-of-declarations0
8283 return this._parseAtApply()
8284 || this._tryParseCustomPropertyDeclaration()
8285 || this._parseDeclaration()
8286 || this._parseUnknownAtRule();
8289 * Parses declarations like:
8290 * @apply --my-theme;
8292 * Follows https://tabatkins.github.io/specs/css-apply-rule/#using
8294 Parser.prototype._parseAtApply = function () {
8295 if (!this.peekKeyword('@apply')) {
8298 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["AtApplyRule"]);
8299 this.consumeToken();
8300 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Variable]))) {
8301 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
8303 return this.finish(node);
8305 Parser.prototype._needsSemicolonAfter = function (node) {
8306 switch (node.type) {
8307 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Keyframe:
8308 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ViewPort:
8309 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Media:
8310 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Ruleset:
8311 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Namespace:
8312 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].If:
8313 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].For:
8314 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Each:
8315 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].While:
8316 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinDeclaration:
8317 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].FunctionDeclaration:
8319 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ExtendsReference:
8320 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinContent:
8321 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ReturnStatement:
8322 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MediaQuery:
8323 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Debug:
8324 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Import:
8325 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].AtApplyRule:
8326 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].CustomPropertyDeclaration:
8328 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].VariableDeclaration:
8329 return node.needsSemicolon;
8330 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].MixinReference:
8331 return !node.getContent();
8332 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Declaration:
8333 return !node.getNestedProperties();
8337 Parser.prototype._parseDeclarations = function (parseDeclaration) {
8338 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Declarations"]);
8339 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
8342 var decl = parseDeclaration();
8343 while (node.addChild(decl)) {
8344 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR)) {
8347 if (this._needsSemicolonAfter(decl) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8348 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]);
8350 // We accepted semicolon token. Link it to declaration.
8351 if (decl && this.prevToken && this.prevToken.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon) {
8352 decl.semicolonPosition = this.prevToken.offset;
8354 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8355 // accept empty statements
8357 decl = parseDeclaration();
8359 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR)) {
8360 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]);
8362 return this.finish(node);
8364 Parser.prototype._parseBody = function (node, parseDeclaration) {
8365 if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
8366 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]);
8368 return this.finish(node);
8370 Parser.prototype._parseSelector = function (isNested) {
8371 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Selector"]);
8372 var hasContent = false;
8374 // nested selectors can start with a combinator
8375 hasContent = node.addChild(this._parseCombinator());
8377 while (node.addChild(this._parseSimpleSelector())) {
8379 node.addChild(this._parseCombinator()); // optional
8381 return hasContent ? this.finish(node) : null;
8383 Parser.prototype._parseDeclaration = function (resyncStopTokens) {
8384 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Declaration"]);
8385 if (!node.setProperty(this._parseProperty())) {
8388 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8389 var stopTokens = resyncStopTokens ? __spreadArrays(resyncStopTokens, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]) : [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon];
8390 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon], stopTokens);
8392 if (this.prevToken) {
8393 node.colonPosition = this.prevToken.offset;
8395 if (!node.setValue(this._parseExpr())) {
8396 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PropertyValueExpected);
8398 node.addChild(this._parsePrio());
8399 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8400 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
8402 return this.finish(node);
8404 Parser.prototype._tryParseCustomPropertyDeclaration = function () {
8405 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^--/)) {
8408 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["CustomPropertyDeclaration"]);
8409 if (!node.setProperty(this._parseProperty())) {
8412 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8413 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon]);
8415 if (this.prevToken) {
8416 node.colonPosition = this.prevToken.offset;
8418 var mark = this.mark();
8419 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
8420 // try to parse it as nested declaration
8421 var propertySet = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["CustomPropertySet"]);
8422 var declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));
8423 if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) {
8424 propertySet.addChild(this._parsePrio());
8425 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8426 this.finish(propertySet);
8427 node.setPropertySet(propertySet);
8428 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
8429 return this.finish(node);
8432 this.restoreAtMark(mark);
8434 // try tp parse as expression
8435 var expression = this._parseExpr();
8436 if (expression && !expression.isErroneous(true)) {
8438 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8439 node.setValue(expression);
8440 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
8441 return this.finish(node);
8444 this.restoreAtMark(mark);
8445 node.addChild(this._parseCustomPropertyValue());
8446 node.addChild(this._parsePrio());
8447 if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(node.colonPosition) && this.token.offset === node.colonPosition + 1) {
8448 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PropertyValueExpected);
8450 return this.finish(node);
8453 * Parse custom property values.
8455 * Based on https://www.w3.org/TR/css-variables/#syntax
8457 * This code is somewhat unusual, as the allowed syntax is incredibly broad,
8458 * parsing almost any sequence of tokens, save for a small set of exceptions.
8459 * Unbalanced delimitors, invalid tokens, and declaration
8460 * terminators like semicolons and !important directives (when not inside
8463 Parser.prototype._parseCustomPropertyValue = function () {
8464 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8465 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
8467 var parensDepth = 0;
8468 var bracketsDepth = 0;
8469 done: while (true) {
8470 switch (this.token.type) {
8471 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon:
8472 // A semicolon only ends things if we're not inside a delimitor.
8477 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation:
8478 // An exclamation ends the value if we're not inside delims.
8483 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
8486 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR:
8488 if (curlyDepth < 0) {
8489 // The property value has been terminated without a semicolon, and
8490 // this is the last declaration in the ruleset.
8491 if (parensDepth === 0 && bracketsDepth === 0) {
8494 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftCurlyExpected);
8497 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL:
8500 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR:
8502 if (parensDepth < 0) {
8503 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected);
8506 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL:
8509 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR:
8511 if (bracketsDepth < 0) {
8512 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftSquareBracketExpected);
8515 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString: // fall through
8517 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF:
8518 // We shouldn't have reached the end of input, something is
8520 var error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightCurlyExpected;
8521 if (bracketsDepth > 0) {
8522 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected;
8524 else if (parensDepth > 0) {
8525 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected;
8527 return this.finish(node, error);
8529 this.consumeToken();
8531 return this.finish(node);
8533 Parser.prototype._tryToParseDeclaration = function () {
8534 var mark = this.mark();
8535 if (this._parseProperty() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8536 // looks like a declaration, go ahead
8537 this.restoreAtMark(mark);
8538 return this._parseDeclaration();
8540 this.restoreAtMark(mark);
8543 Parser.prototype._parseProperty = function () {
8544 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Property"]);
8545 var mark = this.mark();
8546 if (this.acceptDelim('*') || this.acceptDelim('_')) {
8547 // support for IE 5.x, 6 and 7 star hack: see http://en.wikipedia.org/wiki/CSS_filter#Star_hack
8548 if (this.hasWhitespace()) {
8549 this.restoreAtMark(mark);
8553 if (node.setIdentifier(this._parsePropertyIdentifier())) {
8554 return this.finish(node);
8558 Parser.prototype._parsePropertyIdentifier = function () {
8559 return this._parseIdent();
8561 Parser.prototype._parseCharset = function () {
8562 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Charset)) {
8565 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8566 this.consumeToken(); // charset
8567 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String)) {
8568 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
8570 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8571 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
8573 return this.finish(node);
8575 Parser.prototype._parseImport = function () {
8576 if (!this.peekKeyword('@import')) {
8579 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Import"]);
8580 this.consumeToken(); // @import
8581 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
8582 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].URIOrStringExpected);
8584 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF)) {
8585 node.setMedialist(this._parseMediaQueryList());
8587 return this.finish(node);
8589 Parser.prototype._parseNamespace = function () {
8590 // http://www.w3.org/TR/css3-namespace/
8591 // namespace : NAMESPACE_SYM S* [IDENT S*]? [STRING|URI] S* ';' S*
8592 if (!this.peekKeyword('@namespace')) {
8595 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Namespace"]);
8596 this.consumeToken(); // @namespace
8597 if (!node.addChild(this._parseURILiteral())) { // url literal also starts with ident
8598 node.addChild(this._parseIdent()); // optional prefix
8599 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
8600 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].URIExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon]);
8603 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon)) {
8604 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].SemiColonExpected);
8606 return this.finish(node);
8608 Parser.prototype._parseFontFace = function () {
8609 if (!this.peekKeyword('@font-face')) {
8612 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["FontFace"]);
8613 this.consumeToken(); // @font-face
8614 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8616 Parser.prototype._parseViewPort = function () {
8617 if (!this.peekKeyword('@-ms-viewport') &&
8618 !this.peekKeyword('@-o-viewport') &&
8619 !this.peekKeyword('@viewport')) {
8622 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ViewPort"]);
8623 this.consumeToken(); // @-ms-viewport
8624 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8626 Parser.prototype._parseKeyframe = function () {
8627 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword, this.keyframeRegex)) {
8630 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Keyframe"]);
8631 var atNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8632 this.consumeToken(); // atkeyword
8633 node.setKeyword(this.finish(atNode));
8634 if (atNode.matches('@-ms-keyframes')) { // -ms-keyframes never existed
8635 this.markError(atNode, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownKeyword);
8637 if (!node.setIdentifier(this._parseKeyframeIdent())) {
8638 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR]);
8640 return this._parseBody(node, this._parseKeyframeSelector.bind(this));
8642 Parser.prototype._parseKeyframeIdent = function () {
8643 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Keyframe]);
8645 Parser.prototype._parseKeyframeSelector = function () {
8646 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["KeyframeSelector"]);
8647 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
8650 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
8651 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
8652 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].PercentageExpected);
8655 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8657 Parser.prototype._tryParseKeyframeSelector = function () {
8658 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["KeyframeSelector"]);
8659 var pos = this.mark();
8660 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
8663 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
8664 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage)) {
8665 this.restoreAtMark(pos);
8669 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL)) {
8670 this.restoreAtMark(pos);
8673 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8675 Parser.prototype._parseSupports = function (isNested) {
8676 if (isNested === void 0) { isNested = false; }
8677 // SUPPORTS_SYM S* supports_condition '{' S* ruleset* '}' S*
8678 if (!this.peekKeyword('@supports')) {
8681 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Supports"]);
8682 this.consumeToken(); // @supports
8683 node.addChild(this._parseSupportsCondition());
8684 return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested));
8686 Parser.prototype._parseSupportsDeclaration = function (isNested) {
8687 if (isNested === void 0) { isNested = false; }
8689 // if nested, the body can contain rulesets, but also declarations
8690 return this._tryParseRuleset(true)
8691 || this._tryToParseDeclaration()
8692 || this._parseStylesheetStatement(true);
8694 return this._parseStylesheetStatement(false);
8696 Parser.prototype._parseSupportsCondition = function () {
8697 // supports_condition : supports_negation | supports_conjunction | supports_disjunction | supports_condition_in_parens ;
8698 // supports_condition_in_parens: ( '(' S* supports_condition S* ')' ) | supports_declaration_condition | general_enclosed ;
8699 // supports_negation: NOT S+ supports_condition_in_parens ;
8700 // supports_conjunction: supports_condition_in_parens ( S+ AND S+ supports_condition_in_parens )+;
8701 // supports_disjunction: supports_condition_in_parens ( S+ OR S+ supports_condition_in_parens )+;
8702 // supports_declaration_condition: '(' S* declaration ')';
8703 // general_enclosed: ( FUNCTION | '(' ) ( any | unused )* ')' ;
8704 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SupportsCondition"]);
8705 if (this.acceptIdent('not')) {
8706 node.addChild(this._parseSupportsConditionInParens());
8709 node.addChild(this._parseSupportsConditionInParens());
8710 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^(and|or)$/i)) {
8711 var text = this.token.text.toLowerCase();
8712 while (this.acceptIdent(text)) {
8713 node.addChild(this._parseSupportsConditionInParens());
8717 return this.finish(node);
8719 Parser.prototype._parseSupportsConditionInParens = function () {
8720 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SupportsCondition"]);
8721 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
8722 if (this.prevToken) {
8723 node.lParent = this.prevToken.offset;
8725 if (!node.addChild(this._tryToParseDeclaration())) {
8726 if (!this._parseSupportsCondition()) {
8727 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ConditionExpected);
8730 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
8731 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR], []);
8733 if (this.prevToken) {
8734 node.rParent = this.prevToken.offset;
8736 return this.finish(node);
8738 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
8739 var pos = this.mark();
8740 this.consumeToken();
8741 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
8742 var openParentCount = 1;
8743 while (this.token.type !== _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF && openParentCount !== 0) {
8744 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL) {
8747 else if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR) {
8750 this.consumeToken();
8752 return this.finish(node);
8755 this.restoreAtMark(pos);
8758 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL]);
8760 Parser.prototype._parseMediaDeclaration = function (isNested) {
8761 if (isNested === void 0) { isNested = false; }
8763 // if nested, the body can contain rulesets, but also declarations
8764 return this._tryParseRuleset(true)
8765 || this._tryToParseDeclaration()
8766 || this._parseStylesheetStatement(true);
8768 return this._parseStylesheetStatement(false);
8770 Parser.prototype._parseMedia = function (isNested) {
8771 if (isNested === void 0) { isNested = false; }
8772 // MEDIA_SYM S* media_query_list '{' S* ruleset* '}' S*
8773 // media_query_list : S* [media_query [ ',' S* media_query ]* ]?
8774 if (!this.peekKeyword('@media')) {
8777 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Media"]);
8778 this.consumeToken(); // @media
8779 if (!node.addChild(this._parseMediaQueryList())) {
8780 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
8782 return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested));
8784 Parser.prototype._parseMediaQueryList = function () {
8785 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Medialist"]);
8786 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]))) {
8787 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
8789 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
8790 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]))) {
8791 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].MediaQueryExpected);
8794 return this.finish(node);
8796 Parser.prototype._parseMediaQuery = function (resyncStopToken) {
8797 // http://www.w3.org/TR/css3-mediaqueries/
8798 // media_query : [ONLY | NOT]? S* IDENT S* [ AND S* expression ]* | expression [ AND S* expression ]*
8799 // expression : '(' S* IDENT S* [ ':' S* expr ]? ')' S*
8800 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]);
8801 var parseExpression = true;
8802 var hasContent = false;
8803 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
8804 if (this.acceptIdent('only') || this.acceptIdent('not')) {
8807 if (!node.addChild(this._parseIdent())) {
8811 parseExpression = this.acceptIdent('and');
8813 while (parseExpression) {
8814 // Allow short-circuting for other language constructs.
8815 if (node.addChild(this._parseMediaContentStart())) {
8816 parseExpression = this.acceptIdent('and');
8819 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
8821 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected, [], resyncStopToken);
8825 if (!node.addChild(this._parseMediaFeatureName())) {
8826 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected, [], resyncStopToken);
8828 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8829 if (!node.addChild(this._parseExpr())) {
8830 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].TermExpected, [], resyncStopToken);
8833 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
8834 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected, [], resyncStopToken);
8836 parseExpression = this.acceptIdent('and');
8838 return this.finish(node);
8840 Parser.prototype._parseMediaContentStart = function () {
8843 Parser.prototype._parseMediaFeatureName = function () {
8844 return this._parseIdent();
8846 Parser.prototype._parseMedium = function () {
8847 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8848 if (node.addChild(this._parseIdent())) {
8849 return this.finish(node);
8855 Parser.prototype._parsePageDeclaration = function () {
8856 return this._parsePageMarginBox() || this._parseRuleSetDeclaration();
8858 Parser.prototype._parsePage = function () {
8859 // http://www.w3.org/TR/css3-page/
8860 // page_rule : PAGE_SYM S* page_selector_list '{' S* page_body '}' S*
8861 // page_body : /* Can be empty */ declaration? [ ';' S* page_body ]? | page_margin_box page_body
8862 if (!this.peekKeyword('@page')) {
8865 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Page"]);
8866 this.consumeToken();
8867 if (node.addChild(this._parsePageSelector())) {
8868 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
8869 if (!node.addChild(this._parsePageSelector())) {
8870 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
8874 return this._parseBody(node, this._parsePageDeclaration.bind(this));
8876 Parser.prototype._parsePageMarginBox = function () {
8877 // page_margin_box : margin_sym S* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
8878 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
8881 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["PageBoxMarginBox"]);
8882 if (!this.acceptOneKeyword(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__["pageBoxDirectives"])) {
8883 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].UnknownAtRule, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]);
8885 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
8887 Parser.prototype._parsePageSelector = function () {
8888 // page_selector : pseudo_page+ | IDENT pseudo_page*
8889 // pseudo_page : ':' [ "left" | "right" | "first" | "blank" ];
8890 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8893 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8894 node.addChild(this._parseIdent()); // optional ident
8895 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
8896 if (!node.addChild(this._parseIdent())) { // optional ident
8897 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
8900 return this.finish(node);
8902 Parser.prototype._parseDocument = function () {
8903 // -moz-document is experimental but has been pushed to css4
8904 if (!this.peekKeyword('@-moz-document')) {
8907 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Document"]);
8908 this.consumeToken(); // @-moz-document
8909 this.resync([], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL]); // ignore all the rules
8910 return this._parseBody(node, this._parseStylesheetStatement.bind(this));
8912 // https://www.w3.org/TR/css-syntax-3/#consume-an-at-rule
8913 Parser.prototype._parseUnknownAtRule = function () {
8914 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
8917 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["UnknownAtRule"]);
8918 node.addChild(this._parseUnknownAtRuleName());
8919 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
8920 var curlyLCount = 0;
8922 var parensDepth = 0;
8923 var bracketsDepth = 0;
8924 done: while (true) {
8925 switch (this.token.type) {
8926 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SemiColon:
8931 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF:
8932 if (curlyDepth > 0) {
8933 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightCurlyExpected);
8935 else if (bracketsDepth > 0) {
8936 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
8938 else if (parensDepth > 0) {
8939 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
8942 return this.finish(node);
8944 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
8948 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR:
8950 // End of at-rule, consume CurlyR and return node
8951 if (curlyLCount > 0 && curlyDepth === 0) {
8952 this.consumeToken();
8953 if (bracketsDepth > 0) {
8954 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
8956 else if (parensDepth > 0) {
8957 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
8961 if (curlyDepth < 0) {
8962 // The property value has been terminated without a semicolon, and
8963 // this is the last declaration in the ruleset.
8964 if (parensDepth === 0 && bracketsDepth === 0) {
8967 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftCurlyExpected);
8970 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL:
8973 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR:
8975 if (parensDepth < 0) {
8976 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftParenthesisExpected);
8979 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL:
8982 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR:
8984 if (bracketsDepth < 0) {
8985 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].LeftSquareBracketExpected);
8989 this.consumeToken();
8993 Parser.prototype._parseUnknownAtRuleName = function () {
8994 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
8995 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].AtKeyword)) {
8996 return this.finish(node);
9000 Parser.prototype._parseOperator = function () {
9001 // these are operators for binary expressions
9002 if (this.peekDelim('/') ||
9003 this.peekDelim('*') ||
9004 this.peekDelim('+') ||
9005 this.peekDelim('-') ||
9006 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Dashmatch) ||
9007 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Includes) ||
9008 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SubstringOperator) ||
9009 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].PrefixOperator) ||
9010 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].SuffixOperator) ||
9011 this.peekDelim('=')) { // doesn't stick to the standard here
9012 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Operator);
9013 this.consumeToken();
9014 return this.finish(node);
9020 Parser.prototype._parseUnaryOperator = function () {
9021 if (!this.peekDelim('+') && !this.peekDelim('-')) {
9024 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9025 this.consumeToken();
9026 return this.finish(node);
9028 Parser.prototype._parseCombinator = function () {
9029 if (this.peekDelim('>')) {
9030 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9031 this.consumeToken();
9032 var mark = this.mark();
9033 if (!this.hasWhitespace() && this.acceptDelim('>')) {
9034 if (!this.hasWhitespace() && this.acceptDelim('>')) {
9035 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorShadowPiercingDescendant;
9036 return this.finish(node);
9038 this.restoreAtMark(mark);
9040 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorParent;
9041 return this.finish(node);
9043 else if (this.peekDelim('+')) {
9044 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9045 this.consumeToken();
9046 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorSibling;
9047 return this.finish(node);
9049 else if (this.peekDelim('~')) {
9050 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9051 this.consumeToken();
9052 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorAllSiblings;
9053 return this.finish(node);
9055 else if (this.peekDelim('/')) {
9056 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9057 this.consumeToken();
9058 var mark = this.mark();
9059 if (!this.hasWhitespace() && this.acceptIdent('deep') && !this.hasWhitespace() && this.acceptDelim('/')) {
9060 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].SelectorCombinatorShadowPiercingDescendant;
9061 return this.finish(node);
9063 this.restoreAtMark(mark);
9067 Parser.prototype._parseSimpleSelector = function () {
9069 // : element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+ ;
9070 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["SimpleSelector"]);
9072 if (node.addChild(this._parseElementName())) {
9075 while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) {
9078 return c > 0 ? this.finish(node) : null;
9080 Parser.prototype._parseSimpleSelectorBody = function () {
9081 return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib();
9083 Parser.prototype._parseSelectorIdent = function () {
9084 return this._parseIdent();
9086 Parser.prototype._parseHash = function () {
9087 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Hash) && !this.peekDelim('#')) {
9090 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].IdentifierSelector);
9091 if (this.acceptDelim('#')) {
9092 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
9093 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9097 this.consumeToken(); // TokenType.Hash
9099 return this.finish(node);
9101 Parser.prototype._parseClass = function () {
9102 // class: '.' IDENT ;
9103 if (!this.peekDelim('.')) {
9106 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ClassSelector);
9107 this.consumeToken(); // '.'
9108 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
9109 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9111 return this.finish(node);
9113 Parser.prototype._parseElementName = function () {
9114 // element_name: (ns? '|')? IDENT | '*';
9115 var pos = this.mark();
9116 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].ElementNameSelector);
9117 node.addChild(this._parseNamespacePrefix());
9118 if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim('*')) {
9119 this.restoreAtMark(pos);
9122 return this.finish(node);
9124 Parser.prototype._parseNamespacePrefix = function () {
9125 var pos = this.mark();
9126 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].NamespacePrefix);
9127 if (!node.addChild(this._parseIdent()) && !this.acceptDelim('*')) {
9130 if (!this.acceptDelim('|')) {
9131 this.restoreAtMark(pos);
9134 return this.finish(node);
9136 Parser.prototype._parseAttrib = function () {
9137 // attrib : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
9138 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL)) {
9141 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["AttributeSelector"]);
9142 this.consumeToken(); // BracketL
9143 // Optional attrib namespace
9144 node.setNamespacePrefix(this._parseNamespacePrefix());
9145 if (!node.setIdentifier(this._parseIdent())) {
9146 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9148 if (node.setOperator(this._parseOperator())) {
9149 node.setValue(this._parseBinaryExpr());
9150 this.acceptIdent('i'); // case insensitive matching
9152 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR)) {
9153 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
9155 return this.finish(node);
9157 Parser.prototype._parsePseudo = function () {
9159 // pseudo: ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]
9160 var node = this._tryParsePseudoIdentifier();
9162 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9163 var tryAsSelector = function () {
9164 var selectors = _this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9165 if (!selectors.addChild(_this._parseSelector(false))) {
9168 while (_this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma) && selectors.addChild(_this._parseSelector(false))) {
9171 if (_this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9172 return _this.finish(selectors);
9176 node.addChild(this.try(tryAsSelector) || this._parseBinaryExpr());
9177 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9178 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
9181 return this.finish(node);
9185 Parser.prototype._tryParsePseudoIdentifier = function () {
9186 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9189 var pos = this.mark();
9190 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].PseudoSelector);
9191 this.consumeToken(); // Colon
9192 if (this.hasWhitespace()) {
9193 this.restoreAtMark(pos);
9196 // optional, support ::
9197 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon) && this.hasWhitespace()) {
9198 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9200 if (!node.addChild(this._parseIdent())) {
9201 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].IdentifierExpected);
9205 Parser.prototype._tryParsePrio = function () {
9206 var mark = this.mark();
9207 var prio = this._parsePrio();
9211 this.restoreAtMark(mark);
9214 Parser.prototype._parsePrio = function () {
9215 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation)) {
9218 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Prio);
9219 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Exclamation) && this.acceptIdent('important')) {
9220 return this.finish(node);
9224 Parser.prototype._parseExpr = function (stopOnComma) {
9225 if (stopOnComma === void 0) { stopOnComma = false; }
9226 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Expression"]);
9227 if (!node.addChild(this._parseBinaryExpr())) {
9231 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) { // optional
9233 return this.finish(node);
9235 this.consumeToken();
9237 if (!node.addChild(this._parseBinaryExpr())) {
9241 return this.finish(node);
9243 Parser.prototype._parseNamedLine = function () {
9244 // https://www.w3.org/TR/css-grid-1/#named-lines
9245 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketL)) {
9248 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].GridLine);
9249 this.consumeToken();
9250 while (node.addChild(this._parseIdent())) {
9253 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BracketR)) {
9254 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightSquareBracketExpected);
9256 return this.finish(node);
9258 Parser.prototype._parseBinaryExpr = function (preparsedLeft, preparsedOper) {
9259 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["BinaryExpression"]);
9260 if (!node.setLeft((preparsedLeft || this._parseTerm()))) {
9263 if (!node.setOperator(preparsedOper || this._parseOperator())) {
9264 return this.finish(node);
9266 if (!node.setRight(this._parseTerm())) {
9267 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].TermExpected);
9269 // things needed for multiple binary expressions
9270 node = this.finish(node);
9271 var operator = this._parseOperator();
9273 node = this._parseBinaryExpr(node, operator);
9275 return this.finish(node);
9277 Parser.prototype._parseTerm = function () {
9278 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Term"]);
9279 node.setOperator(this._parseUnaryOperator()); // optional
9280 if (node.setExpression(this._parseURILiteral()) || // url before function
9281 node.setExpression(this._parseFunction()) || // function before ident
9282 node.setExpression(this._parseIdent()) ||
9283 node.setExpression(this._parseStringLiteral()) ||
9284 node.setExpression(this._parseNumeric()) ||
9285 node.setExpression(this._parseHexColor()) ||
9286 node.setExpression(this._parseOperation()) ||
9287 node.setExpression(this._parseNamedLine())) {
9288 return this.finish(node);
9292 Parser.prototype._parseOperation = function () {
9293 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9296 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9297 this.consumeToken(); // ParenthesisL
9298 node.addChild(this._parseExpr());
9299 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9300 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
9302 return this.finish(node);
9304 Parser.prototype._parseNumeric = function () {
9305 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Num) ||
9306 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Percentage) ||
9307 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Resolution) ||
9308 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Length) ||
9309 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EMS) ||
9310 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EXS) ||
9311 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Angle) ||
9312 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Time) ||
9313 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Dimension) ||
9314 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Freq)) {
9315 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NumericValue"]);
9316 this.consumeToken();
9317 return this.finish(node);
9321 Parser.prototype._parseStringLiteral = function () {
9322 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString)) {
9325 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].StringLiteral);
9326 this.consumeToken();
9327 return this.finish(node);
9329 Parser.prototype._parseURILiteral = function () {
9330 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^url(-prefix)?$/i)) {
9333 var pos = this.mark();
9334 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].URILiteral);
9335 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident);
9336 if (this.hasWhitespace() || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9337 this.restoreAtMark(pos);
9340 this.scanner.inURL = true;
9341 this.consumeToken(); // consume ()
9342 node.addChild(this._parseURLArgument()); // argument is optional
9343 this.scanner.inURL = false;
9344 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9345 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
9347 return this.finish(node);
9349 Parser.prototype._parseURLArgument = function () {
9350 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Node"]);
9351 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].String) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadString) && !this.acceptUnquotedString()) {
9354 return this.finish(node);
9356 Parser.prototype._parseIdent = function (referenceTypes) {
9357 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
9360 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Identifier"]);
9361 if (referenceTypes) {
9362 node.referenceTypes = referenceTypes;
9364 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident, /^--/);
9365 this.consumeToken();
9366 return this.finish(node);
9368 Parser.prototype._parseFunction = function () {
9369 var pos = this.mark();
9370 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Function"]);
9371 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
9374 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisL)) {
9375 this.restoreAtMark(pos);
9378 if (node.getArguments().addChild(this._parseFunctionArgument())) {
9379 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comma)) {
9380 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9383 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
9384 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].ExpressionExpected);
9388 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].ParenthesisR)) {
9389 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__["ParseError"].RightParenthesisExpected);
9391 return this.finish(node);
9393 Parser.prototype._parseFunctionIdentifier = function () {
9394 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident)) {
9397 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["Identifier"]);
9398 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Function];
9399 if (this.acceptIdent('progid')) {
9400 // support for IE7 specific filters: 'progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)'
9401 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Colon)) {
9402 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Ident) && this.acceptDelim('.')) {
9406 return this.finish(node);
9408 this.consumeToken();
9409 return this.finish(node);
9411 Parser.prototype._parseFunctionArgument = function () {
9412 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["FunctionArgument"]);
9413 if (node.setValue(this._parseExpr(true))) {
9414 return this.finish(node);
9418 Parser.prototype._parseHexColor = function () {
9419 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)) {
9420 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__["HexColorValue"]);
9421 this.consumeToken();
9422 return this.finish(node);
9435 /***/ (function(module, __webpack_exports__, __webpack_require__) {
9438 __webpack_require__.r(__webpack_exports__);
9439 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenType", function() { return TokenType; });
9440 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLineStream", function() { return MultiLineStream; });
9441 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scanner", function() { return Scanner; });
9442 /*---------------------------------------------------------------------------------------------
9443 * Copyright (c) Microsoft Corporation. All rights reserved.
9444 * Licensed under the MIT License. See License.txt in the project root for license information.
9445 *--------------------------------------------------------------------------------------------*/
9448 (function (TokenType) {
9449 TokenType[TokenType["Ident"] = 0] = "Ident";
9450 TokenType[TokenType["AtKeyword"] = 1] = "AtKeyword";
9451 TokenType[TokenType["String"] = 2] = "String";
9452 TokenType[TokenType["BadString"] = 3] = "BadString";
9453 TokenType[TokenType["UnquotedString"] = 4] = "UnquotedString";
9454 TokenType[TokenType["Hash"] = 5] = "Hash";
9455 TokenType[TokenType["Num"] = 6] = "Num";
9456 TokenType[TokenType["Percentage"] = 7] = "Percentage";
9457 TokenType[TokenType["Dimension"] = 8] = "Dimension";
9458 TokenType[TokenType["UnicodeRange"] = 9] = "UnicodeRange";
9459 TokenType[TokenType["CDO"] = 10] = "CDO";
9460 TokenType[TokenType["CDC"] = 11] = "CDC";
9461 TokenType[TokenType["Colon"] = 12] = "Colon";
9462 TokenType[TokenType["SemiColon"] = 13] = "SemiColon";
9463 TokenType[TokenType["CurlyL"] = 14] = "CurlyL";
9464 TokenType[TokenType["CurlyR"] = 15] = "CurlyR";
9465 TokenType[TokenType["ParenthesisL"] = 16] = "ParenthesisL";
9466 TokenType[TokenType["ParenthesisR"] = 17] = "ParenthesisR";
9467 TokenType[TokenType["BracketL"] = 18] = "BracketL";
9468 TokenType[TokenType["BracketR"] = 19] = "BracketR";
9469 TokenType[TokenType["Whitespace"] = 20] = "Whitespace";
9470 TokenType[TokenType["Includes"] = 21] = "Includes";
9471 TokenType[TokenType["Dashmatch"] = 22] = "Dashmatch";
9472 TokenType[TokenType["SubstringOperator"] = 23] = "SubstringOperator";
9473 TokenType[TokenType["PrefixOperator"] = 24] = "PrefixOperator";
9474 TokenType[TokenType["SuffixOperator"] = 25] = "SuffixOperator";
9475 TokenType[TokenType["Delim"] = 26] = "Delim";
9476 TokenType[TokenType["EMS"] = 27] = "EMS";
9477 TokenType[TokenType["EXS"] = 28] = "EXS";
9478 TokenType[TokenType["Length"] = 29] = "Length";
9479 TokenType[TokenType["Angle"] = 30] = "Angle";
9480 TokenType[TokenType["Time"] = 31] = "Time";
9481 TokenType[TokenType["Freq"] = 32] = "Freq";
9482 TokenType[TokenType["Exclamation"] = 33] = "Exclamation";
9483 TokenType[TokenType["Resolution"] = 34] = "Resolution";
9484 TokenType[TokenType["Comma"] = 35] = "Comma";
9485 TokenType[TokenType["Charset"] = 36] = "Charset";
9486 TokenType[TokenType["EscapedJavaScript"] = 37] = "EscapedJavaScript";
9487 TokenType[TokenType["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript";
9488 TokenType[TokenType["Comment"] = 39] = "Comment";
9489 TokenType[TokenType["SingleLineComment"] = 40] = "SingleLineComment";
9490 TokenType[TokenType["EOF"] = 41] = "EOF";
9491 TokenType[TokenType["CustomToken"] = 42] = "CustomToken";
9492 })(TokenType || (TokenType = {}));
9493 var MultiLineStream = /** @class */ (function () {
9494 function MultiLineStream(source) {
9495 this.source = source;
9496 this.len = source.length;
9499 MultiLineStream.prototype.substring = function (from, to) {
9500 if (to === void 0) { to = this.position; }
9501 return this.source.substring(from, to);
9503 MultiLineStream.prototype.eos = function () {
9504 return this.len <= this.position;
9506 MultiLineStream.prototype.pos = function () {
9507 return this.position;
9509 MultiLineStream.prototype.goBackTo = function (pos) {
9510 this.position = pos;
9512 MultiLineStream.prototype.goBack = function (n) {
9515 MultiLineStream.prototype.advance = function (n) {
9518 MultiLineStream.prototype.nextChar = function () {
9519 return this.source.charCodeAt(this.position++) || 0;
9521 MultiLineStream.prototype.peekChar = function (n) {
9522 if (n === void 0) { n = 0; }
9523 return this.source.charCodeAt(this.position + n) || 0;
9525 MultiLineStream.prototype.lookbackChar = function (n) {
9526 if (n === void 0) { n = 0; }
9527 return this.source.charCodeAt(this.position - n) || 0;
9529 MultiLineStream.prototype.advanceIfChar = function (ch) {
9530 if (ch === this.source.charCodeAt(this.position)) {
9536 MultiLineStream.prototype.advanceIfChars = function (ch) {
9537 if (this.position + ch.length > this.source.length) {
9541 for (; i < ch.length; i++) {
9542 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
9549 MultiLineStream.prototype.advanceWhileChar = function (condition) {
9550 var posNow = this.position;
9551 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
9554 return this.position - posNow;
9556 return MultiLineStream;
9559 var _a = 'a'.charCodeAt(0);
9560 var _f = 'f'.charCodeAt(0);
9561 var _z = 'z'.charCodeAt(0);
9562 var _A = 'A'.charCodeAt(0);
9563 var _F = 'F'.charCodeAt(0);
9564 var _Z = 'Z'.charCodeAt(0);
9565 var _0 = '0'.charCodeAt(0);
9566 var _9 = '9'.charCodeAt(0);
9567 var _TLD = '~'.charCodeAt(0);
9568 var _HAT = '^'.charCodeAt(0);
9569 var _EQS = '='.charCodeAt(0);
9570 var _PIP = '|'.charCodeAt(0);
9571 var _MIN = '-'.charCodeAt(0);
9572 var _USC = '_'.charCodeAt(0);
9573 var _PRC = '%'.charCodeAt(0);
9574 var _MUL = '*'.charCodeAt(0);
9575 var _LPA = '('.charCodeAt(0);
9576 var _RPA = ')'.charCodeAt(0);
9577 var _LAN = '<'.charCodeAt(0);
9578 var _RAN = '>'.charCodeAt(0);
9579 var _ATS = '@'.charCodeAt(0);
9580 var _HSH = '#'.charCodeAt(0);
9581 var _DLR = '$'.charCodeAt(0);
9582 var _BSL = '\\'.charCodeAt(0);
9583 var _FSL = '/'.charCodeAt(0);
9584 var _NWL = '\n'.charCodeAt(0);
9585 var _CAR = '\r'.charCodeAt(0);
9586 var _LFD = '\f'.charCodeAt(0);
9587 var _DQO = '"'.charCodeAt(0);
9588 var _SQO = '\''.charCodeAt(0);
9589 var _WSP = ' '.charCodeAt(0);
9590 var _TAB = '\t'.charCodeAt(0);
9591 var _SEM = ';'.charCodeAt(0);
9592 var _COL = ':'.charCodeAt(0);
9593 var _CUL = '{'.charCodeAt(0);
9594 var _CUR = '}'.charCodeAt(0);
9595 var _BRL = '['.charCodeAt(0);
9596 var _BRR = ']'.charCodeAt(0);
9597 var _CMA = ','.charCodeAt(0);
9598 var _DOT = '.'.charCodeAt(0);
9599 var _BNG = '!'.charCodeAt(0);
9600 var staticTokenTable = {};
9601 staticTokenTable[_SEM] = TokenType.SemiColon;
9602 staticTokenTable[_COL] = TokenType.Colon;
9603 staticTokenTable[_CUL] = TokenType.CurlyL;
9604 staticTokenTable[_CUR] = TokenType.CurlyR;
9605 staticTokenTable[_BRR] = TokenType.BracketR;
9606 staticTokenTable[_BRL] = TokenType.BracketL;
9607 staticTokenTable[_LPA] = TokenType.ParenthesisL;
9608 staticTokenTable[_RPA] = TokenType.ParenthesisR;
9609 staticTokenTable[_CMA] = TokenType.Comma;
9610 var staticUnitTable = {};
9611 staticUnitTable['em'] = TokenType.EMS;
9612 staticUnitTable['ex'] = TokenType.EXS;
9613 staticUnitTable['px'] = TokenType.Length;
9614 staticUnitTable['cm'] = TokenType.Length;
9615 staticUnitTable['mm'] = TokenType.Length;
9616 staticUnitTable['in'] = TokenType.Length;
9617 staticUnitTable['pt'] = TokenType.Length;
9618 staticUnitTable['pc'] = TokenType.Length;
9619 staticUnitTable['deg'] = TokenType.Angle;
9620 staticUnitTable['rad'] = TokenType.Angle;
9621 staticUnitTable['grad'] = TokenType.Angle;
9622 staticUnitTable['ms'] = TokenType.Time;
9623 staticUnitTable['s'] = TokenType.Time;
9624 staticUnitTable['hz'] = TokenType.Freq;
9625 staticUnitTable['khz'] = TokenType.Freq;
9626 staticUnitTable['%'] = TokenType.Percentage;
9627 staticUnitTable['fr'] = TokenType.Percentage;
9628 staticUnitTable['dpi'] = TokenType.Resolution;
9629 staticUnitTable['dpcm'] = TokenType.Resolution;
9630 var Scanner = /** @class */ (function () {
9631 function Scanner() {
9632 this.stream = new MultiLineStream('');
9633 this.ignoreComment = true;
9634 this.ignoreWhitespace = true;
9637 Scanner.prototype.setSource = function (input) {
9638 this.stream = new MultiLineStream(input);
9640 Scanner.prototype.finishToken = function (offset, type, text) {
9643 len: this.stream.pos() - offset,
9645 text: text || this.stream.substring(offset)
9648 Scanner.prototype.substring = function (offset, len) {
9649 return this.stream.substring(offset, offset + len);
9651 Scanner.prototype.pos = function () {
9652 return this.stream.pos();
9654 Scanner.prototype.goBackTo = function (pos) {
9655 this.stream.goBackTo(pos);
9657 Scanner.prototype.scanUnquotedString = function () {
9658 var offset = this.stream.pos();
9660 if (this._unquotedString(content)) {
9661 return this.finishToken(offset, TokenType.UnquotedString, content.join(''));
9665 Scanner.prototype.scan = function () {
9666 // processes all whitespaces and comments
9667 var triviaToken = this.trivia();
9668 if (triviaToken !== null) {
9671 var offset = this.stream.pos();
9672 // End of file/input
9673 if (this.stream.eos()) {
9674 return this.finishToken(offset, TokenType.EOF);
9676 return this.scanNext(offset);
9678 Scanner.prototype.scanNext = function (offset) {
9680 if (this.stream.advanceIfChars([_LAN, _BNG, _MIN, _MIN])) {
9681 return this.finishToken(offset, TokenType.CDO);
9684 if (this.stream.advanceIfChars([_MIN, _MIN, _RAN])) {
9685 return this.finishToken(offset, TokenType.CDC);
9688 if (this.ident(content)) {
9689 return this.finishToken(offset, TokenType.Ident, content.join(''));
9692 if (this.stream.advanceIfChar(_ATS)) {
9694 if (this._name(content)) {
9695 var keywordText = content.join('');
9696 if (keywordText === '@charset') {
9697 return this.finishToken(offset, TokenType.Charset, keywordText);
9699 return this.finishToken(offset, TokenType.AtKeyword, keywordText);
9702 return this.finishToken(offset, TokenType.Delim);
9706 if (this.stream.advanceIfChar(_HSH)) {
9708 if (this._name(content)) {
9709 return this.finishToken(offset, TokenType.Hash, content.join(''));
9712 return this.finishToken(offset, TokenType.Delim);
9716 if (this.stream.advanceIfChar(_BNG)) {
9717 return this.finishToken(offset, TokenType.Exclamation);
9720 if (this._number()) {
9721 var pos = this.stream.pos();
9722 content = [this.stream.substring(offset, pos)];
9723 if (this.stream.advanceIfChar(_PRC)) {
9725 return this.finishToken(offset, TokenType.Percentage);
9727 else if (this.ident(content)) {
9728 var dim = this.stream.substring(pos).toLowerCase();
9729 var tokenType_1 = staticUnitTable[dim];
9730 if (typeof tokenType_1 !== 'undefined') {
9731 // Known dimension 43px
9732 return this.finishToken(offset, tokenType_1, content.join(''));
9735 // Unknown dimension 43ft
9736 return this.finishToken(offset, TokenType.Dimension, content.join(''));
9739 return this.finishToken(offset, TokenType.Num);
9741 // String, BadString
9743 var tokenType = this._string(content);
9744 if (tokenType !== null) {
9745 return this.finishToken(offset, tokenType, content.join(''));
9747 // single character tokens
9748 tokenType = staticTokenTable[this.stream.peekChar()];
9749 if (typeof tokenType !== 'undefined') {
9750 this.stream.advance(1);
9751 return this.finishToken(offset, tokenType);
9754 if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS) {
9755 this.stream.advance(2);
9756 return this.finishToken(offset, TokenType.Includes);
9759 if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS) {
9760 this.stream.advance(2);
9761 return this.finishToken(offset, TokenType.Dashmatch);
9763 // Substring operator *=
9764 if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS) {
9765 this.stream.advance(2);
9766 return this.finishToken(offset, TokenType.SubstringOperator);
9768 // Substring operator ^=
9769 if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS) {
9770 this.stream.advance(2);
9771 return this.finishToken(offset, TokenType.PrefixOperator);
9773 // Substring operator $=
9774 if (this.stream.peekChar(0) === _DLR && this.stream.peekChar(1) === _EQS) {
9775 this.stream.advance(2);
9776 return this.finishToken(offset, TokenType.SuffixOperator);
9779 this.stream.nextChar();
9780 return this.finishToken(offset, TokenType.Delim);
9782 Scanner.prototype._matchWordAnyCase = function (characters) {
9784 this.stream.advanceWhileChar(function (ch) {
9785 var result = characters[index] === ch || characters[index + 1] === ch;
9791 if (index === characters.length) {
9795 this.stream.goBack(index / 2);
9799 Scanner.prototype.trivia = function () {
9801 var offset = this.stream.pos();
9802 if (this._whitespace()) {
9803 if (!this.ignoreWhitespace) {
9804 return this.finishToken(offset, TokenType.Whitespace);
9807 else if (this.comment()) {
9808 if (!this.ignoreComment) {
9809 return this.finishToken(offset, TokenType.Comment);
9817 Scanner.prototype.comment = function () {
9818 if (this.stream.advanceIfChars([_FSL, _MUL])) {
9819 var success_1 = false, hot_1 = false;
9820 this.stream.advanceWhileChar(function (ch) {
9821 if (hot_1 && ch === _FSL) {
9825 hot_1 = ch === _MUL;
9829 this.stream.advance(1);
9835 Scanner.prototype._number = function () {
9837 if (this.stream.peekChar() === _DOT) {
9840 ch = this.stream.peekChar(npeek);
9841 if (ch >= _0 && ch <= _9) {
9842 this.stream.advance(npeek + 1);
9843 this.stream.advanceWhileChar(function (ch) {
9844 return ch >= _0 && ch <= _9 || npeek === 0 && ch === _DOT;
9850 Scanner.prototype._newline = function (result) {
9851 var ch = this.stream.peekChar();
9856 this.stream.advance(1);
9857 result.push(String.fromCharCode(ch));
9858 if (ch === _CAR && this.stream.advanceIfChar(_NWL)) {
9865 Scanner.prototype._escape = function (result, includeNewLines) {
9866 var ch = this.stream.peekChar();
9868 this.stream.advance(1);
9869 ch = this.stream.peekChar();
9870 var hexNumCount = 0;
9871 while (hexNumCount < 6 && (ch >= _0 && ch <= _9 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) {
9872 this.stream.advance(1);
9873 ch = this.stream.peekChar();
9876 if (hexNumCount > 0) {
9878 var hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16);
9880 result.push(String.fromCharCode(hexVal));
9886 // optional whitespace or new line, not part of result text
9887 if (ch === _WSP || ch === _TAB) {
9888 this.stream.advance(1);
9895 if (ch !== _CAR && ch !== _LFD && ch !== _NWL) {
9896 this.stream.advance(1);
9897 result.push(String.fromCharCode(ch));
9900 else if (includeNewLines) {
9901 return this._newline(result);
9906 Scanner.prototype._stringChar = function (closeQuote, result) {
9907 // not closeQuote, not backslash, not newline
9908 var ch = this.stream.peekChar();
9909 if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR && ch !== _LFD && ch !== _NWL) {
9910 this.stream.advance(1);
9911 result.push(String.fromCharCode(ch));
9916 Scanner.prototype._string = function (result) {
9917 if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) {
9918 var closeQuote = this.stream.nextChar();
9919 result.push(String.fromCharCode(closeQuote));
9920 while (this._stringChar(closeQuote, result) || this._escape(result, true)) {
9923 if (this.stream.peekChar() === closeQuote) {
9924 this.stream.nextChar();
9925 result.push(String.fromCharCode(closeQuote));
9926 return TokenType.String;
9929 return TokenType.BadString;
9934 Scanner.prototype._unquotedChar = function (result) {
9935 // not closeQuote, not backslash, not newline
9936 var ch = this.stream.peekChar();
9937 if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL && ch !== _LFD && ch !== _CAR) {
9938 this.stream.advance(1);
9939 result.push(String.fromCharCode(ch));
9944 Scanner.prototype._unquotedString = function (result) {
9945 var hasContent = false;
9946 while (this._unquotedChar(result) || this._escape(result)) {
9951 Scanner.prototype._whitespace = function () {
9952 var n = this.stream.advanceWhileChar(function (ch) {
9953 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
9957 Scanner.prototype._name = function (result) {
9958 var matched = false;
9959 while (this._identChar(result) || this._escape(result)) {
9964 Scanner.prototype.ident = function (result) {
9965 var pos = this.stream.pos();
9966 var hasMinus = this._minus(result);
9967 if (hasMinus && this._minus(result) /* -- */) {
9968 if (this._identFirstChar(result) || this._escape(result)) {
9969 while (this._identChar(result) || this._escape(result)) {
9975 else if (this._identFirstChar(result) || this._escape(result)) {
9976 while (this._identChar(result) || this._escape(result)) {
9981 this.stream.goBackTo(pos);
9984 Scanner.prototype._identFirstChar = function (result) {
9985 var ch = this.stream.peekChar();
9986 if (ch === _USC || // _
9987 ch >= _a && ch <= _z || // a-z
9988 ch >= _A && ch <= _Z || // A-Z
9989 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
9990 this.stream.advance(1);
9991 result.push(String.fromCharCode(ch));
9996 Scanner.prototype._minus = function (result) {
9997 var ch = this.stream.peekChar();
9999 this.stream.advance(1);
10000 result.push(String.fromCharCode(ch));
10005 Scanner.prototype._identChar = function (result) {
10006 var ch = this.stream.peekChar();
10007 if (ch === _USC || // _
10008 ch === _MIN || // -
10009 ch >= _a && ch <= _z || // a-z
10010 ch >= _A && ch <= _Z || // A-Z
10011 ch >= _0 && ch <= _9 || // 0/9
10012 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
10013 this.stream.advance(1);
10014 result.push(String.fromCharCode(ch));
10026 /***/ (function(module, __webpack_exports__, __webpack_require__) {
10029 __webpack_require__.r(__webpack_exports__);
10030 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NodeType", function() { return NodeType; });
10031 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceType", function() { return ReferenceType; });
10032 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodeAtOffset", function() { return getNodeAtOffset; });
10033 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodePath", function() { return getNodePath; });
10034 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParentDeclaration", function() { return getParentDeclaration; });
10035 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; });
10036 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nodelist", function() { return Nodelist; });
10037 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Identifier", function() { return Identifier; });
10038 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stylesheet", function() { return Stylesheet; });
10039 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Declarations", function() { return Declarations; });
10040 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BodyDeclaration", function() { return BodyDeclaration; });
10041 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RuleSet", function() { return RuleSet; });
10042 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selector", function() { return Selector; });
10043 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleSelector", function() { return SimpleSelector; });
10044 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AtApplyRule", function() { return AtApplyRule; });
10045 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractDeclaration", function() { return AbstractDeclaration; });
10046 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomPropertyDeclaration", function() { return CustomPropertyDeclaration; });
10047 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomPropertySet", function() { return CustomPropertySet; });
10048 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Declaration", function() { return Declaration; });
10049 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Property", function() { return Property; });
10050 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Invocation", function() { return Invocation; });
10051 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Function", function() { return Function; });
10052 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionParameter", function() { return FunctionParameter; });
10053 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionArgument", function() { return FunctionArgument; });
10054 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IfStatement", function() { return IfStatement; });
10055 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForStatement", function() { return ForStatement; });
10056 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EachStatement", function() { return EachStatement; });
10057 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WhileStatement", function() { return WhileStatement; });
10058 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElseStatement", function() { return ElseStatement; });
10059 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionDeclaration", function() { return FunctionDeclaration; });
10060 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewPort", function() { return ViewPort; });
10061 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontFace", function() { return FontFace; });
10062 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NestedProperties", function() { return NestedProperties; });
10063 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Keyframe", function() { return Keyframe; });
10064 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyframeSelector", function() { return KeyframeSelector; });
10065 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Import", function() { return Import; });
10066 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Use", function() { return Use; });
10067 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleConfiguration", function() { return ModuleConfiguration; });
10068 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Forward", function() { return Forward; });
10069 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForwardVisibility", function() { return ForwardVisibility; });
10070 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return Namespace; });
10071 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Media", function() { return Media; });
10072 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Supports", function() { return Supports; });
10073 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Document", function() { return Document; });
10074 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Medialist", function() { return Medialist; });
10075 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaQuery", function() { return MediaQuery; });
10076 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SupportsCondition", function() { return SupportsCondition; });
10077 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Page", function() { return Page; });
10078 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageBoxMarginBox", function() { return PageBoxMarginBox; });
10079 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expression", function() { return Expression; });
10080 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BinaryExpression", function() { return BinaryExpression; });
10081 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Term", function() { return Term; });
10082 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributeSelector", function() { return AttributeSelector; });
10083 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Operator", function() { return Operator; });
10084 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HexColorValue", function() { return HexColorValue; });
10085 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumericValue", function() { return NumericValue; });
10086 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableDeclaration", function() { return VariableDeclaration; });
10087 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interpolation", function() { return Interpolation; });
10088 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return Variable; });
10089 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExtendsReference", function() { return ExtendsReference; });
10090 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinReference", function() { return MixinReference; });
10091 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixinDeclaration", function() { return MixinDeclaration; });
10092 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnknownAtRule", function() { return UnknownAtRule; });
10093 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListEntry", function() { return ListEntry; });
10094 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LessGuard", function() { return LessGuard; });
10095 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardCondition", function() { return GuardCondition; });
10096 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Module", function() { return Module; });
10097 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Level", function() { return Level; });
10098 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Marker", function() { return Marker; });
10099 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseErrorCollector", function() { return ParseErrorCollector; });
10100 /*---------------------------------------------------------------------------------------------
10101 * Copyright (c) Microsoft Corporation. All rights reserved.
10102 * Licensed under the MIT License. See License.txt in the project root for license information.
10103 *--------------------------------------------------------------------------------------------*/
10105 var __extends = (undefined && undefined.__extends) || (function () {
10106 var extendStatics = function (d, b) {
10107 extendStatics = Object.setPrototypeOf ||
10108 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10109 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
10110 return extendStatics(d, b);
10112 return function (d, b) {
10113 extendStatics(d, b);
10114 function __() { this.constructor = d; }
10115 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10119 /// Nodes for the css 2.1 specification. See for reference:
10120 /// http://www.w3.org/TR/CSS21/grammar.html#grammar
10123 (function (NodeType) {
10124 NodeType[NodeType["Undefined"] = 0] = "Undefined";
10125 NodeType[NodeType["Identifier"] = 1] = "Identifier";
10126 NodeType[NodeType["Stylesheet"] = 2] = "Stylesheet";
10127 NodeType[NodeType["Ruleset"] = 3] = "Ruleset";
10128 NodeType[NodeType["Selector"] = 4] = "Selector";
10129 NodeType[NodeType["SimpleSelector"] = 5] = "SimpleSelector";
10130 NodeType[NodeType["SelectorInterpolation"] = 6] = "SelectorInterpolation";
10131 NodeType[NodeType["SelectorCombinator"] = 7] = "SelectorCombinator";
10132 NodeType[NodeType["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent";
10133 NodeType[NodeType["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling";
10134 NodeType[NodeType["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings";
10135 NodeType[NodeType["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant";
10136 NodeType[NodeType["Page"] = 12] = "Page";
10137 NodeType[NodeType["PageBoxMarginBox"] = 13] = "PageBoxMarginBox";
10138 NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
10139 NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
10140 NodeType[NodeType["ElementNameSelector"] = 16] = "ElementNameSelector";
10141 NodeType[NodeType["PseudoSelector"] = 17] = "PseudoSelector";
10142 NodeType[NodeType["AttributeSelector"] = 18] = "AttributeSelector";
10143 NodeType[NodeType["Declaration"] = 19] = "Declaration";
10144 NodeType[NodeType["Declarations"] = 20] = "Declarations";
10145 NodeType[NodeType["Property"] = 21] = "Property";
10146 NodeType[NodeType["Expression"] = 22] = "Expression";
10147 NodeType[NodeType["BinaryExpression"] = 23] = "BinaryExpression";
10148 NodeType[NodeType["Term"] = 24] = "Term";
10149 NodeType[NodeType["Operator"] = 25] = "Operator";
10150 NodeType[NodeType["Value"] = 26] = "Value";
10151 NodeType[NodeType["StringLiteral"] = 27] = "StringLiteral";
10152 NodeType[NodeType["URILiteral"] = 28] = "URILiteral";
10153 NodeType[NodeType["EscapedValue"] = 29] = "EscapedValue";
10154 NodeType[NodeType["Function"] = 30] = "Function";
10155 NodeType[NodeType["NumericValue"] = 31] = "NumericValue";
10156 NodeType[NodeType["HexColorValue"] = 32] = "HexColorValue";
10157 NodeType[NodeType["MixinDeclaration"] = 33] = "MixinDeclaration";
10158 NodeType[NodeType["MixinReference"] = 34] = "MixinReference";
10159 NodeType[NodeType["VariableName"] = 35] = "VariableName";
10160 NodeType[NodeType["VariableDeclaration"] = 36] = "VariableDeclaration";
10161 NodeType[NodeType["Prio"] = 37] = "Prio";
10162 NodeType[NodeType["Interpolation"] = 38] = "Interpolation";
10163 NodeType[NodeType["NestedProperties"] = 39] = "NestedProperties";
10164 NodeType[NodeType["ExtendsReference"] = 40] = "ExtendsReference";
10165 NodeType[NodeType["SelectorPlaceholder"] = 41] = "SelectorPlaceholder";
10166 NodeType[NodeType["Debug"] = 42] = "Debug";
10167 NodeType[NodeType["If"] = 43] = "If";
10168 NodeType[NodeType["Else"] = 44] = "Else";
10169 NodeType[NodeType["For"] = 45] = "For";
10170 NodeType[NodeType["Each"] = 46] = "Each";
10171 NodeType[NodeType["While"] = 47] = "While";
10172 NodeType[NodeType["MixinContent"] = 48] = "MixinContent";
10173 NodeType[NodeType["Media"] = 49] = "Media";
10174 NodeType[NodeType["Keyframe"] = 50] = "Keyframe";
10175 NodeType[NodeType["FontFace"] = 51] = "FontFace";
10176 NodeType[NodeType["Import"] = 52] = "Import";
10177 NodeType[NodeType["Namespace"] = 53] = "Namespace";
10178 NodeType[NodeType["Invocation"] = 54] = "Invocation";
10179 NodeType[NodeType["FunctionDeclaration"] = 55] = "FunctionDeclaration";
10180 NodeType[NodeType["ReturnStatement"] = 56] = "ReturnStatement";
10181 NodeType[NodeType["MediaQuery"] = 57] = "MediaQuery";
10182 NodeType[NodeType["FunctionParameter"] = 58] = "FunctionParameter";
10183 NodeType[NodeType["FunctionArgument"] = 59] = "FunctionArgument";
10184 NodeType[NodeType["KeyframeSelector"] = 60] = "KeyframeSelector";
10185 NodeType[NodeType["ViewPort"] = 61] = "ViewPort";
10186 NodeType[NodeType["Document"] = 62] = "Document";
10187 NodeType[NodeType["AtApplyRule"] = 63] = "AtApplyRule";
10188 NodeType[NodeType["CustomPropertyDeclaration"] = 64] = "CustomPropertyDeclaration";
10189 NodeType[NodeType["CustomPropertySet"] = 65] = "CustomPropertySet";
10190 NodeType[NodeType["ListEntry"] = 66] = "ListEntry";
10191 NodeType[NodeType["Supports"] = 67] = "Supports";
10192 NodeType[NodeType["SupportsCondition"] = 68] = "SupportsCondition";
10193 NodeType[NodeType["NamespacePrefix"] = 69] = "NamespacePrefix";
10194 NodeType[NodeType["GridLine"] = 70] = "GridLine";
10195 NodeType[NodeType["Plugin"] = 71] = "Plugin";
10196 NodeType[NodeType["UnknownAtRule"] = 72] = "UnknownAtRule";
10197 NodeType[NodeType["Use"] = 73] = "Use";
10198 NodeType[NodeType["ModuleConfiguration"] = 74] = "ModuleConfiguration";
10199 NodeType[NodeType["Forward"] = 75] = "Forward";
10200 NodeType[NodeType["ForwardVisibility"] = 76] = "ForwardVisibility";
10201 NodeType[NodeType["Module"] = 77] = "Module";
10202 })(NodeType || (NodeType = {}));
10204 (function (ReferenceType) {
10205 ReferenceType[ReferenceType["Mixin"] = 0] = "Mixin";
10206 ReferenceType[ReferenceType["Rule"] = 1] = "Rule";
10207 ReferenceType[ReferenceType["Variable"] = 2] = "Variable";
10208 ReferenceType[ReferenceType["Function"] = 3] = "Function";
10209 ReferenceType[ReferenceType["Keyframe"] = 4] = "Keyframe";
10210 ReferenceType[ReferenceType["Unknown"] = 5] = "Unknown";
10211 ReferenceType[ReferenceType["Module"] = 6] = "Module";
10212 ReferenceType[ReferenceType["Forward"] = 7] = "Forward";
10213 ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
10214 })(ReferenceType || (ReferenceType = {}));
10215 function getNodeAtOffset(node, offset) {
10216 var candidate = null;
10217 if (!node || offset < node.offset || offset > node.end) {
10220 // Find the shortest node at the position
10221 node.accept(function (node) {
10222 if (node.offset === -1 && node.length === -1) {
10225 if (node.offset <= offset && node.end >= offset) {
10229 else if (node.length <= candidate.length) {
10238 function getNodePath(node, offset) {
10239 var candidate = getNodeAtOffset(node, offset);
10241 while (candidate) {
10242 path.unshift(candidate);
10243 candidate = candidate.parent;
10247 function getParentDeclaration(node) {
10248 var decl = node.findParent(NodeType.Declaration);
10249 var value = decl && decl.getValue();
10250 if (value && value.encloses(node)) {
10255 var Node = /** @class */ (function () {
10256 function Node(offset, len, nodeType) {
10257 if (offset === void 0) { offset = -1; }
10258 if (len === void 0) { len = -1; }
10259 this.parent = null;
10260 this.offset = offset;
10263 this.nodeType = nodeType;
10266 Object.defineProperty(Node.prototype, "end", {
10267 get: function () { return this.offset + this.length; },
10271 Object.defineProperty(Node.prototype, "type", {
10273 return this.nodeType || NodeType.Undefined;
10275 set: function (type) {
10276 this.nodeType = type;
10281 Node.prototype.getTextProvider = function () {
10283 while (node && !node.textProvider) {
10284 node = node.parent;
10287 return node.textProvider;
10289 return function () { return 'unknown'; };
10291 Node.prototype.getText = function () {
10292 return this.getTextProvider()(this.offset, this.length);
10294 Node.prototype.matches = function (str) {
10295 return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
10297 Node.prototype.startsWith = function (str) {
10298 return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
10300 Node.prototype.endsWith = function (str) {
10301 return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
10303 Node.prototype.accept = function (visitor) {
10304 if (visitor(this) && this.children) {
10305 for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
10306 var child = _a[_i];
10307 child.accept(visitor);
10311 Node.prototype.acceptVisitor = function (visitor) {
10312 this.accept(visitor.visitNode.bind(visitor));
10314 Node.prototype.adoptChild = function (node, index) {
10315 if (index === void 0) { index = -1; }
10316 if (node.parent && node.parent.children) {
10317 var idx = node.parent.children.indexOf(node);
10319 node.parent.children.splice(idx, 1);
10322 node.parent = this;
10323 var children = this.children;
10325 children = this.children = [];
10327 if (index !== -1) {
10328 children.splice(index, 0, node);
10331 children.push(node);
10335 Node.prototype.attachTo = function (parent, index) {
10336 if (index === void 0) { index = -1; }
10338 parent.adoptChild(this, index);
10342 Node.prototype.collectIssues = function (results) {
10344 results.push.apply(results, this.issues);
10347 Node.prototype.addIssue = function (issue) {
10348 if (!this.issues) {
10351 this.issues.push(issue);
10353 Node.prototype.hasIssue = function (rule) {
10354 return Array.isArray(this.issues) && this.issues.some(function (i) { return i.getRule() === rule; });
10356 Node.prototype.isErroneous = function (recursive) {
10357 if (recursive === void 0) { recursive = false; }
10358 if (this.issues && this.issues.length > 0) {
10361 return recursive && Array.isArray(this.children) && this.children.some(function (c) { return c.isErroneous(true); });
10363 Node.prototype.setNode = function (field, node, index) {
10364 if (index === void 0) { index = -1; }
10366 node.attachTo(this, index);
10367 this[field] = node;
10372 Node.prototype.addChild = function (node) {
10374 if (!this.children) {
10375 this.children = [];
10377 node.attachTo(this);
10378 this.updateOffsetAndLength(node);
10383 Node.prototype.updateOffsetAndLength = function (node) {
10384 if (node.offset < this.offset || this.offset === -1) {
10385 this.offset = node.offset;
10387 var nodeEnd = node.end;
10388 if ((nodeEnd > this.end) || this.length === -1) {
10389 this.length = nodeEnd - this.offset;
10392 Node.prototype.hasChildren = function () {
10393 return !!this.children && this.children.length > 0;
10395 Node.prototype.getChildren = function () {
10396 return this.children ? this.children.slice(0) : [];
10398 Node.prototype.getChild = function (index) {
10399 if (this.children && index < this.children.length) {
10400 return this.children[index];
10404 Node.prototype.addChildren = function (nodes) {
10405 for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
10406 var node = nodes_1[_i];
10407 this.addChild(node);
10410 Node.prototype.findFirstChildBeforeOffset = function (offset) {
10411 if (this.children) {
10412 var current = null;
10413 for (var i = this.children.length - 1; i >= 0; i--) {
10414 // iterate until we find a child that has a start offset smaller than the input offset
10415 current = this.children[i];
10416 if (current.offset <= offset) {
10423 Node.prototype.findChildAtOffset = function (offset, goDeep) {
10424 var current = this.findFirstChildBeforeOffset(offset);
10425 if (current && current.end >= offset) {
10427 return current.findChildAtOffset(offset, true) || current;
10433 Node.prototype.encloses = function (candidate) {
10434 return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
10436 Node.prototype.getParent = function () {
10437 var result = this.parent;
10438 while (result instanceof Nodelist) {
10439 result = result.parent;
10443 Node.prototype.findParent = function (type) {
10445 while (result && result.type !== type) {
10446 result = result.parent;
10450 Node.prototype.findAParent = function () {
10452 for (var _i = 0; _i < arguments.length; _i++) {
10453 types[_i] = arguments[_i];
10456 while (result && !types.some(function (t) { return result.type === t; })) {
10457 result = result.parent;
10461 Node.prototype.setData = function (key, value) {
10462 if (!this.options) {
10465 this.options[key] = value;
10467 Node.prototype.getData = function (key) {
10468 if (!this.options || !this.options.hasOwnProperty(key)) {
10471 return this.options[key];
10476 var Nodelist = /** @class */ (function (_super) {
10477 __extends(Nodelist, _super);
10478 function Nodelist(parent, index) {
10479 if (index === void 0) { index = -1; }
10480 var _this = _super.call(this, -1, -1) || this;
10481 _this.attachTo(parent, index);
10489 var Identifier = /** @class */ (function (_super) {
10490 __extends(Identifier, _super);
10491 function Identifier(offset, length) {
10492 var _this = _super.call(this, offset, length) || this;
10493 _this.isCustomProperty = false;
10496 Object.defineProperty(Identifier.prototype, "type", {
10498 return NodeType.Identifier;
10503 Identifier.prototype.containsInterpolation = function () {
10504 return this.hasChildren();
10509 var Stylesheet = /** @class */ (function (_super) {
10510 __extends(Stylesheet, _super);
10511 function Stylesheet(offset, length) {
10512 return _super.call(this, offset, length) || this;
10514 Object.defineProperty(Stylesheet.prototype, "type", {
10516 return NodeType.Stylesheet;
10524 var Declarations = /** @class */ (function (_super) {
10525 __extends(Declarations, _super);
10526 function Declarations(offset, length) {
10527 return _super.call(this, offset, length) || this;
10529 Object.defineProperty(Declarations.prototype, "type", {
10531 return NodeType.Declarations;
10536 return Declarations;
10539 var BodyDeclaration = /** @class */ (function (_super) {
10540 __extends(BodyDeclaration, _super);
10541 function BodyDeclaration(offset, length) {
10542 return _super.call(this, offset, length) || this;
10544 BodyDeclaration.prototype.getDeclarations = function () {
10545 return this.declarations;
10547 BodyDeclaration.prototype.setDeclarations = function (decls) {
10548 return this.setNode('declarations', decls);
10550 return BodyDeclaration;
10553 var RuleSet = /** @class */ (function (_super) {
10554 __extends(RuleSet, _super);
10555 function RuleSet(offset, length) {
10556 return _super.call(this, offset, length) || this;
10558 Object.defineProperty(RuleSet.prototype, "type", {
10560 return NodeType.Ruleset;
10565 RuleSet.prototype.getSelectors = function () {
10566 if (!this.selectors) {
10567 this.selectors = new Nodelist(this);
10569 return this.selectors;
10571 RuleSet.prototype.isNested = function () {
10572 return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null;
10575 }(BodyDeclaration));
10577 var Selector = /** @class */ (function (_super) {
10578 __extends(Selector, _super);
10579 function Selector(offset, length) {
10580 return _super.call(this, offset, length) || this;
10582 Object.defineProperty(Selector.prototype, "type", {
10584 return NodeType.Selector;
10592 var SimpleSelector = /** @class */ (function (_super) {
10593 __extends(SimpleSelector, _super);
10594 function SimpleSelector(offset, length) {
10595 return _super.call(this, offset, length) || this;
10597 Object.defineProperty(SimpleSelector.prototype, "type", {
10599 return NodeType.SimpleSelector;
10604 return SimpleSelector;
10607 var AtApplyRule = /** @class */ (function (_super) {
10608 __extends(AtApplyRule, _super);
10609 function AtApplyRule(offset, length) {
10610 return _super.call(this, offset, length) || this;
10612 Object.defineProperty(AtApplyRule.prototype, "type", {
10614 return NodeType.AtApplyRule;
10619 AtApplyRule.prototype.setIdentifier = function (node) {
10620 return this.setNode('identifier', node, 0);
10622 AtApplyRule.prototype.getIdentifier = function () {
10623 return this.identifier;
10625 AtApplyRule.prototype.getName = function () {
10626 return this.identifier ? this.identifier.getText() : '';
10628 return AtApplyRule;
10631 var AbstractDeclaration = /** @class */ (function (_super) {
10632 __extends(AbstractDeclaration, _super);
10633 function AbstractDeclaration(offset, length) {
10634 return _super.call(this, offset, length) || this;
10636 return AbstractDeclaration;
10639 var CustomPropertyDeclaration = /** @class */ (function (_super) {
10640 __extends(CustomPropertyDeclaration, _super);
10641 function CustomPropertyDeclaration(offset, length) {
10642 return _super.call(this, offset, length) || this;
10644 Object.defineProperty(CustomPropertyDeclaration.prototype, "type", {
10646 return NodeType.CustomPropertyDeclaration;
10651 CustomPropertyDeclaration.prototype.setProperty = function (node) {
10652 return this.setNode('property', node);
10654 CustomPropertyDeclaration.prototype.getProperty = function () {
10655 return this.property;
10657 CustomPropertyDeclaration.prototype.setValue = function (value) {
10658 return this.setNode('value', value);
10660 CustomPropertyDeclaration.prototype.getValue = function () {
10663 CustomPropertyDeclaration.prototype.setPropertySet = function (value) {
10664 return this.setNode('propertySet', value);
10666 CustomPropertyDeclaration.prototype.getPropertySet = function () {
10667 return this.propertySet;
10669 return CustomPropertyDeclaration;
10670 }(AbstractDeclaration));
10672 var CustomPropertySet = /** @class */ (function (_super) {
10673 __extends(CustomPropertySet, _super);
10674 function CustomPropertySet(offset, length) {
10675 return _super.call(this, offset, length) || this;
10677 Object.defineProperty(CustomPropertySet.prototype, "type", {
10679 return NodeType.CustomPropertySet;
10684 return CustomPropertySet;
10685 }(BodyDeclaration));
10687 var Declaration = /** @class */ (function (_super) {
10688 __extends(Declaration, _super);
10689 function Declaration(offset, length) {
10690 var _this = _super.call(this, offset, length) || this;
10691 _this.property = null;
10694 Object.defineProperty(Declaration.prototype, "type", {
10696 return NodeType.Declaration;
10701 Declaration.prototype.setProperty = function (node) {
10702 return this.setNode('property', node);
10704 Declaration.prototype.getProperty = function () {
10705 return this.property;
10707 Declaration.prototype.getFullPropertyName = function () {
10708 var propertyName = this.property ? this.property.getName() : 'unknown';
10709 if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
10710 var parentDecl = this.parent.getParent().getParent();
10711 if (parentDecl instanceof Declaration) {
10712 return parentDecl.getFullPropertyName() + propertyName;
10715 return propertyName;
10717 Declaration.prototype.getNonPrefixedPropertyName = function () {
10718 var propertyName = this.getFullPropertyName();
10719 if (propertyName && propertyName.charAt(0) === '-') {
10720 var vendorPrefixEnd = propertyName.indexOf('-', 1);
10721 if (vendorPrefixEnd !== -1) {
10722 return propertyName.substring(vendorPrefixEnd + 1);
10725 return propertyName;
10727 Declaration.prototype.setValue = function (value) {
10728 return this.setNode('value', value);
10730 Declaration.prototype.getValue = function () {
10733 Declaration.prototype.setNestedProperties = function (value) {
10734 return this.setNode('nestedProperties', value);
10736 Declaration.prototype.getNestedProperties = function () {
10737 return this.nestedProperties;
10739 return Declaration;
10740 }(AbstractDeclaration));
10742 var Property = /** @class */ (function (_super) {
10743 __extends(Property, _super);
10744 function Property(offset, length) {
10745 return _super.call(this, offset, length) || this;
10747 Object.defineProperty(Property.prototype, "type", {
10749 return NodeType.Property;
10754 Property.prototype.setIdentifier = function (value) {
10755 return this.setNode('identifier', value);
10757 Property.prototype.getIdentifier = function () {
10758 return this.identifier;
10760 Property.prototype.getName = function () {
10761 return this.getText();
10763 Property.prototype.isCustomProperty = function () {
10764 return !!this.identifier && this.identifier.isCustomProperty;
10769 var Invocation = /** @class */ (function (_super) {
10770 __extends(Invocation, _super);
10771 function Invocation(offset, length) {
10772 return _super.call(this, offset, length) || this;
10774 Object.defineProperty(Invocation.prototype, "type", {
10776 return NodeType.Invocation;
10781 Invocation.prototype.getArguments = function () {
10782 if (!this.arguments) {
10783 this.arguments = new Nodelist(this);
10785 return this.arguments;
10790 var Function = /** @class */ (function (_super) {
10791 __extends(Function, _super);
10792 function Function(offset, length) {
10793 return _super.call(this, offset, length) || this;
10795 Object.defineProperty(Function.prototype, "type", {
10797 return NodeType.Function;
10802 Function.prototype.setIdentifier = function (node) {
10803 return this.setNode('identifier', node, 0);
10805 Function.prototype.getIdentifier = function () {
10806 return this.identifier;
10808 Function.prototype.getName = function () {
10809 return this.identifier ? this.identifier.getText() : '';
10814 var FunctionParameter = /** @class */ (function (_super) {
10815 __extends(FunctionParameter, _super);
10816 function FunctionParameter(offset, length) {
10817 return _super.call(this, offset, length) || this;
10819 Object.defineProperty(FunctionParameter.prototype, "type", {
10821 return NodeType.FunctionParameter;
10826 FunctionParameter.prototype.setIdentifier = function (node) {
10827 return this.setNode('identifier', node, 0);
10829 FunctionParameter.prototype.getIdentifier = function () {
10830 return this.identifier;
10832 FunctionParameter.prototype.getName = function () {
10833 return this.identifier ? this.identifier.getText() : '';
10835 FunctionParameter.prototype.setDefaultValue = function (node) {
10836 return this.setNode('defaultValue', node, 0);
10838 FunctionParameter.prototype.getDefaultValue = function () {
10839 return this.defaultValue;
10841 return FunctionParameter;
10844 var FunctionArgument = /** @class */ (function (_super) {
10845 __extends(FunctionArgument, _super);
10846 function FunctionArgument(offset, length) {
10847 return _super.call(this, offset, length) || this;
10849 Object.defineProperty(FunctionArgument.prototype, "type", {
10851 return NodeType.FunctionArgument;
10856 FunctionArgument.prototype.setIdentifier = function (node) {
10857 return this.setNode('identifier', node, 0);
10859 FunctionArgument.prototype.getIdentifier = function () {
10860 return this.identifier;
10862 FunctionArgument.prototype.getName = function () {
10863 return this.identifier ? this.identifier.getText() : '';
10865 FunctionArgument.prototype.setValue = function (node) {
10866 return this.setNode('value', node, 0);
10868 FunctionArgument.prototype.getValue = function () {
10871 return FunctionArgument;
10874 var IfStatement = /** @class */ (function (_super) {
10875 __extends(IfStatement, _super);
10876 function IfStatement(offset, length) {
10877 return _super.call(this, offset, length) || this;
10879 Object.defineProperty(IfStatement.prototype, "type", {
10881 return NodeType.If;
10886 IfStatement.prototype.setExpression = function (node) {
10887 return this.setNode('expression', node, 0);
10889 IfStatement.prototype.setElseClause = function (elseClause) {
10890 return this.setNode('elseClause', elseClause);
10892 return IfStatement;
10893 }(BodyDeclaration));
10895 var ForStatement = /** @class */ (function (_super) {
10896 __extends(ForStatement, _super);
10897 function ForStatement(offset, length) {
10898 return _super.call(this, offset, length) || this;
10900 Object.defineProperty(ForStatement.prototype, "type", {
10902 return NodeType.For;
10907 ForStatement.prototype.setVariable = function (node) {
10908 return this.setNode('variable', node, 0);
10910 return ForStatement;
10911 }(BodyDeclaration));
10913 var EachStatement = /** @class */ (function (_super) {
10914 __extends(EachStatement, _super);
10915 function EachStatement(offset, length) {
10916 return _super.call(this, offset, length) || this;
10918 Object.defineProperty(EachStatement.prototype, "type", {
10920 return NodeType.Each;
10925 EachStatement.prototype.getVariables = function () {
10926 if (!this.variables) {
10927 this.variables = new Nodelist(this);
10929 return this.variables;
10931 return EachStatement;
10932 }(BodyDeclaration));
10934 var WhileStatement = /** @class */ (function (_super) {
10935 __extends(WhileStatement, _super);
10936 function WhileStatement(offset, length) {
10937 return _super.call(this, offset, length) || this;
10939 Object.defineProperty(WhileStatement.prototype, "type", {
10941 return NodeType.While;
10946 return WhileStatement;
10947 }(BodyDeclaration));
10949 var ElseStatement = /** @class */ (function (_super) {
10950 __extends(ElseStatement, _super);
10951 function ElseStatement(offset, length) {
10952 return _super.call(this, offset, length) || this;
10954 Object.defineProperty(ElseStatement.prototype, "type", {
10956 return NodeType.Else;
10961 return ElseStatement;
10962 }(BodyDeclaration));
10964 var FunctionDeclaration = /** @class */ (function (_super) {
10965 __extends(FunctionDeclaration, _super);
10966 function FunctionDeclaration(offset, length) {
10967 return _super.call(this, offset, length) || this;
10969 Object.defineProperty(FunctionDeclaration.prototype, "type", {
10971 return NodeType.FunctionDeclaration;
10976 FunctionDeclaration.prototype.setIdentifier = function (node) {
10977 return this.setNode('identifier', node, 0);
10979 FunctionDeclaration.prototype.getIdentifier = function () {
10980 return this.identifier;
10982 FunctionDeclaration.prototype.getName = function () {
10983 return this.identifier ? this.identifier.getText() : '';
10985 FunctionDeclaration.prototype.getParameters = function () {
10986 if (!this.parameters) {
10987 this.parameters = new Nodelist(this);
10989 return this.parameters;
10991 return FunctionDeclaration;
10992 }(BodyDeclaration));
10994 var ViewPort = /** @class */ (function (_super) {
10995 __extends(ViewPort, _super);
10996 function ViewPort(offset, length) {
10997 return _super.call(this, offset, length) || this;
10999 Object.defineProperty(ViewPort.prototype, "type", {
11001 return NodeType.ViewPort;
11007 }(BodyDeclaration));
11009 var FontFace = /** @class */ (function (_super) {
11010 __extends(FontFace, _super);
11011 function FontFace(offset, length) {
11012 return _super.call(this, offset, length) || this;
11014 Object.defineProperty(FontFace.prototype, "type", {
11016 return NodeType.FontFace;
11022 }(BodyDeclaration));
11024 var NestedProperties = /** @class */ (function (_super) {
11025 __extends(NestedProperties, _super);
11026 function NestedProperties(offset, length) {
11027 return _super.call(this, offset, length) || this;
11029 Object.defineProperty(NestedProperties.prototype, "type", {
11031 return NodeType.NestedProperties;
11036 return NestedProperties;
11037 }(BodyDeclaration));
11039 var Keyframe = /** @class */ (function (_super) {
11040 __extends(Keyframe, _super);
11041 function Keyframe(offset, length) {
11042 return _super.call(this, offset, length) || this;
11044 Object.defineProperty(Keyframe.prototype, "type", {
11046 return NodeType.Keyframe;
11051 Keyframe.prototype.setKeyword = function (keyword) {
11052 return this.setNode('keyword', keyword, 0);
11054 Keyframe.prototype.getKeyword = function () {
11055 return this.keyword;
11057 Keyframe.prototype.setIdentifier = function (node) {
11058 return this.setNode('identifier', node, 0);
11060 Keyframe.prototype.getIdentifier = function () {
11061 return this.identifier;
11063 Keyframe.prototype.getName = function () {
11064 return this.identifier ? this.identifier.getText() : '';
11067 }(BodyDeclaration));
11069 var KeyframeSelector = /** @class */ (function (_super) {
11070 __extends(KeyframeSelector, _super);
11071 function KeyframeSelector(offset, length) {
11072 return _super.call(this, offset, length) || this;
11074 Object.defineProperty(KeyframeSelector.prototype, "type", {
11076 return NodeType.KeyframeSelector;
11081 return KeyframeSelector;
11082 }(BodyDeclaration));
11084 var Import = /** @class */ (function (_super) {
11085 __extends(Import, _super);
11086 function Import(offset, length) {
11087 return _super.call(this, offset, length) || this;
11089 Object.defineProperty(Import.prototype, "type", {
11091 return NodeType.Import;
11096 Import.prototype.setMedialist = function (node) {
11098 node.attachTo(this);
11106 var Use = /** @class */ (function (_super) {
11107 __extends(Use, _super);
11109 return _super !== null && _super.apply(this, arguments) || this;
11111 Object.defineProperty(Use.prototype, "type", {
11113 return NodeType.Use;
11118 Use.prototype.getParameters = function () {
11119 if (!this.parameters) {
11120 this.parameters = new Nodelist(this);
11122 return this.parameters;
11124 Use.prototype.setIdentifier = function (node) {
11125 return this.setNode('identifier', node, 0);
11127 Use.prototype.getIdentifier = function () {
11128 return this.identifier;
11133 var ModuleConfiguration = /** @class */ (function (_super) {
11134 __extends(ModuleConfiguration, _super);
11135 function ModuleConfiguration() {
11136 return _super !== null && _super.apply(this, arguments) || this;
11138 Object.defineProperty(ModuleConfiguration.prototype, "type", {
11140 return NodeType.ModuleConfiguration;
11145 ModuleConfiguration.prototype.setIdentifier = function (node) {
11146 return this.setNode('identifier', node, 0);
11148 ModuleConfiguration.prototype.getIdentifier = function () {
11149 return this.identifier;
11151 ModuleConfiguration.prototype.getName = function () {
11152 return this.identifier ? this.identifier.getText() : '';
11154 ModuleConfiguration.prototype.setValue = function (node) {
11155 return this.setNode('value', node, 0);
11157 ModuleConfiguration.prototype.getValue = function () {
11160 return ModuleConfiguration;
11163 var Forward = /** @class */ (function (_super) {
11164 __extends(Forward, _super);
11165 function Forward() {
11166 return _super !== null && _super.apply(this, arguments) || this;
11168 Object.defineProperty(Forward.prototype, "type", {
11170 return NodeType.Forward;
11175 Forward.prototype.setIdentifier = function (node) {
11176 return this.setNode('identifier', node, 0);
11178 Forward.prototype.getIdentifier = function () {
11179 return this.identifier;
11184 var ForwardVisibility = /** @class */ (function (_super) {
11185 __extends(ForwardVisibility, _super);
11186 function ForwardVisibility() {
11187 return _super !== null && _super.apply(this, arguments) || this;
11189 Object.defineProperty(ForwardVisibility.prototype, "type", {
11191 return NodeType.ForwardVisibility;
11196 ForwardVisibility.prototype.setIdentifier = function (node) {
11197 return this.setNode('identifier', node, 0);
11199 ForwardVisibility.prototype.getIdentifier = function () {
11200 return this.identifier;
11202 return ForwardVisibility;
11205 var Namespace = /** @class */ (function (_super) {
11206 __extends(Namespace, _super);
11207 function Namespace(offset, length) {
11208 return _super.call(this, offset, length) || this;
11210 Object.defineProperty(Namespace.prototype, "type", {
11212 return NodeType.Namespace;
11220 var Media = /** @class */ (function (_super) {
11221 __extends(Media, _super);
11222 function Media(offset, length) {
11223 return _super.call(this, offset, length) || this;
11225 Object.defineProperty(Media.prototype, "type", {
11227 return NodeType.Media;
11233 }(BodyDeclaration));
11235 var Supports = /** @class */ (function (_super) {
11236 __extends(Supports, _super);
11237 function Supports(offset, length) {
11238 return _super.call(this, offset, length) || this;
11240 Object.defineProperty(Supports.prototype, "type", {
11242 return NodeType.Supports;
11248 }(BodyDeclaration));
11250 var Document = /** @class */ (function (_super) {
11251 __extends(Document, _super);
11252 function Document(offset, length) {
11253 return _super.call(this, offset, length) || this;
11255 Object.defineProperty(Document.prototype, "type", {
11257 return NodeType.Document;
11263 }(BodyDeclaration));
11265 var Medialist = /** @class */ (function (_super) {
11266 __extends(Medialist, _super);
11267 function Medialist(offset, length) {
11268 return _super.call(this, offset, length) || this;
11270 Medialist.prototype.getMediums = function () {
11271 if (!this.mediums) {
11272 this.mediums = new Nodelist(this);
11274 return this.mediums;
11279 var MediaQuery = /** @class */ (function (_super) {
11280 __extends(MediaQuery, _super);
11281 function MediaQuery(offset, length) {
11282 return _super.call(this, offset, length) || this;
11284 Object.defineProperty(MediaQuery.prototype, "type", {
11286 return NodeType.MediaQuery;
11294 var SupportsCondition = /** @class */ (function (_super) {
11295 __extends(SupportsCondition, _super);
11296 function SupportsCondition(offset, length) {
11297 return _super.call(this, offset, length) || this;
11299 Object.defineProperty(SupportsCondition.prototype, "type", {
11301 return NodeType.SupportsCondition;
11306 return SupportsCondition;
11309 var Page = /** @class */ (function (_super) {
11310 __extends(Page, _super);
11311 function Page(offset, length) {
11312 return _super.call(this, offset, length) || this;
11314 Object.defineProperty(Page.prototype, "type", {
11316 return NodeType.Page;
11322 }(BodyDeclaration));
11324 var PageBoxMarginBox = /** @class */ (function (_super) {
11325 __extends(PageBoxMarginBox, _super);
11326 function PageBoxMarginBox(offset, length) {
11327 return _super.call(this, offset, length) || this;
11329 Object.defineProperty(PageBoxMarginBox.prototype, "type", {
11331 return NodeType.PageBoxMarginBox;
11336 return PageBoxMarginBox;
11337 }(BodyDeclaration));
11339 var Expression = /** @class */ (function (_super) {
11340 __extends(Expression, _super);
11341 function Expression(offset, length) {
11342 return _super.call(this, offset, length) || this;
11344 Object.defineProperty(Expression.prototype, "type", {
11346 return NodeType.Expression;
11354 var BinaryExpression = /** @class */ (function (_super) {
11355 __extends(BinaryExpression, _super);
11356 function BinaryExpression(offset, length) {
11357 return _super.call(this, offset, length) || this;
11359 Object.defineProperty(BinaryExpression.prototype, "type", {
11361 return NodeType.BinaryExpression;
11366 BinaryExpression.prototype.setLeft = function (left) {
11367 return this.setNode('left', left);
11369 BinaryExpression.prototype.getLeft = function () {
11372 BinaryExpression.prototype.setRight = function (right) {
11373 return this.setNode('right', right);
11375 BinaryExpression.prototype.getRight = function () {
11378 BinaryExpression.prototype.setOperator = function (value) {
11379 return this.setNode('operator', value);
11381 BinaryExpression.prototype.getOperator = function () {
11382 return this.operator;
11384 return BinaryExpression;
11387 var Term = /** @class */ (function (_super) {
11388 __extends(Term, _super);
11389 function Term(offset, length) {
11390 return _super.call(this, offset, length) || this;
11392 Object.defineProperty(Term.prototype, "type", {
11394 return NodeType.Term;
11399 Term.prototype.setOperator = function (value) {
11400 return this.setNode('operator', value);
11402 Term.prototype.getOperator = function () {
11403 return this.operator;
11405 Term.prototype.setExpression = function (value) {
11406 return this.setNode('expression', value);
11408 Term.prototype.getExpression = function () {
11409 return this.expression;
11414 var AttributeSelector = /** @class */ (function (_super) {
11415 __extends(AttributeSelector, _super);
11416 function AttributeSelector(offset, length) {
11417 return _super.call(this, offset, length) || this;
11419 Object.defineProperty(AttributeSelector.prototype, "type", {
11421 return NodeType.AttributeSelector;
11426 AttributeSelector.prototype.setNamespacePrefix = function (value) {
11427 return this.setNode('namespacePrefix', value);
11429 AttributeSelector.prototype.getNamespacePrefix = function () {
11430 return this.namespacePrefix;
11432 AttributeSelector.prototype.setIdentifier = function (value) {
11433 return this.setNode('identifier', value);
11435 AttributeSelector.prototype.getIdentifier = function () {
11436 return this.identifier;
11438 AttributeSelector.prototype.setOperator = function (operator) {
11439 return this.setNode('operator', operator);
11441 AttributeSelector.prototype.getOperator = function () {
11442 return this.operator;
11444 AttributeSelector.prototype.setValue = function (value) {
11445 return this.setNode('value', value);
11447 AttributeSelector.prototype.getValue = function () {
11450 return AttributeSelector;
11453 var Operator = /** @class */ (function (_super) {
11454 __extends(Operator, _super);
11455 function Operator(offset, length) {
11456 return _super.call(this, offset, length) || this;
11458 Object.defineProperty(Operator.prototype, "type", {
11460 return NodeType.Operator;
11468 var HexColorValue = /** @class */ (function (_super) {
11469 __extends(HexColorValue, _super);
11470 function HexColorValue(offset, length) {
11471 return _super.call(this, offset, length) || this;
11473 Object.defineProperty(HexColorValue.prototype, "type", {
11475 return NodeType.HexColorValue;
11480 return HexColorValue;
11483 var _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
11484 var NumericValue = /** @class */ (function (_super) {
11485 __extends(NumericValue, _super);
11486 function NumericValue(offset, length) {
11487 return _super.call(this, offset, length) || this;
11489 Object.defineProperty(NumericValue.prototype, "type", {
11491 return NodeType.NumericValue;
11496 NumericValue.prototype.getValue = function () {
11497 var raw = this.getText();
11500 for (var i = 0, len = raw.length; i < len; i++) {
11501 code = raw.charCodeAt(i);
11502 if (!(_0 <= code && code <= _9 || code === _dot)) {
11508 value: raw.substring(0, unitIdx),
11509 unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
11512 return NumericValue;
11515 var VariableDeclaration = /** @class */ (function (_super) {
11516 __extends(VariableDeclaration, _super);
11517 function VariableDeclaration(offset, length) {
11518 var _this = _super.call(this, offset, length) || this;
11519 _this.variable = null;
11520 _this.value = null;
11521 _this.needsSemicolon = true;
11524 Object.defineProperty(VariableDeclaration.prototype, "type", {
11526 return NodeType.VariableDeclaration;
11531 VariableDeclaration.prototype.setVariable = function (node) {
11533 node.attachTo(this);
11534 this.variable = node;
11539 VariableDeclaration.prototype.getVariable = function () {
11540 return this.variable;
11542 VariableDeclaration.prototype.getName = function () {
11543 return this.variable ? this.variable.getName() : '';
11545 VariableDeclaration.prototype.setValue = function (node) {
11547 node.attachTo(this);
11553 VariableDeclaration.prototype.getValue = function () {
11556 return VariableDeclaration;
11557 }(AbstractDeclaration));
11559 var Interpolation = /** @class */ (function (_super) {
11560 __extends(Interpolation, _super);
11561 // private _interpolations: void; // workaround for https://github.com/Microsoft/TypeScript/issues/18276
11562 function Interpolation(offset, length) {
11563 return _super.call(this, offset, length) || this;
11565 Object.defineProperty(Interpolation.prototype, "type", {
11567 return NodeType.Interpolation;
11572 return Interpolation;
11575 var Variable = /** @class */ (function (_super) {
11576 __extends(Variable, _super);
11577 function Variable(offset, length) {
11578 return _super.call(this, offset, length) || this;
11580 Object.defineProperty(Variable.prototype, "type", {
11582 return NodeType.VariableName;
11587 Variable.prototype.getName = function () {
11588 return this.getText();
11593 var ExtendsReference = /** @class */ (function (_super) {
11594 __extends(ExtendsReference, _super);
11595 function ExtendsReference(offset, length) {
11596 return _super.call(this, offset, length) || this;
11598 Object.defineProperty(ExtendsReference.prototype, "type", {
11600 return NodeType.ExtendsReference;
11605 ExtendsReference.prototype.getSelectors = function () {
11606 if (!this.selectors) {
11607 this.selectors = new Nodelist(this);
11609 return this.selectors;
11611 return ExtendsReference;
11614 var MixinReference = /** @class */ (function (_super) {
11615 __extends(MixinReference, _super);
11616 function MixinReference(offset, length) {
11617 return _super.call(this, offset, length) || this;
11619 Object.defineProperty(MixinReference.prototype, "type", {
11621 return NodeType.MixinReference;
11626 MixinReference.prototype.getNamespaces = function () {
11627 if (!this.namespaces) {
11628 this.namespaces = new Nodelist(this);
11630 return this.namespaces;
11632 MixinReference.prototype.setIdentifier = function (node) {
11633 return this.setNode('identifier', node, 0);
11635 MixinReference.prototype.getIdentifier = function () {
11636 return this.identifier;
11638 MixinReference.prototype.getName = function () {
11639 return this.identifier ? this.identifier.getText() : '';
11641 MixinReference.prototype.getArguments = function () {
11642 if (!this.arguments) {
11643 this.arguments = new Nodelist(this);
11645 return this.arguments;
11647 MixinReference.prototype.setContent = function (node) {
11648 return this.setNode('content', node);
11650 MixinReference.prototype.getContent = function () {
11651 return this.content;
11653 return MixinReference;
11656 var MixinDeclaration = /** @class */ (function (_super) {
11657 __extends(MixinDeclaration, _super);
11658 function MixinDeclaration(offset, length) {
11659 return _super.call(this, offset, length) || this;
11661 Object.defineProperty(MixinDeclaration.prototype, "type", {
11663 return NodeType.MixinDeclaration;
11668 MixinDeclaration.prototype.setIdentifier = function (node) {
11669 return this.setNode('identifier', node, 0);
11671 MixinDeclaration.prototype.getIdentifier = function () {
11672 return this.identifier;
11674 MixinDeclaration.prototype.getName = function () {
11675 return this.identifier ? this.identifier.getText() : '';
11677 MixinDeclaration.prototype.getParameters = function () {
11678 if (!this.parameters) {
11679 this.parameters = new Nodelist(this);
11681 return this.parameters;
11683 MixinDeclaration.prototype.setGuard = function (node) {
11685 node.attachTo(this);
11690 return MixinDeclaration;
11691 }(BodyDeclaration));
11693 var UnknownAtRule = /** @class */ (function (_super) {
11694 __extends(UnknownAtRule, _super);
11695 function UnknownAtRule(offset, length) {
11696 return _super.call(this, offset, length) || this;
11698 Object.defineProperty(UnknownAtRule.prototype, "type", {
11700 return NodeType.UnknownAtRule;
11705 UnknownAtRule.prototype.setAtRuleName = function (atRuleName) {
11706 this.atRuleName = atRuleName;
11708 UnknownAtRule.prototype.getAtRuleName = function () {
11709 return this.atRuleName;
11711 return UnknownAtRule;
11712 }(BodyDeclaration));
11714 var ListEntry = /** @class */ (function (_super) {
11715 __extends(ListEntry, _super);
11716 function ListEntry() {
11717 return _super !== null && _super.apply(this, arguments) || this;
11719 Object.defineProperty(ListEntry.prototype, "type", {
11721 return NodeType.ListEntry;
11726 ListEntry.prototype.setKey = function (node) {
11727 return this.setNode('key', node, 0);
11729 ListEntry.prototype.setValue = function (node) {
11730 return this.setNode('value', node, 1);
11735 var LessGuard = /** @class */ (function (_super) {
11736 __extends(LessGuard, _super);
11737 function LessGuard() {
11738 return _super !== null && _super.apply(this, arguments) || this;
11740 LessGuard.prototype.getConditions = function () {
11741 if (!this.conditions) {
11742 this.conditions = new Nodelist(this);
11744 return this.conditions;
11749 var GuardCondition = /** @class */ (function (_super) {
11750 __extends(GuardCondition, _super);
11751 function GuardCondition() {
11752 return _super !== null && _super.apply(this, arguments) || this;
11754 GuardCondition.prototype.setVariable = function (node) {
11755 return this.setNode('variable', node);
11757 return GuardCondition;
11760 var Module = /** @class */ (function (_super) {
11761 __extends(Module, _super);
11762 function Module() {
11763 return _super !== null && _super.apply(this, arguments) || this;
11765 Object.defineProperty(Module.prototype, "type", {
11767 return NodeType.Module;
11772 Module.prototype.setIdentifier = function (node) {
11773 return this.setNode('identifier', node, 0);
11775 Module.prototype.getIdentifier = function () {
11776 return this.identifier;
11782 (function (Level) {
11783 Level[Level["Ignore"] = 1] = "Ignore";
11784 Level[Level["Warning"] = 2] = "Warning";
11785 Level[Level["Error"] = 4] = "Error";
11786 })(Level || (Level = {}));
11787 var Marker = /** @class */ (function () {
11788 function Marker(node, rule, level, message, offset, length) {
11789 if (offset === void 0) { offset = node.offset; }
11790 if (length === void 0) { length = node.length; }
11793 this.level = level;
11794 this.message = message || rule.message;
11795 this.offset = offset;
11796 this.length = length;
11798 Marker.prototype.getRule = function () {
11801 Marker.prototype.getLevel = function () {
11804 Marker.prototype.getOffset = function () {
11805 return this.offset;
11807 Marker.prototype.getLength = function () {
11808 return this.length;
11810 Marker.prototype.getNode = function () {
11813 Marker.prototype.getMessage = function () {
11814 return this.message;
11820 export class DefaultVisitor implements IVisitor {
11822 public visitNode(node:Node):boolean {
11823 switch (node.type) {
11824 case NodeType.Stylesheet:
11825 return this.visitStylesheet(<Stylesheet> node);
11826 case NodeType.FontFace:
11827 return this.visitFontFace(<FontFace> node);
11828 case NodeType.Ruleset:
11829 return this.visitRuleSet(<RuleSet> node);
11830 case NodeType.Selector:
11831 return this.visitSelector(<Selector> node);
11832 case NodeType.SimpleSelector:
11833 return this.visitSimpleSelector(<SimpleSelector> node);
11834 case NodeType.Declaration:
11835 return this.visitDeclaration(<Declaration> node);
11836 case NodeType.Function:
11837 return this.visitFunction(<Function> node);
11838 case NodeType.FunctionDeclaration:
11839 return this.visitFunctionDeclaration(<FunctionDeclaration> node);
11840 case NodeType.FunctionParameter:
11841 return this.visitFunctionParameter(<FunctionParameter> node);
11842 case NodeType.FunctionArgument:
11843 return this.visitFunctionArgument(<FunctionArgument> node);
11844 case NodeType.Term:
11845 return this.visitTerm(<Term> node);
11846 case NodeType.Declaration:
11847 return this.visitExpression(<Expression> node);
11848 case NodeType.NumericValue:
11849 return this.visitNumericValue(<NumericValue> node);
11850 case NodeType.Page:
11851 return this.visitPage(<Page> node);
11852 case NodeType.PageBoxMarginBox:
11853 return this.visitPageBoxMarginBox(<PageBoxMarginBox> node);
11854 case NodeType.Property:
11855 return this.visitProperty(<Property> node);
11856 case NodeType.NumericValue:
11857 return this.visitNodelist(<Nodelist> node);
11858 case NodeType.Import:
11859 return this.visitImport(<Import> node);
11860 case NodeType.Namespace:
11861 return this.visitNamespace(<Namespace> node);
11862 case NodeType.Keyframe:
11863 return this.visitKeyframe(<Keyframe> node);
11864 case NodeType.KeyframeSelector:
11865 return this.visitKeyframeSelector(<KeyframeSelector> node);
11866 case NodeType.MixinDeclaration:
11867 return this.visitMixinDeclaration(<MixinDeclaration> node);
11868 case NodeType.MixinReference:
11869 return this.visitMixinReference(<MixinReference> node);
11870 case NodeType.Variable:
11871 return this.visitVariable(<Variable> node);
11872 case NodeType.VariableDeclaration:
11873 return this.visitVariableDeclaration(<VariableDeclaration> node);
11875 return this.visitUnknownNode(node);
11878 public visitFontFace(node:FontFace):boolean {
11882 public visitKeyframe(node:Keyframe):boolean {
11886 public visitKeyframeSelector(node:KeyframeSelector):boolean {
11890 public visitStylesheet(node:Stylesheet):boolean {
11894 public visitProperty(Node:Property):boolean {
11898 public visitRuleSet(node:RuleSet):boolean {
11902 public visitSelector(node:Selector):boolean {
11906 public visitSimpleSelector(node:SimpleSelector):boolean {
11910 public visitDeclaration(node:Declaration):boolean {
11914 public visitFunction(node:Function):boolean {
11918 public visitFunctionDeclaration(node:FunctionDeclaration):boolean {
11922 public visitInvocation(node:Invocation):boolean {
11926 public visitTerm(node:Term):boolean {
11930 public visitImport(node:Import):boolean {
11934 public visitNamespace(node:Namespace):boolean {
11938 public visitExpression(node:Expression):boolean {
11942 public visitNumericValue(node:NumericValue):boolean {
11946 public visitPage(node:Page):boolean {
11950 public visitPageBoxMarginBox(node:PageBoxMarginBox):boolean {
11954 public visitNodelist(node:Nodelist):boolean {
11958 public visitVariableDeclaration(node:VariableDeclaration):boolean {
11962 public visitVariable(node:Variable):boolean {
11966 public visitMixinDeclaration(node:MixinDeclaration):boolean {
11970 public visitMixinReference(node:MixinReference):boolean {
11974 public visitUnknownNode(node:Node):boolean {
11979 var ParseErrorCollector = /** @class */ (function () {
11980 function ParseErrorCollector() {
11983 ParseErrorCollector.entries = function (node) {
11984 var visitor = new ParseErrorCollector();
11985 node.acceptVisitor(visitor);
11986 return visitor.entries;
11988 ParseErrorCollector.prototype.visitNode = function (node) {
11989 if (node.isErroneous()) {
11990 node.collectIssues(this.entries);
11994 return ParseErrorCollector;
12001 /***/ (function(module, __webpack_exports__, __webpack_require__) {
12004 __webpack_require__.r(__webpack_exports__);
12005 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSIssueType", function() { return CSSIssueType; });
12006 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseError", function() { return ParseError; });
12007 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
12008 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
12009 /*---------------------------------------------------------------------------------------------
12010 * Copyright (c) Microsoft Corporation. All rights reserved.
12011 * Licensed under the MIT License. See License.txt in the project root for license information.
12012 *--------------------------------------------------------------------------------------------*/
12015 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
12016 var CSSIssueType = /** @class */ (function () {
12017 function CSSIssueType(id, message) {
12019 this.message = message;
12021 return CSSIssueType;
12025 NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
12026 ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
12027 RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
12028 DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
12029 ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
12030 SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
12031 TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
12032 ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
12033 OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
12034 IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
12035 PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
12036 URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
12037 URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
12038 VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
12039 VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
12040 PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
12041 LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
12042 RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
12043 LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
12044 RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
12045 LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
12046 RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
12047 CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
12048 PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
12049 UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
12050 UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
12051 SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
12052 StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
12053 WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
12054 MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
12055 IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
12056 WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
12057 IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
12063 /***/ (function(module, exports, __webpack_require__) {
12066 /* --------------------------------------------------------------------------------------------
\r
12067 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
12068 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
12069 * ------------------------------------------------------------------------------------------ */
\r
12071 Object.defineProperty(exports, "__esModule", { value: true });
\r
12072 var path = __webpack_require__(3);
\r
12073 var fs = __webpack_require__(67);
\r
12074 var toString = Object.prototype.toString;
\r
12075 function isDefined(value) {
\r
12076 return typeof value !== 'undefined';
\r
12078 function isNumber(value) {
\r
12079 return toString.call(value) === '[object Number]';
\r
12081 function isString(value) {
\r
12082 return toString.call(value) === '[object String]';
\r
12084 function isBoolean(value) {
\r
12085 return value === true || value === false;
\r
12087 function readJsonFileSync(filename) {
\r
12088 return JSON.parse(fs.readFileSync(filename, 'utf8'));
\r
12090 var MessageFormat;
\r
12091 (function (MessageFormat) {
\r
12092 MessageFormat["file"] = "file";
\r
12093 MessageFormat["bundle"] = "bundle";
\r
12094 MessageFormat["both"] = "both";
\r
12095 })(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));
\r
12096 var BundleFormat;
\r
12097 (function (BundleFormat) {
\r
12098 // the nls.bundle format
\r
12099 BundleFormat["standalone"] = "standalone";
\r
12100 BundleFormat["languagePack"] = "languagePack";
\r
12101 })(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));
\r
12102 var LocalizeInfo;
\r
12103 (function (LocalizeInfo) {
\r
12104 function is(value) {
\r
12105 var candidate = value;
\r
12106 return candidate && isDefined(candidate.key) && isDefined(candidate.comment);
\r
12108 LocalizeInfo.is = is;
\r
12109 })(LocalizeInfo || (LocalizeInfo = {}));
\r
12110 var resolvedLanguage;
\r
12111 var resolvedBundles;
\r
12114 function initializeSettings() {
\r
12115 options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle };
\r
12116 if (isString(process.env.VSCODE_NLS_CONFIG)) {
\r
12118 var vscodeOptions = JSON.parse(process.env.VSCODE_NLS_CONFIG);
\r
12119 var language = void 0;
\r
12120 var locale = void 0;
\r
12121 if (vscodeOptions.availableLanguages) {
\r
12122 var value = vscodeOptions.availableLanguages['*'];
\r
12123 if (isString(value)) {
\r
12124 language = value;
\r
12127 if (isString(vscodeOptions.locale)) {
\r
12128 options.locale = vscodeOptions.locale.toLowerCase();
\r
12130 if (language === undefined) {
\r
12131 options.language = options.locale;
\r
12133 else if (language !== 'en') {
\r
12134 options.language = language;
\r
12136 if (isBoolean(vscodeOptions._languagePackSupport)) {
\r
12137 options.languagePackSupport = vscodeOptions._languagePackSupport;
\r
12139 if (isString(vscodeOptions._cacheRoot)) {
\r
12140 options.cacheRoot = vscodeOptions._cacheRoot;
\r
12142 if (isString(vscodeOptions._languagePackId)) {
\r
12143 options.languagePackId = vscodeOptions._languagePackId;
\r
12145 if (isString(vscodeOptions._translationsConfigFile)) {
\r
12146 options.translationsConfigFile = vscodeOptions._translationsConfigFile;
\r
12148 options.translationsConfig = readJsonFileSync(options.translationsConfigFile);
\r
12151 // We can't read the translation config file. Mark the cache as corrupted.
\r
12152 if (vscodeOptions._corruptedFile) {
\r
12153 fs.writeFile(vscodeOptions._corruptedFile, 'corrupted', 'utf8', function (err) {
\r
12154 console.error(err);
\r
12164 isPseudo = options.locale === 'pseudo';
\r
12165 resolvedLanguage = undefined;
\r
12166 resolvedBundles = Object.create(null);
\r
12168 initializeSettings();
\r
12169 function supportsLanguagePack() {
\r
12170 return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined
\r
12171 && options.translationsConfig !== undefined;
\r
12173 function format(message, args) {
\r
12176 // FF3B and FF3D is the Unicode zenkaku representation for [ and ]
\r
12177 message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
\r
12179 if (args.length === 0) {
\r
12180 result = message;
\r
12183 result = message.replace(/\{(\d+)\}/g, function (match, rest) {
\r
12184 var index = rest[0];
\r
12185 var arg = args[index];
\r
12186 var replacement = match;
\r
12187 if (typeof arg === 'string') {
\r
12188 replacement = arg;
\r
12190 else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {
\r
12191 replacement = String(arg);
\r
12193 return replacement;
\r
12198 function createScopedLocalizeFunction(messages) {
\r
12199 return function (key, message) {
\r
12201 for (var _i = 2; _i < arguments.length; _i++) {
\r
12202 args[_i - 2] = arguments[_i];
\r
12204 if (isNumber(key)) {
\r
12205 if (key >= messages.length) {
\r
12206 console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);
\r
12209 return format(messages[key], args);
\r
12212 if (isString(message)) {
\r
12213 console.warn("Message " + message + " didn't get externalized correctly.");
\r
12214 return format(message, args);
\r
12217 console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);
\r
12222 function localize(key, message) {
\r
12224 for (var _i = 2; _i < arguments.length; _i++) {
\r
12225 args[_i - 2] = arguments[_i];
\r
12227 return format(message, args);
\r
12229 function resolveLanguage(file) {
\r
12230 var resolvedLanguage;
\r
12231 if (options.cacheLanguageResolution && resolvedLanguage) {
\r
12232 resolvedLanguage = resolvedLanguage;
\r
12235 if (isPseudo || !options.language) {
\r
12236 resolvedLanguage = '.nls.json';
\r
12239 var locale = options.language;
\r
12241 var candidate = '.nls.' + locale + '.json';
\r
12242 if (fs.existsSync(file + candidate)) {
\r
12243 resolvedLanguage = candidate;
\r
12247 var index = locale.lastIndexOf('-');
\r
12249 locale = locale.substring(0, index);
\r
12252 resolvedLanguage = '.nls.json';
\r
12258 if (options.cacheLanguageResolution) {
\r
12259 resolvedLanguage = resolvedLanguage;
\r
12262 return file + resolvedLanguage;
\r
12264 function findInTheBoxBundle(root) {
\r
12265 var language = options.language;
\r
12266 while (language) {
\r
12267 var candidate = path.join(root, "nls.bundle." + language + ".json");
\r
12268 if (fs.existsSync(candidate)) {
\r
12269 return candidate;
\r
12272 var index = language.lastIndexOf('-');
\r
12274 language = language.substring(0, index);
\r
12277 language = undefined;
\r
12281 // Test if we can reslove the default bundle.
\r
12282 if (language === undefined) {
\r
12283 var candidate = path.join(root, 'nls.bundle.json');
\r
12284 if (fs.existsSync(candidate)) {
\r
12285 return candidate;
\r
12288 return undefined;
\r
12290 function mkdir(directory) {
\r
12292 fs.mkdirSync(directory);
\r
12295 if (err.code === 'EEXIST') {
\r
12298 else if (err.code === 'ENOENT') {
\r
12299 var parent = path.dirname(directory);
\r
12300 if (parent !== directory) {
\r
12302 fs.mkdirSync(directory);
\r
12310 function createDefaultNlsBundle(folder) {
\r
12311 var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));
\r
12312 var result = Object.create(null);
\r
12313 for (var module_1 in metaData) {
\r
12314 var entry = metaData[module_1];
\r
12315 result[module_1] = entry.messages;
\r
12319 function createNLSBundle(header, metaDataPath) {
\r
12320 var languagePackLocation = options.translationsConfig[header.id];
\r
12321 if (!languagePackLocation) {
\r
12322 return undefined;
\r
12324 var languagePack = readJsonFileSync(languagePackLocation).contents;
\r
12325 var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));
\r
12326 var result = Object.create(null);
\r
12327 for (var module_2 in metaData) {
\r
12328 var entry = metaData[module_2];
\r
12329 var translations = languagePack[header.outDir + "/" + module_2];
\r
12330 if (translations) {
\r
12331 var resultMessages = [];
\r
12332 for (var i = 0; i < entry.keys.length; i++) {
\r
12333 var messageKey = entry.keys[i];
\r
12334 var key = isString(messageKey) ? messageKey : messageKey.key;
\r
12335 var translatedMessage = translations[key];
\r
12336 if (translatedMessage === undefined) {
\r
12337 translatedMessage = entry.messages[i];
\r
12339 resultMessages.push(translatedMessage);
\r
12341 result[module_2] = resultMessages;
\r
12344 result[module_2] = entry.messages;
\r
12349 function touch(file) {
\r
12350 var d = new Date();
\r
12351 fs.utimes(file, d, d, function () {
\r
12352 // Do nothing. Ignore
\r
12355 function cacheBundle(key, bundle) {
\r
12356 resolvedBundles[key] = bundle;
\r
12359 function loadNlsBundleOrCreateFromI18n(header, bundlePath) {
\r
12361 var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");
\r
12362 var useMemoryOnly = false;
\r
12363 var writeBundle = false;
\r
12365 result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));
\r
12370 if (err.code === 'ENOENT') {
\r
12371 writeBundle = true;
\r
12373 else if (err instanceof SyntaxError) {
\r
12374 // We have a syntax error. So no valid JSON. Use
\r
12375 console.log("Syntax error parsing message bundle: " + err.message + ".");
\r
12376 fs.unlink(bundle, function (err) {
\r
12378 console.error("Deleting corrupted bundle " + bundle + " failed.");
\r
12381 useMemoryOnly = true;
\r
12387 result = createNLSBundle(header, bundlePath);
\r
12388 if (!result || useMemoryOnly) {
\r
12391 if (writeBundle) {
\r
12393 fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });
\r
12396 if (err.code === 'EEXIST') {
\r
12404 function loadDefaultNlsBundle(bundlePath) {
\r
12406 return createDefaultNlsBundle(bundlePath);
\r
12409 console.log("Generating default bundle from meta data failed.", err);
\r
12410 return undefined;
\r
12413 function loadNlsBundle(header, bundlePath) {
\r
12415 // Core decided to use a language pack. Do the same in the extension
\r
12416 if (supportsLanguagePack()) {
\r
12418 result = loadNlsBundleOrCreateFromI18n(header, bundlePath);
\r
12421 console.log("Load or create bundle failed ", err);
\r
12425 // No language pack found, but core is running in language pack mode
\r
12426 // Don't try to use old in the box bundles since the might be stale
\r
12427 // Fall right back to the default bundle.
\r
12428 if (options.languagePackSupport) {
\r
12429 return loadDefaultNlsBundle(bundlePath);
\r
12431 var candidate = findInTheBoxBundle(bundlePath);
\r
12434 return readJsonFileSync(candidate);
\r
12437 console.log("Loading in the box message bundle failed.", err);
\r
12440 result = loadDefaultNlsBundle(bundlePath);
\r
12444 function tryFindMetaDataHeaderFile(file) {
\r
12446 var dirname = path.dirname(file);
\r
12448 result = path.join(dirname, 'nls.metadata.header.json');
\r
12449 if (fs.existsSync(result)) {
\r
12452 var parent = path.dirname(dirname);
\r
12453 if (parent === dirname) {
\r
12454 result = undefined;
\r
12458 dirname = parent;
\r
12463 function loadMessageBundle(file) {
\r
12465 // No file. We are in dev mode. Return the default
\r
12466 // localize function.
\r
12469 // Remove extension since we load json files.
\r
12470 var ext = path.extname(file);
\r
12472 file = file.substr(0, file.length - ext.length);
\r
12474 if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.bundle) {
\r
12475 var headerFile = tryFindMetaDataHeaderFile(file);
\r
12476 if (headerFile) {
\r
12477 var bundlePath = path.dirname(headerFile);
\r
12478 var bundle = resolvedBundles[bundlePath];
\r
12479 if (bundle === undefined) {
\r
12481 var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));
\r
12483 var nlsBundle = loadNlsBundle(header, bundlePath);
\r
12484 bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);
\r
12487 console.error('Failed to load nls bundle', err);
\r
12488 bundle = cacheBundle(bundlePath, null);
\r
12492 console.error('Failed to read header file', err);
\r
12493 bundle = cacheBundle(bundlePath, null);
\r
12497 var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');
\r
12498 var messages = bundle.nlsBundle[module_3];
\r
12499 if (messages === undefined) {
\r
12500 console.error("Messages for file " + file + " not found. See console for details.");
\r
12501 return function () {
\r
12502 return 'Messages not found.';
\r
12505 return createScopedLocalizeFunction(messages);
\r
12509 if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.file) {
\r
12510 // Try to load a single file bundle
\r
12512 var json = readJsonFileSync(resolveLanguage(file));
\r
12513 if (Array.isArray(json)) {
\r
12514 return createScopedLocalizeFunction(json);
\r
12517 if (isDefined(json.messages) && isDefined(json.keys)) {
\r
12518 return createScopedLocalizeFunction(json.messages);
\r
12521 console.error("String bundle '" + file + "' uses an unsupported format.");
\r
12522 return function () {
\r
12523 return 'File bundle has unsupported format. See console for details';
\r
12529 if (err.code !== 'ENOENT') {
\r
12530 console.error('Failed to load single file bundle', err);
\r
12534 console.error("Failed to load message bundle for file " + file);
\r
12535 return function () {
\r
12536 return 'Failed to load message bundle. See console for details.';
\r
12539 exports.loadMessageBundle = loadMessageBundle;
\r
12540 function config(opts) {
\r
12542 if (isString(opts.locale)) {
\r
12543 options.locale = opts.locale.toLowerCase();
\r
12544 options.language = options.locale;
\r
12545 resolvedLanguage = undefined;
\r
12546 resolvedBundles = Object.create(null);
\r
12548 if (opts.messageFormat !== undefined) {
\r
12549 options.messageFormat = opts.messageFormat;
\r
12551 if (opts.bundleFormat === BundleFormat.standalone && options.languagePackSupport === true) {
\r
12552 options.languagePackSupport = false;
\r
12555 isPseudo = options.locale === 'pseudo';
\r
12556 return loadMessageBundle;
\r
12558 exports.config = config;
\r
12559 //# sourceMappingURL=main.js.map
12563 /***/ (function(module, __webpack_exports__, __webpack_require__) {
12566 __webpack_require__.r(__webpack_exports__);
12567 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssDataManager", function() { return cssDataManager; });
12568 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79);
12569 /* harmony import */ var _dataManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
12570 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82);
12571 /* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83);
12572 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "browserNames", function() { return _entry__WEBPACK_IMPORTED_MODULE_3__["browserNames"]; });
12574 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getEntryDescription", function() { return _entry__WEBPACK_IMPORTED_MODULE_3__["getEntryDescription"]; });
12576 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBrowserLabel", function() { return _entry__WEBPACK_IMPORTED_MODULE_3__["getBrowserLabel"]; });
12578 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84);
12579 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFunctions", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colorFunctions"]; });
12581 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colors"]; });
12583 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorKeywords", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colorKeywords"]; });
12585 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isColorConstructor", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["isColorConstructor"]; });
12587 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isColorValue", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["isColorValue"]; });
12589 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["hexDigit"]; });
12591 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colorFromHex"]; });
12593 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colorFrom256RGB"]; });
12595 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "colorFromHSL", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["colorFromHSL"]; });
12597 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hslFromColor", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["hslFromColor"]; });
12599 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return _colors__WEBPACK_IMPORTED_MODULE_4__["getColorValue"]; });
12601 /* harmony import */ var _builtinData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(85);
12602 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "positionKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["positionKeywords"]; });
12604 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatStyleKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["repeatStyleKeywords"]; });
12606 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineStyleKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["lineStyleKeywords"]; });
12608 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineWidthKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["lineWidthKeywords"]; });
12610 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "boxKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["boxKeywords"]; });
12612 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geometryBoxKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["geometryBoxKeywords"]; });
12614 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cssWideKeywords", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["cssWideKeywords"]; });
12616 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "imageFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["imageFunctions"]; });
12618 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transitionTimingFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["transitionTimingFunctions"]; });
12620 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "basicShapeFunctions", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["basicShapeFunctions"]; });
12622 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "units", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["units"]; });
12624 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html5Tags", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["html5Tags"]; });
12626 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svgElements", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["svgElements"]; });
12628 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pageBoxDirectives", function() { return _builtinData__WEBPACK_IMPORTED_MODULE_5__["pageBoxDirectives"]; });
12630 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSDataProvider", function() { return _dataProvider__WEBPACK_IMPORTED_MODULE_2__["CSSDataProvider"]; });
12632 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSDataManager", function() { return _dataManager__WEBPACK_IMPORTED_MODULE_1__["CSSDataManager"]; });
12634 /*---------------------------------------------------------------------------------------------
12635 * Copyright (c) Microsoft Corporation. All rights reserved.
12636 * Licensed under the MIT License. See License.txt in the project root for license information.
12637 *--------------------------------------------------------------------------------------------*/
12647 var cssDataManager = new _dataManager__WEBPACK_IMPORTED_MODULE_1__["CSSDataManager"]([
12648 new _dataProvider__WEBPACK_IMPORTED_MODULE_2__["CSSDataProvider"](_data_webCustomData__WEBPACK_IMPORTED_MODULE_0__["cssData"])
12654 /***/ (function(module, __webpack_exports__, __webpack_require__) {
12657 __webpack_require__.r(__webpack_exports__);
12658 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssData", function() { return cssData; });
12659 /*---------------------------------------------------------------------------------------------
12660 * Copyright (c) Microsoft Corporation. All rights reserved.
12661 * Licensed under the MIT License. See License.txt in the project root for license information.
12662 *--------------------------------------------------------------------------------------------*/
12663 // file generated from vscode-web-custom-data NPM package
12672 "description": "The width depends on the values of other properties."
12675 "name": "fit-content",
12676 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
12679 "name": "max-content",
12680 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
12683 "name": "min-content",
12684 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
12687 "syntax": "<viewport-length>{1,2}",
12690 "name": "MDN Reference",
12691 "url": "https://developer.mozilla.org/docs/Web/CSS/width"
12694 "description": "Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
12705 "description": "The height depends on the values of other properties."
12708 "name": "fit-content",
12709 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
12712 "name": "max-content",
12713 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
12716 "name": "min-content",
12717 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
12720 "syntax": "<viewport-length>{1,2}",
12723 "name": "MDN Reference",
12724 "url": "https://developer.mozilla.org/docs/Web/CSS/height"
12727 "description": "Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
12738 "description": "The element generates a block-level box"
12741 "name": "contents",
12742 "description": "The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal."
12746 "description": "The element generates a principal flex container box and establishes a flex formatting context."
12750 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
12753 "name": "flow-root",
12754 "description": "The element generates a block container box, and lays out its contents using flow layout."
12758 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
12762 "description": "The element generates an inline-level box."
12765 "name": "inline-block",
12766 "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."
12769 "name": "inline-flex",
12770 "description": "Inline-level flex container."
12773 "name": "inline-flexbox",
12774 "description": "Inline-level flex container. Standardized as 'inline-flex'"
12777 "name": "inline-table",
12778 "description": "Inline-level table wrapper box containing table box."
12781 "name": "list-item",
12782 "description": "One or more block boxes and one marker box."
12785 "name": "-moz-box",
12786 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
12789 "name": "-moz-deck"
12792 "name": "-moz-grid"
12795 "name": "-moz-grid-group"
12798 "name": "-moz-grid-line"
12801 "name": "-moz-groupbox"
12804 "name": "-moz-inline-box",
12805 "description": "Inline-level flex container. Standardized as 'inline-flex'"
12808 "name": "-moz-inline-grid"
12811 "name": "-moz-inline-stack"
12814 "name": "-moz-marker"
12817 "name": "-moz-popup"
12820 "name": "-moz-stack"
12823 "name": "-ms-flexbox",
12824 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
12827 "name": "-ms-grid",
12828 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
12831 "name": "-ms-inline-flexbox",
12832 "description": "Inline-level flex container. Standardized as 'inline-flex'"
12835 "name": "-ms-inline-grid",
12836 "description": "Inline-level grid container."
12840 "description": "The element and its descendants generates no boxes."
12844 "description": "The element generates a principal ruby container box, and establishes a ruby formatting context."
12847 "name": "ruby-base"
12850 "name": "ruby-base-container"
12853 "name": "ruby-text"
12856 "name": "ruby-text-container"
12860 "description": "The element generates a run-in box. Run-in elements act like inlines or blocks, depending on the surrounding elements."
12864 "description": "The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context."
12867 "name": "table-caption"
12870 "name": "table-cell"
12873 "name": "table-column"
12876 "name": "table-column-group"
12879 "name": "table-footer-group"
12882 "name": "table-header-group"
12885 "name": "table-row"
12888 "name": "table-row-group"
12891 "name": "-webkit-box",
12892 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
12895 "name": "-webkit-flex",
12896 "description": "The element lays out its contents using flow layout (block-and-inline layout)."
12899 "name": "-webkit-inline-box",
12900 "description": "Inline-level flex container. Standardized as 'inline-flex'"
12903 "name": "-webkit-inline-flex",
12904 "description": "Inline-level flex container."
12907 "syntax": "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
12910 "name": "MDN Reference",
12911 "url": "https://developer.mozilla.org/docs/Web/CSS/display"
12914 "description": "In combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",
12922 "syntax": "[ <length> | <percentage> ]{1,4}",
12925 "name": "MDN Reference",
12926 "url": "https://developer.mozilla.org/docs/Web/CSS/padding"
12929 "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.",
12936 "name": "position",
12939 "name": "absolute",
12940 "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'."
12944 "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."
12947 "name": "-ms-page",
12948 "description": "The box's position is calculated according to the 'absolute' model."
12951 "name": "relative",
12952 "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."
12956 "description": "The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."
12960 "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."
12963 "name": "-webkit-sticky",
12964 "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."
12967 "syntax": "static | relative | absolute | sticky | fixed",
12970 "name": "MDN Reference",
12971 "url": "https://developer.mozilla.org/docs/Web/CSS/position"
12980 "syntax": "<line-width> || <line-style> || <color>",
12983 "name": "MDN Reference",
12984 "url": "https://developer.mozilla.org/docs/Web/CSS/border"
12987 "description": "Shorthand property for setting border width, style, and color.",
13002 "syntax": "[ <length> | <percentage> | auto ]{1,4}",
13005 "name": "MDN Reference",
13006 "url": "https://developer.mozilla.org/docs/Web/CSS/margin"
13009 "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.",
13020 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
13023 "syntax": "<length> | <percentage> | auto",
13026 "name": "MDN Reference",
13027 "url": "https://developer.mozilla.org/docs/Web/CSS/top"
13030 "description": "Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",
13041 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
13044 "syntax": "<length> | <percentage> | auto",
13047 "name": "MDN Reference",
13048 "url": "https://developer.mozilla.org/docs/Web/CSS/left"
13051 "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'.",
13058 "name": "margin-top",
13064 "syntax": "<length> | <percentage> | auto",
13067 "name": "MDN Reference",
13068 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
13071 "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..",
13079 "syntax": "<color>",
13082 "name": "MDN Reference",
13083 "url": "https://developer.mozilla.org/docs/Web/CSS/color"
13086 "description": "Color of an element's text",
13092 "name": "font-size",
13122 "syntax": "<absolute-size> | <relative-size> | <length-percentage>",
13125 "name": "MDN Reference",
13126 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size"
13129 "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.",
13136 "name": "background-color",
13137 "syntax": "<color>",
13140 "name": "MDN Reference",
13141 "url": "https://developer.mozilla.org/docs/Web/CSS/background-color"
13144 "description": "Sets the background color of an element.",
13150 "name": "text-align",
13154 "description": "The inline contents are centered within the line box."
13158 "description": "The inline contents are aligned to the end edge of the line box."
13162 "description": "The text is justified according to the method specified by the 'text-justify' property."
13166 "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."
13170 "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."
13174 "description": "The inline contents are aligned to the start edge of the line box."
13177 "syntax": "start | end | left | right | center | justify | match-parent",
13180 "name": "MDN Reference",
13181 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align"
13184 "description": "Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",
13191 "syntax": "<alpha-value>",
13194 "name": "MDN Reference",
13195 "url": "https://developer.mozilla.org/docs/Web/CSS/opacity"
13198 "description": "Opacity of an element's text, where 1 is opaque and 0 is entirely transparent.",
13204 "name": "background",
13208 "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."
13212 "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."
13216 "description": "A value of 'none' counts as an image layer but draws nothing."
13220 "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.)"
13223 "syntax": "[ <bg-layer> , ]* <final-bg-layer>",
13226 "name": "MDN Reference",
13227 "url": "https://developer.mozilla.org/docs/Web/CSS/background"
13230 "description": "Shorthand property for setting most background properties at the same place in the style sheet.",
13246 "name": "inline-end",
13247 "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."
13250 "name": "inline-start",
13251 "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."
13255 "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)."
13259 "description": "The box is not floated."
13263 "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."
13266 "syntax": "left | right | none | inline-start | inline-end",
13269 "name": "MDN Reference",
13270 "url": "https://developer.mozilla.org/docs/Web/CSS/float"
13273 "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.",
13279 "name": "font-weight",
13283 "description": "Thin"
13287 "description": "Extra Light (Ultra Light)"
13291 "description": "Light"
13295 "description": "Normal"
13299 "description": "Medium"
13303 "description": "Semi Bold (Demi Bold)"
13307 "description": "Bold"
13311 "description": "Extra Bold (Ultra Bold)"
13315 "description": "Black (Heavy)"
13319 "description": "Same as 700"
13323 "description": "Specifies the weight of the face bolder than the inherited value."
13327 "description": "Specifies the weight of the face lighter than the inherited value."
13331 "description": "Same as 400"
13334 "syntax": "<font-weight-absolute>{1,2}",
13337 "name": "MDN Reference",
13338 "url": "https://developer.mozilla.org/docs/Web/CSS/font-weight"
13341 "description": "Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",
13347 "name": "overflow",
13351 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
13355 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
13358 "name": "-moz-hidden-unscrollable",
13359 "description": "Same as the standardized 'clip', except doesn’t establish a block formatting context."
13363 "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."
13367 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
13370 "syntax": "[ visible | hidden | clip | scroll | auto ]{1,2}",
13373 "name": "MDN Reference",
13374 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
13377 "description": "Shorthand for setting 'overflow-x' and 'overflow-y'.",
13383 "name": "line-height",
13387 "description": "Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."
13390 "syntax": "normal | <number> | <length> | <percentage>",
13393 "name": "MDN Reference",
13394 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height"
13397 "description": "Determines the block-progression dimension of the text content area of an inline box.",
13405 "name": "font-family",
13408 "name": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
13411 "name": "Arial, Helvetica, sans-serif"
13414 "name": "Cambria, Cochin, Georgia, Times, 'Times New Roman', serif"
13417 "name": "'Courier New', Courier, monospace"
13426 "name": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
13429 "name": "Georgia, 'Times New Roman', Times, serif"
13432 "name": "'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif"
13435 "name": "Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif"
13438 "name": "'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif"
13441 "name": "monospace"
13444 "name": "sans-serif"
13447 "name": "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"
13453 "name": "'Times New Roman', Times, serif"
13456 "name": "'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif"
13459 "name": "Verdana, Geneva, Tahoma, sans-serif"
13462 "syntax": "<family-name>",
13465 "name": "MDN Reference",
13466 "url": "https://developer.mozilla.org/docs/Web/CSS/font-family"
13469 "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.",
13475 "name": "text-decoration",
13479 "description": "Produces a dashed line style."
13483 "description": "Produces a dotted line."
13487 "description": "Produces a double line."
13490 "name": "line-through",
13491 "description": "Each line of text has a line through the middle."
13495 "description": "Produces no line."
13498 "name": "overline",
13499 "description": "Each line of text has a line above it."
13503 "description": "Produces a solid line."
13506 "name": "underline",
13507 "description": "Each line of text is underlined."
13511 "description": "Produces a wavy line."
13514 "syntax": "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
13517 "name": "MDN Reference",
13518 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
13521 "description": "Decorations applied to font used for an element's text.",
13528 "name": "box-sizing",
13531 "name": "border-box",
13532 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
13535 "name": "content-box",
13536 "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."
13539 "syntax": "content-box | border-box",
13542 "name": "MDN Reference",
13543 "url": "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
13546 "description": "Specifies the behavior of the 'width' and 'height' properties.",
13556 "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."
13559 "syntax": "auto | <integer>",
13562 "name": "MDN Reference",
13563 "url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
13566 "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.",
13572 "name": "vertical-align",
13576 "description": "Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."
13579 "name": "baseline",
13580 "description": "Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."
13584 "description": "Align the after edge of the extended inline box with the after-edge of the line box."
13588 "description": "Align the 'middle' baseline of the inline element with the middle baseline of the parent."
13592 "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.)"
13596 "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.)"
13599 "name": "text-bottom",
13600 "description": "Align the bottom of the box with the after-edge of the parent element's font."
13603 "name": "text-top",
13604 "description": "Align the top of the box with the before-edge of the parent element's font."
13608 "description": "Align the before edge of the extended inline box with the before-edge of the line box."
13611 "name": "-webkit-baseline-middle"
13614 "syntax": "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
13617 "name": "MDN Reference",
13618 "url": "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
13621 "description": "Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",
13628 "name": "border-radius",
13629 "syntax": "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
13632 "name": "MDN Reference",
13633 "url": "https://developer.mozilla.org/docs/Web/CSS/border-radius"
13636 "description": "Defines the radii of the outer border edge.",
13643 "name": "margin-left",
13649 "syntax": "<length> | <percentage> | auto",
13652 "name": "MDN Reference",
13653 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
13656 "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..",
13667 "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."
13670 "name": "all-scroll",
13671 "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."
13675 "description": "The UA determines the cursor to display based on the current context."
13679 "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."
13682 "name": "col-resize",
13683 "description": "Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."
13686 "name": "context-menu",
13687 "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."
13691 "description": "Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."
13694 "name": "crosshair",
13695 "description": "A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."
13699 "description": "The platform-dependent default cursor. Often rendered as an arrow."
13702 "name": "e-resize",
13703 "description": "Indicates that east edge is to be moved."
13706 "name": "ew-resize",
13707 "description": "Indicates a bidirectional east-west resize cursor."
13711 "description": "Indicates that something can be grabbed."
13714 "name": "grabbing",
13715 "description": "Indicates that something is being grabbed."
13719 "description": "Help is available for the object under the cursor. Often rendered as a question mark or a balloon."
13723 "description": "Indicates something is to be moved."
13726 "name": "-moz-grab",
13727 "description": "Indicates that something can be grabbed."
13730 "name": "-moz-grabbing",
13731 "description": "Indicates that something is being grabbed."
13734 "name": "-moz-zoom-in",
13735 "description": "Indicates that something can be zoomed (magnified) in."
13738 "name": "-moz-zoom-out",
13739 "description": "Indicates that something can be zoomed (magnified) out."
13742 "name": "ne-resize",
13743 "description": "Indicates that movement starts from north-east corner."
13746 "name": "nesw-resize",
13747 "description": "Indicates a bidirectional north-east/south-west cursor."
13751 "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."
13755 "description": "No cursor is rendered for the element."
13758 "name": "not-allowed",
13759 "description": "Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."
13762 "name": "n-resize",
13763 "description": "Indicates that north edge is to be moved."
13766 "name": "ns-resize",
13767 "description": "Indicates a bidirectional north-south cursor."
13770 "name": "nw-resize",
13771 "description": "Indicates that movement starts from north-west corner."
13774 "name": "nwse-resize",
13775 "description": "Indicates a bidirectional north-west/south-east cursor."
13779 "description": "The cursor is a pointer that indicates a link."
13782 "name": "progress",
13783 "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."
13786 "name": "row-resize",
13787 "description": "Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."
13790 "name": "se-resize",
13791 "description": "Indicates that movement starts from south-east corner."
13794 "name": "s-resize",
13795 "description": "Indicates that south edge is to be moved."
13798 "name": "sw-resize",
13799 "description": "Indicates that movement starts from south-west corner."
13803 "description": "Indicates text that may be selected. Often rendered as a vertical I-beam."
13806 "name": "vertical-text",
13807 "description": "Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."
13811 "description": "Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."
13814 "name": "-webkit-grab",
13815 "description": "Indicates that something can be grabbed."
13818 "name": "-webkit-grabbing",
13819 "description": "Indicates that something is being grabbed."
13822 "name": "-webkit-zoom-in",
13823 "description": "Indicates that something can be zoomed (magnified) in."
13826 "name": "-webkit-zoom-out",
13827 "description": "Indicates that something can be zoomed (magnified) out."
13830 "name": "w-resize",
13831 "description": "Indicates that west edge is to be moved."
13835 "description": "Indicates that something can be zoomed (magnified) in."
13838 "name": "zoom-out",
13839 "description": "Indicates that something can be zoomed (magnified) out."
13842 "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 ] ]",
13845 "name": "MDN Reference",
13846 "url": "https://developer.mozilla.org/docs/Web/CSS/cursor"
13849 "description": "Allows control over cursor appearance in an element",
13857 "name": "margin-bottom",
13863 "syntax": "<length> | <percentage> | auto",
13866 "name": "MDN Reference",
13867 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
13870 "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..",
13881 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
13884 "syntax": "<length> | <percentage> | auto",
13887 "name": "MDN Reference",
13888 "url": "https://developer.mozilla.org/docs/Web/CSS/right"
13891 "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'.",
13898 "name": "margin-right",
13904 "syntax": "<length> | <percentage> | auto",
13907 "name": "MDN Reference",
13908 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
13911 "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..",
13918 "name": "padding-left",
13919 "syntax": "<length> | <percentage>",
13922 "name": "MDN Reference",
13923 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
13926 "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.",
13933 "name": "padding-top",
13934 "syntax": "<length> | <percentage>",
13937 "name": "MDN Reference",
13938 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
13941 "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.",
13948 "name": "max-width",
13952 "description": "No limit on the width of the box."
13955 "name": "fit-content",
13956 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
13959 "name": "max-content",
13960 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
13963 "name": "min-content",
13964 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
13967 "syntax": "<viewport-length>",
13970 "name": "MDN Reference",
13971 "url": "https://developer.mozilla.org/docs/Web/CSS/max-width"
13974 "description": "Allows authors to constrain content width to a certain range.",
13985 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
13988 "syntax": "<length> | <percentage> | auto",
13991 "name": "MDN Reference",
13992 "url": "https://developer.mozilla.org/docs/Web/CSS/bottom"
13995 "description": "Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",
14002 "name": "background-image",
14006 "description": "Counts as an image layer but draws nothing."
14009 "syntax": "<bg-image>#",
14012 "name": "MDN Reference",
14013 "url": "https://developer.mozilla.org/docs/Web/CSS/background-image"
14016 "description": "Sets the background image(s) of an element.",
14027 "description": "The attr(n) function returns as a string the value of attribute n for the subject of the selector."
14030 "name": "counter(name)",
14031 "description": "Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."
14035 "description": "The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."
14039 "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."
14043 "description": "See http://www.w3.org/TR/css3-content/#content for computation rules."
14049 "syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
14052 "name": "MDN Reference",
14053 "url": "https://developer.mozilla.org/docs/Web/CSS/content"
14056 "description": "Determines which page-based occurrence of a given element is applied to a counter or string value.",
14063 "name": "padding-right",
14064 "syntax": "<length> | <percentage>",
14067 "name": "MDN Reference",
14068 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
14071 "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.",
14078 "name": "white-space",
14082 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'normal'."
14086 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'none'."
14090 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'none'."
14093 "name": "pre-line",
14094 "description": "Sets 'white-space-collapsing' to 'preserve-breaks' and 'text-wrap' to 'normal'."
14097 "name": "pre-wrap",
14098 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'normal'."
14101 "syntax": "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
14104 "name": "MDN Reference",
14105 "url": "https://developer.mozilla.org/docs/Web/CSS/white-space"
14108 "description": "Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.",
14114 "name": "padding-bottom",
14115 "syntax": "<length> | <percentage>",
14118 "name": "MDN Reference",
14119 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
14122 "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.",
14129 "name": "border-bottom",
14130 "syntax": "<line-width> || <line-style> || <color>",
14133 "name": "MDN Reference",
14134 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
14137 "description": "Shorthand property for setting border width, style and color.",
14146 "name": "box-shadow",
14150 "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)."
14154 "description": "No shadow."
14157 "syntax": "none | <shadow>#",
14160 "name": "MDN Reference",
14161 "url": "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
14164 "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.",
14172 "name": "transform",
14175 "name": "matrix()",
14176 "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]"
14179 "name": "matrix3d()",
14180 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
14186 "name": "perspective()",
14187 "description": "Specifies a perspective projection matrix."
14190 "name": "rotate()",
14191 "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."
14194 "name": "rotate3d()",
14195 "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."
14198 "name": "rotateX('angle')",
14199 "description": "Specifies a clockwise rotation by the given angle about the X axis."
14202 "name": "rotateY('angle')",
14203 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
14206 "name": "rotateZ('angle')",
14207 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
14211 "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."
14214 "name": "scale3d()",
14215 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
14218 "name": "scaleX()",
14219 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
14222 "name": "scaleY()",
14223 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
14226 "name": "scaleZ()",
14227 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
14231 "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)."
14235 "description": "Specifies a skew transformation along the X axis by the given angle."
14239 "description": "Specifies a skew transformation along the Y axis by the given angle."
14242 "name": "translate()",
14243 "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."
14246 "name": "translate3d()",
14247 "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."
14250 "name": "translateX()",
14251 "description": "Specifies a translation by the given amount in the X direction."
14254 "name": "translateY()",
14255 "description": "Specifies a translation by the given amount in the Y direction."
14258 "name": "translateZ()",
14259 "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."
14262 "syntax": "none | <transform-list>",
14265 "name": "MDN Reference",
14266 "url": "https://developer.mozilla.org/docs/Web/CSS/transform"
14269 "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.",
14275 "name": "min-height",
14281 "name": "fit-content",
14282 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
14285 "name": "max-content",
14286 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
14289 "name": "min-content",
14290 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
14293 "syntax": "<viewport-length>",
14296 "name": "MDN Reference",
14297 "url": "https://developer.mozilla.org/docs/Web/CSS/min-height"
14300 "description": "Allows authors to constrain content height to a certain range.",
14307 "name": "visibility",
14310 "name": "collapse",
14311 "description": "Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."
14315 "description": "The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."
14319 "description": "The generated box is visible."
14322 "syntax": "visible | hidden | collapse",
14325 "name": "MDN Reference",
14326 "url": "https://developer.mozilla.org/docs/Web/CSS/visibility"
14329 "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).",
14335 "name": "background-position",
14336 "syntax": "<bg-position>#",
14339 "name": "MDN Reference",
14340 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
14343 "description": "Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",
14351 "name": "border-top",
14352 "syntax": "<line-width> || <line-style> || <color>",
14355 "name": "MDN Reference",
14356 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top"
14359 "description": "Shorthand property for setting border width, style and color",
14368 "name": "min-width",
14374 "name": "fit-content",
14375 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
14378 "name": "max-content",
14379 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
14382 "name": "min-content",
14383 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
14386 "syntax": "<viewport-length>",
14389 "name": "MDN Reference",
14390 "url": "https://developer.mozilla.org/docs/Web/CSS/min-width"
14393 "description": "Allows authors to constrain content width to a certain range.",
14404 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
14408 "description": "Performs a color inversion on the pixels on the screen."
14411 "syntax": "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
14414 "name": "MDN Reference",
14415 "url": "https://developer.mozilla.org/docs/Web/CSS/outline"
14418 "description": "Shorthand property for 'outline-style', 'outline-width', and 'outline-color'.",
14428 "name": "transition",
14432 "description": "Every property that is able to undergo a transition will do so."
14436 "description": "No property will transition."
14439 "syntax": "<single-transition>#",
14442 "name": "MDN Reference",
14443 "url": "https://developer.mozilla.org/docs/Web/CSS/transition"
14446 "description": "Shorthand property combines four of the transition properties into a single property.",
14459 "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."
14463 "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."
14467 "description": "No constraint on the box's position with respect to floats."
14471 "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."
14474 "syntax": "none | left | right | both | inline-start | inline-end",
14477 "name": "MDN Reference",
14478 "url": "https://developer.mozilla.org/docs/Web/CSS/clear"
14481 "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.",
14487 "name": "border-color",
14489 "syntax": "<color>{1,4}",
14492 "name": "MDN Reference",
14493 "url": "https://developer.mozilla.org/docs/Web/CSS/border-color"
14496 "description": "The color of the border around all four edges of an element.",
14502 "name": "background-repeat",
14504 "syntax": "<repeat-style>#",
14507 "name": "MDN Reference",
14508 "url": "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
14511 "description": "Specifies how background images are tiled after they have been sized and positioned.",
14517 "name": "background-size",
14521 "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%."
14525 "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."
14529 "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."
14532 "syntax": "<bg-size>#",
14535 "name": "MDN Reference",
14536 "url": "https://developer.mozilla.org/docs/Web/CSS/background-size"
14539 "description": "Specifies the size of the background images.",
14546 "name": "text-transform",
14549 "name": "capitalize",
14550 "description": "Puts the first typographic letter unit of each word in titlecase."
14553 "name": "lowercase",
14554 "description": "Puts all letters in lowercase."
14558 "description": "No effects."
14561 "name": "uppercase",
14562 "description": "Puts all letters in uppercase."
14565 "syntax": "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
14568 "name": "MDN Reference",
14569 "url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
14572 "description": "Controls capitalization effects of an element’s text.",
14578 "name": "max-height",
14582 "description": "No limit on the height of the box."
14585 "name": "fit-content",
14586 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
14589 "name": "max-content",
14590 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
14593 "name": "min-content",
14594 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
14597 "syntax": "<viewport-length>",
14600 "name": "MDN Reference",
14601 "url": "https://developer.mozilla.org/docs/Web/CSS/max-height"
14604 "description": "Allows authors to constrain content height to a certain range.",
14611 "name": "list-style",
14618 "description": "A hollow circle."
14624 "name": "decimal-leading-zero"
14628 "description": "A filled circle."
14635 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
14638 "name": "lower-alpha"
14641 "name": "lower-greek"
14644 "name": "lower-latin"
14647 "name": "lower-roman"
14654 "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."
14658 "description": "A filled square."
14661 "name": "symbols()",
14662 "description": "Allows a counter style to be defined inline."
14665 "name": "upper-alpha"
14668 "name": "upper-latin"
14671 "name": "upper-roman"
14677 "syntax": "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
14680 "name": "MDN Reference",
14681 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style"
14684 "description": "Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",
14692 "name": "font-style",
14696 "description": "Selects a font that is labeled as an 'italic' face, or an 'oblique' face if one is not"
14700 "description": "Selects a face that is classified as 'normal'."
14704 "description": "Selects a font that is labeled as an 'oblique' face, or an 'italic' face if one is not."
14707 "syntax": "normal | italic | oblique <angle>{0,2}",
14710 "name": "MDN Reference",
14711 "url": "https://developer.mozilla.org/docs/Web/CSS/font-style"
14714 "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.",
14724 "description": "Thin"
14728 "description": "Extra Light (Ultra Light)"
14732 "description": "Light"
14736 "description": "Normal"
14740 "description": "Medium"
14744 "description": "Semi Bold (Demi Bold)"
14748 "description": "Bold"
14752 "description": "Extra Bold (Ultra Bold)"
14756 "description": "Black (Heavy)"
14760 "description": "Same as 700"
14764 "description": "Specifies the weight of the face bolder than the inherited value."
14768 "description": "The font used for captioned controls (e.g., buttons, drop-downs, etc.)."
14772 "description": "The font used to label icons."
14776 "description": "Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."
14786 "description": "Specifies the weight of the face lighter than the inherited value."
14793 "description": "The font used in menus (e.g., dropdown menus and menu lists)."
14796 "name": "message-box",
14797 "description": "The font used in dialog boxes."
14801 "description": "Specifies a face that is not labeled as a small-caps font."
14805 "description": "Selects a font that is labeled 'oblique'."
14811 "name": "small-caps",
14812 "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."
14815 "name": "small-caption",
14816 "description": "The font used for labeling small controls."
14822 "name": "status-bar",
14823 "description": "The font used in window status bars."
14838 "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",
14841 "name": "MDN Reference",
14842 "url": "https://developer.mozilla.org/docs/Web/CSS/font"
14845 "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.",
14851 "name": "text-overflow",
14855 "description": "Clip inline content that overflows. Characters may be only partially rendered."
14858 "name": "ellipsis",
14859 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
14862 "syntax": "[ clip | ellipsis | <string> ]{1,2}",
14865 "name": "MDN Reference",
14866 "url": "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
14869 "description": "Text can overflow for example when it is prevented from wrapping.",
14876 "name": "border-left",
14877 "syntax": "<line-width> || <line-style> || <color>",
14880 "name": "MDN Reference",
14881 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left"
14884 "description": "Shorthand property for setting border width, style and color",
14893 "name": "border-right",
14894 "syntax": "<line-width> || <line-style> || <color>",
14897 "name": "MDN Reference",
14898 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right"
14901 "description": "Shorthand property for setting border width, style and color",
14910 "name": "border-width",
14912 "syntax": "<line-width>{1,4}",
14915 "name": "MDN Reference",
14916 "url": "https://developer.mozilla.org/docs/Web/CSS/border-width"
14919 "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.",
14926 "name": "justify-content",
14930 "description": "Flex items are packed toward the center of the line."
14934 "description": "The items are packed flush to each other toward the start edge of the alignment container in the main axis."
14938 "description": "The items are packed flush to each other toward the end edge of the alignment container in the main axis."
14942 "description": "The items are packed flush to each other toward the left edge of the alignment container in the main axis."
14946 "description": "The items are packed flush to each other toward the right edge of the alignment container in the main axis."
14950 "description": "If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were start."
14954 "description": "Regardless of the relative sizes of the item and alignment container, the given alignment value is honored."
14958 "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."
14961 "name": "space-evenly",
14962 "description": "The items are evenly distributed within the alignment container along the main axis."
14965 "name": "flex-end",
14966 "description": "Flex items are packed toward the end of the line."
14969 "name": "flex-start",
14970 "description": "Flex items are packed toward the start of the line."
14973 "name": "space-around",
14974 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
14977 "name": "space-between",
14978 "description": "Flex items are evenly distributed in the line."
14981 "name": "baseline",
14982 "description": "Specifies participation in first-baseline alignment."
14985 "name": "first baseline",
14986 "description": "Specifies participation in first-baseline alignment."
14989 "name": "last baseline",
14990 "description": "Specifies participation in last-baseline alignment."
14993 "syntax": "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
14994 "description": "Aligns flex items along the main axis of the current line of the flex container.",
15000 "name": "align-items",
15003 "name": "baseline",
15004 "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."
15008 "description": "The flex item’s margin box is centered in the cross axis within the line."
15011 "name": "flex-end",
15012 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
15015 "name": "flex-start",
15016 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
15020 "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."
15023 "syntax": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
15024 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
15030 "name": "overflow-y",
15034 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
15038 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
15042 "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."
15046 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
15049 "syntax": "visible | hidden | clip | scroll | auto",
15052 "name": "MDN Reference",
15053 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
15056 "description": "Specifies the handling of overflow in the vertical direction.",
15062 "name": "pointer-events",
15066 "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."
15070 "description": "The given element can be the target element for pointer events whenever the pointer is over the interior of the element."
15074 "description": "The given element does not receive pointer events."
15078 "description": "The given element can be the target element for pointer events when the pointer is over a \"painted\" area. "
15082 "description": "The given element can be the target element for pointer events whenever the pointer is over the perimeter of the element."
15086 "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."
15089 "name": "visibleFill",
15090 "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."
15093 "name": "visiblePainted",
15094 "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."
15097 "name": "visibleStroke",
15098 "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."
15101 "syntax": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
15104 "name": "MDN Reference",
15105 "url": "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
15108 "description": "Specifies under what circumstances a given element can be the target element for a pointer event.",
15114 "name": "letter-spacing",
15118 "description": "The spacing is the normal spacing for the current font. It is typically zero-length."
15121 "syntax": "normal | <length>",
15124 "name": "MDN Reference",
15125 "url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
15128 "description": "Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",
15134 "name": "border-style",
15136 "syntax": "<line-style>{1,4}",
15139 "name": "MDN Reference",
15140 "url": "https://developer.mozilla.org/docs/Web/CSS/border-style"
15143 "description": "The style of the border around edges of an element.",
15149 "name": "animation",
15152 "name": "alternate",
15153 "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."
15156 "name": "alternate-reverse",
15157 "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."
15160 "name": "backwards",
15161 "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'."
15165 "description": "Both forwards and backwards fill modes are applied."
15168 "name": "forwards",
15169 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
15172 "name": "infinite",
15173 "description": "Causes the animation to repeat forever."
15177 "description": "No animation is performed"
15181 "description": "Normal playback."
15185 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
15188 "syntax": "<single-animation>#",
15191 "name": "MDN Reference",
15192 "url": "https://developer.mozilla.org/docs/Web/CSS/animation"
15195 "description": "Shorthand property combines six of the animation properties into a single property.",
15205 "name": "overflow-x",
15209 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
15213 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
15217 "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."
15221 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
15224 "syntax": "visible | hidden | clip | scroll | auto",
15227 "name": "MDN Reference",
15228 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
15231 "description": "Specifies the handling of overflow in the horizontal direction.",
15237 "name": "word-wrap",
15240 "name": "break-word",
15241 "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."
15245 "description": "Lines may break only at allowed break points."
15248 "syntax": "normal | break-word",
15251 "name": "MDN Reference",
15252 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
15255 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
15261 "name": "border-collapse",
15264 "name": "collapse",
15265 "description": "Selects the collapsing borders model."
15268 "name": "separate",
15269 "description": "Selects the separated borders border model."
15272 "syntax": "collapse | separate",
15275 "name": "MDN Reference",
15276 "url": "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
15279 "description": "Selects a table's border model.",
15285 "name": "flex-direction",
15289 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
15292 "name": "column-reverse",
15293 "description": "Same as 'column', except the main-start and main-end directions are swapped."
15297 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
15300 "name": "row-reverse",
15301 "description": "Same as 'row', except the main-start and main-end directions are swapped."
15304 "syntax": "row | row-reverse | column | column-reverse",
15307 "name": "MDN Reference",
15308 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
15311 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
15330 "syntax": "auto | <number> | <percentage>",
15333 "name": "MDN Reference",
15334 "url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
15337 "description": "Non-standard. Specifies the magnification scale of the object. See 'transform: scale()' for a standards-based alternative.",
15350 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
15354 "description": "Indicates automatic sizing, based on the flex item’s content."
15358 "description": "Expands to '0 0 auto'."
15361 "syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
15364 "name": "MDN Reference",
15365 "url": "https://developer.mozilla.org/docs/Web/CSS/flex"
15368 "description": "Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",
15376 "name": "text-shadow",
15380 "description": "No shadow."
15383 "syntax": "none | <shadow-t>#",
15386 "name": "MDN Reference",
15387 "url": "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
15390 "description": "Enables shadow effects to be applied to the text of the element.",
15397 "name": "list-style-type",
15400 "name": "armenian",
15401 "description": "Traditional uppercase Armenian numbering."
15405 "description": "A hollow circle."
15409 "description": "Western decimal numbers."
15412 "name": "decimal-leading-zero",
15413 "description": "Decimal numbers padded by initial zeros."
15417 "description": "A filled circle."
15420 "name": "georgian",
15421 "description": "Traditional Georgian numbering."
15424 "name": "lower-alpha",
15425 "description": "Lowercase ASCII letters."
15428 "name": "lower-greek",
15429 "description": "Lowercase classical Greek."
15432 "name": "lower-latin",
15433 "description": "Lowercase ASCII letters."
15436 "name": "lower-roman",
15437 "description": "Lowercase ASCII Roman numerals."
15441 "description": "No marker"
15445 "description": "A filled square."
15448 "name": "symbols()",
15449 "description": "Allows a counter style to be defined inline."
15452 "name": "upper-alpha",
15453 "description": "Uppercase ASCII letters."
15456 "name": "upper-latin",
15457 "description": "Uppercase ASCII letters."
15460 "name": "upper-roman",
15461 "description": "Uppercase ASCII Roman numerals."
15464 "syntax": "<counter-style> | <string> | none",
15467 "name": "MDN Reference",
15468 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
15471 "description": "Used to construct the default contents of a list item’s marker",
15478 "name": "border-bottom-left-radius",
15479 "syntax": "<length-percentage>{1,2}",
15482 "name": "MDN Reference",
15483 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
15486 "description": "Defines the radii of the bottom left outer border edge.",
15493 "name": "user-select",
15497 "description": "The content of the element must be selected atomically"
15504 "description": "UAs must not allow a selection which is started in this element to be extended outside of this element."
15508 "description": "The UA must not allow selections to be started in this element."
15512 "description": "The element imposes no constraint on the selection."
15515 "status": "nonstandard",
15516 "syntax": "auto | text | none | contain | all",
15519 "name": "MDN Reference",
15520 "url": "https://developer.mozilla.org/docs/Web/CSS/user-select"
15523 "description": "Controls the appearance of selection.",
15533 "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’."
15537 "description": "No paint is applied in this layer."
15540 "description": "Paints the interior of the given graphical element.",
15548 "name": "transform-origin",
15549 "syntax": "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
15552 "name": "MDN Reference",
15553 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
15556 "description": "Establishes the origin of transformation for an element.",
15564 "name": "border-top-left-radius",
15565 "syntax": "<length-percentage>{1,2}",
15568 "name": "MDN Reference",
15569 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
15572 "description": "Defines the radii of the top left outer border edge.",
15579 "name": "text-indent",
15581 "syntax": "<length-percentage> && hanging? && each-line?",
15584 "name": "MDN Reference",
15585 "url": "https://developer.mozilla.org/docs/Web/CSS/text-indent"
15588 "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.",
15595 "name": "border-bottom-right-radius",
15596 "syntax": "<length-percentage>{1,2}",
15599 "name": "MDN Reference",
15600 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
15603 "description": "Defines the radii of the bottom right outer border edge.",
15610 "name": "flex-wrap",
15614 "description": "The flex container is single-line."
15618 "description": "The flexbox is multi-line."
15621 "name": "wrap-reverse",
15622 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
15625 "syntax": "nowrap | wrap | wrap-reverse",
15628 "name": "MDN Reference",
15629 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
15632 "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.",
15638 "name": "border-spacing",
15639 "syntax": "<length> <length>?",
15642 "name": "MDN Reference",
15643 "url": "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
15646 "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.",
15652 "name": "border-top-right-radius",
15653 "syntax": "<length-percentage>{1,2}",
15656 "name": "MDN Reference",
15657 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
15660 "description": "Defines the radii of the top right outer border edge.",
15671 "description": "The element does not clip."
15675 "description": "Specifies offsets from the edges of the border box."
15678 "syntax": "<shape> | auto",
15681 "name": "MDN Reference",
15682 "url": "https://developer.mozilla.org/docs/Web/CSS/clip"
15685 "description": "Deprecated. Use the 'clip-path' property when support allows. Defines the visible portion of an element’s box.",
15691 "name": "border-top-color",
15692 "syntax": "<color>",
15695 "name": "MDN Reference",
15696 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
15699 "description": "Sets the color of the top border.",
15705 "name": "word-break",
15708 "name": "break-all",
15709 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
15712 "name": "keep-all",
15713 "description": "Block characters can no longer create implied break points."
15717 "description": "Breaks non-CJK scripts according to their own rules."
15720 "syntax": "normal | break-all | keep-all | break-word",
15723 "name": "MDN Reference",
15724 "url": "https://developer.mozilla.org/docs/Web/CSS/word-break"
15727 "description": "Specifies line break opportunities for non-CJK scripts.",
15733 "name": "border-bottom-color",
15734 "syntax": "<'border-top-color'>",
15737 "name": "MDN Reference",
15738 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
15741 "description": "Sets the color of the bottom border.",
15747 "name": "flex-grow",
15748 "syntax": "<number>",
15751 "name": "MDN Reference",
15752 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
15755 "description": "Sets the flex grow factor. Negative numbers are invalid.",
15761 "name": "direction",
15765 "description": "Left-to-right direction."
15769 "description": "Right-to-left direction."
15772 "syntax": "ltr | rtl",
15775 "name": "MDN Reference",
15776 "url": "https://developer.mozilla.org/docs/Web/CSS/direction"
15779 "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.",
15785 "name": "align-self",
15789 "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."
15792 "name": "baseline",
15793 "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."
15797 "description": "The flex item’s margin box is centered in the cross axis within the line."
15800 "name": "flex-end",
15801 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
15804 "name": "flex-start",
15805 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
15809 "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."
15812 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
15813 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
15819 "name": "flex-shrink",
15820 "syntax": "<number>",
15823 "name": "MDN Reference",
15824 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
15827 "description": "Sets the flex shrink factor. Negative numbers are invalid.",
15833 "name": "text-rendering",
15845 "name": "geometricPrecision",
15846 "description": "Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed."
15849 "name": "optimizeLegibility",
15850 "description": "Indicates that the user agent shall emphasize legibility over rendering speed and geometric precision."
15853 "name": "optimizeSpeed",
15854 "description": "Indicates that the user agent shall emphasize rendering speed over legibility and geometric precision."
15857 "syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
15860 "name": "MDN Reference",
15861 "url": "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
15864 "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.",
15870 "name": "touch-action",
15874 "description": "The user agent may determine any permitted touch behaviors for touches that begin on the element."
15877 "name": "cross-slide-x"
15880 "name": "cross-slide-y"
15883 "name": "double-tap-zoom"
15886 "name": "manipulation",
15887 "description": "The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming."
15891 "description": "Touches that begin on the element must not trigger default touch behaviors."
15895 "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."
15899 "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."
15902 "name": "pinch-zoom"
15905 "syntax": "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
15908 "name": "MDN Reference",
15909 "url": "https://developer.mozilla.org/docs/Web/CSS/touch-action"
15912 "description": "Determines whether touch input may trigger default behavior supplied by user agent.",
15918 "name": "background-clip",
15919 "syntax": "<box>#",
15922 "name": "MDN Reference",
15923 "url": "https://developer.mozilla.org/docs/Web/CSS/background-clip"
15926 "description": "Determines the background painting area.",
15943 "description": "No filter effects are applied."
15947 "description": "Applies a Gaussian blur to the input image."
15950 "name": "brightness()",
15951 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
15954 "name": "contrast()",
15955 "description": "Adjusts the contrast of the input."
15958 "name": "drop-shadow()",
15959 "description": "Applies a drop shadow effect to the input image."
15962 "name": "grayscale()",
15963 "description": "Converts the input image to grayscale."
15966 "name": "hue-rotate()",
15967 "description": "Applies a hue rotation on the input image. "
15970 "name": "invert()",
15971 "description": "Inverts the samples in the input image."
15974 "name": "opacity()",
15975 "description": "Applies transparency to the samples in the input image."
15978 "name": "saturate()",
15979 "description": "Saturates the input image."
15983 "description": "Converts the input image to sepia."
15994 "description": "A filter reference to a <filter> element."
15997 "syntax": "none | <filter-function-list>",
16000 "name": "MDN Reference",
16001 "url": "https://developer.mozilla.org/docs/Web/CSS/filter"
16004 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
16015 "description": "Reference font by URL"
16018 "name": "format()",
16019 "description": "Optional hint describing the format of the font resource."
16023 "description": "Format-specific string that identifies a locally available copy of a given font."
16026 "syntax": "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
16027 "description": "@font-face descriptor. Specifies the resource containing font data. It is required, whether the font is downloadable or locally installed.",
16035 "name": "animation-timing-function",
16036 "syntax": "<timing-function>#",
16039 "name": "MDN Reference",
16040 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
16043 "description": "Describes how the animation will progress over one cycle of its duration.",
16049 "name": "border-right-color",
16050 "syntax": "<color>",
16053 "name": "MDN Reference",
16054 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
16057 "description": "Sets the color of the right border.",
16063 "name": "font-variant",
16067 "description": "Specifies a face that is not labeled as a small-caps font."
16070 "name": "small-caps",
16071 "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."
16074 "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 ]",
16077 "name": "MDN Reference",
16078 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant"
16081 "description": "Specifies variant representations of the font",
16087 "name": "border-left-color",
16088 "syntax": "<color>",
16091 "name": "MDN Reference",
16092 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
16095 "description": "Sets the color of the left border.",
16101 "name": "animation-name",
16105 "description": "No animation is performed"
16108 "syntax": "[ none | <keyframes-name> ]#",
16111 "name": "MDN Reference",
16112 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-name"
16115 "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.",
16122 "name": "animation-duration",
16123 "syntax": "<time>#",
16126 "name": "MDN Reference",
16127 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
16130 "description": "Defines the length of time that an animation takes to complete one cycle.",
16136 "name": "will-change",
16146 "description": "Expresses no particular intent."
16149 "name": "contents",
16150 "description": "Indicates that the author expects to animate or change something about the element’s contents in the near future."
16153 "name": "scroll-position",
16154 "description": "Indicates that the author expects to animate or change the scroll position of the element in the near future."
16157 "syntax": "auto | <animateable-feature>#",
16160 "name": "MDN Reference",
16161 "url": "https://developer.mozilla.org/docs/Web/CSS/will-change"
16164 "description": "Provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element.",
16175 "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’."
16179 "description": "No paint is applied in this layer."
16182 "description": "Paints along the outline of the given graphical element.",
16190 "name": "transition-property",
16194 "description": "Every property that is able to undergo a transition will do so."
16198 "description": "No property will transition."
16201 "syntax": "none | <single-transition-property>#",
16204 "name": "MDN Reference",
16205 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-property"
16208 "description": "Specifies the name of the CSS property to which the transition is applied.",
16214 "name": "table-layout",
16218 "description": "Use any automatic table layout algorithm."
16222 "description": "Use the fixed table layout algorithm."
16225 "syntax": "auto | fixed",
16228 "name": "MDN Reference",
16229 "url": "https://developer.mozilla.org/docs/Web/CSS/table-layout"
16232 "description": "Controls the algorithm used to lay out the table cells, rows, and columns.",
16238 "name": "transition-delay",
16239 "syntax": "<time>#",
16242 "name": "MDN Reference",
16243 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
16246 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
16252 "name": "flex-basis",
16256 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
16260 "description": "Indicates automatic sizing, based on the flex item’s content."
16263 "syntax": "content | <'width'>",
16266 "name": "MDN Reference",
16267 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
16270 "description": "Sets the flex basis.",
16278 "name": "overflow-wrap",
16281 "name": "break-word",
16282 "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."
16286 "description": "Lines may break only at allowed break points."
16289 "syntax": "normal | break-word | anywhere",
16292 "name": "MDN Reference",
16293 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
16296 "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.",
16302 "name": "border-top-width",
16303 "syntax": "<line-width>",
16306 "name": "MDN Reference",
16307 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
16310 "description": "Sets the thickness of the top border.",
16317 "name": "outline-width",
16318 "syntax": "<line-width>",
16321 "name": "MDN Reference",
16322 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-width"
16325 "description": "Width of the outline.",
16333 "syntax": "<integer>",
16336 "name": "MDN Reference",
16337 "url": "https://developer.mozilla.org/docs/Web/CSS/order"
16340 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
16346 "name": "border-bottom-width",
16347 "syntax": "<line-width>",
16350 "name": "MDN Reference",
16351 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
16354 "description": "Sets the thickness of the bottom border.",
16361 "name": "animation-fill-mode",
16364 "name": "backwards",
16365 "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'."
16369 "description": "Both forwards and backwards fill modes are applied."
16372 "name": "forwards",
16373 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
16377 "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."
16380 "syntax": "<single-animation-fill-mode>#",
16383 "name": "MDN Reference",
16384 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
16387 "description": "Defines what values are applied by the animation outside the time it is executing.",
16393 "name": "outline-style",
16397 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
16400 "syntax": "auto | <'border-style'>",
16403 "name": "MDN Reference",
16404 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-style"
16407 "description": "Style of the outline.",
16414 "name": "object-fit",
16425 "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."
16429 "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."
16433 "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."
16437 "description": "The replaced content is not resized to fit inside the element's content box"
16440 "name": "scale-down",
16441 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
16444 "syntax": "fill | contain | cover | none | scale-down",
16447 "name": "MDN Reference",
16448 "url": "https://developer.mozilla.org/docs/Web/CSS/object-fit"
16451 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
16457 "name": "stroke-width",
16458 "description": "Specifies the width of the stroke on the current object.",
16465 "name": "transition-duration",
16466 "syntax": "<time>#",
16469 "name": "MDN Reference",
16470 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
16473 "description": "Specifies how long the transition from the old value to the new value should take.",
16479 "name": "animation-delay",
16480 "syntax": "<time>#",
16483 "name": "MDN Reference",
16484 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
16487 "description": "Defines when the animation will start.",
16493 "name": "outline-offset",
16501 "syntax": "<length>",
16504 "name": "MDN Reference",
16505 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
16508 "description": "Offset the outline and draw it beyond the border edge.",
16514 "name": "stroke-dashoffset",
16515 "description": "Specifies the distance into the dash pattern to start the dash.",
16522 "name": "backface-visibility",
16526 "description": "Back side is hidden."
16530 "description": "Back side is visible."
16533 "syntax": "visible | hidden",
16536 "name": "MDN Reference",
16537 "url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
16540 "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.",
16546 "name": "border-right-width",
16547 "syntax": "<line-width>",
16550 "name": "MDN Reference",
16551 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
16554 "description": "Sets the thickness of the right border.",
16561 "name": "flex-flow",
16565 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
16568 "name": "column-reverse",
16569 "description": "Same as 'column', except the main-start and main-end directions are swapped."
16573 "description": "The flex container is single-line."
16577 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
16580 "name": "row-reverse",
16581 "description": "Same as 'row', except the main-start and main-end directions are swapped."
16585 "description": "The flexbox is multi-line."
16588 "name": "wrap-reverse",
16589 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
16592 "syntax": "<'flex-direction'> || <'flex-wrap'>",
16595 "name": "MDN Reference",
16596 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
16599 "description": "Specifies how flexbox items are placed in the flexbox.",
16605 "name": "word-spacing",
16609 "description": "No additional spacing is applied. Computes to zero."
16612 "syntax": "normal | <length-percentage>",
16615 "name": "MDN Reference",
16616 "url": "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
16619 "description": "Specifies additional spacing between “words”.",
16626 "name": "transition-timing-function",
16627 "syntax": "<timing-function>#",
16630 "name": "MDN Reference",
16631 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
16634 "description": "Describes how the intermediate values used during a transition will be calculated.",
16650 "description": "The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."
16653 "name": "horizontal",
16654 "description": "The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."
16658 "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."
16661 "name": "vertical",
16662 "description": "The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."
16665 "syntax": "none | both | horizontal | vertical | block | inline",
16668 "name": "MDN Reference",
16669 "url": "https://developer.mozilla.org/docs/Web/CSS/resize"
16672 "description": "Specifies whether or not an element is resizable by the user, and if so, along which axis/axes.",
16678 "name": "unicode-bidi",
16681 "name": "bidi-override",
16682 "description": "Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."
16686 "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."
16690 "description": "The contents of the element are considered to be inside a separate, independent paragraph."
16693 "name": "isolate-override",
16694 "description": "This combines the isolation behavior of 'isolate' with the directional override behavior of 'bidi-override'"
16698 "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."
16701 "name": "plaintext",
16702 "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'."
16705 "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
16708 "name": "MDN Reference",
16709 "url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
16712 "description": "The level of embedding with respect to the bidirectional algorithm.",
16718 "name": "unicode-range",
16722 "description": "Ampersand."
16725 "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",
16726 "description": "WGL4 character set (Pan-European)."
16729 "name": "U+20-17F, U+2B0-2FF, U+2000-206F, U+20A0-20CF, U+2100-21FF, U+2600-26FF",
16730 "description": "The Multilingual European Subset No. 1. Latin. Covers ~44 languages."
16733 "name": "U+20-2FF, U+370-4FF, U+1E00-20CF, U+2100-23FF, U+2500-26FF, U+FB00-FB4F, U+FFF0-FFFD",
16734 "description": "The Multilingual European Subset No. 2. Latin, Greek, and Cyrillic. Covers ~128 language."
16737 "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",
16738 "description": "The Multilingual European Subset No. 3. Covers all characters belonging to European scripts."
16742 "description": "Basic Latin (ASCII)."
16746 "description": "Latin-1 Supplement. Accented characters for Western European languages, common punctuation characters, multiplication and division signs."
16749 "name": "U+100-17F",
16750 "description": "Latin Extended-A. Accented characters for for Czech, Dutch, Polish, and Turkish."
16753 "name": "U+180-24F",
16754 "description": "Latin Extended-B. Croatian, Slovenian, Romanian, Non-European and historic latin, Khoisan, Pinyin, Livonian, Sinology."
16757 "name": "U+1E00-1EFF",
16758 "description": "Latin Extended Additional. Vietnamese, German captial sharp s, Medievalist, Latin general use."
16761 "name": "U+250-2AF",
16762 "description": "International Phonetic Alphabet Extensions."
16765 "name": "U+370-3FF",
16766 "description": "Greek and Coptic."
16769 "name": "U+1F00-1FFF",
16770 "description": "Greek Extended. Accented characters for polytonic Greek."
16773 "name": "U+400-4FF",
16774 "description": "Cyrillic."
16777 "name": "U+500-52F",
16778 "description": "Cyrillic Supplement. Extra letters for Komi, Khanty, Chukchi, Mordvin, Kurdish, Aleut, Chuvash, Abkhaz, Azerbaijani, and Orok."
16781 "name": "U+00-52F, U+1E00-1FFF, U+2200–22FF",
16782 "description": "Latin, Greek, Cyrillic, some punctuation and symbols."
16785 "name": "U+530–58F",
16786 "description": "Armenian."
16789 "name": "U+590–5FF",
16790 "description": "Hebrew."
16793 "name": "U+600–6FF",
16794 "description": "Arabic."
16797 "name": "U+750–77F",
16798 "description": "Arabic Supplement. Additional letters for African languages, Khowar, Torwali, Burushaski, and early Persian."
16801 "name": "U+8A0–8FF",
16802 "description": "Arabic Extended-A. Additional letters for African languages, European and Central Asian languages, Rohingya, Tamazight, Arwi, and Koranic annotation signs."
16805 "name": "U+700–74F",
16806 "description": "Syriac."
16809 "name": "U+900–97F",
16810 "description": "Devanagari."
16813 "name": "U+980–9FF",
16814 "description": "Bengali."
16817 "name": "U+A00–A7F",
16818 "description": "Gurmukhi."
16821 "name": "U+A80–AFF",
16822 "description": "Gujarati."
16825 "name": "U+B00–B7F",
16826 "description": "Oriya."
16829 "name": "U+B80–BFF",
16830 "description": "Tamil."
16833 "name": "U+C00–C7F",
16834 "description": "Telugu."
16837 "name": "U+C80–CFF",
16838 "description": "Kannada."
16841 "name": "U+D00–D7F",
16842 "description": "Malayalam."
16845 "name": "U+D80–DFF",
16846 "description": "Sinhala."
16849 "name": "U+118A0–118FF",
16850 "description": "Warang Citi."
16853 "name": "U+E00–E7F",
16854 "description": "Thai."
16857 "name": "U+1A20–1AAF",
16858 "description": "Tai Tham."
16861 "name": "U+AA80–AADF",
16862 "description": "Tai Viet."
16865 "name": "U+E80–EFF",
16866 "description": "Lao."
16869 "name": "U+F00–FFF",
16870 "description": "Tibetan."
16873 "name": "U+1000–109F",
16874 "description": "Myanmar (Burmese)."
16877 "name": "U+10A0–10FF",
16878 "description": "Georgian."
16881 "name": "U+1200–137F",
16882 "description": "Ethiopic."
16885 "name": "U+1380–139F",
16886 "description": "Ethiopic Supplement. Extra Syllables for Sebatbeit, and Tonal marks"
16889 "name": "U+2D80–2DDF",
16890 "description": "Ethiopic Extended. Extra Syllables for Me'en, Blin, and Sebatbeit."
16893 "name": "U+AB00–AB2F",
16894 "description": "Ethiopic Extended-A. Extra characters for Gamo-Gofa-Dawro, Basketo, and Gumuz."
16897 "name": "U+1780–17FF",
16898 "description": "Khmer."
16901 "name": "U+1800–18AF",
16902 "description": "Mongolian."
16905 "name": "U+1B80–1BBF",
16906 "description": "Sundanese."
16909 "name": "U+1CC0–1CCF",
16910 "description": "Sundanese Supplement. Punctuation."
16913 "name": "U+4E00–9FD5",
16914 "description": "CJK (Chinese, Japanese, Korean) Unified Ideographs. Most common ideographs for modern Chinese and Japanese."
16917 "name": "U+3400–4DB5",
16918 "description": "CJK Unified Ideographs Extension A. Rare ideographs."
16921 "name": "U+2F00–2FDF",
16922 "description": "Kangxi Radicals."
16925 "name": "U+2E80–2EFF",
16926 "description": "CJK Radicals Supplement. Alternative forms of Kangxi Radicals."
16929 "name": "U+1100–11FF",
16930 "description": "Hangul Jamo."
16933 "name": "U+AC00–D7AF",
16934 "description": "Hangul Syllables."
16937 "name": "U+3040–309F",
16938 "description": "Hiragana."
16941 "name": "U+30A0–30FF",
16942 "description": "Katakana."
16945 "name": "U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F",
16946 "description": "Japanese Kanji, Hiragana and Katakana characters plus Yen/Yuan symbol."
16949 "name": "U+A4D0–A4FF",
16950 "description": "Lisu."
16953 "name": "U+A000–A48F",
16954 "description": "Yi Syllables."
16957 "name": "U+A490–A4CF",
16958 "description": "Yi Radicals."
16961 "name": "U+2000-206F",
16962 "description": "General Punctuation."
16965 "name": "U+3000–303F",
16966 "description": "CJK Symbols and Punctuation."
16969 "name": "U+2070–209F",
16970 "description": "Superscripts and Subscripts."
16973 "name": "U+20A0–20CF",
16974 "description": "Currency Symbols."
16977 "name": "U+2100–214F",
16978 "description": "Letterlike Symbols."
16981 "name": "U+2150–218F",
16982 "description": "Number Forms."
16985 "name": "U+2190–21FF",
16986 "description": "Arrows."
16989 "name": "U+2200–22FF",
16990 "description": "Mathematical Operators."
16993 "name": "U+2300–23FF",
16994 "description": "Miscellaneous Technical."
16997 "name": "U+E000-F8FF",
16998 "description": "Private Use Area."
17001 "name": "U+FB00–FB4F",
17002 "description": "Alphabetic Presentation Forms. Ligatures for latin, Armenian, and Hebrew."
17005 "name": "U+FB50–FDFF",
17006 "description": "Arabic Presentation Forms-A. Contextual forms / ligatures for Persian, Urdu, Sindhi, Central Asian languages, etc, Arabic pedagogical symbols, word ligatures."
17009 "name": "U+1F600–1F64F",
17010 "description": "Emoji: Emoticons."
17013 "name": "U+2600–26FF",
17014 "description": "Emoji: Miscellaneous Symbols."
17017 "name": "U+1F300–1F5FF",
17018 "description": "Emoji: Miscellaneous Symbols and Pictographs."
17021 "name": "U+1F900–1F9FF",
17022 "description": "Emoji: Supplemental Symbols and Pictographs."
17025 "name": "U+1F680–1F6FF",
17026 "description": "Emoji: Transport and Map Symbols."
17029 "syntax": "<unicode-range>#",
17030 "description": "@font-face descriptor. Defines the set of Unicode codepoints that may be supported by the font face for which it is declared.",
17036 "name": "stroke-dasharray",
17040 "description": "Indicates that no dashing is used."
17043 "description": "Controls the pattern of dashes and gaps used to stroke paths.",
17052 "name": "animation-iteration-count",
17055 "name": "infinite",
17056 "description": "Causes the animation to repeat forever."
17059 "syntax": "<single-animation-iteration-count>#",
17062 "name": "MDN Reference",
17063 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
17066 "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.",
17073 "name": "image-rendering",
17083 "description": "The image should be scaled with an algorithm that maximizes the appearance of the image."
17086 "name": "crisp-edges",
17087 "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."
17090 "name": "-moz-crisp-edges",
17099 "name": "optimizeQuality",
17100 "description": "Deprecated."
17103 "name": "optimizeSpeed",
17104 "description": "Deprecated."
17107 "name": "pixelated",
17108 "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."
17111 "syntax": "auto | crisp-edges | pixelated",
17114 "name": "MDN Reference",
17115 "url": "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
17118 "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.",
17124 "name": "border-left-width",
17125 "syntax": "<line-width>",
17128 "name": "MDN Reference",
17129 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
17132 "description": "Sets the thickness of the left border.",
17139 "name": "align-content",
17143 "description": "Lines are packed toward the center of the flex container."
17146 "name": "flex-end",
17147 "description": "Lines are packed toward the end of the flex container."
17150 "name": "flex-start",
17151 "description": "Lines are packed toward the start of the flex container."
17154 "name": "space-around",
17155 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
17158 "name": "space-between",
17159 "description": "Lines are evenly distributed in the flex container."
17163 "description": "Lines stretch to take up the remaining space."
17166 "syntax": "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
17167 "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.",
17173 "name": "border-bottom-style",
17174 "syntax": "<line-style>",
17177 "name": "MDN Reference",
17178 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
17181 "description": "Sets the style of the bottom border.",
17187 "name": "perspective",
17191 "description": "No perspective transform is applied."
17194 "syntax": "none | <length>",
17197 "name": "MDN Reference",
17198 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective"
17201 "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.",
17208 "name": "border-top-style",
17209 "syntax": "<line-style>",
17212 "name": "MDN Reference",
17213 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
17216 "description": "Sets the style of the top border.",
17222 "name": "text-size-adjust",
17223 "status": "experimental",
17224 "syntax": "none | auto | <percentage>",
17232 "name": "MDN Reference",
17233 "url": "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
17236 "description": "The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."
17239 "name": "transform-style",
17250 "description": "All children of this element are rendered flattened into the 2D plane of the element."
17253 "name": "preserve-3d",
17261 "description": "Flattening is not performed, so children maintain their position in 3D space."
17264 "syntax": "flat | preserve-3d",
17267 "name": "MDN Reference",
17268 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-style"
17271 "description": "Defines how nested elements are rendered in 3D space.",
17277 "name": "grid-template-columns",
17288 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
17291 "name": "min-content",
17292 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
17295 "name": "max-content",
17296 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
17300 "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."
17304 "description": "Indicates that the grid will align to its parent grid in that axis."
17307 "name": "minmax()",
17308 "description": "Defines a size range greater than or equal to min and less than or equal to max."
17311 "name": "repeat()",
17312 "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."
17315 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
17318 "name": "MDN Reference",
17319 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
17322 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
17331 "name": "list-style-position",
17335 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
17339 "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."
17342 "syntax": "inside | outside",
17345 "name": "MDN Reference",
17346 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
17349 "description": "Specifies the position of the '::marker' pseudo-element's box in the list item.",
17355 "name": "animation-direction",
17358 "name": "alternate",
17359 "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."
17362 "name": "alternate-reverse",
17363 "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."
17367 "description": "Normal playback."
17371 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
17374 "syntax": "<single-animation-direction>#",
17377 "name": "MDN Reference",
17378 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
17381 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
17387 "name": "animation-play-state",
17391 "description": "A running animation will be paused."
17395 "description": "Resume playback of a paused animation."
17398 "syntax": "<single-animation-play-state>#",
17401 "name": "MDN Reference",
17402 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
17405 "description": "Defines whether the animation is running or paused.",
17415 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
17419 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
17423 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
17426 "syntax": "none | manual | auto",
17429 "name": "MDN Reference",
17430 "url": "https://developer.mozilla.org/docs/Web/CSS/hyphens"
17433 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
17443 "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."
17446 "syntax": "none | auto | [ <string> <string> ]+",
17449 "name": "MDN Reference",
17450 "url": "https://developer.mozilla.org/docs/Web/CSS/quotes"
17453 "description": "Specifies quotation marks for any number of embedded quotations.",
17459 "name": "background-origin",
17460 "syntax": "<box>#",
17463 "name": "MDN Reference",
17464 "url": "https://developer.mozilla.org/docs/Web/CSS/background-origin"
17467 "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).",
17473 "name": "background-attachment",
17477 "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."
17481 "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."
17485 "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.)"
17488 "syntax": "<attachment>#",
17491 "name": "MDN Reference",
17492 "url": "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
17495 "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').",
17501 "name": "background-position-x",
17505 "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."
17509 "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."
17513 "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."
17516 "status": "experimental",
17517 "syntax": "[ center | [ left | right | x-start | x-end ]? <length-percentage>? ]#",
17520 "name": "MDN Reference",
17521 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
17524 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
17531 "name": "background-position-y",
17535 "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."
17539 "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."
17543 "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."
17546 "status": "experimental",
17547 "syntax": "[ center | [ top | bottom | y-start | y-end ]? <length-percentage>? ]#",
17550 "name": "MDN Reference",
17551 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
17554 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
17561 "name": "font-feature-settings",
17564 "name": "\"aalt\"",
17565 "description": "Access All Alternates."
17568 "name": "\"abvf\"",
17569 "description": "Above-base Forms. Required in Khmer script."
17572 "name": "\"abvm\"",
17573 "description": "Above-base Mark Positioning. Required in Indic scripts."
17576 "name": "\"abvs\"",
17577 "description": "Above-base Substitutions. Required in Indic scripts."
17580 "name": "\"afrc\"",
17581 "description": "Alternative Fractions."
17584 "name": "\"akhn\"",
17585 "description": "Akhand. Required in most Indic scripts."
17588 "name": "\"blwf\"",
17589 "description": "Below-base Form. Required in a number of Indic scripts."
17592 "name": "\"blwm\"",
17593 "description": "Below-base Mark Positioning. Required in Indic scripts."
17596 "name": "\"blws\"",
17597 "description": "Below-base Substitutions. Required in Indic scripts."
17600 "name": "\"calt\"",
17601 "description": "Contextual Alternates."
17604 "name": "\"case\"",
17605 "description": "Case-Sensitive Forms. Applies only to European scripts; particularly prominent in Spanish-language setting."
17608 "name": "\"ccmp\"",
17609 "description": "Glyph Composition/Decomposition."
17612 "name": "\"cfar\"",
17613 "description": "Conjunct Form After Ro. Required in Khmer scripts."
17616 "name": "\"cjct\"",
17617 "description": "Conjunct Forms. Required in Indic scripts that show similarity to Devanagari."
17620 "name": "\"clig\"",
17621 "description": "Contextual Ligatures."
17624 "name": "\"cpct\"",
17625 "description": "Centered CJK Punctuation. Used primarily in Chinese fonts."
17628 "name": "\"cpsp\"",
17629 "description": "Capital Spacing. Should not be used in connecting scripts (e.g. most Arabic)."
17632 "name": "\"cswh\"",
17633 "description": "Contextual Swash."
17636 "name": "\"curs\"",
17637 "description": "Cursive Positioning. Can be used in any cursive script."
17640 "name": "\"c2pc\"",
17641 "description": "Petite Capitals From Capitals. Applies only to bicameral scripts."
17644 "name": "\"c2sc\"",
17645 "description": "Small Capitals From Capitals. Applies only to bicameral scripts."
17648 "name": "\"dist\"",
17649 "description": "Distances. Required in Indic scripts."
17652 "name": "\"dlig\"",
17653 "description": "Discretionary ligatures."
17656 "name": "\"dnom\"",
17657 "description": "Denominators."
17660 "name": "\"dtls\"",
17661 "description": "Dotless Forms. Applied to math formula layout."
17664 "name": "\"expt\"",
17665 "description": "Expert Forms. Applies only to Japanese."
17668 "name": "\"falt\"",
17669 "description": "Final Glyph on Line Alternates. Can be used in any cursive script."
17672 "name": "\"fin2\"",
17673 "description": "Terminal Form #2. Used only with the Syriac script."
17676 "name": "\"fin3\"",
17677 "description": "Terminal Form #3. Used only with the Syriac script."
17680 "name": "\"fina\"",
17681 "description": "Terminal Forms. Can be used in any alphabetic script."
17684 "name": "\"flac\"",
17685 "description": "Flattened ascent forms. Applied to math formula layout."
17688 "name": "\"frac\"",
17689 "description": "Fractions."
17692 "name": "\"fwid\"",
17693 "description": "Full Widths. Applies to any script which can use monospaced forms."
17696 "name": "\"half\"",
17697 "description": "Half Forms. Required in Indic scripts that show similarity to Devanagari."
17700 "name": "\"haln\"",
17701 "description": "Halant Forms. Required in Indic scripts."
17704 "name": "\"halt\"",
17705 "description": "Alternate Half Widths. Used only in CJKV fonts."
17708 "name": "\"hist\"",
17709 "description": "Historical Forms."
17712 "name": "\"hkna\"",
17713 "description": "Horizontal Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
17716 "name": "\"hlig\"",
17717 "description": "Historical Ligatures."
17720 "name": "\"hngl\"",
17721 "description": "Hangul. Korean only."
17724 "name": "\"hojo\"",
17725 "description": "Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms). Used only with Kanji script."
17728 "name": "\"hwid\"",
17729 "description": "Half Widths. Generally used only in CJKV fonts."
17732 "name": "\"init\"",
17733 "description": "Initial Forms. Can be used in any alphabetic script."
17736 "name": "\"isol\"",
17737 "description": "Isolated Forms. Can be used in any cursive script."
17740 "name": "\"ital\"",
17741 "description": "Italics. Applies mostly to Latin; note that many non-Latin fonts contain Latin as well."
17744 "name": "\"jalt\"",
17745 "description": "Justification Alternates. Can be used in any cursive script."
17748 "name": "\"jp78\"",
17749 "description": "JIS78 Forms. Applies only to Japanese."
17752 "name": "\"jp83\"",
17753 "description": "JIS83 Forms. Applies only to Japanese."
17756 "name": "\"jp90\"",
17757 "description": "JIS90 Forms. Applies only to Japanese."
17760 "name": "\"jp04\"",
17761 "description": "JIS2004 Forms. Applies only to Japanese."
17764 "name": "\"kern\"",
17765 "description": "Kerning."
17768 "name": "\"lfbd\"",
17769 "description": "Left Bounds."
17772 "name": "\"liga\"",
17773 "description": "Standard Ligatures."
17776 "name": "\"ljmo\"",
17777 "description": "Leading Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
17780 "name": "\"lnum\"",
17781 "description": "Lining Figures."
17784 "name": "\"locl\"",
17785 "description": "Localized Forms."
17788 "name": "\"ltra\"",
17789 "description": "Left-to-right glyph alternates."
17792 "name": "\"ltrm\"",
17793 "description": "Left-to-right mirrored forms."
17796 "name": "\"mark\"",
17797 "description": "Mark Positioning."
17800 "name": "\"med2\"",
17801 "description": "Medial Form #2. Used only with the Syriac script."
17804 "name": "\"medi\"",
17805 "description": "Medial Forms."
17808 "name": "\"mgrk\"",
17809 "description": "Mathematical Greek."
17812 "name": "\"mkmk\"",
17813 "description": "Mark to Mark Positioning."
17816 "name": "\"nalt\"",
17817 "description": "Alternate Annotation Forms."
17820 "name": "\"nlck\"",
17821 "description": "NLC Kanji Forms. Used only with Kanji script."
17824 "name": "\"nukt\"",
17825 "description": "Nukta Forms. Required in Indic scripts.."
17828 "name": "\"numr\"",
17829 "description": "Numerators."
17832 "name": "\"onum\"",
17833 "description": "Oldstyle Figures."
17836 "name": "\"opbd\"",
17837 "description": "Optical Bounds."
17840 "name": "\"ordn\"",
17841 "description": "Ordinals. Applies mostly to Latin script."
17844 "name": "\"ornm\"",
17845 "description": "Ornaments."
17848 "name": "\"palt\"",
17849 "description": "Proportional Alternate Widths. Used mostly in CJKV fonts."
17852 "name": "\"pcap\"",
17853 "description": "Petite Capitals."
17856 "name": "\"pkna\"",
17857 "description": "Proportional Kana. Generally used only in Japanese fonts."
17860 "name": "\"pnum\"",
17861 "description": "Proportional Figures."
17864 "name": "\"pref\"",
17865 "description": "Pre-base Forms. Required in Khmer and Myanmar (Burmese) scripts and southern Indic scripts that may display a pre-base form of Ra."
17868 "name": "\"pres\"",
17869 "description": "Pre-base Substitutions. Required in Indic scripts."
17872 "name": "\"pstf\"",
17873 "description": "Post-base Forms. Required in scripts of south and southeast Asia that have post-base forms for consonants eg: Gurmukhi, Malayalam, Khmer."
17876 "name": "\"psts\"",
17877 "description": "Post-base Substitutions."
17880 "name": "\"pwid\"",
17881 "description": "Proportional Widths."
17884 "name": "\"qwid\"",
17885 "description": "Quarter Widths. Generally used only in CJKV fonts."
17888 "name": "\"rand\"",
17889 "description": "Randomize."
17892 "name": "\"rclt\"",
17893 "description": "Required Contextual Alternates. May apply to any script, but is especially important for many styles of Arabic."
17896 "name": "\"rlig\"",
17897 "description": "Required Ligatures. Applies to Arabic and Syriac. May apply to some other scripts."
17900 "name": "\"rkrf\"",
17901 "description": "Rakar Forms. Required in Devanagari and Gujarati scripts."
17904 "name": "\"rphf\"",
17905 "description": "Reph Form. Required in Indic scripts. E.g. Devanagari, Kannada."
17908 "name": "\"rtbd\"",
17909 "description": "Right Bounds."
17912 "name": "\"rtla\"",
17913 "description": "Right-to-left alternates."
17916 "name": "\"rtlm\"",
17917 "description": "Right-to-left mirrored forms."
17920 "name": "\"ruby\"",
17921 "description": "Ruby Notation Forms. Applies only to Japanese."
17924 "name": "\"salt\"",
17925 "description": "Stylistic Alternates."
17928 "name": "\"sinf\"",
17929 "description": "Scientific Inferiors."
17932 "name": "\"size\"",
17933 "description": "Optical size."
17936 "name": "\"smcp\"",
17937 "description": "Small Capitals. Applies only to bicameral scripts."
17940 "name": "\"smpl\"",
17941 "description": "Simplified Forms. Applies only to Chinese and Japanese."
17944 "name": "\"ssty\"",
17945 "description": "Math script style alternates."
17948 "name": "\"stch\"",
17949 "description": "Stretching Glyph Decomposition."
17952 "name": "\"subs\"",
17953 "description": "Subscript."
17956 "name": "\"sups\"",
17957 "description": "Superscript."
17960 "name": "\"swsh\"",
17961 "description": "Swash. Does not apply to ideographic scripts."
17964 "name": "\"titl\"",
17965 "description": "Titling."
17968 "name": "\"tjmo\"",
17969 "description": "Trailing Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
17972 "name": "\"tnam\"",
17973 "description": "Traditional Name Forms. Applies only to Japanese."
17976 "name": "\"tnum\"",
17977 "description": "Tabular Figures."
17980 "name": "\"trad\"",
17981 "description": "Traditional Forms. Applies only to Chinese and Japanese."
17984 "name": "\"twid\"",
17985 "description": "Third Widths. Generally used only in CJKV fonts."
17988 "name": "\"unic\"",
17989 "description": "Unicase."
17992 "name": "\"valt\"",
17993 "description": "Alternate Vertical Metrics. Applies only to scripts with vertical writing modes."
17996 "name": "\"vatu\"",
17997 "description": "Vattu Variants. Used for Indic scripts. E.g. Devanagari."
18000 "name": "\"vert\"",
18001 "description": "Vertical Alternates. Applies only to scripts with vertical writing modes."
18004 "name": "\"vhal\"",
18005 "description": "Alternate Vertical Half Metrics. Used only in CJKV fonts."
18008 "name": "\"vjmo\"",
18009 "description": "Vowel Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
18012 "name": "\"vkna\"",
18013 "description": "Vertical Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
18016 "name": "\"vkrn\"",
18017 "description": "Vertical Kerning."
18020 "name": "\"vpal\"",
18021 "description": "Proportional Alternate Vertical Metrics. Used mostly in CJKV fonts."
18024 "name": "\"vrt2\"",
18025 "description": "Vertical Alternates and Rotation. Applies only to scripts with vertical writing modes."
18028 "name": "\"zero\"",
18029 "description": "Slashed Zero."
18033 "description": "No change in glyph substitution or positioning occurs."
18037 "description": "Disable feature."
18041 "description": "Enable feature."
18044 "syntax": "normal | <feature-tag-value>#",
18047 "name": "MDN Reference",
18048 "url": "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
18051 "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.",
18058 "name": "border-left-style",
18059 "syntax": "<line-style>",
18062 "name": "MDN Reference",
18063 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
18066 "description": "Sets the style of the left border.",
18072 "name": "font-stretch",
18075 "name": "condensed"
18081 "name": "extra-condensed"
18084 "name": "extra-expanded"
18087 "name": "narrower",
18088 "description": "Indicates a narrower value relative to the width of the parent element."
18094 "name": "semi-condensed"
18097 "name": "semi-expanded"
18100 "name": "ultra-condensed"
18103 "name": "ultra-expanded"
18107 "description": "Indicates a wider value relative to the width of the parent element."
18110 "syntax": "<font-stretch-absolute>{1,2}",
18113 "name": "MDN Reference",
18114 "url": "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
18117 "description": "Selects a normal, condensed, or expanded face from a font family.",
18123 "name": "outline-color",
18127 "description": "Performs a color inversion on the pixels on the screen."
18130 "syntax": "<color> | invert",
18133 "name": "MDN Reference",
18134 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-color"
18137 "description": "The color of the outline.",
18144 "name": "border-right-style",
18145 "syntax": "<line-style>",
18148 "name": "MDN Reference",
18149 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
18152 "description": "Sets the style of the right border.",
18158 "name": "clip-path",
18162 "description": "No clipping path gets created."
18166 "description": "References a <clipPath> element to create a clipping path."
18169 "syntax": "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
18172 "name": "MDN Reference",
18173 "url": "https://developer.mozilla.org/docs/Web/CSS/clip-path"
18176 "description": "Specifies a clipping path where everything inside the path is visible and everything outside is clipped out.",
18185 "name": "list-style-image",
18189 "description": "The default contents of the of the list item’s marker are given by 'list-style-type' instead."
18192 "syntax": "<url> | none",
18195 "name": "MDN Reference",
18196 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
18199 "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.",
18205 "name": "counter-increment",
18209 "description": "This element does not alter the value of any counters."
18212 "syntax": "[ <custom-ident> <integer>? ]+ | none",
18215 "name": "MDN Reference",
18216 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
18219 "description": "Manipulate the value of existing counters.",
18226 "name": "counter-reset",
18230 "description": "The counter is not modified."
18233 "syntax": "[ <custom-ident> <integer>? ]+ | none",
18236 "name": "MDN Reference",
18237 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
18240 "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.",
18247 "name": "font-display",
18248 "status": "experimental",
18249 "syntax": "[ auto | block | swap | fallback | optional ]",
18250 "description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
18253 "name": "border-image",
18257 "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."
18261 "description": "Causes the middle part of the border-image to be preserved."
18265 "description": "Use the border styles."
18269 "description": "The image is tiled (repeated) to fill the area."
18273 "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."
18277 "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."
18281 "description": "The image is stretched to fill the area."
18287 "syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
18290 "name": "MDN Reference",
18291 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image"
18294 "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.",
18304 "name": "column-count",
18308 "description": "Determines the number of columns by the 'column-width' property and the element width."
18311 "syntax": "<integer> | auto",
18314 "name": "MDN Reference",
18315 "url": "https://developer.mozilla.org/docs/Web/CSS/column-count"
18318 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
18325 "name": "column-gap",
18329 "description": "User agent specific and typically equivalent to 1em."
18332 "syntax": "normal | <length-percentage>",
18333 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
18340 "name": "text-decoration-color",
18347 "syntax": "<color>",
18350 "name": "MDN Reference",
18351 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
18354 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
18368 "syntax": "initial | inherit | unset | revert",
18371 "name": "MDN Reference",
18372 "url": "https://developer.mozilla.org/docs/Web/CSS/all"
18375 "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",
18381 "name": "object-position",
18389 "syntax": "<position>",
18392 "name": "MDN Reference",
18393 "url": "https://developer.mozilla.org/docs/Web/CSS/object-position"
18396 "description": "Determines the alignment of the replaced element inside its box.",
18404 "name": "page-break-inside",
18408 "description": "Neither force nor forbid a page break inside the generated box."
18412 "description": "Avoid a page break inside the generated box."
18415 "syntax": "auto | avoid",
18418 "name": "MDN Reference",
18419 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
18422 "description": "Defines rules for page breaks inside an element.",
18428 "name": "stroke-linecap",
18432 "description": "Indicates that the stroke for each subpath does not extend beyond its two endpoints."
18436 "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."
18440 "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."
18443 "description": "Specifies the shape to be used at the end of open subpaths when they are stroked.",
18459 "name": "empty-cells",
18463 "description": "No borders or backgrounds are drawn around/behind empty cells."
18466 "name": "-moz-show-background"
18470 "description": "Borders and backgrounds are drawn around/behind empty cells (like normal cells)."
18473 "syntax": "show | hide",
18476 "name": "MDN Reference",
18477 "url": "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
18480 "description": "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",
18486 "name": "page-break-after",
18490 "description": "Always force a page break after the generated box."
18494 "description": "Neither force nor forbid a page break after generated box."
18498 "description": "Avoid a page break after the generated box."
18502 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a left page."
18506 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a right page."
18509 "syntax": "auto | always | avoid | left | right | recto | verso",
18512 "name": "MDN Reference",
18513 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
18516 "description": "Defines rules for page breaks after an element.",
18522 "name": "fill-opacity",
18523 "description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
18529 "name": "grid-gap",
18536 "status": "obsolete",
18537 "syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
18538 "description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
18544 "name": "margin-block-end",
18556 "syntax": "<'margin-left'>",
18559 "name": "MDN Reference",
18560 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
18563 "description": "Logical 'margin-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
18579 "description": "Indicates that the property has no effect."
18583 "description": "Turns on all forms of containment for the element."
18587 "description": "All containment rules except size are applied to the element."
18591 "description": "For properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element."
18595 "description": "Turns on layout containment for the element."
18599 "description": "Turns on style containment for the element."
18603 "description": "Turns on paint containment for the element."
18606 "status": "experimental",
18607 "syntax": "none | strict | content | [ size || layout || style || paint ]",
18610 "name": "MDN Reference",
18611 "url": "https://developer.mozilla.org/docs/Web/CSS/contain"
18614 "description": "Indicates that an element and its contents are, as much as possible, independent of the rest of the document tree.",
18620 "name": "padding-inline-start",
18627 "syntax": "<'padding-left'>",
18630 "name": "MDN Reference",
18631 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
18634 "description": "Logical 'padding-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
18641 "name": "margin-inline-start",
18653 "syntax": "<'margin-left'>",
18656 "name": "MDN Reference",
18657 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
18660 "description": "Logical 'margin-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
18667 "name": "margin-inline-end",
18679 "syntax": "<'margin-left'>",
18682 "name": "MDN Reference",
18683 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
18686 "description": "Logical 'margin-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
18693 "name": "grid-template-rows",
18704 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
18707 "name": "min-content",
18708 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
18711 "name": "max-content",
18712 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
18716 "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."
18720 "description": "Indicates that the grid will align to its parent grid in that axis."
18723 "name": "minmax()",
18724 "description": "Defines a size range greater than or equal to min and less than or equal to max."
18727 "name": "repeat()",
18728 "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."
18731 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
18734 "name": "MDN Reference",
18735 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
18738 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
18748 "name": "padding-inline-end",
18755 "syntax": "<'padding-left'>",
18758 "name": "MDN Reference",
18759 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
18762 "description": "Logical 'padding-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
18769 "name": "stroke-opacity",
18770 "description": "Specifies the opacity of the painting operation used to stroke the current object.",
18784 "syntax": "<integer>",
18787 "name": "MDN Reference",
18788 "url": "https://developer.mozilla.org/docs/Web/CSS/orphans"
18791 "description": "Specifies the minimum number of line boxes in a block container that must be left in a fragment before a fragmentation break.",
18797 "name": "shape-outside",
18806 "name": "margin-box",
18807 "description": "The background is painted within (clipped to) the margin box."
18811 "description": "The float area is unaffected."
18814 "syntax": "none | <shape-box> || <basic-shape> | <image>",
18817 "name": "MDN Reference",
18818 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
18821 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
18830 "name": "caption-side",
18834 "description": "Positions the caption box below the table box."
18838 "description": "Positions the caption box above the table box."
18841 "syntax": "top | bottom | block-start | block-end | inline-start | inline-end",
18844 "name": "MDN Reference",
18845 "url": "https://developer.mozilla.org/docs/Web/CSS/caption-side"
18848 "description": "Specifies the position of the caption box with respect to the table box.",
18862 "syntax": "<integer>",
18865 "name": "MDN Reference",
18866 "url": "https://developer.mozilla.org/docs/Web/CSS/widows"
18869 "description": "Specifies the minimum number of line boxes of a block container that must be left in a fragment after a break.",
18875 "name": "grid-column",
18886 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
18890 "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."
18893 "syntax": "<grid-line> [ / <grid-line> ]?",
18896 "name": "MDN Reference",
18897 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column"
18900 "description": "Shorthand for 'grid-column-start' and 'grid-column-end'.",
18908 "name": "perspective-origin",
18909 "syntax": "<position>",
18912 "name": "MDN Reference",
18913 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
18916 "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.",
18924 "name": "column-width",
18928 "description": "The width depends on the values of other properties."
18931 "syntax": "<length> | auto",
18934 "name": "MDN Reference",
18935 "url": "https://developer.mozilla.org/docs/Web/CSS/column-width"
18938 "description": "Describes the width of columns in multicol elements.",
18945 "name": "mix-blend-mode",
18955 "description": "Default attribute which specifies no blending"
18958 "name": "multiply",
18959 "description": "The source color is multiplied by the destination color and replaces the destination."
18963 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
18967 "description": "Multiplies or screens the colors, depending on the backdrop color value."
18971 "description": "Selects the darker of the backdrop and source colors."
18975 "description": "Selects the lighter of the backdrop and source colors."
18978 "name": "color-dodge",
18979 "description": "Brightens the backdrop color to reflect the source color."
18982 "name": "color-burn",
18983 "description": "Darkens the backdrop color to reflect the source color."
18986 "name": "hard-light",
18987 "description": "Multiplies or screens the colors, depending on the source color value."
18990 "name": "soft-light",
18991 "description": "Darkens or lightens the colors, depending on the source color value."
18994 "name": "difference",
18995 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
18998 "name": "exclusion",
18999 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
19009 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
19012 "name": "saturation",
19019 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
19029 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
19032 "name": "luminosity",
19039 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
19042 "syntax": "<blend-mode>",
19045 "name": "MDN Reference",
19046 "url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
19049 "description": "Defines the formula that must be used to mix the colors with the backdrop.",
19055 "name": "grid-auto-rows",
19058 "name": "min-content",
19059 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
19062 "name": "max-content",
19063 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
19067 "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."
19070 "name": "minmax()",
19071 "description": "Defines a size range greater than or equal to min and less than or equal to max."
19074 "syntax": "<track-size>+",
19077 "name": "MDN Reference",
19078 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
19081 "description": "Specifies the size of implicitly created rows.",
19088 "name": "font-variant-ligatures",
19097 "name": "additional-ligatures",
19098 "description": "Enables display of additional ligatures."
19101 "name": "common-ligatures",
19102 "description": "Enables display of common ligatures."
19105 "name": "contextual",
19112 "description": "Enables display of contextual alternates."
19115 "name": "discretionary-ligatures",
19116 "description": "Enables display of discretionary ligatures."
19119 "name": "historical-ligatures",
19120 "description": "Enables display of historical ligatures."
19123 "name": "no-additional-ligatures",
19124 "description": "Disables display of additional ligatures."
19127 "name": "no-common-ligatures",
19128 "description": "Disables display of common ligatures."
19131 "name": "no-contextual",
19138 "description": "Disables display of contextual alternates."
19141 "name": "no-discretionary-ligatures",
19142 "description": "Disables display of discretionary ligatures."
19145 "name": "no-historical-ligatures",
19146 "description": "Disables display of historical ligatures."
19156 "description": "Disables all ligatures."
19160 "description": "Implies that the defaults set by the font are used."
19163 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
19166 "name": "MDN Reference",
19167 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
19170 "description": "Specifies control over which ligatures are enabled or disabled. A value of ‘normal’ implies that the defaults set by the font are used.",
19176 "name": "scroll-behavior",
19185 "description": "Scrolls in an instant fashion."
19189 "description": "Scrolls in a smooth fashion using a user-agent-defined timing function and time period."
19192 "syntax": "auto | smooth",
19195 "name": "MDN Reference",
19196 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
19199 "description": "Specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs.",
19205 "name": "text-decoration-skip",
19206 "status": "experimental",
19207 "syntax": "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
19215 "name": "MDN Reference",
19216 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
19219 "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."
19226 "description": "The width depends on the values of other properties."
19229 "syntax": "<'column-width'> || <'column-count'>",
19232 "name": "MDN Reference",
19233 "url": "https://developer.mozilla.org/docs/Web/CSS/columns"
19236 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
19244 "name": "column-rule",
19245 "syntax": "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
19248 "name": "MDN Reference",
19249 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule"
19252 "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.",
19261 "name": "line-break",
19265 "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."
19269 "description": "Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
19273 "description": "Breaks text using the most common set of line-breaking rules."
19277 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
19280 "syntax": "auto | loose | normal | strict | anywhere",
19283 "name": "MDN Reference",
19284 "url": "https://developer.mozilla.org/docs/Web/CSS/line-break"
19287 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
19293 "name": "text-align-last",
19304 "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'."
19308 "description": "The inline contents are centered within the line box."
19312 "description": "The text is justified according to the method specified by the 'text-justify' property."
19316 "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."
19320 "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."
19323 "syntax": "auto | start | end | left | right | center | justify",
19326 "name": "MDN Reference",
19327 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
19330 "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'.",
19336 "name": "border-image-width",
19340 "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."
19343 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
19346 "name": "MDN Reference",
19347 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
19350 "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.",
19358 "name": "stroke-miterlimit",
19359 "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.",
19365 "name": "border-image-repeat",
19369 "description": "The image is tiled (repeated) to fill the area."
19373 "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."
19377 "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."
19381 "description": "The image is stretched to fill the area."
19384 "syntax": "[ stretch | repeat | round | space ]{1,2}",
19387 "name": "MDN Reference",
19388 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
19391 "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.",
19397 "name": "grid-column-gap",
19404 "status": "obsolete",
19405 "syntax": "<length-percentage>",
19406 "description": "Specifies the gutters between grid columns. Replaced by 'column-gap' property.",
19412 "name": "border-image-slice",
19416 "description": "Causes the middle part of the border-image to be preserved."
19419 "syntax": "<number-percentage>{1,4} && fill?",
19422 "name": "MDN Reference",
19423 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
19426 "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.",
19433 "name": "justify-self",
19455 "name": "flex-end",
19456 "description": "\"Flex items are packed toward the end of the line.\""
19459 "name": "flex-start",
19460 "description": "\"Flex items are packed toward the start of the line.\""
19463 "name": "self-end",
19464 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
19467 "name": "self-start",
19468 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
19472 "description": "The items are packed flush to each other toward the center of the of the alignment container."
19484 "name": "first baseline"
19487 "name": "last baseline"
19491 "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."
19500 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
19501 "description": "Defines the way of justifying a box inside its container along the appropriate axis.",
19507 "name": "fill-rule",
19511 "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."
19515 "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."
19518 "description": "Indicates the algorithm (or winding rule) which is to be used to determine what parts of the canvas are included inside the shape.",
19524 "name": "border-image-outset",
19525 "syntax": "[ <length> | <number> ]{1,4}",
19528 "name": "MDN Reference",
19529 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
19532 "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.",
19539 "name": "justify-items",
19554 "name": "flex-end",
19555 "description": "\"Flex items are packed toward the end of the line.\""
19558 "name": "flex-start",
19559 "description": "\"Flex items are packed toward the start of the line.\""
19562 "name": "self-end",
19563 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
19566 "name": "self-start",
19567 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
19571 "description": "The items are packed flush to each other toward the center of the of the alignment container."
19583 "name": "first baseline"
19586 "name": "last baseline"
19590 "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."
19602 "syntax": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
19603 "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",
19609 "name": "break-inside",
19613 "description": "Impose no additional breaking constraints within the box."
19617 "description": "Avoid breaks within the box."
19620 "name": "avoid-column",
19621 "description": "Avoid a column break within the box."
19624 "name": "avoid-page",
19625 "description": "Avoid a page break within the box."
19628 "syntax": "auto | avoid | avoid-page | avoid-column | avoid-region",
19629 "description": "Describes the page/column/region break behavior inside the principal box.",
19635 "name": "scroll-snap-type",
19639 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
19642 "name": "mandatory",
19643 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
19646 "name": "proximity",
19647 "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."
19650 "syntax": "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
19653 "name": "MDN Reference",
19654 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
19657 "description": "Defines how strictly snap points are enforced on the scroll container.",
19663 "name": "text-decoration-line",
19672 "name": "line-through",
19673 "description": "Each line of text has a line through the middle."
19677 "description": "Neither produces nor inhibits text decoration."
19680 "name": "overline",
19681 "description": "Each line of text has a line above it."
19684 "name": "underline",
19685 "description": "Each line of text is underlined."
19688 "syntax": "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
19691 "name": "MDN Reference",
19692 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
19695 "description": "Specifies what line decorations, if any, are added to the element.",
19701 "name": "scroll-snap-align",
19702 "syntax": "[ none | start | end | center ]{1,2}",
19711 "name": "MDN Reference",
19712 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
19715 "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."
19718 "name": "grid-row",
19729 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
19733 "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."
19736 "syntax": "<grid-line> [ / <grid-line> ]?",
19739 "name": "MDN Reference",
19740 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row"
19743 "description": "Shorthand for 'grid-row-start' and 'grid-row-end'.",
19751 "name": "caret-color",
19761 "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."
19764 "syntax": "auto | <color>",
19767 "name": "MDN Reference",
19768 "url": "https://developer.mozilla.org/docs/Web/CSS/caret-color"
19771 "description": "Controls the color of the text insertion indicator.",
19778 "name": "stroke-linejoin",
19782 "description": "Indicates that a bevelled corner is to be used to join path segments."
19786 "description": "Indicates that a sharp corner is to be used to join path segments."
19790 "description": "Indicates that a round corner is to be used to join path segments."
19793 "description": "Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",
19799 "name": "grid-area",
19810 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
19814 "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."
19817 "syntax": "<grid-line> [ / <grid-line> ]{0,3}",
19820 "name": "MDN Reference",
19821 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-area"
19824 "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'.",
19831 "name": "column-fill",
19835 "description": "Fills columns sequentially."
19839 "description": "Balance content equally between columns, if possible."
19842 "syntax": "auto | balance | balance-all",
19845 "name": "MDN Reference",
19846 "url": "https://developer.mozilla.org/docs/Web/CSS/column-fill"
19849 "description": "In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",
19855 "name": "tab-size",
19862 "syntax": "<integer> | <length>",
19865 "name": "MDN Reference",
19866 "url": "https://developer.mozilla.org/docs/Web/CSS/tab-size"
19869 "description": "Determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
19876 "name": "overflow-anchor",
19877 "status": "experimental",
19878 "syntax": "auto | none",
19886 "name": "MDN Reference",
19887 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"
19890 "description": "The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."
19893 "name": "border-image-source",
19897 "description": "Use the border styles."
19900 "syntax": "none | <image>",
19903 "name": "MDN Reference",
19904 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
19907 "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.",
19913 "name": "grid-template-areas",
19924 "description": "The grid container doesn’t define any named grid areas."
19927 "syntax": "none | <string>+",
19930 "name": "MDN Reference",
19931 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
19934 "description": "Specifies named grid areas, which are not associated with any particular grid item, but can be referenced from the grid-placement properties.",
19940 "name": "font-kerning",
19950 "description": "Specifies that kerning is applied at the discretion of the user agent."
19954 "description": "Specifies that kerning is not applied."
19958 "description": "Specifies that kerning is applied."
19961 "syntax": "auto | normal | none",
19964 "name": "MDN Reference",
19965 "url": "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
19968 "description": "Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",
19974 "name": "page-break-before",
19978 "description": "Always force a page break before the generated box."
19982 "description": "Neither force nor forbid a page break before the generated box."
19986 "description": "Avoid a page break before the generated box."
19990 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a left page."
19994 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a right page."
19997 "syntax": "auto | always | avoid | left | right | recto | verso",
20000 "name": "MDN Reference",
20001 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
20004 "description": "Defines rules for page breaks before an element.",
20010 "name": "text-decoration-style",
20020 "description": "Produces a dashed line style."
20024 "description": "Produces a dotted line."
20028 "description": "Produces a double line."
20032 "description": "Produces no line."
20036 "description": "Produces a solid line."
20040 "description": "Produces a wavy line."
20043 "syntax": "solid | double | dotted | dashed | wavy",
20046 "name": "MDN Reference",
20047 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
20050 "description": "Specifies the line style for underline, line-through and overline text decoration.",
20056 "name": "grid-row-gap",
20063 "status": "obsolete",
20064 "syntax": "<length-percentage>",
20065 "description": "Specifies the gutters between grid rows. Replaced by 'row-gap' property.",
20071 "name": "backdrop-filter",
20072 "status": "experimental",
20073 "syntax": "none | <filter-function-list>",
20083 "name": "MDN Reference",
20084 "url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
20087 "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."
20090 "name": "grid-auto-flow",
20101 "description": "The auto-placement algorithm places items by filling each row in turn, adding new rows as necessary."
20105 "description": "The auto-placement algorithm places items by filling each column in turn, adding new columns as necessary."
20109 "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."
20112 "syntax": "[ row | column ] || dense",
20115 "name": "MDN Reference",
20116 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
20119 "description": "Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.",
20125 "name": "grid-column-start",
20136 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
20140 "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."
20143 "syntax": "<grid-line>",
20146 "name": "MDN Reference",
20147 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
20150 "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.",
20158 "name": "column-rule-color",
20159 "syntax": "<color>",
20162 "name": "MDN Reference",
20163 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
20166 "description": "Sets the color of the column rule",
20172 "name": "isolation",
20182 "description": "Elements are not isolated unless an operation is applied that causes the creation of a stacking context."
20186 "description": "In CSS will turn the element into a stacking context."
20189 "syntax": "auto | isolate",
20192 "name": "MDN Reference",
20193 "url": "https://developer.mozilla.org/docs/Web/CSS/isolation"
20196 "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.",
20202 "name": "column-rule-style",
20203 "syntax": "<'border-style'>",
20206 "name": "MDN Reference",
20207 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
20210 "description": "Sets the style of the rule between columns of an element.",
20216 "name": "stop-color",
20217 "description": "Indicates what color to use at that gradient stop.",
20223 "name": "clip-rule",
20235 "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."
20239 "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."
20242 "description": "Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",
20248 "name": "background-blend-mode",
20258 "description": "Default attribute which specifies no blending"
20261 "name": "multiply",
20262 "description": "The source color is multiplied by the destination color and replaces the destination."
20266 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
20270 "description": "Multiplies or screens the colors, depending on the backdrop color value."
20274 "description": "Selects the darker of the backdrop and source colors."
20278 "description": "Selects the lighter of the backdrop and source colors."
20281 "name": "color-dodge",
20282 "description": "Brightens the backdrop color to reflect the source color."
20285 "name": "color-burn",
20286 "description": "Darkens the backdrop color to reflect the source color."
20289 "name": "hard-light",
20290 "description": "Multiplies or screens the colors, depending on the source color value."
20293 "name": "soft-light",
20294 "description": "Darkens or lightens the colors, depending on the source color value."
20297 "name": "difference",
20298 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
20301 "name": "exclusion",
20302 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
20312 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
20315 "name": "saturation",
20322 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
20332 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
20335 "name": "luminosity",
20342 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
20345 "syntax": "<blend-mode>#",
20348 "name": "MDN Reference",
20349 "url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
20352 "description": "Defines the blending mode of each background layer.",
20358 "name": "font-variant-numeric",
20367 "name": "diagonal-fractions",
20368 "description": "Enables display of lining diagonal fractions."
20371 "name": "lining-nums",
20372 "description": "Enables display of lining numerals."
20376 "description": "None of the features are enabled."
20379 "name": "oldstyle-nums",
20380 "description": "Enables display of old-style numerals."
20384 "description": "Enables display of letter forms used with ordinal numbers."
20387 "name": "proportional-nums",
20388 "description": "Enables display of proportional numerals."
20391 "name": "slashed-zero",
20392 "description": "Enables display of slashed zeros."
20395 "name": "stacked-fractions",
20396 "description": "Enables display of lining stacked fractions."
20399 "name": "tabular-nums",
20400 "description": "Enables display of tabular numerals."
20403 "syntax": "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
20406 "name": "MDN Reference",
20407 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
20410 "description": "Specifies control over numerical forms.",
20416 "name": "grid-column-end",
20427 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
20431 "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."
20434 "syntax": "<grid-line>",
20437 "name": "MDN Reference",
20438 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
20441 "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.",
20449 "name": "margin-block-start",
20461 "syntax": "<'margin-left'>",
20464 "name": "MDN Reference",
20465 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
20468 "description": "Logical 'margin-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
20475 "name": "writing-mode",
20478 "name": "horizontal-tb",
20479 "description": "Top-to-bottom block flow direction. The writing mode is horizontal."
20482 "name": "sideways-lr",
20483 "description": "Left-to-right block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
20486 "name": "sideways-rl",
20487 "description": "Right-to-left block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
20490 "name": "vertical-lr",
20491 "description": "Left-to-right block flow direction. The writing mode is vertical."
20494 "name": "vertical-rl",
20495 "description": "Right-to-left block flow direction. The writing mode is vertical."
20498 "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
20501 "name": "MDN Reference",
20502 "url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
20505 "description": "This is a shorthand property for both 'direction' and 'block-progression'.",
20511 "name": "shape-rendering",
20515 "description": "Suppresses aural rendering."
20518 "name": "crispEdges",
20519 "description": "Emphasize the contrast between clean edges of artwork over rendering speed and geometric precision."
20522 "name": "geometricPrecision",
20523 "description": "Emphasize geometric precision over speed and crisp edges."
20526 "name": "optimizeSpeed",
20527 "description": "Emphasize rendering speed over geometric precision and crisp edges."
20530 "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.",
20536 "name": "grid-row-start",
20547 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
20551 "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."
20554 "syntax": "<grid-line>",
20557 "name": "MDN Reference",
20558 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
20561 "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.",
20569 "name": "grid-auto-columns",
20572 "name": "min-content",
20573 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
20576 "name": "max-content",
20577 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
20581 "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."
20584 "name": "minmax()",
20585 "description": "Defines a size range greater than or equal to min and less than or equal to max."
20588 "syntax": "<track-size>+",
20591 "name": "MDN Reference",
20592 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
20595 "description": "Specifies the size of implicitly created columns.",
20602 "name": "break-after",
20606 "description": "Always force a page break before/after the generated box."
20610 "description": "Neither force nor forbid a page/column break before/after the principal box."
20614 "description": "Avoid a break before/after the principal box."
20617 "name": "avoid-column",
20618 "description": "Avoid a column break before/after the principal box."
20621 "name": "avoid-page",
20622 "description": "Avoid a page break before/after the principal box."
20626 "description": "Always force a column break before/after the principal box."
20630 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
20634 "description": "Always force a page break before/after the principal box."
20638 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
20641 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
20642 "description": "Describes the page/column/region break behavior after the generated box.",
20648 "name": "text-decoration-skip-ink",
20649 "status": "experimental",
20650 "syntax": "auto | none",
20658 "name": "MDN Reference",
20659 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
20662 "description": "The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."
20665 "name": "grid-row-end",
20676 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
20680 "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."
20683 "syntax": "<grid-line>",
20686 "name": "MDN Reference",
20687 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
20690 "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.",
20698 "name": "break-before",
20702 "description": "Always force a page break before/after the generated box."
20706 "description": "Neither force nor forbid a page/column break before/after the principal box."
20710 "description": "Avoid a break before/after the principal box."
20713 "name": "avoid-column",
20714 "description": "Avoid a column break before/after the principal box."
20717 "name": "avoid-page",
20718 "description": "Avoid a page break before/after the principal box."
20722 "description": "Always force a column break before/after the principal box."
20726 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
20730 "description": "Always force a page break before/after the principal box."
20734 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
20737 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
20738 "description": "Describes the page/column/region break behavior before the generated box.",
20744 "name": "font-variant-caps",
20752 "name": "all-petite-caps",
20753 "description": "Enables display of petite capitals for both upper and lowercase letters."
20756 "name": "all-small-caps",
20757 "description": "Enables display of small capitals for both upper and lowercase letters."
20761 "description": "None of the features are enabled."
20764 "name": "petite-caps",
20765 "description": "Enables display of petite capitals."
20768 "name": "small-caps",
20769 "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."
20772 "name": "titling-caps",
20773 "description": "Enables display of titling capitals."
20777 "description": "Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."
20780 "syntax": "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
20783 "name": "MDN Reference",
20784 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
20787 "description": "Specifies control over capitalized forms.",
20793 "name": "stop-opacity",
20794 "description": "Defines the opacity of a given gradient stop.",
20800 "name": "column-span",
20804 "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."
20808 "description": "The element does not span multiple columns."
20811 "syntax": "none | all",
20814 "name": "MDN Reference",
20815 "url": "https://developer.mozilla.org/docs/Web/CSS/column-span"
20818 "description": "Describes the page/column break behavior after the generated box.",
20824 "name": "text-anchor",
20828 "description": "The rendered characters are aligned such that the end of the resulting rendered text is at the initial current text position."
20832 "description": "The rendered characters are aligned such that the geometric middle of the resulting rendered text is at the initial current text position."
20836 "description": "The rendered characters are aligned such that the start of the resulting rendered text is at the initial current text position."
20839 "description": "Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",
20845 "name": "column-rule-width",
20846 "syntax": "<'border-width'>",
20849 "name": "MDN Reference",
20850 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
20853 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
20861 "syntax": "<mask-layer>#",
20871 "name": "MDN Reference",
20872 "url": "https://developer.mozilla.org/docs/Web/CSS/mask"
20875 "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."
20878 "name": "text-underline-position",
20891 "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."
20895 "description": "The underline is aligned with the under edge of the element’s content box."
20898 "syntax": "auto | [ under || [ left | right ] ]",
20901 "name": "MDN Reference",
20902 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
20905 "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",
20911 "name": "mask-type",
20921 "description": "Indicates that the alpha values of the mask should be used."
20924 "name": "luminance",
20925 "description": "Indicates that the luminance values of the mask should be used."
20928 "syntax": "luminance | alpha",
20931 "name": "MDN Reference",
20932 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
20935 "description": "Defines whether the content of the <mask> element is treated as as luminance mask or alpha mask.",
20941 "name": "font-variant-east-asian",
20949 "name": "full-width",
20950 "description": "Enables rendering of full-width variants."
20954 "description": "Enables rendering of JIS04 forms."
20958 "description": "Enables rendering of JIS78 forms."
20962 "description": "Enables rendering of JIS83 forms."
20966 "description": "Enables rendering of JIS90 forms."
20970 "description": "None of the features are enabled."
20973 "name": "proportional-width",
20974 "description": "Enables rendering of proportionally-spaced variants."
20978 "description": "Enables display of ruby variant glyphs."
20981 "name": "simplified",
20982 "description": "Enables rendering of simplified forms."
20985 "name": "traditional",
20986 "description": "Enables rendering of traditional forms."
20989 "syntax": "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
20992 "name": "MDN Reference",
20993 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
20996 "description": "Allows control of glyph substitute and positioning in East Asian text.",
21002 "name": "border-inline-end-width",
21009 "syntax": "<'border-top-width'>",
21012 "name": "MDN Reference",
21013 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
21016 "description": "Logical 'border-right-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21023 "name": "border-inline-start-width",
21030 "syntax": "<'border-top-width'>",
21033 "name": "MDN Reference",
21034 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
21037 "description": "Logical 'border-left-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21044 "name": "text-orientation",
21053 "name": "sideways",
21060 "description": "This value is equivalent to 'sideways-right' in 'vertical-rl' writing mode and equivalent to 'sideways-left' in 'vertical-lr' writing mode."
21063 "name": "sideways-right",
21070 "description": "In vertical writing modes, this causes text to be set as if in a horizontal layout, but rotated 90° clockwise."
21074 "description": "In vertical writing modes, characters from horizontal-only scripts are rendered upright, i.e. in their standard horizontal orientation."
21077 "syntax": "mixed | upright | sideways",
21080 "name": "MDN Reference",
21081 "url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
21084 "description": "Specifies the orientation of text within a line.",
21090 "name": "shape-margin",
21097 "syntax": "<length-percentage>",
21100 "name": "MDN Reference",
21101 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
21104 "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.",
21112 "name": "shape-image-threshold",
21119 "syntax": "<alpha-value>",
21122 "name": "MDN Reference",
21123 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
21126 "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.",
21132 "name": "min-inline-size",
21139 "syntax": "<'min-width'>",
21142 "name": "MDN Reference",
21143 "url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
21146 "description": "Logical 'min-height'. Mapping depends on the element’s 'writing-mode'.",
21153 "name": "inline-size",
21163 "description": "Depends on the values of other properties."
21166 "syntax": "<'width'>",
21169 "name": "MDN Reference",
21170 "url": "https://developer.mozilla.org/docs/Web/CSS/inline-size"
21173 "description": "Logical 'height'. Mapping depends on the element’s 'writing-mode'.",
21180 "name": "text-combine-upright",
21181 "syntax": "none | all | [ digits <integer>? ]",
21184 "name": "MDN Reference",
21185 "url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
21188 "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."
21191 "name": "block-size",
21201 "description": "Depends on the values of other properties."
21204 "syntax": "<'width'>",
21207 "name": "MDN Reference",
21208 "url": "https://developer.mozilla.org/docs/Web/CSS/block-size"
21211 "description": "Logical 'width'. Mapping depends on the element’s 'writing-mode'.",
21218 "name": "min-block-size",
21225 "syntax": "<'min-width'>",
21228 "name": "MDN Reference",
21229 "url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
21232 "description": "Logical 'min-width'. Mapping depends on the element’s 'writing-mode'.",
21239 "name": "padding-block-start",
21246 "syntax": "<'padding-left'>",
21249 "name": "MDN Reference",
21250 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
21253 "description": "Logical 'padding-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21260 "name": "padding-block-end",
21267 "syntax": "<'padding-left'>",
21270 "name": "MDN Reference",
21271 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
21274 "description": "Logical 'padding-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21281 "name": "border-inline-start-color",
21288 "syntax": "<'border-top-color'>",
21291 "name": "MDN Reference",
21292 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
21295 "description": "Logical 'border-left-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21301 "name": "border-inline-end-color",
21308 "syntax": "<'border-top-color'>",
21311 "name": "MDN Reference",
21312 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
21315 "description": "Logical 'border-right-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21321 "name": "border-inline-end-style",
21328 "syntax": "<'border-top-style'>",
21331 "name": "MDN Reference",
21332 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
21335 "description": "Logical 'border-right-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21341 "name": "border-inline-start-style",
21348 "syntax": "<'border-top-style'>",
21351 "name": "MDN Reference",
21352 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
21355 "description": "Logical 'border-left-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21361 "name": "border-block-end-style",
21368 "syntax": "<'border-top-style'>",
21371 "name": "MDN Reference",
21372 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
21375 "description": "Logical 'border-bottom-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21381 "name": "border-block-end-color",
21388 "syntax": "<'border-top-color'>",
21391 "name": "MDN Reference",
21392 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
21395 "description": "Logical 'border-bottom-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21401 "name": "border-block-start-style",
21408 "syntax": "<'border-top-style'>",
21411 "name": "MDN Reference",
21412 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
21415 "description": "Logical 'border-top-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21421 "name": "border-block-start-color",
21428 "syntax": "<'border-top-color'>",
21431 "name": "MDN Reference",
21432 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
21435 "description": "Logical 'border-top-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21441 "name": "border-block-start-width",
21448 "syntax": "<'border-top-width'>",
21451 "name": "MDN Reference",
21452 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
21455 "description": "Logical 'border-top-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21462 "name": "border-block-end-width",
21469 "syntax": "<'border-top-width'>",
21472 "name": "MDN Reference",
21473 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
21476 "description": "Logical 'border-bottom-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
21484 "syntax": "normal | <length-percentage>",
21492 "description": "The row-gap CSS property specifies the gutter between grid rows."
21495 "name": "grid-template",
21506 "description": "Sets all three properties to their initial values."
21509 "name": "min-content",
21510 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
21513 "name": "max-content",
21514 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
21518 "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."
21522 "description": "Sets 'grid-template-rows' and 'grid-template-columns' to 'subgrid', and 'grid-template-areas' to its initial value."
21525 "name": "minmax()",
21526 "description": "Defines a size range greater than or equal to min and less than or equal to max."
21529 "name": "repeat()",
21530 "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."
21533 "syntax": "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
21536 "name": "MDN Reference",
21537 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template"
21540 "description": "Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.",
21550 "name": "color-interpolation-filters",
21562 "description": "Color operations are not required to occur in a particular color space."
21565 "name": "linearRGB",
21566 "description": "Color operations should occur in the linearized RGB color space."
21570 "description": "Color operations should occur in the sRGB color space."
21573 "description": "Specifies the color space for imaging operations performed via filter effects.",
21579 "name": "paint-order",
21596 "description": "The element is painted with the standard order of painting operations: the 'fill' is painted first, then its 'stroke' and finally its markers."
21602 "status": "experimental",
21603 "syntax": "normal | [ fill || stroke || markers ]",
21606 "name": "MDN Reference",
21607 "url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
21610 "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.",
21616 "name": "flood-color",
21625 "description": "Indicates what color to use to flood the current filter primitive subregion.",
21631 "name": "flood-opacity",
21640 "description": "Indicates what opacity to use to flood the current filter primitive subregion.",
21647 "name": "scroll-snap-stop",
21648 "syntax": "normal | always",
21655 "name": "MDN Reference",
21656 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
21659 "description": "The scroll-snap-stop CSS property defines whether the scroll container is allowed to \"pass over\" possible snap positions."
21662 "name": "lighting-color",
21671 "description": "Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",
21677 "name": "scroll-padding-left",
21678 "syntax": "auto | <length-percentage>",
21687 "name": "MDN Reference",
21688 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
21691 "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."
21694 "name": "marker-end",
21698 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
21702 "description": "Indicates that the <marker> element referenced will be used."
21705 "description": "Specifies the marker that will be drawn at the last vertices of the given markable element.",
21711 "name": "marker-start",
21715 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
21719 "description": "Indicates that the <marker> element referenced will be used."
21722 "description": "Specifies the marker that will be drawn at the first vertices of the given markable element.",
21728 "name": "marker-mid",
21732 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
21736 "description": "Indicates that the <marker> element referenced will be used."
21739 "description": "Specifies the marker that will be drawn at all vertices except the first and last.",
21745 "name": "offset-distance",
21746 "status": "experimental",
21747 "syntax": "<length-percentage>",
21755 "name": "MDN Reference",
21756 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
21759 "description": "The offset-distance CSS property specifies a position along an offset-path."
21762 "name": "place-content",
21763 "syntax": "<'align-content'> <'justify-content'>?",
21770 "description": "The place-content CSS shorthand property sets both the align-content and justify-content properties."
21773 "name": "font-variation-settings",
21774 "syntax": "normal | [ <string> <number> ]#",
21784 "name": "MDN Reference",
21785 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
21788 "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."
21791 "name": "offset-path",
21792 "status": "experimental",
21793 "syntax": "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
21801 "name": "MDN Reference",
21802 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
21805 "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."
21808 "name": "offset-rotate",
21809 "status": "experimental",
21810 "syntax": "[ auto | reverse ] || <angle>",
21818 "name": "MDN Reference",
21819 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
21822 "description": "The offset-rotate CSS property defines the direction of the element while positioning along the offset path."
21825 "name": "max-inline-size",
21835 "description": "No limit on the height of the box."
21838 "status": "experimental",
21839 "syntax": "<'max-width'>",
21842 "name": "MDN Reference",
21843 "url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
21846 "description": "Logical 'max-height'. Mapping depends on the element’s 'writing-mode'.",
21853 "name": "max-block-size",
21863 "description": "No limit on the width of the box."
21866 "status": "experimental",
21867 "syntax": "<'max-width'>",
21870 "name": "MDN Reference",
21871 "url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
21874 "description": "Logical 'max-width'. Mapping depends on the element’s 'writing-mode'.",
21881 "name": "scroll-padding",
21882 "syntax": "[ auto | <length-percentage> ]{1,4}",
21891 "name": "MDN Reference",
21892 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
21895 "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."
21898 "name": "transform-box",
21899 "syntax": "border-box | fill-box | view-box",
21908 "name": "MDN Reference",
21909 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
21912 "description": "The transform-box CSS property defines the layout box to which the transform and transform-origin properties relate."
21915 "name": "scroll-padding-top",
21916 "syntax": "auto | <length-percentage>",
21925 "name": "MDN Reference",
21926 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
21929 "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."
21933 "syntax": "<'row-gap'> <'column-gap'>?",
21941 "description": "The gap CSS property is a shorthand property for row-gap and column-gap specifying the gutters between grid rows and columns."
21944 "name": "scroll-padding-right",
21945 "syntax": "auto | <length-percentage>",
21954 "name": "MDN Reference",
21955 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
21958 "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."
21965 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
21969 "description": "Indicates that the <marker> element referenced will be used."
21972 "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.",
21978 "name": "scroll-padding-bottom",
21979 "syntax": "auto | <length-percentage>",
21988 "name": "MDN Reference",
21989 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
21992 "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."
21995 "name": "scroll-padding-inline-start",
21996 "syntax": "auto | <length-percentage>",
22005 "name": "MDN Reference",
22006 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
22009 "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."
22012 "name": "scroll-padding-block-start",
22013 "syntax": "auto | <length-percentage>",
22022 "name": "MDN Reference",
22023 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
22026 "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."
22029 "name": "scroll-padding-inline-end",
22030 "syntax": "auto | <length-percentage>",
22039 "name": "MDN Reference",
22040 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
22043 "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."
22046 "name": "scroll-padding-block-end",
22047 "syntax": "auto | <length-percentage>",
22056 "name": "MDN Reference",
22057 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
22060 "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."
22063 "name": "place-self",
22064 "syntax": "<'align-self'> <'justify-self'>?",
22070 "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."
22081 "syntax": "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
22084 "name": "MDN Reference",
22085 "url": "https://developer.mozilla.org/docs/Web/CSS/grid"
22088 "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.",
22098 "name": "place-items",
22099 "syntax": "<'align-items'> <'justify-items'>?",
22106 "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."
22109 "name": "font-optical-sizing",
22110 "syntax": "auto | none",
22119 "name": "MDN Reference",
22120 "url": "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
22123 "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."
22126 "name": "border-block-start",
22133 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22136 "name": "MDN Reference",
22137 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
22140 "description": "Logical 'border-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
22149 "name": "border-block-end",
22156 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22159 "name": "MDN Reference",
22160 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
22163 "description": "Logical 'border-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
22172 "name": "border-inline-start",
22179 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22182 "name": "MDN Reference",
22183 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
22186 "description": "Logical 'border-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
22196 "status": "experimental",
22197 "syntax": "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
22205 "name": "MDN Reference",
22206 "url": "https://developer.mozilla.org/docs/Web/CSS/offset"
22209 "description": "The offset CSS property is a shorthand property for animating an element along a defined path."
22212 "name": "border-inline-end",
22219 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22222 "name": "MDN Reference",
22223 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
22226 "description": "Logical 'border-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
22235 "name": "scroll-padding-block",
22236 "syntax": "[ auto | <length-percentage> ]{1,2}",
22244 "name": "MDN Reference",
22245 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
22248 "description": "The scroll-padding-block property is a shorthand property which sets the scroll-padding longhands for the block dimension."
22251 "name": "scroll-padding-inline",
22252 "syntax": "[ auto | <length-percentage> ]{1,2}",
22260 "name": "MDN Reference",
22261 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
22264 "description": "The scroll-padding-inline property is a shorthand property which sets the scroll-padding longhands for the inline dimension."
22275 "description": "No motion path gets created."
22279 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
22283 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
22287 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
22290 "description": "Shorthand property for setting 'motion-path', 'motion-offset' and 'motion-rotation'.",
22302 "name": "margin-inline",
22303 "syntax": "<'margin-left'>{1,2}",
22311 "name": "MDN Reference",
22312 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
22315 "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."
22318 "name": "padding-block",
22319 "syntax": "<'padding-left'>{1,2}",
22327 "name": "MDN Reference",
22328 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block"
22331 "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."
22334 "name": "padding-inline",
22335 "syntax": "<'padding-left'>{1,2}",
22343 "name": "MDN Reference",
22344 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
22347 "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."
22350 "name": "font-size-adjust",
22359 "description": "Do not preserve the font’s x-height."
22362 "syntax": "none | <number>",
22365 "name": "MDN Reference",
22366 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
22369 "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.",
22375 "name": "motion-path",
22383 "description": "No motion path gets created."
22387 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
22390 "description": "Specifies the motion path the element gets positioned at.",
22399 "name": "text-justify",
22410 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
22413 "name": "distribute",
22414 "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."
22417 "name": "distribute-all-lines"
22420 "name": "inter-cluster",
22421 "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."
22424 "name": "inter-ideograph",
22425 "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."
22428 "name": "inter-word",
22429 "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."
22433 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
22436 "name": "newspaper"
22439 "syntax": "auto | inter-character | inter-word | none",
22442 "name": "MDN Reference",
22443 "url": "https://developer.mozilla.org/docs/Web/CSS/text-justify"
22446 "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.",
22452 "name": "motion-offset",
22457 "description": "A distance that describes the position along the specified motion path.",
22464 "name": "inset-block-start",
22465 "syntax": "<'top'>",
22473 "name": "MDN Reference",
22474 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
22477 "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."
22481 "syntax": "<'top'>{1,4}",
22487 "name": "MDN Reference",
22488 "url": "https://developer.mozilla.org/docs/Web/CSS/inset"
22491 "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."
22494 "name": "inset-inline-start",
22495 "syntax": "<'top'>",
22503 "name": "MDN Reference",
22504 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
22507 "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."
22510 "name": "inset-inline-end",
22511 "syntax": "<'top'>",
22519 "name": "MDN Reference",
22520 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
22523 "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."
22527 "syntax": "none | <number>{1,3}",
22533 "name": "MDN Reference",
22534 "url": "https://developer.mozilla.org/docs/Web/CSS/scale"
22537 "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."
22540 "name": "translate",
22541 "syntax": "none | <length-percentage> [ <length-percentage> <length>? ]?",
22547 "name": "MDN Reference",
22548 "url": "https://developer.mozilla.org/docs/Web/CSS/translate"
22551 "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."
22555 "syntax": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
22561 "name": "MDN Reference",
22562 "url": "https://developer.mozilla.org/docs/Web/CSS/rotate"
22565 "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."
22568 "name": "offset-anchor",
22569 "status": "experimental",
22570 "syntax": "auto | <position>",
22577 "name": "MDN Reference",
22578 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
22581 "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."
22584 "name": "offset-position",
22585 "status": "experimental",
22586 "syntax": "auto | <position>",
22587 "description": "Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."
22590 "name": "margin-block",
22591 "syntax": "<'margin-left'>{1,2}",
22599 "name": "MDN Reference",
22600 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block"
22603 "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."
22606 "name": "user-zoom",
22607 "syntax": "zoom | fixed",
22608 "description": "The user-zoom CSS descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport."
22611 "name": "min-zoom",
22612 "syntax": "auto | <number> | <percentage>",
22613 "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."
22616 "name": "inset-block-end",
22617 "syntax": "<'top'>",
22625 "name": "MDN Reference",
22626 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
22629 "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."
22632 "name": "enable-background",
22635 "name": "accumulate",
22636 "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."
22640 "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."
22643 "description": "Deprecated. Use 'isolation' property instead when support allows. Specifies how the accumulation of the background image is managed.",
22652 "name": "glyph-orientation-horizontal",
22653 "description": "Controls glyph orientation when the inline-progression-direction is horizontal.",
22660 "name": "glyph-orientation-vertical",
22664 "description": "Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."
22667 "description": "Controls glyph orientation when the inline-progression-direction is vertical.",
22679 "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."
22682 "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.",
22689 "name": "image-orientation",
22696 "description": "After rotating by the precededing angle, the image is flipped horizontally. Defaults to 0deg if the angle is ommitted."
22699 "name": "from-image",
22700 "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."
22703 "syntax": "from-image | <angle> | [ <angle>? flip ]",
22706 "name": "MDN Reference",
22707 "url": "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
22710 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
22716 "name": "image-resolution",
22717 "status": "experimental",
22718 "syntax": "[ from-image || <resolution> ] && snap?",
22719 "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."
22722 "name": "max-zoom",
22723 "syntax": "auto | <number> | <percentage>",
22724 "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."
22727 "name": "orientation",
22728 "syntax": "auto | portrait | landscape",
22729 "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)."
22732 "name": "motion-rotation",
22740 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
22744 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
22747 "description": "Defines the direction of the element while positioning along the motion path.",
22753 "name": "scroll-snap-points-x",
22761 "description": "No snap points are defined by this scroll container."
22764 "name": "repeat()",
22765 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
22768 "status": "obsolete",
22769 "syntax": "none | repeat( <length-percentage> )",
22772 "name": "MDN Reference",
22773 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
22776 "description": "Defines the positioning of snap points along the x axis of the scroll container it is applied to.",
22782 "name": "scroll-snap-points-y",
22790 "description": "No snap points are defined by this scroll container."
22793 "name": "repeat()",
22794 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
22797 "status": "obsolete",
22798 "syntax": "none | repeat( <length-percentage> )",
22801 "name": "MDN Reference",
22802 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
22805 "description": "Defines the positioning of snap points along the y axis of the scroll container it is applied to.",
22811 "name": "scroll-snap-coordinate",
22818 "description": "Specifies that this element does not contribute a snap point."
22821 "status": "obsolete",
22822 "syntax": "none | <position>#",
22825 "name": "MDN Reference",
22826 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
22829 "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.",
22838 "name": "scroll-snap-destination",
22842 "status": "obsolete",
22843 "syntax": "<position>",
22846 "name": "MDN Reference",
22847 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
22850 "description": "Define the x and y coordinate within the scroll container’s visual viewport which element snap points will align with.",
22858 "name": "border-block-color",
22859 "syntax": "<'border-top-color'>{1,2}",
22867 "name": "MDN Reference",
22868 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
22871 "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."
22874 "name": "border-block-style",
22875 "syntax": "<'border-top-style'>",
22883 "name": "MDN Reference",
22884 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
22887 "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."
22890 "name": "border-block-width",
22891 "syntax": "<'border-top-width'>",
22899 "name": "MDN Reference",
22900 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
22903 "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."
22906 "name": "border-inline-color",
22907 "syntax": "<'border-top-color'>{1,2}",
22915 "name": "MDN Reference",
22916 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
22919 "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."
22922 "name": "border-inline-style",
22923 "syntax": "<'border-top-style'>",
22931 "name": "MDN Reference",
22932 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
22935 "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."
22938 "name": "border-inline-width",
22939 "syntax": "<'border-top-width'>",
22947 "name": "MDN Reference",
22948 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
22951 "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."
22954 "name": "border-block",
22955 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22963 "name": "MDN Reference",
22964 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block"
22967 "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."
22970 "name": "border-inline",
22971 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
22979 "name": "MDN Reference",
22980 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline"
22983 "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."
22986 "name": "inset-block",
22987 "syntax": "<'top'>{1,2}",
22995 "name": "MDN Reference",
22996 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block"
22999 "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."
23002 "name": "inset-inline",
23003 "syntax": "<'top'>{1,2}",
23011 "name": "MDN Reference",
23012 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
23015 "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."
23018 "name": "additive-symbols",
23022 "syntax": "[ <integer> && <symbol> ]#",
23023 "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'.",
23039 "name": "MDN Reference",
23040 "url": "https://developer.mozilla.org/docs/Web/CSS/alt"
23043 "description": "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",
23050 "name": "behavior",
23054 "description": "IE only. Used to extend behaviors of the browser.",
23060 "name": "box-decoration-break",
23070 "description": "Each box is independently wrapped with the border and padding."
23074 "description": "The effect is as though the element were rendered with no breaks present, and then sliced by the breaks afterward."
23077 "syntax": "slice | clone",
23080 "name": "MDN Reference",
23081 "url": "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
23084 "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.",
23090 "name": "fallback",
23094 "syntax": "<counter-style-name>",
23095 "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.",
23101 "name": "font-language-override",
23108 "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."
23111 "syntax": "normal | <string>",
23114 "name": "MDN Reference",
23115 "url": "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
23118 "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.",
23124 "name": "font-synthesis",
23132 "description": "Disallow all synthetic faces."
23136 "description": "Allow synthetic italic faces."
23140 "description": "Allow synthetic bold faces."
23143 "syntax": "none | [ weight || style ]",
23146 "name": "MDN Reference",
23147 "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
23150 "description": "Controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",
23156 "name": "font-variant-alternates",
23162 "name": "annotation()",
23163 "description": "Enables display of alternate annotation forms."
23166 "name": "character-variant()",
23167 "description": "Enables display of specific character variants."
23170 "name": "historical-forms",
23171 "description": "Enables display of historical forms."
23175 "description": "None of the features are enabled."
23178 "name": "ornaments()",
23179 "description": "Enables replacement of default glyphs with ornaments, if provided in the font."
23182 "name": "styleset()",
23183 "description": "Enables display with stylistic sets."
23186 "name": "stylistic()",
23187 "description": "Enables display of stylistic alternates."
23191 "description": "Enables display of swash glyphs."
23194 "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> ) ]",
23197 "name": "MDN Reference",
23198 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
23201 "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.",
23207 "name": "font-variant-position",
23214 "description": "None of the features are enabled."
23218 "description": "Enables display of subscript variants (OpenType feature: subs)."
23222 "description": "Enables display of superscript variants (OpenType feature: sups)."
23225 "syntax": "normal | sub | super",
23228 "name": "MDN Reference",
23229 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
23232 "description": "Specifies the vertical position",
23238 "name": "ime-mode",
23247 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
23251 "description": "No change is made to the current input method editor state. This is the default."
23254 "name": "disabled",
23255 "description": "The input method editor is disabled and may not be activated by the user."
23258 "name": "inactive",
23259 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
23263 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
23266 "status": "obsolete",
23267 "syntax": "auto | normal | active | inactive | disabled",
23270 "name": "MDN Reference",
23271 "url": "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
23274 "description": "Controls the state of the input method editor for text fields.",
23280 "name": "mask-image",
23291 "description": "Counts as a transparent black image layer."
23295 "description": "Reference to a <mask element or to a CSS image."
23298 "syntax": "<mask-reference>#",
23301 "name": "MDN Reference",
23302 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-image"
23305 "description": "Sets the mask layer image of an element.",
23313 "name": "mask-mode",
23320 "description": "Alpha values of the mask layer image should be used as the mask values."
23324 "description": "Use alpha values if 'mask-image' is an image, luminance if a <mask> element or a CSS image."
23327 "name": "luminance",
23328 "description": "Luminance values of the mask layer image should be used as the mask values."
23331 "syntax": "<masking-mode>#",
23334 "name": "MDN Reference",
23335 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
23338 "description": "Indicates whether the mask layer image is treated as luminance mask or alpha mask.",
23346 "name": "mask-origin",
23353 "syntax": "<geometry-box>#",
23356 "name": "MDN Reference",
23357 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
23360 "description": "Specifies the mask positioning area.",
23367 "name": "mask-position",
23375 "syntax": "<position>#",
23378 "name": "MDN Reference",
23379 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-position"
23382 "description": "Specifies how mask layer images are positioned.",
23390 "name": "mask-repeat",
23398 "syntax": "<repeat-style>#",
23401 "name": "MDN Reference",
23402 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
23405 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
23411 "name": "mask-size",
23422 "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%."
23426 "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."
23430 "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."
23433 "syntax": "<bg-size>#",
23436 "name": "MDN Reference",
23437 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-size"
23440 "description": "Specifies the size of the mask layer images.",
23448 "name": "-moz-animation",
23454 "name": "alternate",
23455 "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."
23458 "name": "alternate-reverse",
23459 "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."
23462 "name": "backwards",
23463 "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'."
23467 "description": "Both forwards and backwards fill modes are applied."
23470 "name": "forwards",
23471 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
23474 "name": "infinite",
23475 "description": "Causes the animation to repeat forever."
23479 "description": "No animation is performed"
23483 "description": "Normal playback."
23487 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
23490 "description": "Shorthand property combines six of the animation properties into a single property.",
23500 "name": "-moz-animation-delay",
23504 "description": "Defines when the animation will start.",
23510 "name": "-moz-animation-direction",
23516 "name": "alternate",
23517 "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."
23520 "name": "alternate-reverse",
23521 "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."
23525 "description": "Normal playback."
23529 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
23532 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
23538 "name": "-moz-animation-duration",
23542 "description": "Defines the length of time that an animation takes to complete one cycle.",
23548 "name": "-moz-animation-iteration-count",
23554 "name": "infinite",
23555 "description": "Causes the animation to repeat forever."
23558 "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.",
23565 "name": "-moz-animation-name",
23572 "description": "No animation is performed"
23575 "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.",
23582 "name": "-moz-animation-play-state",
23589 "description": "A running animation will be paused."
23593 "description": "Resume playback of a paused animation."
23596 "description": "Defines whether the animation is running or paused.",
23602 "name": "-moz-animation-timing-function",
23606 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
23612 "name": "-moz-appearance",
23621 "name": "button-arrow-down"
23624 "name": "button-arrow-next"
23627 "name": "button-arrow-previous"
23630 "name": "button-arrow-up"
23633 "name": "button-bevel"
23639 "name": "checkbox-container"
23642 "name": "checkbox-label"
23654 "name": "menuarrow"
23657 "name": "menuimage"
23663 "name": "menuitemtext"
23669 "name": "menulist-button"
23672 "name": "menulist-text"
23675 "name": "menulist-textfield"
23678 "name": "menupopup"
23681 "name": "menuradio"
23684 "name": "menuseparator"
23687 "name": "-moz-mac-unified-toolbar"
23690 "name": "-moz-win-borderless-glass"
23693 "name": "-moz-win-browsertabbar-toolbox"
23696 "name": "-moz-win-communications-toolbox"
23699 "name": "-moz-win-glass"
23702 "name": "-moz-win-media-toolbox"
23708 "name": "progressbar"
23711 "name": "progresschunk"
23717 "name": "radio-container"
23720 "name": "radio-label"
23723 "name": "radiomenuitem"
23729 "name": "resizerpanel"
23732 "name": "scrollbarbutton-down"
23735 "name": "scrollbarbutton-left"
23738 "name": "scrollbarbutton-right"
23741 "name": "scrollbarbutton-up"
23744 "name": "scrollbar-small"
23747 "name": "scrollbartrack-horizontal"
23750 "name": "scrollbartrack-vertical"
23753 "name": "separator"
23759 "name": "spinner-downbutton"
23762 "name": "spinner-textfield"
23765 "name": "spinner-upbutton"
23768 "name": "statusbar"
23771 "name": "statusbarpanel"
23777 "name": "tabpanels"
23780 "name": "tab-scroll-arrow-back"
23783 "name": "tab-scroll-arrow-forward"
23786 "name": "textfield"
23789 "name": "textfield-multiline"
23801 "name": "treeheadercell"
23804 "name": "treeheadersortarrow"
23810 "name": "treetwistyopen"
23816 "name": "treewisty"
23822 "status": "nonstandard",
23823 "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",
23824 "description": "Used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",
23830 "name": "-moz-backface-visibility",
23842 "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.",
23848 "name": "-moz-background-clip",
23857 "description": "Determines the background painting area.",
23864 "name": "-moz-background-inline-policy",
23870 "name": "bounding-box"
23873 "name": "continuous"
23879 "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.",
23885 "name": "-moz-background-origin",
23889 "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).",
23895 "name": "-moz-border-bottom-colors",
23899 "status": "nonstandard",
23900 "syntax": "<color>+ | none",
23903 "name": "MDN Reference",
23904 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
23907 "description": "Sets a list of colors for the bottom border.",
23913 "name": "-moz-border-image",
23920 "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."
23924 "description": "Causes the middle part of the border-image to be preserved."
23931 "description": "The image is tiled (repeated) to fill the area."
23935 "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."
23939 "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."
23943 "description": "The image is stretched to fill the area."
23949 "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.",
23959 "name": "-moz-border-left-colors",
23963 "status": "nonstandard",
23964 "syntax": "<color>+ | none",
23967 "name": "MDN Reference",
23968 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
23971 "description": "Sets a list of colors for the bottom border.",
23977 "name": "-moz-border-right-colors",
23981 "status": "nonstandard",
23982 "syntax": "<color>+ | none",
23985 "name": "MDN Reference",
23986 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
23989 "description": "Sets a list of colors for the bottom border.",
23995 "name": "-moz-border-top-colors",
23999 "status": "nonstandard",
24000 "syntax": "<color>+ | none",
24003 "name": "MDN Reference",
24004 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
24007 "description": "Ske Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",
24013 "name": "-moz-box-align",
24019 "name": "baseline",
24020 "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."
24024 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
24028 "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."
24032 "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."
24036 "description": "The height of each child is adjusted to that of the containing block."
24039 "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.",
24045 "name": "-moz-box-direction",
24052 "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."
24056 "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."
24059 "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).",
24065 "name": "-moz-box-flex",
24069 "description": "Specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout.",
24075 "name": "-moz-box-flexgroup",
24079 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
24085 "name": "-moz-box-ordinal-group",
24089 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
24095 "name": "-moz-box-orient",
24101 "name": "block-axis",
24102 "description": "Elements are oriented along the box's axis."
24105 "name": "horizontal",
24106 "description": "The box displays its children from left to right in a horizontal line."
24109 "name": "inline-axis",
24110 "description": "Elements are oriented vertically."
24113 "name": "vertical",
24114 "description": "The box displays its children from stacked from top to bottom vertically."
24117 "description": "In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",
24123 "name": "-moz-box-pack",
24130 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
24134 "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."
24138 "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."
24142 "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."
24145 "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.",
24151 "name": "-moz-box-sizing",
24157 "name": "border-box",
24158 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
24161 "name": "content-box",
24162 "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."
24165 "name": "padding-box",
24166 "description": "The specified width and height (and respective min/max properties) on this element determine the padding box of the element."
24169 "description": "Box Model addition in CSS3.",
24175 "name": "-moz-column-count",
24182 "description": "Determines the number of columns by the 'column-width' property and the element width."
24185 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
24191 "name": "-moz-column-gap",
24198 "description": "User agent specific and typically equivalent to 1em."
24201 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
24207 "name": "-moz-column-rule",
24211 "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.",
24220 "name": "-moz-column-rule-color",
24224 "description": "Sets the color of the column rule",
24230 "name": "-moz-column-rule-style",
24234 "description": "Sets the style of the rule between columns of an element.",
24240 "name": "-moz-column-rule-width",
24244 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
24251 "name": "-moz-columns",
24258 "description": "The width depends on the values of other properties."
24261 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
24268 "name": "-moz-column-width",
24275 "description": "The width depends on the values of other properties."
24278 "description": "This property describes the width of columns in multicol elements.",
24284 "name": "-moz-font-feature-settings",
24318 "description": "No change in glyph substitution or positioning occurs."
24333 "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.",
24340 "name": "-moz-hyphens",
24347 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
24351 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
24355 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
24358 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
24364 "name": "-moz-perspective",
24371 "description": "No perspective transform is applied."
24374 "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.",
24380 "name": "-moz-perspective-origin",
24384 "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.",
24392 "name": "-moz-text-align-last",
24402 "description": "The inline contents are centered within the line box."
24406 "description": "The text is justified according to the method specified by the 'text-justify' property."
24410 "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."
24414 "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."
24417 "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'.",
24423 "name": "-moz-text-decoration-color",
24427 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
24433 "name": "-moz-text-decoration-line",
24439 "name": "line-through",
24440 "description": "Each line of text has a line through the middle."
24444 "description": "Neither produces nor inhibits text decoration."
24447 "name": "overline",
24448 "description": "Each line of text has a line above it."
24451 "name": "underline",
24452 "description": "Each line of text is underlined."
24455 "description": "Specifies what line decorations, if any, are added to the element.",
24461 "name": "-moz-text-decoration-style",
24468 "description": "Produces a dashed line style."
24472 "description": "Produces a dotted line."
24476 "description": "Produces a double line."
24480 "description": "Produces no line."
24484 "description": "Produces a solid line."
24488 "description": "Produces a wavy line."
24491 "description": "Specifies the line style for underline, line-through and overline text decoration.",
24497 "name": "-moz-text-size-adjust",
24504 "description": "Renderers must use the default size adjustment when displaying on a small device."
24508 "description": "Renderers must not do size adjustment when displaying on a small device."
24511 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
24518 "name": "-moz-transform",
24524 "name": "matrix()",
24525 "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]"
24528 "name": "matrix3d()",
24529 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
24535 "name": "perspective",
24536 "description": "Specifies a perspective projection matrix."
24539 "name": "rotate()",
24540 "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."
24543 "name": "rotate3d()",
24544 "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."
24547 "name": "rotateX('angle')",
24548 "description": "Specifies a clockwise rotation by the given angle about the X axis."
24551 "name": "rotateY('angle')",
24552 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
24555 "name": "rotateZ('angle')",
24556 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
24560 "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."
24563 "name": "scale3d()",
24564 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
24567 "name": "scaleX()",
24568 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
24571 "name": "scaleY()",
24572 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
24575 "name": "scaleZ()",
24576 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
24580 "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)."
24584 "description": "Specifies a skew transformation along the X axis by the given angle."
24588 "description": "Specifies a skew transformation along the Y axis by the given angle."
24591 "name": "translate()",
24592 "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."
24595 "name": "translate3d()",
24596 "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."
24599 "name": "translateX()",
24600 "description": "Specifies a translation by the given amount in the X direction."
24603 "name": "translateY()",
24604 "description": "Specifies a translation by the given amount in the Y direction."
24607 "name": "translateZ()",
24608 "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."
24611 "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.",
24617 "name": "-moz-transform-origin",
24621 "description": "Establishes the origin of transformation for an element.",
24629 "name": "-moz-transition",
24636 "description": "Every property that is able to undergo a transition will do so."
24640 "description": "No property will transition."
24643 "description": "Shorthand property combines four of the transition properties into a single property.",
24652 "name": "-moz-transition-delay",
24656 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
24662 "name": "-moz-transition-duration",
24666 "description": "Specifies how long the transition from the old value to the new value should take.",
24672 "name": "-moz-transition-property",
24679 "description": "Every property that is able to undergo a transition will do so."
24683 "description": "No property will transition."
24686 "description": "Specifies the name of the CSS property to which the transition is applied.",
24692 "name": "-moz-transition-timing-function",
24696 "description": "Describes how the intermediate values used during a transition will be calculated.",
24702 "name": "-moz-user-focus",
24714 "status": "nonstandard",
24715 "syntax": "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
24718 "name": "MDN Reference",
24719 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
24722 "description": "Used to indicate whether the element can have focus."
24725 "name": "-moz-user-select",
24743 "name": "-moz-none"
24755 "description": "Controls the appearance of selection.",
24761 "name": "-ms-accelerator",
24769 "description": "The element does not contain an accelerator key sequence."
24773 "description": "The element contains an accelerator key sequence."
24776 "status": "nonstandard",
24777 "syntax": "false | true",
24778 "description": "IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",
24784 "name": "-ms-behavior",
24788 "description": "IE only. Used to extend behaviors of the browser",
24794 "name": "-ms-block-progression",
24801 "description": "Bottom-to-top block flow. Layout is horizontal."
24805 "description": "Left-to-right direction. The flow orientation is vertical."
24809 "description": "Right-to-left direction. The flow orientation is vertical."
24813 "description": "Top-to-bottom direction. The flow orientation is horizontal."
24816 "status": "nonstandard",
24817 "syntax": "tb | rl | bt | lr",
24818 "description": "Sets the block-progression value and the flow orientation",
24824 "name": "-ms-content-zoom-chaining",
24832 "description": "The nearest zoomable parent element begins zooming when the user hits a zoom limit during a manipulation. No bounce effect is shown."
24836 "description": "A bounce effect is shown when the user hits a zoom limit during a manipulation."
24839 "status": "nonstandard",
24840 "syntax": "none | chained",
24841 "description": "Specifies the zoom behavior that occurs when a user hits the zoom limit during a manipulation."
24844 "name": "-ms-content-zooming",
24852 "description": "The element is not zoomable."
24856 "description": "The element is zoomable."
24859 "status": "nonstandard",
24860 "syntax": "none | zoom",
24861 "description": "Specifies whether zooming is enabled.",
24867 "name": "-ms-content-zoom-limit",
24872 "status": "nonstandard",
24873 "syntax": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
24874 "description": "Shorthand property for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.",
24880 "name": "-ms-content-zoom-limit-max",
24885 "status": "nonstandard",
24886 "syntax": "<percentage>",
24887 "description": "Specifies the maximum zoom factor.",
24893 "name": "-ms-content-zoom-limit-min",
24898 "status": "nonstandard",
24899 "syntax": "<percentage>",
24900 "description": "Specifies the minimum zoom factor.",
24906 "name": "-ms-content-zoom-snap",
24913 "name": "mandatory",
24914 "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."
24918 "description": "Indicates that zooming is unaffected by any defined snap-points."
24921 "name": "proximity",
24922 "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."
24925 "name": "snapInterval(100%, 100%)",
24926 "description": "Specifies where the snap-points will be placed."
24929 "name": "snapList()",
24930 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
24933 "status": "nonstandard",
24934 "syntax": "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
24935 "description": "Shorthand property for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties."
24938 "name": "-ms-content-zoom-snap-points",
24945 "name": "snapInterval(100%, 100%)",
24946 "description": "Specifies where the snap-points will be placed."
24949 "name": "snapList()",
24950 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
24953 "status": "nonstandard",
24954 "syntax": "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
24955 "description": "Defines where zoom snap-points are located."
24958 "name": "-ms-content-zoom-snap-type",
24965 "name": "mandatory",
24966 "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."
24970 "description": "Indicates that zooming is unaffected by any defined snap-points."
24973 "name": "proximity",
24974 "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."
24977 "status": "nonstandard",
24978 "syntax": "none | proximity | mandatory",
24979 "description": "Specifies how zooming is affected by defined snap-points.",
24985 "name": "-ms-filter",
24989 "status": "nonstandard",
24990 "syntax": "<string>",
24991 "description": "IE only. Used to produce visual effects.",
24997 "name": "-ms-flex",
25004 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
25008 "description": "Expands to '0 0 auto'."
25011 "description": "specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",
25019 "name": "-ms-flex-align",
25025 "name": "baseline",
25026 "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."
25030 "description": "The flex item’s margin box is centered in the cross axis within the line."
25034 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
25038 "description": "The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."
25042 "description": "If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."
25045 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
25051 "name": "-ms-flex-direction",
25058 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
25061 "name": "column-reverse",
25062 "description": "Same as 'column', except the main-start and main-end directions are swapped."
25066 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
25069 "name": "row-reverse",
25070 "description": "Same as 'row', except the main-start and main-end directions are swapped."
25073 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
25079 "name": "-ms-flex-flow",
25086 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
25089 "name": "column-reverse",
25090 "description": "Same as 'column', except the main-start and main-end directions are swapped."
25094 "description": "The flex container is single-line."
25098 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
25102 "description": "The flexbox is multi-line."
25105 "name": "wrap-reverse",
25106 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
25109 "description": "Specifies how flexbox items are placed in the flexbox.",
25115 "name": "-ms-flex-item-align",
25122 "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."
25125 "name": "baseline",
25126 "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."
25130 "description": "The flex item’s margin box is centered in the cross axis within the line."
25134 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
25138 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
25142 "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."
25145 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
25151 "name": "-ms-flex-line-pack",
25158 "description": "Lines are packed toward the center of the flex container."
25161 "name": "distribute",
25162 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
25166 "description": "Lines are packed toward the end of the flex container."
25170 "description": "Lines are evenly distributed in the flex container."
25174 "description": "Lines are packed toward the start of the flex container."
25178 "description": "Lines stretch to take up the remaining space."
25181 "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.",
25187 "name": "-ms-flex-order",
25191 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
25197 "name": "-ms-flex-pack",
25204 "description": "Flex items are packed toward the center of the line."
25207 "name": "distribute",
25208 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
25212 "description": "Flex items are packed toward the end of the line."
25216 "description": "Flex items are evenly distributed in the line."
25220 "description": "Flex items are packed toward the start of the line."
25223 "description": "Aligns flex items along the main axis of the current line of the flex container.",
25229 "name": "-ms-flex-wrap",
25236 "description": "The flex container is single-line."
25240 "description": "The flexbox is multi-line."
25243 "name": "wrap-reverse",
25244 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
25247 "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.",
25253 "name": "-ms-flow-from",
25261 "description": "The block container is not a CSS Region."
25264 "status": "nonstandard",
25265 "syntax": "[ none | <custom-ident> ]#",
25266 "description": "Makes a block container a region and associates it with a named flow.",
25272 "name": "-ms-flow-into",
25280 "description": "The element is not moved to a named flow and normal CSS processing takes place."
25283 "status": "nonstandard",
25284 "syntax": "[ none | <custom-ident> ]#",
25285 "description": "Places an element or its contents into a named flow.",
25291 "name": "-ms-grid-column",
25307 "description": "Used to place grid items and explicitly defined grid cells in the Grid.",
25315 "name": "-ms-grid-column-align",
25323 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's column."
25327 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."
25331 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."
25335 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."
25338 "description": "Aligns the columns in a grid.",
25344 "name": "-ms-grid-columns",
25349 "description": "Lays out the columns of the grid."
25352 "name": "-ms-grid-column-span",
25357 "description": "Specifies the number of columns to span.",
25363 "name": "-ms-grid-layer",
25368 "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.",
25374 "name": "-ms-grid-row",
25390 "description": "grid-row is used to place grid items and explicitly defined grid cells in the Grid.",
25398 "name": "-ms-grid-row-align",
25406 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's row."
25410 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."
25414 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."
25418 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."
25421 "description": "Aligns the rows in a grid.",
25427 "name": "-ms-grid-rows",
25432 "description": "Lays out the columns of the grid."
25435 "name": "-ms-grid-row-span",
25440 "description": "Specifies the number of rows to span.",
25446 "name": "-ms-high-contrast-adjust",
25454 "description": "Properties will be adjusted as applicable."
25458 "description": "No adjustments will be applied."
25461 "status": "nonstandard",
25462 "syntax": "auto | none",
25463 "description": "Specifies if properties should be adjusted in high contrast mode.",
25469 "name": "-ms-hyphenate-limit-chars",
25477 "description": "The user agent chooses a value that adapts to the current layout."
25480 "status": "nonstandard",
25481 "syntax": "auto | <integer>{1,3}",
25482 "description": "Specifies the minimum number of characters in a hyphenated word.",
25488 "name": "-ms-hyphenate-limit-lines",
25495 "name": "no-limit",
25496 "description": "There is no limit."
25499 "status": "nonstandard",
25500 "syntax": "no-limit | <integer>",
25501 "description": "Indicates the maximum number of successive hyphenated lines in an element.",
25507 "name": "-ms-hyphenate-limit-zone",
25512 "status": "nonstandard",
25513 "syntax": "<percentage> | <length>",
25514 "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.",
25521 "name": "-ms-hyphens",
25529 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
25533 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
25537 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
25540 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
25546 "name": "-ms-ime-mode",
25553 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
25557 "description": "No change is made to the current input method editor state. This is the default."
25560 "name": "disabled",
25561 "description": "The input method editor is disabled and may not be activated by the user."
25564 "name": "inactive",
25565 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
25569 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
25572 "description": "Controls the state of the input method editor for text fields.",
25578 "name": "-ms-interpolation-mode",
25587 "name": "nearest-neighbor"
25590 "description": "Gets or sets the interpolation (resampling) method used to stretch images.",
25596 "name": "-ms-layout-grid",
25604 "description": "Any of the range of character values available to the -ms-layout-grid-char property."
25608 "description": "Any of the range of line values available to the -ms-layout-grid-line property."
25612 "description": "Any of the range of mode values available to the -ms-layout-grid-mode property."
25616 "description": "Any of the range of type values available to the -ms-layout-grid-type property."
25619 "description": "Sets or retrieves the composite document grid properties that specify the layout of text characters."
25622 "name": "-ms-layout-grid-char",
25630 "description": "Largest character in the font of the element is used to set the character grid."
25634 "description": "Default. No character grid is set."
25637 "description": "Sets or retrieves the size of the character grid used for rendering the text content of an element.",
25645 "name": "-ms-layout-grid-line",
25653 "description": "Largest character in the font of the element is used to set the character grid."
25657 "description": "Default. No grid line is set."
25660 "description": "Sets or retrieves the gridline value used for rendering the text content of an element.",
25666 "name": "-ms-layout-grid-mode",
25674 "description": "Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."
25678 "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."
25682 "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."
25686 "description": "No grid is used."
25689 "description": "Gets or sets whether the text layout grid uses two dimensions.",
25695 "name": "-ms-layout-grid-type",
25703 "description": "Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."
25707 "description": "Default. Grid used for Japanese and Korean characters."
25711 "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."
25714 "description": "Sets or retrieves the type of grid used for rendering the text content of an element.",
25720 "name": "-ms-line-break",
25728 "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."
25731 "name": "keep-all",
25732 "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."
25735 "name": "newspaper",
25736 "description": "Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
25740 "description": "Breaks CJK scripts using a normal set of line-breaking rules."
25744 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
25747 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
25753 "name": "-ms-overflow-style",
25761 "description": "No preference, UA should use the first scrolling method in the list that it supports."
25764 "name": "-ms-autohiding-scrollbar",
25765 "description": "Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."
25769 "description": "Indicates the element does not display scrollbars or panning indicators, even when its content overflows."
25772 "name": "scrollbar",
25773 "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."
25776 "status": "nonstandard",
25777 "syntax": "auto | none | scrollbar | -ms-autohiding-scrollbar",
25778 "description": "Specify whether content is clipped when it overflows the element's content area.",
25784 "name": "-ms-perspective",
25791 "description": "No perspective transform is applied."
25794 "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.",
25800 "name": "-ms-perspective-origin",
25804 "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.",
25812 "name": "-ms-perspective-origin-x",
25816 "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.",
25824 "name": "-ms-perspective-origin-y",
25828 "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.",
25836 "name": "-ms-progress-appearance",
25848 "description": "Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",
25854 "name": "-ms-scrollbar-3dlight-color",
25858 "status": "nonstandard",
25859 "syntax": "<color>",
25860 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
25866 "name": "-ms-scrollbar-arrow-color",
25870 "status": "nonstandard",
25871 "syntax": "<color>",
25872 "description": "Determines the color of the arrow elements of a scroll arrow.",
25878 "name": "-ms-scrollbar-base-color",
25882 "status": "nonstandard",
25883 "syntax": "<color>",
25884 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
25890 "name": "-ms-scrollbar-darkshadow-color",
25894 "status": "nonstandard",
25895 "syntax": "<color>",
25896 "description": "Determines the color of the gutter of a scroll bar.",
25902 "name": "-ms-scrollbar-face-color",
25906 "status": "nonstandard",
25907 "syntax": "<color>",
25908 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
25914 "name": "-ms-scrollbar-highlight-color",
25918 "status": "nonstandard",
25919 "syntax": "<color>",
25920 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
25926 "name": "-ms-scrollbar-shadow-color",
25930 "status": "nonstandard",
25931 "syntax": "<color>",
25932 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
25938 "name": "-ms-scrollbar-track-color",
25942 "status": "nonstandard",
25943 "syntax": "<color>",
25944 "description": "Determines the color of the track element of a scroll bar.",
25950 "name": "-ms-scroll-chaining",
25963 "status": "nonstandard",
25964 "syntax": "chained | none",
25965 "description": "Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",
25972 "name": "-ms-scroll-limit",
25982 "status": "nonstandard",
25983 "syntax": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
25984 "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.",
25990 "name": "-ms-scroll-limit-x-max",
26000 "status": "nonstandard",
26001 "syntax": "auto | <length>",
26002 "description": "Gets or sets a value that specifies the maximum value for the scrollLeft property.",
26008 "name": "-ms-scroll-limit-x-min",
26013 "status": "nonstandard",
26014 "syntax": "<length>",
26015 "description": "Gets or sets a value that specifies the minimum value for the scrollLeft property.",
26021 "name": "-ms-scroll-limit-y-max",
26031 "status": "nonstandard",
26032 "syntax": "auto | <length>",
26033 "description": "Gets or sets a value that specifies the maximum value for the scrollTop property.",
26039 "name": "-ms-scroll-limit-y-min",
26044 "status": "nonstandard",
26045 "syntax": "<length>",
26046 "description": "Gets or sets a value that specifies the minimum value for the scrollTop property.",
26052 "name": "-ms-scroll-rails",
26065 "status": "nonstandard",
26066 "syntax": "none | railed",
26067 "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).",
26074 "name": "-ms-scroll-snap-points-x",
26081 "name": "snapInterval(100%, 100%)"
26084 "name": "snapList()"
26087 "status": "nonstandard",
26088 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
26089 "description": "Gets or sets a value that defines where snap-points will be located along the x-axis.",
26095 "name": "-ms-scroll-snap-points-y",
26102 "name": "snapInterval(100%, 100%)"
26105 "name": "snapList()"
26108 "status": "nonstandard",
26109 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
26110 "description": "Gets or sets a value that defines where snap-points will be located along the y-axis.",
26116 "name": "-ms-scroll-snap-type",
26124 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
26127 "name": "mandatory",
26128 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
26131 "name": "proximity",
26132 "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."
26135 "status": "nonstandard",
26136 "syntax": "none | proximity | mandatory",
26137 "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.",
26143 "name": "-ms-scroll-snap-x",
26150 "name": "mandatory"
26156 "name": "proximity"
26159 "name": "snapInterval(100%, 100%)"
26162 "name": "snapList()"
26165 "status": "nonstandard",
26166 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
26167 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",
26173 "name": "-ms-scroll-snap-y",
26180 "name": "mandatory"
26186 "name": "proximity"
26189 "name": "snapInterval(100%, 100%)"
26192 "name": "snapList()"
26195 "status": "nonstandard",
26196 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
26197 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",
26203 "name": "-ms-scroll-translation",
26213 "name": "vertical-to-horizontal"
26216 "status": "nonstandard",
26217 "syntax": "none | vertical-to-horizontal",
26218 "description": "Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",
26224 "name": "-ms-text-align-last",
26235 "description": "The inline contents are centered within the line box."
26239 "description": "The text is justified according to the method specified by the 'text-justify' property."
26243 "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."
26247 "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."
26250 "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'.",
26256 "name": "-ms-text-autospace",
26263 "name": "ideograph-alpha",
26264 "description": "Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."
26267 "name": "ideograph-numeric",
26268 "description": "Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."
26271 "name": "ideograph-parenthesis",
26272 "description": "Creates extra spacing between normal (non wide) parenthesis and ideographs."
26275 "name": "ideograph-space",
26276 "description": "Extends the width of the space character while surrounded by ideographs."
26280 "description": "No extra space is created."
26283 "name": "punctuation",
26284 "description": "Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."
26287 "status": "nonstandard",
26288 "syntax": "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
26289 "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.",
26295 "name": "-ms-text-combine-horizontal",
26303 "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."
26307 "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."
26311 "description": "No special processing."
26314 "description": "This property specifies the combination of multiple characters into the space of a single character.",
26321 "name": "-ms-text-justify",
26329 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
26332 "name": "distribute",
26333 "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."
26336 "name": "inter-cluster",
26337 "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."
26340 "name": "inter-ideograph",
26341 "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."
26344 "name": "inter-word",
26345 "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."
26349 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
26352 "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.",
26358 "name": "-ms-text-kashida-space",
26363 "description": "Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.",
26369 "name": "-ms-text-overflow",
26376 "description": "Clip inline content that overflows. Characters may be only partially rendered."
26379 "name": "ellipsis",
26380 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
26383 "description": "Text can overflow for example when it is prevented from wrapping",
26389 "name": "-ms-text-size-adjust",
26397 "description": "Renderers must use the default size adjustment when displaying on a small device."
26401 "description": "Renderers must not do size adjustment when displaying on a small device."
26404 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
26411 "name": "-ms-text-underline-position",
26418 "name": "alphabetic",
26419 "description": "The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."
26423 "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."
26427 "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."
26431 "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."
26434 "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",
26440 "name": "-ms-touch-action",
26447 "description": "The element is a passive element, with several exceptions."
26450 "name": "double-tap-zoom",
26451 "description": "The element will zoom on double-tap."
26454 "name": "manipulation",
26455 "description": "The element is a manipulation-causing element."
26459 "description": "The element is a manipulation-blocking element."
26463 "description": "The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."
26467 "description": "The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."
26470 "name": "pinch-zoom",
26471 "description": "The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."
26474 "description": "Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",
26480 "name": "-ms-touch-select",
26487 "name": "grippers",
26488 "description": "Grippers are always on."
26492 "description": "Grippers are always off."
26495 "status": "nonstandard",
26496 "syntax": "grippers | none",
26497 "description": "Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",
26503 "name": "-ms-transform",
26509 "name": "matrix()",
26510 "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]"
26513 "name": "matrix3d()",
26514 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
26520 "name": "rotate()",
26521 "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."
26524 "name": "rotate3d()",
26525 "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."
26528 "name": "rotateX('angle')",
26529 "description": "Specifies a clockwise rotation by the given angle about the X axis."
26532 "name": "rotateY('angle')",
26533 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
26536 "name": "rotateZ('angle')",
26537 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
26541 "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."
26544 "name": "scale3d()",
26545 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
26548 "name": "scaleX()",
26549 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
26552 "name": "scaleY()",
26553 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
26556 "name": "scaleZ()",
26557 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
26561 "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)."
26565 "description": "Specifies a skew transformation along the X axis by the given angle."
26569 "description": "Specifies a skew transformation along the Y axis by the given angle."
26572 "name": "translate()",
26573 "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."
26576 "name": "translate3d()",
26577 "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."
26580 "name": "translateX()",
26581 "description": "Specifies a translation by the given amount in the X direction."
26584 "name": "translateY()",
26585 "description": "Specifies a translation by the given amount in the Y direction."
26588 "name": "translateZ()",
26589 "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."
26592 "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.",
26598 "name": "-ms-transform-origin",
26602 "description": "Establishes the origin of transformation for an element.",
26610 "name": "-ms-transform-origin-x",
26614 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
26621 "name": "-ms-transform-origin-y",
26625 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
26632 "name": "-ms-transform-origin-z",
26636 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
26643 "name": "-ms-user-select",
26659 "status": "nonstandard",
26660 "syntax": "none | element | text",
26661 "description": "Controls the appearance of selection.",
26667 "name": "-ms-word-break",
26673 "name": "break-all",
26674 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
26677 "name": "keep-all",
26678 "description": "Block characters can no longer create implied break points."
26682 "description": "Breaks non-CJK scripts according to their own rules."
26685 "description": "Specifies line break opportunities for non-CJK scripts.",
26691 "name": "-ms-word-wrap",
26697 "name": "break-word",
26698 "description": "An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
26702 "description": "Lines may break only at allowed break points."
26705 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
26711 "name": "-ms-wrap-flow",
26719 "description": "For floats an exclusion is created, for all other elements an exclusion is not created."
26723 "description": "Inline flow content can flow on all sides of the exclusion."
26727 "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."
26731 "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."
26735 "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."
26739 "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."
26743 "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."
26746 "status": "nonstandard",
26747 "syntax": "auto | both | start | end | maximum | clear",
26748 "description": "An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",
26754 "name": "-ms-wrap-margin",
26759 "status": "nonstandard",
26760 "syntax": "<length>",
26761 "description": "Gets or sets a value that is used to offset the inner wrap shape from other shapes.",
26768 "name": "-ms-wrap-through",
26776 "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."
26780 "description": "The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."
26783 "status": "nonstandard",
26784 "syntax": "wrap | none",
26785 "description": "Specifies if an element inherits its parent wrapping context. In other words if it is subject to the exclusions defined outside the element.",
26791 "name": "-ms-writing-mode",
26821 "description": "Shorthand property for both 'direction' and 'block-progression'.",
26827 "name": "-ms-zoom",
26836 "description": "Sets or retrieves the magnification scale of the object.",
26845 "name": "-ms-zoom-animation",
26857 "description": "Gets or sets a value that indicates whether an animation is used when zooming.",
26863 "name": "nav-down",
26870 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
26874 "description": "Indicates that the user agent should target the frame that the element is in."
26878 "description": "Indicates that the user agent should target the full window."
26881 "description": "Provides an way to control directional focus navigation.",
26889 "name": "nav-index",
26896 "description": "The element's sequential navigation order is assigned automatically by the user agent."
26899 "description": "Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",
26905 "name": "nav-left",
26912 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
26916 "description": "Indicates that the user agent should target the frame that the element is in."
26920 "description": "Indicates that the user agent should target the full window."
26923 "description": "Provides an way to control directional focus navigation.",
26931 "name": "nav-right",
26938 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
26942 "description": "Indicates that the user agent should target the frame that the element is in."
26946 "description": "Indicates that the user agent should target the full window."
26949 "description": "Provides an way to control directional focus navigation.",
26964 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
26968 "description": "Indicates that the user agent should target the frame that the element is in."
26972 "description": "Indicates that the user agent should target the full window."
26975 "description": "Provides an way to control directional focus navigation.",
26983 "name": "negative",
26987 "syntax": "<symbol> <symbol>?",
26988 "description": "@counter-style descriptor. Defines how to alter the representation when the counter value is negative.",
26996 "name": "-o-animation",
27002 "name": "alternate",
27003 "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."
27006 "name": "alternate-reverse",
27007 "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."
27010 "name": "backwards",
27011 "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'."
27015 "description": "Both forwards and backwards fill modes are applied."
27018 "name": "forwards",
27019 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
27022 "name": "infinite",
27023 "description": "Causes the animation to repeat forever."
27027 "description": "No animation is performed"
27031 "description": "Normal playback."
27035 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
27038 "description": "Shorthand property combines six of the animation properties into a single property.",
27048 "name": "-o-animation-delay",
27052 "description": "Defines when the animation will start.",
27058 "name": "-o-animation-direction",
27064 "name": "alternate",
27065 "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."
27068 "name": "alternate-reverse",
27069 "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."
27073 "description": "Normal playback."
27077 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
27080 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
27086 "name": "-o-animation-duration",
27090 "description": "Defines the length of time that an animation takes to complete one cycle.",
27096 "name": "-o-animation-fill-mode",
27102 "name": "backwards",
27103 "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'."
27107 "description": "Both forwards and backwards fill modes are applied."
27110 "name": "forwards",
27111 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
27115 "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."
27118 "description": "Defines what values are applied by the animation outside the time it is executing.",
27124 "name": "-o-animation-iteration-count",
27130 "name": "infinite",
27131 "description": "Causes the animation to repeat forever."
27134 "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.",
27141 "name": "-o-animation-name",
27148 "description": "No animation is performed"
27151 "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.",
27158 "name": "-o-animation-play-state",
27165 "description": "A running animation will be paused."
27169 "description": "Resume playback of a paused animation."
27172 "description": "Defines whether the animation is running or paused.",
27178 "name": "-o-animation-timing-function",
27182 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
27188 "name": "-o-border-image",
27195 "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."
27199 "description": "Causes the middle part of the border-image to be preserved."
27206 "description": "The image is tiled (repeated) to fill the area."
27210 "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."
27214 "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."
27218 "description": "The image is stretched to fill the area."
27221 "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.",
27231 "name": "-o-object-fit",
27238 "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."
27242 "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."
27246 "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."
27250 "description": "The replaced content is not resized to fit inside the element's content box"
27253 "name": "scale-down",
27254 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
27257 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
27263 "name": "-o-object-position",
27267 "description": "Determines the alignment of the replaced element inside its box.",
27275 "name": "-o-table-baseline",
27279 "description": "Determines which row of a inline-table should be used as baseline of inline-table.",
27285 "name": "-o-tab-size",
27289 "description": "This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
27296 "name": "-o-text-overflow",
27303 "description": "Clip inline content that overflows. Characters may be only partially rendered."
27306 "name": "ellipsis",
27307 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
27310 "description": "Text can overflow for example when it is prevented from wrapping",
27316 "name": "-o-transform",
27322 "name": "matrix()",
27323 "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]"
27326 "name": "matrix3d()",
27327 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
27333 "name": "rotate()",
27334 "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."
27337 "name": "rotate3d()",
27338 "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."
27341 "name": "rotateX('angle')",
27342 "description": "Specifies a clockwise rotation by the given angle about the X axis."
27345 "name": "rotateY('angle')",
27346 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
27349 "name": "rotateZ('angle')",
27350 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
27354 "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."
27357 "name": "scale3d()",
27358 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
27361 "name": "scaleX()",
27362 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
27365 "name": "scaleY()",
27366 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
27369 "name": "scaleZ()",
27370 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
27374 "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)."
27378 "description": "Specifies a skew transformation along the X axis by the given angle."
27382 "description": "Specifies a skew transformation along the Y axis by the given angle."
27385 "name": "translate()",
27386 "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."
27389 "name": "translate3d()",
27390 "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."
27393 "name": "translateX()",
27394 "description": "Specifies a translation by the given amount in the X direction."
27397 "name": "translateY()",
27398 "description": "Specifies a translation by the given amount in the Y direction."
27401 "name": "translateZ()",
27402 "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."
27405 "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.",
27411 "name": "-o-transform-origin",
27415 "description": "Establishes the origin of transformation for an element.",
27423 "name": "-o-transition",
27430 "description": "Every property that is able to undergo a transition will do so."
27434 "description": "No property will transition."
27437 "description": "Shorthand property combines four of the transition properties into a single property.",
27446 "name": "-o-transition-delay",
27450 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
27456 "name": "-o-transition-duration",
27460 "description": "Specifies how long the transition from the old value to the new value should take.",
27466 "name": "-o-transition-property",
27473 "description": "Every property that is able to undergo a transition will do so."
27477 "description": "No property will transition."
27480 "description": "Specifies the name of the CSS property to which the transition is applied.",
27486 "name": "-o-transition-timing-function",
27490 "description": "Describes how the intermediate values used during a transition will be calculated.",
27496 "name": "offset-block-end",
27503 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
27506 "description": "Logical 'bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
27513 "name": "offset-block-start",
27520 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
27523 "description": "Logical 'top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
27530 "name": "offset-inline-end",
27537 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
27540 "description": "Logical 'right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
27547 "name": "offset-inline-start",
27554 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
27557 "description": "Logical 'left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
27568 "syntax": "<integer> && <symbol>",
27569 "description": "@counter-style descriptor. Specifies a “fixed-width” counter style, where representations shorter than the pad value are padded with a particular <symbol>",
27582 "syntax": "<symbol>",
27583 "description": "@counter-style descriptor. Specifies a <symbol> that is prepended to the marker representation.",
27598 "description": "The range depends on the counter system."
27601 "name": "infinite",
27602 "description": "If used as the first value in a range, it represents negative infinity; if used as the second value, it represents positive infinity."
27605 "syntax": "[ [ <integer> | infinite ]{2} ]# | auto",
27606 "description": "@counter-style descriptor. Defines the ranges over which the counter style is defined.",
27613 "name": "ruby-align",
27623 "description": "The user agent determines how the ruby contents are aligned. This is the initial value."
27627 "description": "The ruby content is centered within its box."
27630 "name": "distribute-letter",
27634 "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."
27637 "name": "distribute-space",
27641 "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."
27645 "description": "The ruby text content is aligned with the start edge of the base."
27648 "name": "line-edge",
27652 "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."
27659 "description": "The ruby text content is aligned with the end edge of the base."
27666 "description": "The ruby text content is aligned with the start edge of the base."
27669 "name": "space-between",
27673 "description": "The ruby content expands as defined for normal text justification (as defined by 'text-justify'),"
27676 "name": "space-around",
27680 "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."
27683 "status": "experimental",
27684 "syntax": "start | center | space-between | space-around",
27687 "name": "MDN Reference",
27688 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
27691 "description": "Specifies how text is distributed within the various ruby boxes when their contents do not exactly fill their respective boxes.",
27697 "name": "ruby-overhang",
27705 "description": "The ruby text can overhang text adjacent to the base on either side. This is the initial value."
27709 "description": "The ruby text can overhang the text that follows it."
27713 "description": "The ruby text cannot overhang any text adjacent to its base, only its own base."
27717 "description": "The ruby text can overhang the text that precedes it."
27720 "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.",
27726 "name": "ruby-position",
27734 "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."
27738 "description": "The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."
27745 "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."
27748 "status": "experimental",
27749 "syntax": "over | under | inter-character",
27752 "name": "MDN Reference",
27753 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
27756 "description": "Used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",
27762 "name": "ruby-span",
27769 "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."
27773 "description": "No spanning. The computed value is '1'."
27776 "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.",
27782 "name": "scrollbar-3dlight-color",
27788 "name": "MDN Reference",
27789 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-3dlight-color"
27792 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
27798 "name": "scrollbar-arrow-color",
27804 "name": "MDN Reference",
27805 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-arrow-color"
27808 "description": "Determines the color of the arrow elements of a scroll arrow.",
27814 "name": "scrollbar-base-color",
27820 "name": "MDN Reference",
27821 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-base-color"
27824 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
27830 "name": "scrollbar-darkshadow-color",
27836 "name": "MDN Reference",
27837 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-darkshadow-color"
27840 "description": "Determines the color of the gutter of a scroll bar.",
27846 "name": "scrollbar-face-color",
27852 "name": "MDN Reference",
27853 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-face-color"
27856 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
27862 "name": "scrollbar-highlight-color",
27868 "name": "MDN Reference",
27869 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-highlight-color"
27872 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
27878 "name": "scrollbar-shadow-color",
27884 "name": "MDN Reference",
27885 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-shadow-color"
27888 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
27894 "name": "scrollbar-track-color",
27900 "name": "MDN Reference",
27901 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-track-color"
27904 "description": "Determines the color of the track element of a scroll bar.",
27914 "syntax": "<symbol>",
27915 "description": "@counter-style descriptor. Specifies a <symbol> that is appended to the marker representation.",
27929 "name": "additive",
27930 "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."
27933 "name": "alphabetic",
27934 "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\"."
27938 "description": "Cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list."
27942 "description": "Use the algorithm of another counter style, but alter other aspects."
27946 "description": "Runs through its list of counter symbols once, then falls back."
27950 "description": "interprets the list of counter symbols as digits to a \"place-value\" numbering system, similar to the default 'decimal' counter style."
27953 "name": "symbolic",
27954 "description": "Cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."
27957 "syntax": "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
27958 "description": "@counter-style descriptor. Specifies which algorithm will be used to construct the counter’s representation based on the counter value.",
27969 "syntax": "<symbol>+",
27970 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor.",
27978 "name": "-webkit-animation",
27985 "name": "alternate",
27986 "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."
27989 "name": "alternate-reverse",
27990 "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."
27993 "name": "backwards",
27994 "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'."
27998 "description": "Both forwards and backwards fill modes are applied."
28001 "name": "forwards",
28002 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
28005 "name": "infinite",
28006 "description": "Causes the animation to repeat forever."
28010 "description": "No animation is performed"
28014 "description": "Normal playback."
28018 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
28021 "description": "Shorthand property combines six of the animation properties into a single property.",
28031 "name": "-webkit-animation-delay",
28036 "description": "Defines when the animation will start.",
28042 "name": "-webkit-animation-direction",
28049 "name": "alternate",
28050 "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."
28053 "name": "alternate-reverse",
28054 "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."
28058 "description": "Normal playback."
28062 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
28065 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
28071 "name": "-webkit-animation-duration",
28076 "description": "Defines the length of time that an animation takes to complete one cycle.",
28082 "name": "-webkit-animation-fill-mode",
28089 "name": "backwards",
28090 "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'."
28094 "description": "Both forwards and backwards fill modes are applied."
28097 "name": "forwards",
28098 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
28102 "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."
28105 "description": "Defines what values are applied by the animation outside the time it is executing.",
28111 "name": "-webkit-animation-iteration-count",
28118 "name": "infinite",
28119 "description": "Causes the animation to repeat forever."
28122 "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.",
28129 "name": "-webkit-animation-name",
28137 "description": "No animation is performed"
28140 "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.",
28147 "name": "-webkit-animation-play-state",
28155 "description": "A running animation will be paused."
28159 "description": "Resume playback of a paused animation."
28162 "description": "Defines whether the animation is running or paused.",
28168 "name": "-webkit-animation-timing-function",
28173 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
28179 "name": "-webkit-appearance",
28189 "name": "button-bevel"
28192 "name": "caps-lock-indicator"
28201 "name": "default-button"
28210 "name": "media-fullscreen-button"
28213 "name": "media-mute-button"
28216 "name": "media-play-button"
28219 "name": "media-seek-back-button"
28222 "name": "media-seek-forward-button"
28225 "name": "media-slider"
28228 "name": "media-sliderthumb"
28234 "name": "menulist-button"
28237 "name": "menulist-text"
28240 "name": "menulist-textfield"
28246 "name": "push-button"
28252 "name": "scrollbarbutton-down"
28255 "name": "scrollbarbutton-left"
28258 "name": "scrollbarbutton-right"
28261 "name": "scrollbarbutton-up"
28264 "name": "scrollbargripper-horizontal"
28267 "name": "scrollbargripper-vertical"
28270 "name": "scrollbarthumb-horizontal"
28273 "name": "scrollbarthumb-vertical"
28276 "name": "scrollbartrack-horizontal"
28279 "name": "scrollbartrack-vertical"
28282 "name": "searchfield"
28285 "name": "searchfield-cancel-button"
28288 "name": "searchfield-decoration"
28291 "name": "searchfield-results-button"
28294 "name": "searchfield-results-decoration"
28297 "name": "slider-horizontal"
28300 "name": "sliderthumb-horizontal"
28303 "name": "sliderthumb-vertical"
28306 "name": "slider-vertical"
28309 "name": "square-button"
28315 "name": "textfield"
28318 "status": "nonstandard",
28319 "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",
28320 "description": "Changes the appearance of buttons and other controls to resemble native controls.",
28326 "name": "-webkit-backdrop-filter",
28333 "description": "No filter effects are applied."
28337 "description": "Applies a Gaussian blur to the input image."
28340 "name": "brightness()",
28341 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
28344 "name": "contrast()",
28345 "description": "Adjusts the contrast of the input."
28348 "name": "drop-shadow()",
28349 "description": "Applies a drop shadow effect to the input image."
28352 "name": "grayscale()",
28353 "description": "Converts the input image to grayscale."
28356 "name": "hue-rotate()",
28357 "description": "Applies a hue rotation on the input image. "
28360 "name": "invert()",
28361 "description": "Inverts the samples in the input image."
28364 "name": "opacity()",
28365 "description": "Applies transparency to the samples in the input image."
28368 "name": "saturate()",
28369 "description": "Saturates the input image."
28373 "description": "Converts the input image to sepia."
28377 "description": "A filter reference to a <filter> element."
28380 "description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image.",
28387 "name": "-webkit-backface-visibility",
28400 "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.",
28406 "name": "-webkit-background-clip",
28411 "description": "Determines the background painting area.",
28417 "name": "-webkit-background-composite",
28435 "name": "-webkit-background-origin",
28440 "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).",
28446 "name": "-webkit-border-image",
28454 "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."
28458 "description": "Causes the middle part of the border-image to be preserved."
28465 "description": "The image is tiled (repeated) to fill the area."
28469 "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."
28473 "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."
28477 "description": "The image is stretched to fill the area."
28483 "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.",
28493 "name": "-webkit-box-align",
28500 "name": "baseline",
28501 "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."
28505 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
28509 "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."
28513 "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."
28517 "description": "The height of each child is adjusted to that of the containing block."
28520 "description": "Specifies the alignment of nested elements within an outer flexible box element.",
28526 "name": "-webkit-box-direction",
28534 "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."
28538 "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."
28541 "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).",
28547 "name": "-webkit-box-flex",
28552 "description": "Specifies an element's flexibility.",
28558 "name": "-webkit-box-flex-group",
28563 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
28569 "name": "-webkit-box-ordinal-group",
28574 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
28580 "name": "-webkit-box-orient",
28587 "name": "block-axis",
28588 "description": "Elements are oriented along the box's axis."
28591 "name": "horizontal",
28592 "description": "The box displays its children from left to right in a horizontal line."
28595 "name": "inline-axis",
28596 "description": "Elements are oriented vertically."
28599 "name": "vertical",
28600 "description": "The box displays its children from stacked from top to bottom vertically."
28603 "description": "In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",
28609 "name": "-webkit-box-pack",
28617 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
28621 "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."
28625 "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."
28629 "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."
28632 "description": "Specifies alignment of child elements within the current element in the direction of orientation.",
28638 "name": "-webkit-box-reflect",
28647 "description": "The reflection appears above the border box."
28651 "description": "The reflection appears below the border box."
28655 "description": "The reflection appears to the left of the border box."
28659 "description": "The reflection appears to the right of the border box."
28662 "status": "nonstandard",
28663 "syntax": "[ above | below | right | left ]? <length>? <image>?",
28666 "name": "MDN Reference",
28667 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
28670 "description": "Defines a reflection of a border box."
28673 "name": "-webkit-box-sizing",
28680 "name": "border-box",
28681 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
28684 "name": "content-box",
28685 "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."
28688 "description": "Box Model addition in CSS3.",
28694 "name": "-webkit-break-after",
28701 "description": "Always force a page break before/after the generated box."
28705 "description": "Neither force nor forbid a page/column break before/after the generated box."
28709 "description": "Avoid a page/column break before/after the generated box."
28712 "name": "avoid-column",
28713 "description": "Avoid a column break before/after the generated box."
28716 "name": "avoid-page",
28717 "description": "Avoid a page break before/after the generated box."
28720 "name": "avoid-region"
28724 "description": "Always force a column break before/after the generated box."
28728 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
28732 "description": "Always force a page break before/after the generated box."
28739 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
28742 "description": "Describes the page/column break behavior before the generated box.",
28748 "name": "-webkit-break-before",
28755 "description": "Always force a page break before/after the generated box."
28759 "description": "Neither force nor forbid a page/column break before/after the generated box."
28763 "description": "Avoid a page/column break before/after the generated box."
28766 "name": "avoid-column",
28767 "description": "Avoid a column break before/after the generated box."
28770 "name": "avoid-page",
28771 "description": "Avoid a page break before/after the generated box."
28774 "name": "avoid-region"
28778 "description": "Always force a column break before/after the generated box."
28782 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
28786 "description": "Always force a page break before/after the generated box."
28793 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
28796 "description": "Describes the page/column break behavior before the generated box.",
28802 "name": "-webkit-break-inside",
28809 "description": "Neither force nor forbid a page/column break inside the generated box."
28813 "description": "Avoid a page/column break inside the generated box."
28816 "name": "avoid-column",
28817 "description": "Avoid a column break inside the generated box."
28820 "name": "avoid-page",
28821 "description": "Avoid a page break inside the generated box."
28824 "name": "avoid-region"
28827 "description": "Describes the page/column break behavior inside the generated box.",
28833 "name": "-webkit-column-break-after",
28841 "description": "Always force a page break before/after the generated box."
28845 "description": "Neither force nor forbid a page/column break before/after the generated box."
28849 "description": "Avoid a page/column break before/after the generated box."
28852 "name": "avoid-column",
28853 "description": "Avoid a column break before/after the generated box."
28856 "name": "avoid-page",
28857 "description": "Avoid a page break before/after the generated box."
28860 "name": "avoid-region"
28864 "description": "Always force a column break before/after the generated box."
28868 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
28872 "description": "Always force a page break before/after the generated box."
28879 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
28882 "description": "Describes the page/column break behavior before the generated box.",
28888 "name": "-webkit-column-break-before",
28896 "description": "Always force a page break before/after the generated box."
28900 "description": "Neither force nor forbid a page/column break before/after the generated box."
28904 "description": "Avoid a page/column break before/after the generated box."
28907 "name": "avoid-column",
28908 "description": "Avoid a column break before/after the generated box."
28911 "name": "avoid-page",
28912 "description": "Avoid a page break before/after the generated box."
28915 "name": "avoid-region"
28919 "description": "Always force a column break before/after the generated box."
28923 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
28927 "description": "Always force a page break before/after the generated box."
28934 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
28937 "description": "Describes the page/column break behavior before the generated box.",
28943 "name": "-webkit-column-break-inside",
28951 "description": "Neither force nor forbid a page/column break inside the generated box."
28955 "description": "Avoid a page/column break inside the generated box."
28958 "name": "avoid-column",
28959 "description": "Avoid a column break inside the generated box."
28962 "name": "avoid-page",
28963 "description": "Avoid a page break inside the generated box."
28966 "name": "avoid-region"
28969 "description": "Describes the page/column break behavior inside the generated box.",
28975 "name": "-webkit-column-count",
28983 "description": "Determines the number of columns by the 'column-width' property and the element width."
28986 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
28992 "name": "-webkit-column-gap",
29000 "description": "User agent specific and typically equivalent to 1em."
29003 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
29009 "name": "-webkit-column-rule",
29014 "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.",
29023 "name": "-webkit-column-rule-color",
29028 "description": "Sets the color of the column rule",
29034 "name": "-webkit-column-rule-style",
29039 "description": "Sets the style of the rule between columns of an element.",
29045 "name": "-webkit-column-rule-width",
29050 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
29057 "name": "-webkit-columns",
29065 "description": "The width depends on the values of other properties."
29068 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
29075 "name": "-webkit-column-span",
29083 "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."
29087 "description": "The element does not span multiple columns."
29090 "description": "Describes the page/column break behavior after the generated box.",
29096 "name": "-webkit-column-width",
29104 "description": "The width depends on the values of other properties."
29107 "description": "This property describes the width of columns in multicol elements.",
29113 "name": "-webkit-filter",
29122 "description": "No filter effects are applied."
29126 "description": "Applies a Gaussian blur to the input image."
29129 "name": "brightness()",
29130 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
29133 "name": "contrast()",
29134 "description": "Adjusts the contrast of the input."
29137 "name": "drop-shadow()",
29138 "description": "Applies a drop shadow effect to the input image."
29141 "name": "grayscale()",
29142 "description": "Converts the input image to grayscale."
29145 "name": "hue-rotate()",
29146 "description": "Applies a hue rotation on the input image. "
29149 "name": "invert()",
29150 "description": "Inverts the samples in the input image."
29153 "name": "opacity()",
29154 "description": "Applies transparency to the samples in the input image."
29157 "name": "saturate()",
29158 "description": "Saturates the input image."
29162 "description": "Converts the input image to sepia."
29166 "description": "A filter reference to a <filter> element."
29169 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
29176 "name": "-webkit-flow-from",
29183 "description": "The block container is not a CSS Region."
29186 "description": "Makes a block container a region and associates it with a named flow.",
29192 "name": "-webkit-flow-into",
29199 "description": "The element is not moved to a named flow and normal CSS processing takes place."
29202 "description": "Places an element or its contents into a named flow.",
29208 "name": "-webkit-font-feature-settings",
29242 "description": "No change in glyph substitution or positioning occurs."
29251 "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.",
29258 "name": "-webkit-hyphens",
29265 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
29269 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
29273 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
29276 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
29282 "name": "-webkit-line-break",
29289 "name": "after-white-space"
29295 "description": "Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text."
29298 "name": "-webkit-margin-bottom-collapse",
29319 "name": "-webkit-margin-collapse",
29340 "name": "-webkit-margin-start",
29356 "name": "-webkit-margin-top-collapse",
29377 "name": "-webkit-mask-clip",
29383 "status": "nonstandard",
29384 "syntax": "[ <box> | border | padding | content | text ]#",
29385 "description": "Determines the mask painting area, which determines the area that is affected by the mask.",
29391 "name": "-webkit-mask-image",
29400 "description": "Counts as a transparent black image layer."
29404 "description": "Reference to a <mask element or to a CSS image."
29407 "status": "nonstandard",
29408 "syntax": "<mask-reference>#",
29409 "description": "Sets the mask layer image of an element.",
29417 "name": "-webkit-mask-origin",
29423 "status": "nonstandard",
29424 "syntax": "[ <box> | border | padding | content ]#",
29425 "description": "Specifies the mask positioning area.",
29431 "name": "-webkit-mask-repeat",
29437 "status": "nonstandard",
29438 "syntax": "<repeat-style>#",
29439 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
29445 "name": "-webkit-mask-size",
29454 "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%."
29458 "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."
29462 "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."
29465 "status": "nonstandard",
29466 "syntax": "<bg-size>#",
29467 "description": "Specifies the size of the mask layer images.",
29475 "name": "-webkit-nbsp-mode",
29488 "description": "Defines the behavior of nonbreaking spaces within text."
29491 "name": "-webkit-overflow-scrolling",
29504 "status": "nonstandard",
29505 "syntax": "auto | touch",
29508 "name": "MDN Reference",
29509 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
29512 "description": "Specifies whether to use native-style scrolling in an overflow:scroll element."
29515 "name": "-webkit-padding-start",
29526 "name": "-webkit-perspective",
29534 "description": "No perspective transform is applied."
29537 "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.",
29543 "name": "-webkit-perspective-origin",
29548 "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.",
29556 "name": "-webkit-region-fragment",
29563 "description": "Content flows as it would in a regular content box."
29567 "description": "If the content fits within the CSS Region, then this property has no effect."
29570 "description": "The 'region-fragment' property controls the behavior of the last region associated with a named flow.",
29576 "name": "-webkit-tap-highlight-color",
29582 "status": "nonstandard",
29583 "syntax": "<color>",
29589 "name": "-webkit-text-fill-color",
29597 "status": "nonstandard",
29598 "syntax": "<color>",
29601 "name": "MDN Reference",
29602 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
29610 "name": "-webkit-text-size-adjust",
29619 "description": "Renderers must use the default size adjustment when displaying on a small device."
29623 "description": "Renderers must not do size adjustment when displaying on a small device."
29626 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
29632 "name": "-webkit-text-stroke",
29640 "status": "nonstandard",
29641 "syntax": "<length> || <color>",
29644 "name": "MDN Reference",
29645 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
29656 "name": "-webkit-text-stroke-color",
29664 "status": "nonstandard",
29665 "syntax": "<color>",
29668 "name": "MDN Reference",
29669 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
29677 "name": "-webkit-text-stroke-width",
29685 "status": "nonstandard",
29686 "syntax": "<length>",
29689 "name": "MDN Reference",
29690 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
29700 "name": "-webkit-touch-callout",
29709 "status": "nonstandard",
29710 "syntax": "default | none",
29713 "name": "MDN Reference",
29714 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
29722 "name": "-webkit-transform",
29730 "name": "matrix()",
29731 "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]"
29734 "name": "matrix3d()",
29735 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
29741 "name": "perspective()",
29742 "description": "Specifies a perspective projection matrix."
29745 "name": "rotate()",
29746 "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."
29749 "name": "rotate3d()",
29750 "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."
29753 "name": "rotateX('angle')",
29754 "description": "Specifies a clockwise rotation by the given angle about the X axis."
29757 "name": "rotateY('angle')",
29758 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
29761 "name": "rotateZ('angle')",
29762 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
29766 "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."
29769 "name": "scale3d()",
29770 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
29773 "name": "scaleX()",
29774 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
29777 "name": "scaleY()",
29778 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
29781 "name": "scaleZ()",
29782 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
29786 "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)."
29790 "description": "Specifies a skew transformation along the X axis by the given angle."
29794 "description": "Specifies a skew transformation along the Y axis by the given angle."
29797 "name": "translate()",
29798 "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."
29801 "name": "translate3d()",
29802 "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."
29805 "name": "translateX()",
29806 "description": "Specifies a translation by the given amount in the X direction."
29809 "name": "translateY()",
29810 "description": "Specifies a translation by the given amount in the Y direction."
29813 "name": "translateZ()",
29814 "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."
29817 "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.",
29823 "name": "-webkit-transform-origin",
29829 "description": "Establishes the origin of transformation for an element.",
29837 "name": "-webkit-transform-origin-x",
29842 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
29849 "name": "-webkit-transform-origin-y",
29854 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
29861 "name": "-webkit-transform-origin-z",
29866 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
29873 "name": "-webkit-transform-style",
29881 "description": "All children of this element are rendered flattened into the 2D plane of the element."
29884 "description": "Defines how nested elements are rendered in 3D space.",
29890 "name": "-webkit-transition",
29899 "description": "Every property that is able to undergo a transition will do so."
29903 "description": "No property will transition."
29906 "description": "Shorthand property combines four of the transition properties into a single property.",
29915 "name": "-webkit-transition-delay",
29921 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
29927 "name": "-webkit-transition-duration",
29933 "description": "Specifies how long the transition from the old value to the new value should take.",
29939 "name": "-webkit-transition-property",
29948 "description": "Every property that is able to undergo a transition will do so."
29952 "description": "No property will transition."
29955 "description": "Specifies the name of the CSS property to which the transition is applied.",
29961 "name": "-webkit-transition-timing-function",
29967 "description": "Describes how the intermediate values used during a transition will be calculated.",
29973 "name": "-webkit-user-drag",
29993 "name": "-webkit-user-modify",
30000 "name": "read-only"
30003 "name": "read-write"
30006 "name": "read-write-plaintext-only"
30009 "status": "nonstandard",
30010 "syntax": "read-only | read-write | read-write-plaintext-only",
30011 "description": "Determines whether a user can edit the content of an element.",
30017 "name": "-webkit-user-select",
30033 "description": "Controls the appearance of selection.",
30039 "name": "-ms-ime-align",
30040 "status": "nonstandard",
30041 "syntax": "auto | after",
30042 "description": "Aligns the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active."
30045 "name": "-moz-binding",
30046 "status": "nonstandard",
30047 "syntax": "<url> | none",
30053 "name": "MDN Reference",
30054 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
30057 "description": "The -moz-binding CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element."
30060 "name": "-moz-context-properties",
30061 "status": "nonstandard",
30062 "syntax": "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
30068 "name": "MDN Reference",
30069 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
30072 "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."
30075 "name": "-moz-float-edge",
30076 "status": "nonstandard",
30077 "syntax": "border-box | content-box | margin-box | padding-box",
30078 "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."
30081 "name": "-moz-force-broken-image-icon",
30082 "status": "nonstandard",
30083 "syntax": "<integer>",
30084 "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."
30087 "name": "-moz-image-region",
30088 "status": "nonstandard",
30089 "syntax": "<shape> | auto",
30095 "name": "MDN Reference",
30096 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
30099 "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."
30102 "name": "-moz-orient",
30103 "status": "nonstandard",
30104 "syntax": "inline | block | horizontal | vertical",
30110 "name": "MDN Reference",
30111 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
30114 "description": "The -moz-orient CSS property specifies the orientation of the element to which it's applied."
30117 "name": "-moz-outline-radius",
30118 "status": "nonstandard",
30119 "syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
30125 "name": "MDN Reference",
30126 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
30129 "description": "In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."
30132 "name": "-moz-outline-radius-bottomleft",
30133 "status": "nonstandard",
30134 "syntax": "<outline-radius>",
30135 "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."
30138 "name": "-moz-outline-radius-bottomright",
30139 "status": "nonstandard",
30140 "syntax": "<outline-radius>",
30141 "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."
30144 "name": "-moz-outline-radius-topleft",
30145 "status": "nonstandard",
30146 "syntax": "<outline-radius>",
30147 "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."
30150 "name": "-moz-outline-radius-topright",
30151 "status": "nonstandard",
30152 "syntax": "<outline-radius>",
30153 "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."
30156 "name": "-moz-stack-sizing",
30157 "status": "nonstandard",
30158 "syntax": "ignore | stretch-to-fit",
30159 "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."
30162 "name": "-moz-text-blink",
30163 "status": "nonstandard",
30164 "syntax": "none | blink",
30170 "name": "MDN Reference",
30171 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
30174 "description": "The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."
30177 "name": "-moz-user-input",
30178 "status": "nonstandard",
30179 "syntax": "auto | none | enabled | disabled",
30185 "name": "MDN Reference",
30186 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
30189 "description": "In Mozilla applications, -moz-user-input determines if an element will accept user input."
30192 "name": "-moz-user-modify",
30193 "status": "nonstandard",
30194 "syntax": "read-only | read-write | write-only",
30195 "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."
30198 "name": "-moz-window-dragging",
30199 "status": "nonstandard",
30200 "syntax": "drag | no-drag",
30201 "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."
30204 "name": "-moz-window-shadow",
30205 "status": "nonstandard",
30206 "syntax": "default | menu | tooltip | sheet | none",
30212 "name": "MDN Reference",
30213 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
30216 "description": "The -moz-window-shadow CSS property specifies whether a window will have a shadow. It only works on Mac OS X."
30219 "name": "-webkit-border-before",
30220 "status": "nonstandard",
30221 "syntax": "<'border-width'> || <'border-style'> || <'color'>",
30229 "name": "MDN Reference",
30230 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
30233 "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."
30236 "name": "-webkit-border-before-color",
30237 "status": "nonstandard",
30238 "syntax": "<'color'>",
30239 "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."
30242 "name": "-webkit-border-before-style",
30243 "status": "nonstandard",
30244 "syntax": "<'border-style'>",
30245 "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."
30248 "name": "-webkit-border-before-width",
30249 "status": "nonstandard",
30250 "syntax": "<'border-width'>",
30251 "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."
30254 "name": "-webkit-line-clamp",
30255 "syntax": "none | <integer>",
30265 "name": "MDN Reference",
30266 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
30269 "description": "The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines."
30272 "name": "-webkit-mask",
30273 "status": "nonstandard",
30274 "syntax": "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
30275 "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."
30278 "name": "-webkit-mask-attachment",
30279 "status": "nonstandard",
30280 "syntax": "<attachment>#",
30287 "name": "MDN Reference",
30288 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
30291 "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."
30294 "name": "-webkit-mask-composite",
30295 "status": "nonstandard",
30296 "syntax": "<composite-style>#",
30306 "name": "MDN Reference",
30307 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
30310 "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."
30313 "name": "-webkit-mask-position",
30314 "status": "nonstandard",
30315 "syntax": "<position>#",
30316 "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."
30319 "name": "-webkit-mask-position-x",
30320 "status": "nonstandard",
30321 "syntax": "[ <length-percentage> | left | center | right ]#",
30331 "name": "MDN Reference",
30332 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
30335 "description": "The -webkit-mask-position-x CSS property sets the initial horizontal position of a mask image."
30338 "name": "-webkit-mask-position-y",
30339 "status": "nonstandard",
30340 "syntax": "[ <length-percentage> | top | center | bottom ]#",
30350 "name": "MDN Reference",
30351 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
30354 "description": "The -webkit-mask-position-y CSS property sets the initial vertical position of a mask image."
30357 "name": "-webkit-mask-repeat-x",
30358 "status": "nonstandard",
30359 "syntax": "repeat | no-repeat | space | round",
30368 "name": "MDN Reference",
30369 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
30372 "description": "The -webkit-mask-repeat-x property specifies whether and how a mask image is repeated (tiled) horizontally."
30375 "name": "-webkit-mask-repeat-y",
30376 "status": "nonstandard",
30377 "syntax": "repeat | no-repeat | space | round",
30386 "name": "MDN Reference",
30387 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
30390 "description": "The -webkit-mask-repeat-y property specifies whether and how a mask image is repeated (tiled) vertically."
30393 "name": "appearance",
30394 "status": "experimental",
30395 "syntax": "none | auto | button | textfield | <compat>",
30405 "name": "MDN Reference",
30406 "url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
30409 "description": "Changes the appearance of buttons and other controls to resemble native controls."
30412 "name": "aspect-ratio",
30413 "status": "experimental",
30414 "syntax": "auto | <ratio>",
30419 "status": "obsolete",
30420 "syntax": "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
30423 "name": "MDN Reference",
30424 "url": "https://developer.mozilla.org/docs/Web/CSS/azimuth"
30427 "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."
30430 "name": "border-end-end-radius",
30431 "syntax": "<length-percentage>{1,2}",
30437 "name": "MDN Reference",
30438 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
30441 "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."
30444 "name": "border-end-start-radius",
30445 "syntax": "<length-percentage>{1,2}",
30451 "name": "MDN Reference",
30452 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
30455 "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."
30458 "name": "border-start-end-radius",
30459 "syntax": "<length-percentage>{1,2}",
30465 "name": "MDN Reference",
30466 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
30469 "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."
30472 "name": "border-start-start-radius",
30473 "syntax": "<length-percentage>{1,2}",
30479 "name": "MDN Reference",
30480 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
30483 "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."
30486 "name": "box-align",
30487 "status": "nonstandard",
30488 "syntax": "start | center | end | baseline | stretch",
30498 "name": "MDN Reference",
30499 "url": "https://developer.mozilla.org/docs/Web/CSS/box-align"
30502 "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."
30505 "name": "box-direction",
30506 "status": "nonstandard",
30507 "syntax": "normal | reverse | inherit",
30517 "name": "MDN Reference",
30518 "url": "https://developer.mozilla.org/docs/Web/CSS/box-direction"
30521 "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)."
30524 "name": "box-flex",
30525 "status": "nonstandard",
30526 "syntax": "<number>",
30536 "name": "MDN Reference",
30537 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex"
30540 "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."
30543 "name": "box-flex-group",
30544 "status": "nonstandard",
30545 "syntax": "<integer>",
30553 "name": "MDN Reference",
30554 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
30557 "description": "The box-flex-group CSS property assigns the flexbox's child elements to a flex group."
30560 "name": "box-lines",
30561 "status": "nonstandard",
30562 "syntax": "single | multiple",
30570 "name": "MDN Reference",
30571 "url": "https://developer.mozilla.org/docs/Web/CSS/box-lines"
30574 "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)."
30577 "name": "box-ordinal-group",
30578 "status": "nonstandard",
30579 "syntax": "<integer>",
30589 "name": "MDN Reference",
30590 "url": "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
30593 "description": "The box-ordinal-group CSS property assigns the flexbox's child elements to an ordinal group."
30596 "name": "box-orient",
30597 "status": "nonstandard",
30598 "syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
30608 "name": "MDN Reference",
30609 "url": "https://developer.mozilla.org/docs/Web/CSS/box-orient"
30612 "description": "The box-orient CSS property specifies whether an element lays out its contents horizontally or vertically."
30615 "name": "box-pack",
30616 "status": "nonstandard",
30617 "syntax": "start | center | end | justify",
30627 "name": "MDN Reference",
30628 "url": "https://developer.mozilla.org/docs/Web/CSS/box-pack"
30631 "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."
30634 "name": "color-adjust",
30635 "syntax": "economy | exact",
30644 "name": "MDN Reference",
30645 "url": "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
30648 "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."
30651 "name": "counter-set",
30652 "syntax": "[ <custom-ident> <integer>? ]+ | none",
30658 "name": "MDN Reference",
30659 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-set"
30662 "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."
30665 "name": "hanging-punctuation",
30666 "syntax": "none | [ first || [ force-end | allow-end ] || last ]",
30672 "name": "MDN Reference",
30673 "url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
30676 "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."
30679 "name": "initial-letter",
30680 "status": "experimental",
30681 "syntax": "normal | [ <number> <integer>? ]",
30687 "name": "MDN Reference",
30688 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
30691 "description": "The initial-letter CSS property specifies styling for dropped, raised, and sunken initial letters."
30694 "name": "initial-letter-align",
30695 "status": "experimental",
30696 "syntax": "[ auto | alphabetic | hanging | ideographic ]",
30699 "name": "MDN Reference",
30700 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
30703 "description": "The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph."
30706 "name": "line-clamp",
30707 "status": "experimental",
30708 "syntax": "none | <integer>",
30709 "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."
30712 "name": "line-height-step",
30713 "status": "experimental",
30714 "syntax": "<length>",
30721 "name": "MDN Reference",
30722 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
30725 "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."
30728 "name": "mask-border",
30729 "status": "experimental",
30730 "syntax": "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
30731 "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."
30734 "name": "mask-border-mode",
30735 "status": "experimental",
30736 "syntax": "luminance | alpha",
30737 "description": "The mask-border-mode CSS property specifies the blending mode used in a mask border."
30740 "name": "mask-border-outset",
30741 "status": "experimental",
30742 "syntax": "[ <length> | <number> ]{1,4}",
30743 "description": "The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."
30746 "name": "mask-border-repeat",
30747 "status": "experimental",
30748 "syntax": "[ stretch | repeat | round | space ]{1,2}",
30749 "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."
30752 "name": "mask-border-slice",
30753 "status": "experimental",
30754 "syntax": "<number-percentage>{1,4} fill?",
30755 "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."
30758 "name": "mask-border-source",
30759 "status": "experimental",
30760 "syntax": "none | <image>",
30761 "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."
30764 "name": "mask-border-width",
30765 "status": "experimental",
30766 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
30767 "description": "The mask-border-width CSS property specifies the width of an element's mask border."
30770 "name": "mask-clip",
30771 "syntax": "[ <geometry-box> | no-clip ]#",
30780 "name": "MDN Reference",
30781 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
30784 "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."
30787 "name": "mask-composite",
30788 "syntax": "<compositing-operator>#",
30795 "name": "MDN Reference",
30796 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
30799 "description": "The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."
30802 "name": "max-lines",
30803 "status": "experimental",
30804 "syntax": "none | <integer>",
30805 "description": "The max-liens property forces a break after a set number of lines"
30808 "name": "overflow-block",
30809 "status": "experimental",
30810 "syntax": "visible | hidden | clip | scroll | auto",
30816 "name": "MDN Reference",
30817 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-block"
30820 "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."
30823 "name": "overflow-clip-box",
30824 "status": "nonstandard",
30825 "syntax": "padding-box | content-box",
30831 "name": "MDN Reference",
30832 "url": "https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"
30835 "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."
30838 "name": "overflow-inline",
30839 "status": "experimental",
30840 "syntax": "visible | hidden | clip | scroll | auto",
30846 "name": "MDN Reference",
30847 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-inline"
30850 "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."
30853 "name": "overscroll-behavior",
30854 "status": "nonstandard",
30855 "syntax": "[ contain | none | auto ]{1,2}",
30864 "name": "MDN Reference",
30865 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
30868 "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."
30871 "name": "overscroll-behavior-x",
30872 "status": "nonstandard",
30873 "syntax": "contain | none | auto",
30882 "name": "MDN Reference",
30883 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
30886 "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."
30889 "name": "overscroll-behavior-y",
30890 "status": "nonstandard",
30891 "syntax": "contain | none | auto",
30900 "name": "MDN Reference",
30901 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
30904 "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."
30907 "name": "ruby-merge",
30908 "status": "experimental",
30909 "syntax": "separate | collapse | auto",
30910 "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."
30913 "name": "scrollbar-color",
30914 "syntax": "auto | dark | light | <color>{2}",
30920 "name": "MDN Reference",
30921 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
30924 "description": "The scrollbar-color CSS property sets the color of the scrollbar track and thumb."
30927 "name": "scrollbar-width",
30928 "syntax": "auto | thin | none",
30934 "name": "MDN Reference",
30935 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
30938 "description": "The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. "
30941 "name": "scroll-margin",
30942 "syntax": "<length>{1,4}",
30951 "name": "MDN Reference",
30952 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
30955 "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."
30958 "name": "scroll-margin-block",
30959 "syntax": "<length>{1,2}",
30967 "name": "MDN Reference",
30968 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
30971 "description": "The scroll-margin-block property is a shorthand property which sets the scroll-margin longhands in the block dimension."
30974 "name": "scroll-margin-block-start",
30975 "syntax": "<length>",
30984 "name": "MDN Reference",
30985 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
30988 "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."
30991 "name": "scroll-margin-block-end",
30992 "syntax": "<length>",
31001 "name": "MDN Reference",
31002 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
31005 "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."
31008 "name": "scroll-margin-bottom",
31009 "syntax": "<length>",
31018 "name": "MDN Reference",
31019 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
31022 "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."
31025 "name": "scroll-margin-inline",
31026 "syntax": "<length>{1,2}",
31032 "name": "MDN Reference",
31033 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
31036 "description": "The scroll-margin-inline property is a shorthand property which sets the scroll-margin longhands in the inline dimension."
31039 "name": "scroll-margin-inline-start",
31040 "syntax": "<length>",
31049 "name": "MDN Reference",
31050 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
31053 "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."
31056 "name": "scroll-margin-inline-end",
31057 "syntax": "<length>",
31066 "name": "MDN Reference",
31067 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
31070 "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."
31073 "name": "scroll-margin-left",
31074 "syntax": "<length>",
31083 "name": "MDN Reference",
31084 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
31087 "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."
31090 "name": "scroll-margin-right",
31091 "syntax": "<length>",
31100 "name": "MDN Reference",
31101 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
31104 "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."
31107 "name": "scroll-margin-top",
31108 "syntax": "<length>",
31117 "name": "MDN Reference",
31118 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
31121 "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."
31124 "name": "scroll-snap-type-x",
31125 "status": "obsolete",
31126 "syntax": "none | mandatory | proximity",
31133 "name": "MDN Reference",
31134 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
31137 "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."
31140 "name": "scroll-snap-type-y",
31141 "status": "obsolete",
31142 "syntax": "none | mandatory | proximity",
31148 "name": "MDN Reference",
31149 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
31152 "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."
31155 "name": "text-decoration-thickness",
31156 "syntax": "auto | from-font | <length>",
31163 "name": "MDN Reference",
31164 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
31167 "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."
31170 "name": "text-emphasis",
31171 "syntax": "<'text-emphasis-style'> || <'text-emphasis-color'>",
31180 "name": "MDN Reference",
31181 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
31184 "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."
31187 "name": "text-emphasis-color",
31188 "syntax": "<color>",
31197 "name": "MDN Reference",
31198 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
31201 "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."
31204 "name": "text-emphasis-position",
31205 "syntax": "[ over | under ] && [ right | left ]",
31214 "name": "MDN Reference",
31215 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
31218 "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."
31221 "name": "text-emphasis-style",
31222 "syntax": "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
31231 "name": "MDN Reference",
31232 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
31235 "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."
31238 "name": "text-underline-offset",
31239 "syntax": "auto | from-font | <length>",
31246 "name": "MDN Reference",
31247 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
31250 "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."
31253 "name": "speak-as",
31254 "syntax": "auto | bullets | numbers | words | spell-out | <counter-style-name>",
31255 "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."
31259 "status": "experimental",
31260 "syntax": "auto | <length>",
31261 "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."
31265 "status": "experimental",
31266 "syntax": "none | [ crop || cross ]",
31267 "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."
31272 "name": "@charset",
31275 "name": "MDN Reference",
31276 "url": "https://developer.mozilla.org/docs/Web/CSS/@charset"
31279 "description": "Defines character set of the document."
31282 "name": "@counter-style",
31288 "name": "MDN Reference",
31289 "url": "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
31292 "description": "Defines a custom counter style."
31295 "name": "@font-face",
31298 "name": "MDN Reference",
31299 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-face"
31302 "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."
31305 "name": "@font-feature-values",
31312 "name": "MDN Reference",
31313 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
31316 "description": "Defines named values for the indices used to select alternate glyphs for a given font family."
31322 "name": "MDN Reference",
31323 "url": "https://developer.mozilla.org/docs/Web/CSS/@import"
31326 "description": "Includes content of another file."
31329 "name": "@keyframes",
31332 "name": "MDN Reference",
31333 "url": "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
31336 "description": "Defines set of animation key frames."
31342 "name": "MDN Reference",
31343 "url": "https://developer.mozilla.org/docs/Web/CSS/@media"
31346 "description": "Defines a stylesheet for a particular media type."
31349 "name": "@-moz-document",
31353 "description": "Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."
31356 "name": "@-moz-keyframes",
31360 "description": "Defines set of animation key frames."
31363 "name": "@-ms-viewport",
31368 "description": "Specifies the size, zoom factor, and orientation of the viewport."
31371 "name": "@namespace",
31374 "name": "MDN Reference",
31375 "url": "https://developer.mozilla.org/docs/Web/CSS/@namespace"
31378 "description": "Declares a prefix and associates it with a namespace name."
31381 "name": "@-o-keyframes",
31385 "description": "Defines set of animation key frames."
31388 "name": "@-o-viewport",
31392 "description": "Specifies the size, zoom factor, and orientation of the viewport."
31405 "name": "MDN Reference",
31406 "url": "https://developer.mozilla.org/docs/Web/CSS/@page"
31409 "description": "Directive defines various page parameters."
31412 "name": "@supports",
31422 "name": "MDN Reference",
31423 "url": "https://developer.mozilla.org/docs/Web/CSS/@supports"
31426 "description": "A conditional group rule whose condition tests whether the user agent supports CSS property:value pairs."
31429 "name": "@-webkit-keyframes",
31434 "description": "Defines set of animation key frames."
31442 "name": "MDN Reference",
31443 "url": "https://developer.mozilla.org/docs/Web/CSS/:active"
31446 "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."
31449 "name": ":any-link",
31458 "name": "MDN Reference",
31459 "url": "https://developer.mozilla.org/docs/Web/CSS/:any-link"
31462 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
31465 "name": ":checked",
31468 "name": "MDN Reference",
31469 "url": "https://developer.mozilla.org/docs/Web/CSS/:checked"
31472 "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."
31475 "name": ":corner-present",
31480 "description": "Non-standard. Indicates whether or not a scrollbar corner is present."
31483 "name": ":decrement",
31488 "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."
31491 "name": ":default",
31500 "name": "MDN Reference",
31501 "url": "https://developer.mozilla.org/docs/Web/CSS/:default"
31504 "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."
31507 "name": ":disabled",
31510 "name": "MDN Reference",
31511 "url": "https://developer.mozilla.org/docs/Web/CSS/:disabled"
31514 "description": "Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."
31517 "name": ":double-button",
31522 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar."
31528 "name": "MDN Reference",
31529 "url": "https://developer.mozilla.org/docs/Web/CSS/:empty"
31532 "description": "Represents an element that has no children at all."
31535 "name": ":enabled",
31538 "name": "MDN Reference",
31539 "url": "https://developer.mozilla.org/docs/Web/CSS/:enabled"
31542 "description": "Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."
31550 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb."
31563 "name": "MDN Reference",
31564 "url": "https://developer.mozilla.org/docs/Web/CSS/:first"
31567 "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."
31570 "name": ":first-child",
31573 "name": "MDN Reference",
31574 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-child"
31577 "description": "Same as :nth-child(1). Represents an element that is the first child of some other element."
31580 "name": ":first-of-type",
31583 "name": "MDN Reference",
31584 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-of-type"
31587 "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."
31593 "name": "MDN Reference",
31594 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus"
31597 "description": "Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."
31600 "name": ":fullscreen",
31603 "name": "MDN Reference",
31604 "url": "https://developer.mozilla.org/docs/Web/CSS/:fullscreen"
31607 "description": "Matches any element that has its fullscreen flag set."
31616 "description": "Represents any element that is defined to occur entirely after a :current element."
31619 "name": ":horizontal",
31624 "description": "Non-standard. Applies to any scrollbar pieces that have a horizontal orientation."
31636 "name": "MDN Reference",
31637 "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
31640 "description": "When evaluated in the context of a shadow tree, matches the shadow tree’s host element."
31648 "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."
31651 "name": ":host-context()",
31656 "description": "Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector."
31662 "name": "MDN Reference",
31663 "url": "https://developer.mozilla.org/docs/Web/CSS/:hover"
31666 "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."
31669 "name": ":increment",
31674 "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."
31677 "name": ":indeterminate",
31680 "name": "MDN Reference",
31681 "url": "https://developer.mozilla.org/docs/Web/CSS/:indeterminate"
31684 "description": "Applies to UI elements whose value is in an indeterminate state."
31687 "name": ":in-range",
31697 "name": "MDN Reference",
31698 "url": "https://developer.mozilla.org/docs/Web/CSS/:in-range"
31701 "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."
31704 "name": ":invalid",
31707 "name": "MDN Reference",
31708 "url": "https://developer.mozilla.org/docs/Web/CSS/:invalid"
31711 "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."
31723 "description": "Represents an element that is in language specified."
31726 "name": ":last-child",
31729 "name": "MDN Reference",
31730 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-child"
31733 "description": "Same as :nth-last-child(1). Represents an element that is the last child of some other element."
31736 "name": ":last-of-type",
31739 "name": "MDN Reference",
31740 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-of-type"
31743 "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."
31756 "name": "MDN Reference",
31757 "url": "https://developer.mozilla.org/docs/Web/CSS/:left"
31760 "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."
31766 "name": "MDN Reference",
31767 "url": "https://developer.mozilla.org/docs/Web/CSS/:link"
31770 "description": "Applies to links that have not yet been visited."
31773 "name": ":matches()",
31777 "description": "Takes a selector list as its argument. It represents an element that is represented by its argument."
31780 "name": ":-moz-any()",
31784 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
31787 "name": ":-moz-any-link",
31791 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
31794 "name": ":-moz-broken",
31798 "description": "Non-standard. Matches elements representing broken images."
31801 "name": ":-moz-drag-over",
31805 "description": "Non-standard. Matches elements when a drag-over event applies to it."
31808 "name": ":-moz-first-node",
31812 "description": "Non-standard. Represents an element that is the first child node of some other element."
31815 "name": ":-moz-focusring",
31819 "description": "Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser."
31822 "name": ":-moz-full-screen",
31826 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
31829 "name": ":-moz-last-node",
31833 "description": "Non-standard. Represents an element that is the last child node of some other element."
31836 "name": ":-moz-loading",
31840 "description": "Non-standard. Matches elements, such as images, that haven’t started loading yet."
31843 "name": ":-moz-only-whitespace",
31849 "name": "MDN Reference",
31850 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-only-whitespace"
31853 "description": "The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank."
31856 "name": ":-moz-placeholder",
31860 "description": "Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+."
31863 "name": ":-moz-submit-invalid",
31869 "name": "MDN Reference",
31870 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-submit-invalid"
31873 "description": "Non-standard. Represents any submit button when the contents of the associated form are not valid."
31876 "name": ":-moz-suppressed",
31880 "description": "Non-standard. Matches elements representing images that have been blocked from loading."
31883 "name": ":-moz-ui-invalid",
31889 "name": "MDN Reference",
31890 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-invalid"
31893 "description": "Non-standard. Represents any validated form element whose value isn't valid "
31896 "name": ":-moz-ui-valid",
31902 "name": "MDN Reference",
31903 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-valid"
31906 "description": "Non-standard. Represents any validated form element whose value is valid "
31909 "name": ":-moz-user-disabled",
31913 "description": "Non-standard. Matches elements representing images that have been disabled due to the user’s preferences."
31916 "name": ":-moz-window-inactive",
31922 "name": "MDN Reference",
31923 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-window-inactive"
31926 "description": "Non-standard. Matches elements in an inactive window."
31929 "name": ":-ms-fullscreen",
31933 "description": "Matches any element that has its fullscreen flag set."
31936 "name": ":-ms-input-placeholder",
31940 "description": "Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder."
31943 "name": ":-ms-keyboard-active",
31947 "description": "Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar."
31950 "name": ":-ms-lang()",
31955 "description": "Represents an element that is in the language specified. Accepts a comma separated list of language tokens."
31958 "name": ":no-button",
31963 "description": "Non-standard. Applies to track pieces. Applies when there is no button at that end of the track."
31975 "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."
31978 "name": ":nth-child()",
31987 "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."
31990 "name": ":nth-last-child()",
31999 "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."
32002 "name": ":nth-last-of-type()",
32011 "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."
32014 "name": ":nth-of-type()",
32023 "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."
32026 "name": ":only-child",
32029 "name": "MDN Reference",
32030 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-child"
32033 "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."
32036 "name": ":only-of-type",
32039 "name": "MDN Reference",
32040 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-of-type"
32043 "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."
32046 "name": ":optional",
32049 "name": "MDN Reference",
32050 "url": "https://developer.mozilla.org/docs/Web/CSS/:optional"
32053 "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."
32056 "name": ":out-of-range",
32066 "name": "MDN Reference",
32067 "url": "https://developer.mozilla.org/docs/Web/CSS/:out-of-range"
32070 "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."
32079 "description": "Represents any element that is defined to occur entirely prior to a :current element."
32082 "name": ":read-only",
32092 "name": "MDN Reference",
32093 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-only"
32096 "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."
32099 "name": ":read-write",
32109 "name": "MDN Reference",
32110 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-write"
32113 "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."
32116 "name": ":required",
32119 "name": "MDN Reference",
32120 "url": "https://developer.mozilla.org/docs/Web/CSS/:required"
32123 "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."
32136 "name": "MDN Reference",
32137 "url": "https://developer.mozilla.org/docs/Web/CSS/:right"
32140 "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."
32146 "name": "MDN Reference",
32147 "url": "https://developer.mozilla.org/docs/Web/CSS/:root"
32150 "description": "Represents an element that is the root of the document. In HTML 4, this is always the HTML element."
32162 "name": "MDN Reference",
32163 "url": "https://developer.mozilla.org/docs/Web/CSS/:scope"
32166 "description": "Represents any element that is in the contextual reference element set."
32169 "name": ":single-button",
32174 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar."
32182 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb."
32188 "name": "MDN Reference",
32189 "url": "https://developer.mozilla.org/docs/Web/CSS/:target"
32192 "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)."
32198 "name": "MDN Reference",
32199 "url": "https://developer.mozilla.org/docs/Web/CSS/:valid"
32202 "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."
32205 "name": ":vertical",
32210 "description": "Non-standard. Applies to any scrollbar pieces that have a vertical orientation."
32213 "name": ":visited",
32216 "name": "MDN Reference",
32217 "url": "https://developer.mozilla.org/docs/Web/CSS/:visited"
32220 "description": "Applies once the link has been visited by the user."
32223 "name": ":-webkit-any()",
32228 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
32231 "name": ":-webkit-full-screen",
32236 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
32239 "name": ":window-inactive",
32244 "description": "Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active."
32248 "status": "experimental",
32251 "name": "MDN Reference",
32252 "url": "https://developer.mozilla.org/docs/Web/CSS/:blank"
32255 "description": "The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>)."
32258 "name": ":defined",
32259 "status": "experimental",
32268 "name": "MDN Reference",
32269 "url": "https://developer.mozilla.org/docs/Web/CSS/:defined"
32272 "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)."
32281 "name": "MDN Reference",
32282 "url": "https://developer.mozilla.org/docs/Web/CSS/:dir"
32285 "description": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them."
32288 "name": ":focus-visible",
32289 "status": "experimental",
32297 "name": "MDN Reference",
32298 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-visible"
32301 "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."
32304 "name": ":focus-within",
32305 "status": "experimental",
32314 "name": "MDN Reference",
32315 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-within"
32318 "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."
32322 "status": "experimental",
32325 "name": "MDN Reference",
32326 "url": "https://developer.mozilla.org/docs/Web/CSS/:has"
32329 "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."
32333 "status": "experimental",
32342 "name": "MDN Reference",
32343 "url": "https://developer.mozilla.org/docs/Web/CSS/:is"
32346 "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."
32349 "name": ":placeholder-shown",
32350 "status": "experimental",
32360 "name": "MDN Reference",
32361 "url": "https://developer.mozilla.org/docs/Web/CSS/:placeholder-shown"
32364 "description": "The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."
32368 "status": "experimental",
32369 "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."
32372 "pseudoElements": [
32377 "name": "MDN Reference",
32378 "url": "https://developer.mozilla.org/docs/Web/CSS/::after"
32381 "description": "Represents a styleable child pseudo-element immediately after the originating element’s actual content."
32384 "name": "::backdrop",
32394 "name": "MDN Reference",
32395 "url": "https://developer.mozilla.org/docs/Web/CSS/::backdrop"
32398 "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)."
32401 "name": "::before",
32404 "name": "MDN Reference",
32405 "url": "https://developer.mozilla.org/docs/Web/CSS/::before"
32408 "description": "Represents a styleable child pseudo-element immediately before the originating element’s actual content."
32411 "name": "::content",
32416 "description": "Deprecated. Matches the distribution list itself, on elements that have one. Use ::slotted for forward compatibility."
32428 "name": "MDN Reference",
32429 "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
32442 "name": "::cue-region",
32450 "name": "::cue-region()",
32458 "name": "::first-letter",
32461 "name": "MDN Reference",
32462 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-letter"
32465 "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."
32468 "name": "::first-line",
32471 "name": "MDN Reference",
32472 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-line"
32475 "description": "Describes the contents of the first formatted line of its originating element."
32478 "name": "::-moz-focus-inner",
32484 "name": "::-moz-focus-outer",
32490 "name": "::-moz-list-bullet",
32494 "description": "Used to style the bullet of a list element. Similar to the standardized ::marker."
32497 "name": "::-moz-list-number",
32501 "description": "Used to style the numbers of a list element. Similar to the standardized ::marker."
32504 "name": "::-moz-placeholder",
32508 "description": "Represents placeholder text in an input field"
32511 "name": "::-moz-progress-bar",
32515 "description": "Represents the bar portion of a progress bar."
32518 "name": "::-moz-selection",
32522 "description": "Represents the portion of a document that has been highlighted by the user."
32525 "name": "::-ms-backdrop",
32529 "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)."
32532 "name": "::-ms-browse",
32539 "name": "MDN Reference",
32540 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-browse"
32543 "description": "Represents the browse button of an input type=file control."
32546 "name": "::-ms-check",
32553 "name": "MDN Reference",
32554 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-check"
32557 "description": "Represents the check of a checkbox or radio button input control."
32560 "name": "::-ms-clear",
32567 "name": "MDN Reference",
32568 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-clear"
32571 "description": "Represents the clear button of a text input control"
32574 "name": "::-ms-expand",
32579 "description": "Represents the drop-down button of a select control."
32582 "name": "::-ms-fill",
32589 "name": "MDN Reference",
32590 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill"
32593 "description": "Represents the bar portion of a progress bar."
32596 "name": "::-ms-fill-lower",
32603 "name": "MDN Reference",
32604 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill-lower"
32607 "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."
32610 "name": "::-ms-fill-upper",
32617 "name": "MDN Reference",
32618 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-fill-upper"
32621 "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."
32624 "name": "::-ms-reveal",
32631 "name": "MDN Reference",
32632 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-reveal"
32635 "description": "Represents the password reveal button of an input type=password control."
32638 "name": "::-ms-thumb",
32643 "description": "Represents the portion of range input control (also known as a slider control) that the user drags."
32646 "name": "::-ms-ticks-after",
32651 "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."
32654 "name": "::-ms-ticks-before",
32659 "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."
32662 "name": "::-ms-tooltip",
32667 "description": "Represents the tooltip of a slider (input type=range)."
32670 "name": "::-ms-track",
32675 "description": "Represents the track of a slider."
32678 "name": "::-ms-value",
32685 "name": "MDN Reference",
32686 "url": "https://developer.mozilla.org/docs/Web/CSS/::-ms-value"
32689 "description": "Represents the content of a text or password input control, or a select control."
32692 "name": "::selection",
32695 "name": "MDN Reference",
32696 "url": "https://developer.mozilla.org/docs/Web/CSS/::selection"
32699 "description": "Represents the portion of a document that has been highlighted by the user."
32702 "name": "::shadow",
32707 "description": "Matches the shadow root if an element has a shadow tree."
32710 "name": "::-webkit-file-upload-button",
32718 "name": "MDN Reference",
32719 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-file-upload-button"
32724 "name": "::-webkit-inner-spin-button",
32732 "name": "MDN Reference",
32733 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-inner-spin-button"
32738 "name": "::-webkit-input-placeholder",
32745 "name": "::-webkit-keygen-select",
32753 "name": "::-webkit-meter-bar",
32761 "name": "MDN Reference",
32762 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-bar"
32767 "name": "::-webkit-meter-even-less-good-value",
32775 "name": "MDN Reference",
32776 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-even-less-good-value"
32781 "name": "::-webkit-meter-optimum-value",
32789 "name": "MDN Reference",
32790 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-optimum-value"
32795 "name": "::-webkit-meter-suboptimal-value",
32804 "name": "::-webkit-outer-spin-button",
32811 "name": "MDN Reference",
32812 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-outer-spin-button"
32817 "name": "::-webkit-progress-bar",
32825 "name": "MDN Reference",
32826 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-bar"
32831 "name": "::-webkit-progress-inner-element",
32839 "name": "MDN Reference",
32840 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-inner-element"
32845 "name": "::-webkit-progress-value",
32853 "name": "MDN Reference",
32854 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-value"
32859 "name": "::-webkit-resizer",
32867 "name": "MDN Reference",
32868 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-resizer"
32873 "name": "::-webkit-scrollbar",
32881 "name": "MDN Reference",
32882 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
32887 "name": "::-webkit-scrollbar-button",
32895 "name": "MDN Reference",
32896 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar-button"
32901 "name": "::-webkit-scrollbar-corner",
32909 "name": "MDN Reference",
32910 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar-corner"
32915 "name": "::-webkit-scrollbar-thumb",
32923 "name": "MDN Reference",
32924 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar-thumb"
32929 "name": "::-webkit-scrollbar-track",
32937 "name": "MDN Reference",
32938 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar-track"
32943 "name": "::-webkit-scrollbar-track-piece",
32951 "name": "MDN Reference",
32952 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar-track-piece"
32957 "name": "::-webkit-search-cancel-button",
32965 "name": "MDN Reference",
32966 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-cancel-button"
32971 "name": "::-webkit-search-decoration",
32978 "name": "::-webkit-search-results-button",
32986 "name": "MDN Reference",
32987 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-results-button"
32992 "name": "::-webkit-search-results-decoration",
32999 "name": "::-webkit-slider-runnable-track",
33007 "name": "::-webkit-slider-thumb",
33015 "name": "::-webkit-textfield-decoration-container",
33023 "name": "::-webkit-validation-bubble",
33031 "name": "::-webkit-validation-bubble-arrow",
33039 "name": "::-webkit-validation-bubble-arrow-clipper",
33047 "name": "::-webkit-validation-bubble-heading",
33055 "name": "::-webkit-validation-bubble-message",
33063 "name": "::-webkit-validation-bubble-text-block",
33071 "name": "::-moz-range-progress",
33072 "status": "nonstandard",
33078 "name": "MDN Reference",
33079 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-progress"
33082 "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)."
33085 "name": "::-moz-range-thumb",
33086 "status": "nonstandard",
33092 "name": "MDN Reference",
33093 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-thumb"
33096 "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."
33099 "name": "::-moz-range-track",
33100 "status": "nonstandard",
33106 "name": "MDN Reference",
33107 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-track"
33110 "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\"."
33113 "name": "::-webkit-progress-inner-value",
33114 "status": "nonstandard",
33115 "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."
33118 "name": "::grammar-error",
33119 "status": "experimental",
33122 "name": "MDN Reference",
33123 "url": "https://developer.mozilla.org/docs/Web/CSS/::grammar-error"
33126 "description": "The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."
33129 "name": "::marker",
33136 "name": "MDN Reference",
33137 "url": "https://developer.mozilla.org/docs/Web/CSS/::marker"
33140 "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."
33144 "status": "experimental",
33152 "name": "MDN Reference",
33153 "url": "https://developer.mozilla.org/docs/Web/CSS/::part"
33156 "description": "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."
33159 "name": "::placeholder",
33169 "name": "MDN Reference",
33170 "url": "https://developer.mozilla.org/docs/Web/CSS/::placeholder"
33173 "description": "The ::placeholder CSS pseudo-element represents the placeholder text of a form element."
33176 "name": "::slotted",
33185 "name": "MDN Reference",
33186 "url": "https://developer.mozilla.org/docs/Web/CSS/::slotted"
33189 "description": "The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."
33192 "name": "::spelling-error",
33193 "status": "experimental",
33196 "name": "MDN Reference",
33197 "url": "https://developer.mozilla.org/docs/Web/CSS/::spelling-error"
33200 "description": "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."
33208 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33211 __webpack_require__.r(__webpack_exports__);
33212 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSDataManager", function() { return CSSDataManager; });
33213 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81);
33214 /*---------------------------------------------------------------------------------------------
33215 * Copyright (c) Microsoft Corporation. All rights reserved.
33216 * Licensed under the MIT License. See License.txt in the project root for license information.
33217 *--------------------------------------------------------------------------------------------*/
33220 var CSSDataManager = /** @class */ (function () {
33221 function CSSDataManager(dataProviders) {
33222 this.dataProviders = dataProviders;
33223 this._propertySet = {};
33224 this._atDirectiveSet = {};
33225 this._pseudoClassSet = {};
33226 this._pseudoElementSet = {};
33227 this._properties = [];
33228 this._atDirectives = [];
33229 this._pseudoClasses = [];
33230 this._pseudoElements = [];
33231 this.collectData();
33233 CSSDataManager.prototype.addDataProviders = function (providers) {
33234 this.dataProviders = this.dataProviders.concat(providers);
33235 this.collectData();
33238 * Collect all data & handle duplicates
33240 CSSDataManager.prototype.collectData = function () {
33242 this.dataProviders.forEach(function (provider) {
33243 provider.provideProperties().forEach(function (p) {
33244 if (!_this._propertySet[p.name]) {
33245 _this._propertySet[p.name] = p;
33248 provider.provideAtDirectives().forEach(function (p) {
33249 if (!_this._atDirectiveSet[p.name]) {
33250 _this._atDirectiveSet[p.name] = p;
33253 provider.providePseudoClasses().forEach(function (p) {
33254 if (!_this._pseudoClassSet[p.name]) {
33255 _this._pseudoClassSet[p.name] = p;
33258 provider.providePseudoElements().forEach(function (p) {
33259 if (!_this._pseudoElementSet[p.name]) {
33260 _this._pseudoElementSet[p.name] = p;
33264 this._properties = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._propertySet);
33265 this._atDirectives = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._atDirectiveSet);
33266 this._pseudoClasses = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._pseudoClassSet);
33267 this._pseudoElements = _utils_objects__WEBPACK_IMPORTED_MODULE_0__["values"](this._pseudoElementSet);
33269 CSSDataManager.prototype.getProperty = function (name) { return this._propertySet[name]; };
33270 CSSDataManager.prototype.getAtDirective = function (name) { return this._atDirectiveSet[name]; };
33271 CSSDataManager.prototype.getPseudoClass = function (name) { return this._pseudoClassSet[name]; };
33272 CSSDataManager.prototype.getPseudoElement = function (name) { return this._pseudoElementSet[name]; };
33273 CSSDataManager.prototype.getProperties = function () {
33274 return this._properties;
33276 CSSDataManager.prototype.getAtDirectives = function () {
33277 return this._atDirectives;
33279 CSSDataManager.prototype.getPseudoClasses = function () {
33280 return this._pseudoClasses;
33282 CSSDataManager.prototype.getPseudoElements = function () {
33283 return this._pseudoElements;
33285 CSSDataManager.prototype.isKnownProperty = function (name) {
33286 return name.toLowerCase() in this._propertySet;
33288 CSSDataManager.prototype.isStandardProperty = function (name) {
33289 return this.isKnownProperty(name) &&
33290 (!this._propertySet[name.toLowerCase()].status || this._propertySet[name.toLowerCase()].status === 'standard');
33292 return CSSDataManager;
33299 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33302 __webpack_require__.r(__webpack_exports__);
33303 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
33304 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDefined", function() { return isDefined; });
33305 /*---------------------------------------------------------------------------------------------
33306 * Copyright (c) Microsoft Corporation. All rights reserved.
33307 * Licensed under the MIT License. See License.txt in the project root for license information.
33308 *--------------------------------------------------------------------------------------------*/
33310 function values(obj) {
33311 return Object.keys(obj).map(function (key) { return obj[key]; });
33313 function isDefined(obj) {
33314 return typeof obj !== 'undefined';
33320 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33323 __webpack_require__.r(__webpack_exports__);
33324 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSDataProvider", function() { return CSSDataProvider; });
33325 /*---------------------------------------------------------------------------------------------
33326 * Copyright (c) Microsoft Corporation. All rights reserved.
33327 * Licensed under the MIT License. See License.txt in the project root for license information.
33328 *--------------------------------------------------------------------------------------------*/
33330 var CSSDataProvider = /** @class */ (function () {
33332 * Currently, unversioned data uses the V1 implementation
33333 * In the future when the provider handles multiple versions of HTML custom data,
33334 * use the latest implementation for unversioned data
33336 function CSSDataProvider(data) {
33337 this._properties = [];
33338 this._atDirectives = [];
33339 this._pseudoClasses = [];
33340 this._pseudoElements = [];
33341 this.addData(data);
33343 CSSDataProvider.prototype.provideProperties = function () {
33344 return this._properties;
33346 CSSDataProvider.prototype.provideAtDirectives = function () {
33347 return this._atDirectives;
33349 CSSDataProvider.prototype.providePseudoClasses = function () {
33350 return this._pseudoClasses;
33352 CSSDataProvider.prototype.providePseudoElements = function () {
33353 return this._pseudoElements;
33355 CSSDataProvider.prototype.addData = function (data) {
33356 if (data.properties) {
33357 this._properties = this._properties.concat(data.properties);
33359 if (data.atDirectives) {
33360 this._atDirectives = this._atDirectives.concat(data.atDirectives);
33362 if (data.pseudoClasses) {
33363 this._pseudoClasses = this._pseudoClasses.concat(data.pseudoClasses);
33365 if (data.pseudoElements) {
33366 this._pseudoElements = this._pseudoElements.concat(data.pseudoElements);
33369 return CSSDataProvider;
33376 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33379 __webpack_require__.r(__webpack_exports__);
33380 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "browserNames", function() { return browserNames; });
33381 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEntryDescription", function() { return getEntryDescription; });
33382 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBrowserLabel", function() { return getBrowserLabel; });
33383 /*---------------------------------------------------------------------------------------------
33384 * Copyright (c) Microsoft Corporation. All rights reserved.
33385 * Licensed under the MIT License. See License.txt in the project root for license information.
33386 *--------------------------------------------------------------------------------------------*/
33388 var browserNames = {
33396 function getEntryStatus(status) {
33398 case 'experimental':
33399 return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
33400 case 'nonstandard':
33401 return '🚨️ Property is nonstandard. Avoid using it.\n\n';
33403 return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
33408 function getEntryDescription(entry, doesSupportMarkdown) {
33410 if (doesSupportMarkdown) {
33413 value: getEntryMarkdownDescription(entry)
33419 value: getEntryStringDescription(entry)
33422 if (result.value === '') {
33427 function getEntryStringDescription(entry) {
33428 if (!entry.description || entry.description === '') {
33431 if (typeof entry.description !== 'string') {
33432 return entry.description.value;
33435 if (entry.status) {
33436 result += getEntryStatus(entry.status);
33438 result += entry.description;
33439 var browserLabel = getBrowserLabel(entry.browsers);
33440 if (browserLabel) {
33441 result += '\n(' + browserLabel + ')';
33443 if ('syntax' in entry) {
33444 result += "\n\nSyntax: " + entry.syntax;
33446 if (entry.references && entry.references.length > 0) {
33448 result += entry.references.map(function (r) {
33449 return r.name + ": " + r.url;
33454 function getEntryMarkdownDescription(entry) {
33455 if (!entry.description || entry.description === '') {
33459 if (entry.status) {
33460 result += getEntryStatus(entry.status);
33462 if (typeof entry.description === 'string') {
33463 result += entry.description;
33466 result = entry.description.value;
33468 var browserLabel = getBrowserLabel(entry.browsers);
33469 if (browserLabel) {
33470 result += '\n\n(' + browserLabel + ')';
33472 if ('syntax' in entry) {
33473 result += "\n\nSyntax: " + entry.syntax;
33475 if (entry.references && entry.references.length > 0) {
33477 result += entry.references.map(function (r) {
33478 return "[" + r.name + "](" + r.url + ")";
33484 * Input is like `["E12","FF49","C47","IE","O"]`
33485 * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
33487 function getBrowserLabel(browsers) {
33488 if (browsers === void 0) { browsers = []; }
33489 if (browsers.length === 0) {
33493 .map(function (b) {
33495 var matches = b.match(/([A-Z]+)(\d+)?/);
33496 var name = matches[1];
33497 var version = matches[2];
33498 if (name in browserNames) {
33499 result += browserNames[name];
33502 result += ' ' + version;
33512 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33515 __webpack_require__.r(__webpack_exports__);
33516 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFunctions", function() { return colorFunctions; });
33517 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return colors; });
33518 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorKeywords", function() { return colorKeywords; });
33519 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isColorConstructor", function() { return isColorConstructor; });
33520 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isColorValue", function() { return isColorValue; });
33521 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return hexDigit; });
33522 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return colorFromHex; });
33523 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return colorFrom256RGB; });
33524 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHSL", function() { return colorFromHSL; });
33525 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslFromColor", function() { return hslFromColor; });
33526 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorValue", function() { return getColorValue; });
33527 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
33528 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
33529 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
33530 /*---------------------------------------------------------------------------------------------
33531 * Copyright (c) Microsoft Corporation. All rights reserved.
33532 * Licensed under the MIT License. See License.txt in the project root for license information.
33533 *--------------------------------------------------------------------------------------------*/
33536 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
33537 var colorFunctions = [
33538 { func: 'rgb($red, $green, $blue)', desc: localize('css.builtin.rgb', 'Creates a Color from red, green, and blue values.') },
33539 { func: 'rgba($red, $green, $blue, $alpha)', desc: localize('css.builtin.rgba', 'Creates a Color from red, green, blue, and alpha values.') },
33540 { func: 'hsl($hue, $saturation, $lightness)', desc: localize('css.builtin.hsl', 'Creates a Color from hue, saturation, and lightness values.') },
33541 { func: 'hsla($hue, $saturation, $lightness, $alpha)', desc: localize('css.builtin.hsla', 'Creates a Color from hue, saturation, lightness, and alpha values.') }
33544 aliceblue: '#f0f8ff',
33545 antiquewhite: '#faebd7',
33547 aquamarine: '#7fffd4',
33552 blanchedalmond: '#ffebcd',
33554 blueviolet: '#8a2be2',
33556 burlywood: '#deb887',
33557 cadetblue: '#5f9ea0',
33558 chartreuse: '#7fff00',
33559 chocolate: '#d2691e',
33561 cornflowerblue: '#6495ed',
33562 cornsilk: '#fff8dc',
33563 crimson: '#dc143c',
33565 darkblue: '#00008b',
33566 darkcyan: '#008b8b',
33567 darkgoldenrod: '#b8860b',
33568 darkgray: '#a9a9a9',
33569 darkgrey: '#a9a9a9',
33570 darkgreen: '#006400',
33571 darkkhaki: '#bdb76b',
33572 darkmagenta: '#8b008b',
33573 darkolivegreen: '#556b2f',
33574 darkorange: '#ff8c00',
33575 darkorchid: '#9932cc',
33576 darkred: '#8b0000',
33577 darksalmon: '#e9967a',
33578 darkseagreen: '#8fbc8f',
33579 darkslateblue: '#483d8b',
33580 darkslategray: '#2f4f4f',
33581 darkslategrey: '#2f4f4f',
33582 darkturquoise: '#00ced1',
33583 darkviolet: '#9400d3',
33584 deeppink: '#ff1493',
33585 deepskyblue: '#00bfff',
33586 dimgray: '#696969',
33587 dimgrey: '#696969',
33588 dodgerblue: '#1e90ff',
33589 firebrick: '#b22222',
33590 floralwhite: '#fffaf0',
33591 forestgreen: '#228b22',
33592 fuchsia: '#ff00ff',
33593 gainsboro: '#dcdcdc',
33594 ghostwhite: '#f8f8ff',
33596 goldenrod: '#daa520',
33600 greenyellow: '#adff2f',
33601 honeydew: '#f0fff0',
33602 hotpink: '#ff69b4',
33603 indianred: '#cd5c5c',
33607 lavender: '#e6e6fa',
33608 lavenderblush: '#fff0f5',
33609 lawngreen: '#7cfc00',
33610 lemonchiffon: '#fffacd',
33611 lightblue: '#add8e6',
33612 lightcoral: '#f08080',
33613 lightcyan: '#e0ffff',
33614 lightgoldenrodyellow: '#fafad2',
33615 lightgray: '#d3d3d3',
33616 lightgrey: '#d3d3d3',
33617 lightgreen: '#90ee90',
33618 lightpink: '#ffb6c1',
33619 lightsalmon: '#ffa07a',
33620 lightseagreen: '#20b2aa',
33621 lightskyblue: '#87cefa',
33622 lightslategray: '#778899',
33623 lightslategrey: '#778899',
33624 lightsteelblue: '#b0c4de',
33625 lightyellow: '#ffffe0',
33627 limegreen: '#32cd32',
33629 magenta: '#ff00ff',
33631 mediumaquamarine: '#66cdaa',
33632 mediumblue: '#0000cd',
33633 mediumorchid: '#ba55d3',
33634 mediumpurple: '#9370d8',
33635 mediumseagreen: '#3cb371',
33636 mediumslateblue: '#7b68ee',
33637 mediumspringgreen: '#00fa9a',
33638 mediumturquoise: '#48d1cc',
33639 mediumvioletred: '#c71585',
33640 midnightblue: '#191970',
33641 mintcream: '#f5fffa',
33642 mistyrose: '#ffe4e1',
33643 moccasin: '#ffe4b5',
33644 navajowhite: '#ffdead',
33646 oldlace: '#fdf5e6',
33648 olivedrab: '#6b8e23',
33650 orangered: '#ff4500',
33652 palegoldenrod: '#eee8aa',
33653 palegreen: '#98fb98',
33654 paleturquoise: '#afeeee',
33655 palevioletred: '#d87093',
33656 papayawhip: '#ffefd5',
33657 peachpuff: '#ffdab9',
33661 powderblue: '#b0e0e6',
33664 rebeccapurple: '#663399',
33665 rosybrown: '#bc8f8f',
33666 royalblue: '#4169e1',
33667 saddlebrown: '#8b4513',
33669 sandybrown: '#f4a460',
33670 seagreen: '#2e8b57',
33671 seashell: '#fff5ee',
33674 skyblue: '#87ceeb',
33675 slateblue: '#6a5acd',
33676 slategray: '#708090',
33677 slategrey: '#708090',
33679 springgreen: '#00ff7f',
33680 steelblue: '#4682b4',
33683 thistle: '#d8bfd8',
33685 turquoise: '#40e0d0',
33689 whitesmoke: '#f5f5f5',
33691 yellowgreen: '#9acd32'
33693 var colorKeywords = {
33694 '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.',
33695 'transparent': 'Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value.',
33697 function getNumericValue(node, factor) {
33698 var val = node.getText();
33699 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);
33704 var result = parseFloat(m[1]) / factor;
33705 if (result >= 0 && result <= 1) {
33711 function getAngle(node) {
33712 var val = node.getText();
33713 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);
33715 return parseFloat(val) % 360;
33719 function isColorConstructor(node) {
33720 var name = node.getName();
33724 return /^(rgb|rgba|hsl|hsla)$/gi.test(name);
33727 * Returns true if the node is a color value - either
33728 * defined a hex number, as rgb or rgba function, or
33731 function isColorValue(node) {
33732 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue) {
33735 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Function) {
33736 return isColorConstructor(node);
33738 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier) {
33739 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
33742 var candidateColor = node.getText().toLowerCase();
33743 if (candidateColor === 'none') {
33746 if (colors[candidateColor]) {
33758 function hexDigit(charCode) {
33759 if (charCode < Digit0) {
33762 if (charCode <= Digit9) {
33763 return charCode - Digit0;
33765 if (charCode < a) {
33766 charCode += (a - A);
33768 if (charCode >= a && charCode <= f) {
33769 return charCode - a + 10;
33773 function colorFromHex(text) {
33774 if (text[0] !== '#') {
33777 switch (text.length) {
33780 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
33781 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
33782 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
33787 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
33788 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
33789 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
33790 alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
33794 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
33795 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
33796 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
33801 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
33802 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
33803 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
33804 alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
33809 function colorFrom256RGB(red, green, blue, alpha) {
33810 if (alpha === void 0) { alpha = 1.0; }
33813 green: green / 255.0,
33814 blue: blue / 255.0,
33818 function colorFromHSL(hue, sat, light, alpha) {
33819 if (alpha === void 0) { alpha = 1.0; }
33822 return { red: light, green: light, blue: light, alpha: alpha };
33825 var hueToRgb = function (t1, t2, hue) {
33833 return (t2 - t1) * hue + t1;
33839 return (t2 - t1) * (4 - hue) + t1;
33843 var t2 = light <= 0.5 ? (light * (sat + 1)) : (light + sat - (light * sat));
33844 var t1 = light * 2 - t2;
33845 return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha: alpha };
33848 function hslFromColor(rgba) {
33850 var g = rgba.green;
33852 var a = rgba.alpha;
33853 var max = Math.max(r, g, b);
33854 var min = Math.min(r, g, b);
33857 var l = (min + max) / 2;
33858 var chroma = max - min;
33860 s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
33863 h = (g - b) / chroma + (g < b ? 6 : 0);
33866 h = (b - r) / chroma + 2;
33869 h = (r - g) / chroma + 4;
33875 return { h: h, s: s, l: l, a: a };
33877 function getColorValue(node) {
33878 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue) {
33879 var text = node.getText();
33880 return colorFromHex(text);
33882 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Function) {
33883 var functionNode = node;
33884 var name = functionNode.getName();
33885 var colorValues = functionNode.getArguments().getChildren();
33886 if (!name || colorValues.length < 3 || colorValues.length > 4) {
33890 var alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1;
33891 if (name === 'rgb' || name === 'rgba') {
33893 red: getNumericValue(colorValues[0], 255.0),
33894 green: getNumericValue(colorValues[1], 255.0),
33895 blue: getNumericValue(colorValues[2], 255.0),
33899 else if (name === 'hsl' || name === 'hsla') {
33900 var h = getAngle(colorValues[0]);
33901 var s = getNumericValue(colorValues[1], 100.0);
33902 var l = getNumericValue(colorValues[2], 100.0);
33903 return colorFromHSL(h, s, l, alpha);
33907 // parse error on numeric value
33911 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier) {
33912 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
33915 var term = node.parent;
33916 if (term && term.parent && term.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].BinaryExpression) {
33917 var expression = term.parent;
33918 if (expression.parent && expression.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ListEntry && expression.parent.key === expression) {
33922 var candidateColor = node.getText().toLowerCase();
33923 if (candidateColor === 'none') {
33926 var colorHex = colors[candidateColor];
33928 return colorFromHex(colorHex);
33937 /***/ (function(module, __webpack_exports__, __webpack_require__) {
33940 __webpack_require__.r(__webpack_exports__);
33941 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionKeywords", function() { return positionKeywords; });
33942 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatStyleKeywords", function() { return repeatStyleKeywords; });
33943 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineStyleKeywords", function() { return lineStyleKeywords; });
33944 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineWidthKeywords", function() { return lineWidthKeywords; });
33945 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "boxKeywords", function() { return boxKeywords; });
33946 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "geometryBoxKeywords", function() { return geometryBoxKeywords; });
33947 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssWideKeywords", function() { return cssWideKeywords; });
33948 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "imageFunctions", function() { return imageFunctions; });
33949 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionTimingFunctions", function() { return transitionTimingFunctions; });
33950 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basicShapeFunctions", function() { return basicShapeFunctions; });
33951 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "units", function() { return units; });
33952 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html5Tags", function() { return html5Tags; });
33953 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svgElements", function() { return svgElements; });
33954 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageBoxDirectives", function() { return pageBoxDirectives; });
33955 /*---------------------------------------------------------------------------------------------
33956 * Copyright (c) Microsoft Corporation. All rights reserved.
33957 * Licensed under the MIT License. See License.txt in the project root for license information.
33958 *--------------------------------------------------------------------------------------------*/
33960 var positionKeywords = {
33961 '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.',
33962 '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.',
33963 '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.',
33964 '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.',
33965 '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.'
33967 var repeatStyleKeywords = {
33968 'no-repeat': 'Placed once and not repeated in this direction.',
33969 'repeat': 'Repeated in this direction as often as needed to cover the background painting area.',
33970 'repeat-x': 'Computes to ‘repeat no-repeat’.',
33971 'repeat-y': 'Computes to ‘no-repeat repeat’.',
33972 '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.',
33973 '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.'
33975 var lineStyleKeywords = {
33976 'dashed': 'A series of square-ended dashes.',
33977 'dotted': 'A series of round dots.',
33978 'double': 'Two parallel solid lines with some space between them.',
33979 'groove': 'Looks as if it were carved in the canvas.',
33980 'hidden': 'Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.',
33981 'inset': 'Looks as if the content on the inside of the border is sunken into the canvas.',
33982 'none': 'No border. Color and width are ignored.',
33983 'outset': 'Looks as if the content on the inside of the border is coming out of the canvas.',
33984 'ridge': 'Looks as if it were coming out of the canvas.',
33985 'solid': 'A single line segment.'
33987 var lineWidthKeywords = ['medium', 'thick', 'thin'];
33988 var boxKeywords = {
33989 'border-box': 'The background is painted within (clipped to) the border box.',
33990 'content-box': 'The background is painted within (clipped to) the content box.',
33991 'padding-box': 'The background is painted within (clipped to) the padding box.'
33993 var geometryBoxKeywords = {
33994 'margin-box': 'Uses the margin box as reference box.',
33995 'fill-box': 'Uses the object bounding box as reference box.',
33996 'stroke-box': 'Uses the stroke bounding box as reference box.',
33997 'view-box': 'Uses the nearest SVG viewport as reference box.'
33999 var cssWideKeywords = {
34000 'initial': 'Represents the value specified as the property’s initial value.',
34001 'inherit': 'Represents the computed value of the property on the element’s parent.',
34002 'unset': 'Acts as either `inherit` or `initial`, depending on whether the property is inherited or not.'
34004 var imageFunctions = {
34005 'url()': 'Reference an image file by URL',
34006 'image()': 'Provide image fallbacks and annotations.',
34007 '-webkit-image-set()': 'Provide multiple resolutions. Remember to use unprefixed image-set() in addition.',
34008 'image-set()': 'Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.',
34009 '-moz-element()': 'Use an element in the document as an image. Remember to use unprefixed element() in addition.',
34010 'element()': 'Use an element in the document as an image.',
34011 'cross-fade()': 'Indicates the two images to be combined and how far along in the transition the combination is.',
34012 '-webkit-gradient()': 'Deprecated. Use modern linear-gradient() or radial-gradient() instead.',
34013 '-webkit-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
34014 '-moz-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
34015 '-o-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
34016 'linear-gradient()': 'A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.',
34017 '-webkit-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
34018 '-moz-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
34019 '-o-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
34020 '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.',
34021 '-webkit-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
34022 '-moz-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
34023 'radial-gradient()': 'Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.',
34024 '-webkit-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
34025 '-moz-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
34026 '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.'
34028 var transitionTimingFunctions = {
34029 'ease': 'Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).',
34030 'ease-in': 'Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).',
34031 'ease-in-out': 'Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).',
34032 'ease-out': 'Equivalent to cubic-bezier(0, 0, 0.58, 1.0).',
34033 'linear': 'Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).',
34034 'step-end': 'Equivalent to steps(1, end).',
34035 'step-start': 'Equivalent to steps(1, start).',
34036 '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”.',
34037 'cubic-bezier()': 'Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).',
34038 'cubic-bezier(0.6, -0.28, 0.735, 0.045)': 'Ease-in Back. Overshoots.',
34039 'cubic-bezier(0.68, -0.55, 0.265, 1.55)': 'Ease-in-out Back. Overshoots.',
34040 'cubic-bezier(0.175, 0.885, 0.32, 1.275)': 'Ease-out Back. Overshoots.',
34041 'cubic-bezier(0.6, 0.04, 0.98, 0.335)': 'Ease-in Circular. Based on half circle.',
34042 'cubic-bezier(0.785, 0.135, 0.15, 0.86)': 'Ease-in-out Circular. Based on half circle.',
34043 'cubic-bezier(0.075, 0.82, 0.165, 1)': 'Ease-out Circular. Based on half circle.',
34044 'cubic-bezier(0.55, 0.055, 0.675, 0.19)': 'Ease-in Cubic. Based on power of three.',
34045 'cubic-bezier(0.645, 0.045, 0.355, 1)': 'Ease-in-out Cubic. Based on power of three.',
34046 'cubic-bezier(0.215, 0.610, 0.355, 1)': 'Ease-out Cubic. Based on power of three.',
34047 'cubic-bezier(0.95, 0.05, 0.795, 0.035)': 'Ease-in Exponential. Based on two to the power ten.',
34048 'cubic-bezier(1, 0, 0, 1)': 'Ease-in-out Exponential. Based on two to the power ten.',
34049 'cubic-bezier(0.19, 1, 0.22, 1)': 'Ease-out Exponential. Based on two to the power ten.',
34050 'cubic-bezier(0.47, 0, 0.745, 0.715)': 'Ease-in Sine.',
34051 'cubic-bezier(0.445, 0.05, 0.55, 0.95)': 'Ease-in-out Sine.',
34052 'cubic-bezier(0.39, 0.575, 0.565, 1)': 'Ease-out Sine.',
34053 'cubic-bezier(0.55, 0.085, 0.68, 0.53)': 'Ease-in Quadratic. Based on power of two.',
34054 'cubic-bezier(0.455, 0.03, 0.515, 0.955)': 'Ease-in-out Quadratic. Based on power of two.',
34055 'cubic-bezier(0.25, 0.46, 0.45, 0.94)': 'Ease-out Quadratic. Based on power of two.',
34056 'cubic-bezier(0.895, 0.03, 0.685, 0.22)': 'Ease-in Quartic. Based on power of four.',
34057 'cubic-bezier(0.77, 0, 0.175, 1)': 'Ease-in-out Quartic. Based on power of four.',
34058 'cubic-bezier(0.165, 0.84, 0.44, 1)': 'Ease-out Quartic. Based on power of four.',
34059 'cubic-bezier(0.755, 0.05, 0.855, 0.06)': 'Ease-in Quintic. Based on power of five.',
34060 'cubic-bezier(0.86, 0, 0.07, 1)': 'Ease-in-out Quintic. Based on power of five.',
34061 'cubic-bezier(0.23, 1, 0.320, 1)': 'Ease-out Quintic. Based on power of five.'
34063 var basicShapeFunctions = {
34064 'circle()': 'Defines a circle.',
34065 'ellipse()': 'Defines an ellipse.',
34066 'inset()': 'Defines an inset rectangle.',
34067 'polygon()': 'Defines a polygon.'
34070 'length': ['em', 'rem', 'ex', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vw', 'vh', 'vmin', 'vmax'],
34071 'angle': ['deg', 'rad', 'grad', 'turn'],
34072 'time': ['ms', 's'],
34073 'frequency': ['Hz', 'kHz'],
34074 'resolution': ['dpi', 'dpcm', 'dppx'],
34075 'percentage': ['%', 'fr']
34077 var html5Tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption',
34078 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer',
34079 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',
34080 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q',
34081 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td',
34082 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'const', 'video', 'wbr'];
34083 var svgElements = ['circle', 'clipPath', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting',
34084 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology',
34085 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'hatch', 'hatchpath', 'image', 'line', 'linearGradient',
34086 'marker', 'mask', 'mesh', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'solidcolor', 'stop', 'svg', 'switch',
34087 'symbol', 'text', 'textPath', 'tspan', 'use', 'view'];
34088 var pageBoxDirectives = [
34089 '@bottom-center', '@bottom-left', '@bottom-left-corner', '@bottom-right', '@bottom-right-corner',
34090 '@left-bottom', '@left-middle', '@left-top', '@right-bottom', '@right-middle', '@right-top',
34091 '@top-center', '@top-left', '@top-left-corner', '@top-right', '@top-right-corner'
34097 /***/ (function(module, __webpack_exports__, __webpack_require__) {
34100 __webpack_require__.r(__webpack_exports__);
34101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSCompletion", function() { return CSSCompletion; });
34102 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
34103 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
34104 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78);
34105 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89);
34106 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90);
34107 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
34108 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_5__);
34109 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81);
34110 /*---------------------------------------------------------------------------------------------
34111 * Copyright (c) Microsoft Corporation. All rights reserved.
34112 * Licensed under the MIT License. See License.txt in the project root for license information.
34113 *--------------------------------------------------------------------------------------------*/
34122 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__["loadMessageBundle"]();
34123 var SnippetFormat = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["InsertTextFormat"].Snippet;
34125 (function (SortTexts) {
34126 // char code 32, comes before everything
34127 SortTexts["Enums"] = " ";
34128 SortTexts["Normal"] = "d";
34129 SortTexts["VendorPrefixed"] = "x";
34130 SortTexts["Term"] = "y";
34131 SortTexts["Variable"] = "z";
34132 })(SortTexts || (SortTexts = {}));
34133 var CSSCompletion = /** @class */ (function () {
34134 function CSSCompletion(variablePrefix, clientCapabilities) {
34135 if (variablePrefix === void 0) { variablePrefix = null; }
34136 this.variablePrefix = variablePrefix;
34137 this.clientCapabilities = clientCapabilities;
34138 this.completionParticipants = [];
34139 this.valueTypes = [
34140 _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Identifier, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Value, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].StringLiteral, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].URILiteral, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].NumericValue,
34141 _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].HexColorValue, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].VariableName, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Prio
34144 CSSCompletion.prototype.configure = function (settings) {
34145 this.settings = settings;
34147 CSSCompletion.prototype.getSymbolContext = function () {
34148 if (!this.symbolContext) {
34149 this.symbolContext = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__["Symbols"](this.styleSheet);
34151 return this.symbolContext;
34153 CSSCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
34154 this.completionParticipants = registeredCompletionParticipants || [];
34156 CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
34157 this.offset = document.offsetAt(position);
34158 this.position = position;
34159 this.currentWord = getCurrentWord(document, this.offset);
34160 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Position"].create(this.position.line, this.position.character - this.currentWord.length), this.position);
34161 this.textDocument = document;
34162 this.styleSheet = styleSheet;
34164 var result = { isIncomplete: false, items: [] };
34165 this.nodePath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](this.styleSheet, this.offset);
34166 for (var i = this.nodePath.length - 1; i >= 0; i--) {
34167 var node = this.nodePath[i];
34168 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Property"]) {
34169 this.getCompletionsForDeclarationProperty(node.getParent(), result);
34171 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Expression"]) {
34172 if (node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Interpolation"]) {
34173 this.getVariableProposals(null, result);
34176 this.getCompletionsForExpression(node, result);
34179 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
34180 var parentRef = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Ruleset);
34182 if (parentRef.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference) {
34183 this.getCompletionsForExtendsReference(parentRef, node, result);
34186 var parentRuleSet = parentRef;
34187 this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result);
34191 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"]) {
34192 this.getCompletionsForFunctionArgument(node, node.getParent(), result);
34194 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declarations"]) {
34195 this.getCompletionsForDeclarations(node, result);
34197 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["VariableDeclaration"]) {
34198 this.getCompletionsForVariableDeclaration(node, result);
34200 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
34201 this.getCompletionsForRuleSet(node, result);
34203 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Interpolation"]) {
34204 this.getCompletionsForInterpolation(node, result);
34206 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionDeclaration"]) {
34207 this.getCompletionsForFunctionDeclaration(node, result);
34209 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["MixinReference"]) {
34210 this.getCompletionsForMixinReference(node, result);
34212 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Function"]) {
34213 this.getCompletionsForFunctionArgument(null, node, result);
34215 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Supports"]) {
34216 this.getCompletionsForSupports(node, result);
34218 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
34219 this.getCompletionsForSupportsCondition(node, result);
34221 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ExtendsReference"]) {
34222 this.getCompletionsForExtendsReference(node, null, result);
34224 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].URILiteral) {
34225 this.getCompletionForUriLiteralValue(node, result);
34227 else if (node.parent === null) {
34228 this.getCompletionForTopLevel(result);
34230 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].StringLiteral && this.isImportPathParent(node.parent.type)) {
34231 this.getCompletionForImportPath(node, result);
34232 // } else if (node instanceof nodes.Variable) {
34233 // this.getCompletionsForVariableDeclaration()
34238 if (result.items.length > 0 || this.offset > node.offset) {
34239 return this.finalize(result);
34242 this.getCompletionsForStylesheet(result);
34243 if (result.items.length === 0) {
34244 if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) {
34245 this.getVariableProposals(null, result);
34248 return this.finalize(result);
34251 // don't hold on any state, clear symbolContext
34252 this.position = null;
34253 this.currentWord = null;
34254 this.textDocument = null;
34255 this.styleSheet = null;
34256 this.symbolContext = null;
34257 this.defaultReplaceRange = null;
34258 this.nodePath = null;
34261 CSSCompletion.prototype.isImportPathParent = function (type) {
34262 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Import;
34264 CSSCompletion.prototype.finalize = function (result) {
34265 var needsSortText = result.items.some(function (i) { return !!i.sortText || i.label[0] === '-'; });
34266 if (needsSortText) {
34267 result.items.forEach(function (item, index) {
34268 if (!item.sortText) {
34269 if (item.label[0] === '-') {
34270 item.sortText = SortTexts.VendorPrefixed + '_' + computeRankNumber(index);
34273 item.sortText = SortTexts.Normal + '_' + computeRankNumber(index);
34277 if (item.label[0] === '-') {
34278 item.sortText += SortTexts.VendorPrefixed + '_' + computeRankNumber(index);
34281 item.sortText += SortTexts.Normal + '_' + computeRankNumber(index);
34288 CSSCompletion.prototype.findInNodePath = function () {
34290 for (var _i = 0; _i < arguments.length; _i++) {
34291 types[_i] = arguments[_i];
34293 for (var i = this.nodePath.length - 1; i >= 0; i--) {
34294 var node = this.nodePath[i];
34295 if (types.indexOf(node.type) !== -1) {
34301 CSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
34302 return this.getPropertyProposals(declaration, result);
34304 CSSCompletion.prototype.getPropertyProposals = function (declaration, result) {
34306 var triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled;
34307 var completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled;
34308 var properties = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getProperties();
34309 properties.forEach(function (entry) {
34312 var retrigger = false;
34314 range = _this.getCompletionRange(declaration.getProperty());
34315 insertText = entry.name;
34316 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition)) {
34317 insertText += ': ';
34322 range = _this.getCompletionRange(null);
34323 insertText = entry.name + ': ';
34326 // Empty .selector { | } case
34327 if (!declaration && completePropertyWithSemicolon) {
34328 insertText += '$0;';
34330 // Cases such as .selector { p; } or .selector { p:; }
34331 if (declaration && !declaration.semicolonPosition) {
34332 if (completePropertyWithSemicolon && _this.offset >= _this.textDocument.offsetAt(range.end)) {
34333 insertText += '$0;';
34338 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
34339 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
34340 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(range, insertText),
34341 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["InsertTextFormat"].Snippet,
34342 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Property
34344 if (!entry.restrictions) {
34347 if (triggerPropertyValueCompletion && retrigger) {
34350 command: 'editor.action.triggerSuggest'
34353 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, '-')) {
34354 item.sortText = SortTexts.VendorPrefixed;
34356 result.items.push(item);
34358 this.completionParticipants.forEach(function (participant) {
34359 if (participant.onCssProperty) {
34360 participant.onCssProperty({
34361 propertyName: _this.currentWord,
34362 range: _this.defaultReplaceRange
34368 Object.defineProperty(CSSCompletion.prototype, "isTriggerPropertyValueCompletionEnabled", {
34370 if (!this.settings ||
34371 !this.settings.completion ||
34372 this.settings.completion.triggerPropertyValueCompletion === undefined) {
34375 return this.settings.completion.triggerPropertyValueCompletion;
34380 Object.defineProperty(CSSCompletion.prototype, "isCompletePropertyWithSemicolonEnabled", {
34382 if (!this.settings ||
34383 !this.settings.completion ||
34384 this.settings.completion.completePropertyWithSemicolon === undefined) {
34387 return this.settings.completion.completePropertyWithSemicolon;
34392 CSSCompletion.prototype.getCompletionsForDeclarationValue = function (node, result) {
34394 var propertyName = node.getFullPropertyName();
34395 var entry = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getProperty(propertyName);
34396 var existingNode = node.getValue() || null;
34397 while (existingNode && existingNode.hasChildren()) {
34398 existingNode = existingNode.findChildAtOffset(this.offset, false);
34400 this.completionParticipants.forEach(function (participant) {
34401 if (participant.onCssPropertyValue) {
34402 participant.onCssPropertyValue({
34403 propertyName: propertyName,
34404 propertyValue: _this.currentWord,
34405 range: _this.getCompletionRange(existingNode)
34410 if (entry.restrictions) {
34411 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
34412 var restriction = _a[_i];
34413 switch (restriction) {
34415 this.getColorProposals(entry, existingNode, result);
34418 this.getPositionProposals(entry, existingNode, result);
34421 this.getRepeatStyleProposals(entry, existingNode, result);
34424 this.getLineStyleProposals(entry, existingNode, result);
34427 this.getLineWidthProposals(entry, existingNode, result);
34429 case 'geometry-box':
34430 this.getGeometryBoxProposals(entry, existingNode, result);
34433 this.getBoxProposals(entry, existingNode, result);
34436 this.getImageProposals(entry, existingNode, result);
34438 case 'timing-function':
34439 this.getTimingFunctionProposals(entry, existingNode, result);
34442 this.getBasicShapeProposals(entry, existingNode, result);
34447 this.getValueEnumProposals(entry, existingNode, result);
34448 this.getCSSWideKeywordProposals(entry, existingNode, result);
34449 this.getUnitProposals(entry, existingNode, result);
34452 var existingValues = collectValues(this.styleSheet, node);
34453 for (var _b = 0, _c = existingValues.getEntries(); _b < _c.length; _b++) {
34454 var existingValue = _c[_b];
34455 result.items.push({
34456 label: existingValue,
34457 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), existingValue),
34458 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34462 this.getVariableProposals(existingNode, result);
34463 this.getTermProposals(entry, existingNode, result);
34466 CSSCompletion.prototype.getValueEnumProposals = function (entry, existingNode, result) {
34467 if (entry.values) {
34468 for (var _i = 0, _a = entry.values; _i < _a.length; _i++) {
34469 var value = _a[_i];
34470 var insertString = value.name;
34471 var insertTextFormat = void 0;
34472 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["endsWith"](insertString, ')')) {
34473 var from = insertString.lastIndexOf('(');
34475 insertString = insertString.substr(0, from) + '($1)';
34476 insertTextFormat = SnippetFormat;
34481 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](value, this.doesSupportMarkdown()),
34482 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
34483 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertString),
34484 sortText: SortTexts.Enums,
34485 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value,
34486 insertTextFormat: insertTextFormat
34488 result.items.push(item);
34493 CSSCompletion.prototype.getCSSWideKeywordProposals = function (entry, existingNode, result) {
34494 for (var keywords in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssWideKeywords"]) {
34495 result.items.push({
34497 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssWideKeywords"][keywords],
34498 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), keywords),
34499 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34504 CSSCompletion.prototype.getCompletionsForInterpolation = function (node, result) {
34505 if (this.offset >= node.offset + 2) {
34506 this.getVariableProposals(null, result);
34510 CSSCompletion.prototype.getVariableProposals = function (existingNode, result) {
34511 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
34512 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
34513 var symbol = symbols_1[_i];
34514 var insertText = _utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](symbol.name, '--') ? "var(" + symbol.name + ")" : symbol.name;
34515 var completionItem = {
34516 label: symbol.name,
34517 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__["getLimitedString"](symbol.value) : symbol.value,
34518 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34519 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Variable,
34520 sortText: SortTexts.Variable
34522 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
34523 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color;
34525 if (symbol.node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionParameter) {
34526 var mixinNode = (symbol.node.getParent());
34527 if (mixinNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration) {
34528 completionItem.detail = localize('completion.argument', 'argument from \'{0}\'', mixinNode.getName());
34531 result.items.push(completionItem);
34535 CSSCompletion.prototype.getVariableProposalsForCSSVarFunction = function (result) {
34536 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
34537 symbols = symbols.filter(function (symbol) {
34538 return _utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](symbol.name, '--');
34540 for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
34541 var symbol = symbols_2[_i];
34542 var completionItem = {
34543 label: symbol.name,
34544 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__["getLimitedString"](symbol.value) : symbol.value,
34545 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(null), symbol.name),
34546 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Variable
34548 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
34549 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color;
34551 result.items.push(completionItem);
34555 CSSCompletion.prototype.getUnitProposals = function (entry, existingNode, result) {
34556 var currentWord = '0';
34557 if (this.currentWord.length > 0) {
34558 var numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
34560 currentWord = numMatch[0];
34561 result.isIncomplete = currentWord.length === this.currentWord.length;
34564 else if (this.currentWord.length === 0) {
34565 result.isIncomplete = true;
34567 if (existingNode && existingNode.parent && existingNode.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Term) {
34568 existingNode = existingNode.getParent(); // include the unary operator
34570 if (entry.restrictions) {
34571 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
34572 var restriction = _a[_i];
34573 var units = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["units"][restriction];
34575 for (var _b = 0, units_1 = units; _b < units_1.length; _b++) {
34576 var unit = units_1[_b];
34577 var insertText = currentWord + unit;
34578 result.items.push({
34580 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34581 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Unit
34589 CSSCompletion.prototype.getCompletionRange = function (existingNode) {
34590 if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) {
34591 var end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position;
34592 var start = this.textDocument.positionAt(existingNode.offset);
34593 if (start.line === end.line) {
34594 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(start, end); // multi line edits are not allowed
34597 return this.defaultReplaceRange;
34599 CSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
34600 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"]) {
34601 result.items.push({
34603 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"][color],
34604 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
34605 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color
34608 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorKeywords"]) {
34609 result.items.push({
34611 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorKeywords"][color],
34612 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
34613 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34616 var colorValues = new Set();
34617 this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset));
34618 for (var _i = 0, _a = colorValues.getEntries(); _i < _a.length; _i++) {
34619 var color = _a[_i];
34620 result.items.push({
34622 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), color),
34623 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Color
34626 var _loop_1 = function (p) {
34628 var replaceFunction = function (_match, p1) { return '${' + tabStop++ + ':' + p1 + '}'; };
34629 var insertText = p.func.replace(/\[?\$(\w+)\]?/g, replaceFunction);
34630 result.items.push({
34631 label: p.func.substr(0, p.func.indexOf('(')),
34633 documentation: p.desc,
34634 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this_1.getCompletionRange(existingNode), insertText),
34635 insertTextFormat: SnippetFormat,
34636 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function
34640 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colorFunctions"]; _b < _c.length; _b++) {
34646 CSSCompletion.prototype.getPositionProposals = function (entry, existingNode, result) {
34647 for (var position in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["positionKeywords"]) {
34648 result.items.push({
34650 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["positionKeywords"][position],
34651 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), position),
34652 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34657 CSSCompletion.prototype.getRepeatStyleProposals = function (entry, existingNode, result) {
34658 for (var repeat in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["repeatStyleKeywords"]) {
34659 result.items.push({
34661 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["repeatStyleKeywords"][repeat],
34662 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), repeat),
34663 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34668 CSSCompletion.prototype.getLineStyleProposals = function (entry, existingNode, result) {
34669 for (var lineStyle in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineStyleKeywords"]) {
34670 result.items.push({
34672 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineStyleKeywords"][lineStyle],
34673 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), lineStyle),
34674 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34679 CSSCompletion.prototype.getLineWidthProposals = function (entry, existingNode, result) {
34680 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["lineWidthKeywords"]; _i < _a.length; _i++) {
34681 var lineWidth = _a[_i];
34682 result.items.push({
34684 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), lineWidth),
34685 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34690 CSSCompletion.prototype.getGeometryBoxProposals = function (entry, existingNode, result) {
34691 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["geometryBoxKeywords"]) {
34692 result.items.push({
34694 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["geometryBoxKeywords"][box],
34695 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), box),
34696 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34701 CSSCompletion.prototype.getBoxProposals = function (entry, existingNode, result) {
34702 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["boxKeywords"]) {
34703 result.items.push({
34705 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["boxKeywords"][box],
34706 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), box),
34707 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Value
34712 CSSCompletion.prototype.getImageProposals = function (entry, existingNode, result) {
34713 for (var image in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["imageFunctions"]) {
34714 var insertText = moveCursorInsideParenthesis(image);
34715 result.items.push({
34717 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["imageFunctions"][image],
34718 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34719 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34720 insertTextFormat: image !== insertText ? SnippetFormat : void 0
34725 CSSCompletion.prototype.getTimingFunctionProposals = function (entry, existingNode, result) {
34726 for (var timing in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["transitionTimingFunctions"]) {
34727 var insertText = moveCursorInsideParenthesis(timing);
34728 result.items.push({
34730 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["transitionTimingFunctions"][timing],
34731 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34732 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34733 insertTextFormat: timing !== insertText ? SnippetFormat : void 0
34738 CSSCompletion.prototype.getBasicShapeProposals = function (entry, existingNode, result) {
34739 for (var shape in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["basicShapeFunctions"]) {
34740 var insertText = moveCursorInsideParenthesis(shape);
34741 result.items.push({
34743 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["basicShapeFunctions"][shape],
34744 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34745 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34746 insertTextFormat: shape !== insertText ? SnippetFormat : void 0
34751 CSSCompletion.prototype.getCompletionsForStylesheet = function (result) {
34752 var node = this.styleSheet.findFirstChildBeforeOffset(this.offset);
34754 return this.getCompletionForTopLevel(result);
34756 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
34757 return this.getCompletionsForRuleSet(node, result);
34759 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Supports"]) {
34760 return this.getCompletionsForSupports(node, result);
34764 CSSCompletion.prototype.getCompletionForTopLevel = function (result) {
34766 _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getAtDirectives().forEach(function (entry) {
34767 result.items.push({
34769 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(null), entry.name),
34770 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
34771 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
34772 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
34775 this.getCompletionsForSelector(null, false, result);
34778 CSSCompletion.prototype.getCompletionsForRuleSet = function (ruleSet, result) {
34779 var declarations = ruleSet.getDeclarations();
34780 var isAfter = declarations && declarations.endsWith('}') && this.offset >= declarations.end;
34782 return this.getCompletionForTopLevel(result);
34784 var isInSelectors = !declarations || this.offset <= declarations.offset;
34785 if (isInSelectors) {
34786 return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result);
34788 return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result);
34790 CSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
34792 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);
34793 if (!existingNode && this.offset - this.currentWord.length > 0 && this.textDocument.getText()[this.offset - this.currentWord.length - 1] === ':') {
34794 // after the ':' of a pseudo selector, no node generated for just ':'
34795 this.currentWord = ':' + this.currentWord;
34796 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Position"].create(this.position.line, this.position.character - this.currentWord.length), this.position);
34798 var pseudoClasses = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getPseudoClasses();
34799 pseudoClasses.forEach(function (entry) {
34800 var insertText = moveCursorInsideParenthesis(entry.name);
34803 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), insertText),
34804 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
34805 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
34806 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34807 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
34809 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, ':-')) {
34810 item.sortText = SortTexts.VendorPrefixed;
34812 result.items.push(item);
34814 var pseudoElements = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getPseudoElements();
34815 pseudoElements.forEach(function (entry) {
34816 var insertText = moveCursorInsideParenthesis(entry.name);
34819 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), insertText),
34820 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["getEntryDescription"](entry, _this.doesSupportMarkdown()),
34821 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemTag"].Deprecated] : [],
34822 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34823 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
34825 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"](entry.name, '::-')) {
34826 item.sortText = SortTexts.VendorPrefixed;
34828 result.items.push(item);
34830 if (!isNested) { // show html tags only for top level
34831 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["html5Tags"]; _i < _a.length; _i++) {
34832 var entry = _a[_i];
34833 result.items.push({
34835 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), entry),
34836 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
34839 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["svgElements"]; _b < _c.length; _b++) {
34840 var entry = _c[_b];
34841 result.items.push({
34843 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), entry),
34844 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
34849 visited[this.currentWord] = true;
34850 var docText = this.textDocument.getText();
34851 this.styleSheet.accept(function (n) {
34852 if (n.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SimpleSelector && n.length > 0) {
34853 var selector = docText.substr(n.offset, n.length);
34854 if (selector.charAt(0) === '.' && !visited[selector]) {
34855 visited[selector] = true;
34856 result.items.push({
34858 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(_this.getCompletionRange(existingNode), selector),
34859 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Keyword
34866 if (ruleSet && ruleSet.isNested()) {
34867 var selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset);
34868 if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) {
34869 this.getPropertyProposals(null, result);
34874 CSSCompletion.prototype.getCompletionsForDeclarations = function (declarations, result) {
34875 if (!declarations || this.offset === declarations.offset) { // incomplete nodes
34878 var node = declarations.findFirstChildBeforeOffset(this.offset);
34880 return this.getCompletionsForDeclarationProperty(null, result);
34882 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["AbstractDeclaration"]) {
34883 var declaration = node;
34884 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition) || this.offset <= declaration.colonPosition) {
34885 // complete property
34886 return this.getCompletionsForDeclarationProperty(declaration, result);
34888 else if ((Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset)) {
34889 if (this.offset === declaration.semicolonPosition + 1) {
34890 return result; // don't show new properties right after semicolon (see Bug 15421:[intellisense] [css] Be less aggressive when manually typing CSS)
34892 // complete next property
34893 return this.getCompletionsForDeclarationProperty(null, result);
34895 if (declaration instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
34897 return this.getCompletionsForDeclarationValue(declaration, result);
34900 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ExtendsReference"]) {
34901 this.getCompletionsForExtendsReference(node, null, result);
34903 else if (this.currentWord && this.currentWord[0] === '@') {
34904 this.getCompletionsForDeclarationProperty(null, result);
34908 CSSCompletion.prototype.getCompletionsForVariableDeclaration = function (declaration, result) {
34909 if (this.offset && Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(declaration.colonPosition) && this.offset > declaration.colonPosition) {
34910 this.getVariableProposals(declaration.getValue(), result);
34914 CSSCompletion.prototype.getCompletionsForExpression = function (expression, result) {
34915 var parent = expression.getParent();
34916 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"]) {
34917 this.getCompletionsForFunctionArgument(parent, parent.getParent(), result);
34920 var declaration = expression.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Declaration);
34921 if (!declaration) {
34922 this.getTermProposals(null, null, result);
34925 var node = expression.findChildAtOffset(this.offset, true);
34927 return this.getCompletionsForDeclarationValue(declaration, result);
34929 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NumericValue"] || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Identifier"]) {
34930 return this.getCompletionsForDeclarationValue(declaration, result);
34934 CSSCompletion.prototype.getCompletionsForFunctionArgument = function (arg, func, result) {
34935 var identifier = func.getIdentifier();
34936 if (identifier && identifier.matches('var')) {
34937 if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) {
34938 this.getVariableProposalsForCSSVarFunction(result);
34943 CSSCompletion.prototype.getCompletionsForFunctionDeclaration = function (decl, result) {
34944 var declarations = decl.getDeclarations();
34945 if (declarations && this.offset > declarations.offset && this.offset < declarations.end) {
34946 this.getTermProposals(null, null, result);
34950 CSSCompletion.prototype.getCompletionsForMixinReference = function (ref, result) {
34951 var allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Mixin);
34952 for (var _i = 0, allMixins_1 = allMixins; _i < allMixins_1.length; _i++) {
34953 var mixinSymbol = allMixins_1[_i];
34954 if (mixinSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["MixinDeclaration"]) {
34955 result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null));
34960 CSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
34961 var allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function);
34962 for (var _i = 0, allFunctions_1 = allFunctions; _i < allFunctions_1.length; _i++) {
34963 var functionSymbol = allFunctions_1[_i];
34964 if (functionSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionDeclaration"]) {
34965 result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode));
34970 CSSCompletion.prototype.makeTermProposal = function (symbol, parameters, existingNode) {
34971 var decl = symbol.node;
34972 var params = parameters.getChildren().map(function (c) {
34973 return (c instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionParameter"]) ? c.getName() : c.getText();
34975 var insertText = symbol.name + '(' + params.map(function (p, index) { return '${' + (index + 1) + ':' + p + '}'; }).join(', ') + ')';
34977 label: symbol.name,
34978 detail: symbol.name + '(' + params.join(', ') + ')',
34979 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
34980 insertTextFormat: SnippetFormat,
34981 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CompletionItemKind"].Function,
34982 sortText: SortTexts.Term
34985 CSSCompletion.prototype.getCompletionsForSupportsCondition = function (supportsCondition, result) {
34986 var child = supportsCondition.findFirstChildBeforeOffset(this.offset);
34988 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
34989 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(child.colonPosition) || this.offset <= child.colonPosition) {
34990 return this.getCompletionsForDeclarationProperty(child, result);
34993 return this.getCompletionsForDeclarationValue(child, result);
34996 else if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
34997 return this.getCompletionsForSupportsCondition(child, result);
35000 if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) {
35001 return this.getCompletionsForDeclarationProperty(null, result);
35005 CSSCompletion.prototype.getCompletionsForSupports = function (supports, result) {
35006 var declarations = supports.getDeclarations();
35007 var inInCondition = !declarations || this.offset <= declarations.offset;
35008 if (inInCondition) {
35009 var child = supports.findFirstChildBeforeOffset(this.offset);
35010 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SupportsCondition"]) {
35011 return this.getCompletionsForSupportsCondition(child, result);
35015 return this.getCompletionForTopLevel(result);
35017 CSSCompletion.prototype.getCompletionsForExtendsReference = function (extendsRef, existingNode, result) {
35020 CSSCompletion.prototype.getCompletionForUriLiteralValue = function (uriLiteralNode, result) {
35024 // No children, empty value
35025 if (!uriLiteralNode.hasChildren()) {
35027 position = this.position;
35028 var emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + 'url('.length);
35029 range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(emptyURIValuePosition, emptyURIValuePosition);
35032 var uriValueNode = uriLiteralNode.getChild(0);
35033 uriValue = uriValueNode.getText();
35034 position = this.position;
35035 range = this.getCompletionRange(uriValueNode);
35037 this.completionParticipants.forEach(function (participant) {
35038 if (participant.onCssURILiteralValue) {
35039 participant.onCssURILiteralValue({
35040 uriValue: uriValue,
35041 position: position,
35048 CSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
35050 this.completionParticipants.forEach(function (participant) {
35051 if (participant.onCssImportPath) {
35052 participant.onCssImportPath({
35053 pathValue: importPathNode.getText(),
35054 position: _this.position,
35055 range: _this.getCompletionRange(importPathNode)
35061 CSSCompletion.prototype.doesSupportMarkdown = function () {
35062 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(this.supportsMarkdown)) {
35063 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_6__["isDefined"])(this.clientCapabilities)) {
35064 this.supportsMarkdown = true;
35065 return this.supportsMarkdown;
35067 var completion = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.completion;
35068 this.supportsMarkdown = completion && completion.completionItem && Array.isArray(completion.completionItem.documentationFormat) && completion.completionItem.documentationFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["MarkupKind"].Markdown) !== -1;
35070 return this.supportsMarkdown;
35072 return CSSCompletion;
35075 function isDeprecated(entry) {
35076 if (entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete')) {
35082 * Rank number should all be same length strings
35084 function computeRankNumber(n) {
35085 var nstr = n.toString();
35086 switch (nstr.length) {
35092 return '00' + nstr;
35094 return '000' + nstr;
35099 var Set = /** @class */ (function () {
35103 Set.prototype.add = function (entry) {
35104 this.entries[entry] = true;
35106 Set.prototype.getEntries = function () {
35107 return Object.keys(this.entries);
35111 function moveCursorInsideParenthesis(text) {
35112 return text.replace(/\(\)$/, "($1)");
35114 function collectValues(styleSheet, declaration) {
35115 var fullPropertyName = declaration.getFullPropertyName();
35116 var entries = new Set();
35117 function visitValue(node) {
35118 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"]) {
35119 entries.add(node.getText());
35123 function matchesProperty(decl) {
35124 var propertyName = decl.getFullPropertyName();
35125 return fullPropertyName === propertyName;
35127 function vistNode(node) {
35128 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"] && node !== declaration) {
35129 if (matchesProperty(node)) {
35130 var value = node.getValue();
35132 value.accept(visitValue);
35138 styleSheet.accept(vistNode);
35141 var ColorValueCollector = /** @class */ (function () {
35142 function ColorValueCollector(entries, currentOffset) {
35143 this.entries = entries;
35144 this.currentOffset = currentOffset;
35147 ColorValueCollector.prototype.visitNode = function (node) {
35148 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))) {
35149 if (this.currentOffset < node.offset || node.end < this.currentOffset) {
35150 this.entries.add(node.getText());
35155 return ColorValueCollector;
35157 function getCurrentWord(document, offset) {
35158 var i = offset - 1;
35159 var text = document.getText();
35160 while (i >= 0 && ' \t\n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) {
35163 return text.substring(i + 1, offset);
35165 function isColorString(s) {
35166 // From https://stackoverflow.com/questions/8027423/how-to-check-if-a-string-is-a-valid-hex-color-representation/8027444
35167 return (s.toLowerCase() in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["colors"]) || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(s);
35173 /***/ (function(module, __webpack_exports__, __webpack_require__) {
35176 __webpack_require__.r(__webpack_exports__);
35177 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return Scope; });
35178 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalScope", function() { return GlobalScope; });
35179 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Symbol", function() { return Symbol; });
35180 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScopeBuilder", function() { return ScopeBuilder; });
35181 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Symbols", function() { return Symbols; });
35182 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
35183 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
35184 /*---------------------------------------------------------------------------------------------
35185 * Copyright (c) Microsoft Corporation. All rights reserved.
35186 * Licensed under the MIT License. See License.txt in the project root for license information.
35187 *--------------------------------------------------------------------------------------------*/
35189 var __extends = (undefined && undefined.__extends) || (function () {
35190 var extendStatics = function (d, b) {
35191 extendStatics = Object.setPrototypeOf ||
35192 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
35193 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
35194 return extendStatics(d, b);
35196 return function (d, b) {
35197 extendStatics(d, b);
35198 function __() { this.constructor = d; }
35199 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
35204 var Scope = /** @class */ (function () {
35205 function Scope(offset, length) {
35206 this.offset = offset;
35207 this.length = length;
35209 this.parent = null;
35210 this.children = [];
35212 Scope.prototype.addChild = function (scope) {
35213 this.children.push(scope);
35214 scope.setParent(this);
35216 Scope.prototype.setParent = function (scope) {
35217 this.parent = scope;
35219 Scope.prototype.findScope = function (offset, length) {
35220 if (length === void 0) { length = 0; }
35221 if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) {
35222 return this.findInScope(offset, length);
35226 Scope.prototype.findInScope = function (offset, length) {
35227 if (length === void 0) { length = 0; }
35228 // find the first scope child that has an offset larger than offset + length
35229 var end = offset + length;
35230 var idx = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_1__["findFirst"])(this.children, function (s) { return s.offset > end; });
35232 // all scopes have offsets larger than our end
35235 var res = this.children[idx - 1];
35236 if (res.offset <= offset && res.offset + res.length >= offset + length) {
35237 return res.findInScope(offset, length);
35241 Scope.prototype.addSymbol = function (symbol) {
35242 this.symbols.push(symbol);
35244 Scope.prototype.getSymbol = function (name, type) {
35245 for (var index = 0; index < this.symbols.length; index++) {
35246 var symbol = this.symbols[index];
35247 if (symbol.name === name && symbol.type === type) {
35253 Scope.prototype.getSymbols = function () {
35254 return this.symbols;
35259 var GlobalScope = /** @class */ (function (_super) {
35260 __extends(GlobalScope, _super);
35261 function GlobalScope() {
35262 return _super.call(this, 0, Number.MAX_VALUE) || this;
35264 return GlobalScope;
35267 var Symbol = /** @class */ (function () {
35268 function Symbol(name, value, node, type) {
35270 this.value = value;
35277 var ScopeBuilder = /** @class */ (function () {
35278 function ScopeBuilder(scope) {
35279 this.scope = scope;
35281 ScopeBuilder.prototype.addSymbol = function (node, name, value, type) {
35282 if (node.offset !== -1) {
35283 var current = this.scope.findScope(node.offset, node.length);
35285 current.addSymbol(new Symbol(name, value, node, type));
35289 ScopeBuilder.prototype.addScope = function (node) {
35290 if (node.offset !== -1) {
35291 var current = this.scope.findScope(node.offset, node.length);
35292 if (current && (current.offset !== node.offset || current.length !== node.length)) { // scope already known?
35293 var newScope = new Scope(node.offset, node.length);
35294 current.addChild(newScope);
35301 ScopeBuilder.prototype.addSymbolToChildScope = function (scopeNode, node, name, value, type) {
35302 if (scopeNode && scopeNode.offset !== -1) {
35303 var current = this.addScope(scopeNode); // create the scope or gets the existing one
35305 current.addSymbol(new Symbol(name, value, node, type));
35309 ScopeBuilder.prototype.visitNode = function (node) {
35310 switch (node.type) {
35311 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Keyframe:
35312 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Keyframe);
35314 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].CustomPropertyDeclaration:
35315 return this.visitCustomPropertyDeclarationNode(node);
35316 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].VariableDeclaration:
35317 return this.visitVariableDeclarationNode(node);
35318 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Ruleset:
35319 return this.visitRuleSet(node);
35320 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
35321 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Mixin);
35323 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionDeclaration:
35324 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function);
35326 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].FunctionParameter: {
35327 return this.visitFunctionParameterNode(node);
35329 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Declarations:
35330 this.addScope(node);
35332 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].For:
35333 var forNode = node;
35334 var scopeNode = forNode.getDeclarations();
35335 if (scopeNode && forNode.variable) {
35336 this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
35339 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Each: {
35340 var eachNode = node;
35341 var scopeNode_1 = eachNode.getDeclarations();
35343 var variables = eachNode.getVariables().getChildren();
35344 for (var _i = 0, variables_1 = variables; _i < variables_1.length; _i++) {
35345 var variable = variables_1[_i];
35346 this.addSymbolToChildScope(scopeNode_1, variable, variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
35354 ScopeBuilder.prototype.visitRuleSet = function (node) {
35355 var current = this.scope.findScope(node.offset, node.length);
35357 for (var _i = 0, _a = node.getSelectors().getChildren(); _i < _a.length; _i++) {
35358 var child = _a[_i];
35359 if (child instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Selector"]) {
35360 if (child.getChildren().length === 1) { // only selectors with a single element can be extended
35361 current.addSymbol(new Symbol(child.getChild(0).getText(), void 0, child, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Rule));
35368 ScopeBuilder.prototype.visitVariableDeclarationNode = function (node) {
35369 var value = node.getValue() ? node.getValue().getText() : void 0;
35370 this.addSymbol(node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
35373 ScopeBuilder.prototype.visitFunctionParameterNode = function (node) {
35374 // parameters are part of the body scope
35375 var scopeNode = node.getParent().getDeclarations();
35377 var valueNode = node.getDefaultValue();
35378 var value = valueNode ? valueNode.getText() : void 0;
35379 this.addSymbolToChildScope(scopeNode, node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
35383 ScopeBuilder.prototype.visitCustomPropertyDeclarationNode = function (node) {
35384 var value = node.getValue() ? node.getValue().getText() : '';
35385 this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable);
35388 ScopeBuilder.prototype.addCSSVariable = function (node, name, value, type) {
35389 if (node.offset !== -1) {
35390 this.scope.addSymbol(new Symbol(name, value, node, type));
35393 return ScopeBuilder;
35396 var Symbols = /** @class */ (function () {
35397 function Symbols(node) {
35398 this.global = new GlobalScope();
35399 node.acceptVisitor(new ScopeBuilder(this.global));
35401 Symbols.prototype.findSymbolsAtOffset = function (offset, referenceType) {
35402 var scope = this.global.findScope(offset, 0);
35406 var symbols = scope.getSymbols();
35407 for (var i = 0; i < symbols.length; i++) {
35408 var symbol = symbols[i];
35409 if (symbol.type === referenceType && !names[symbol.name]) {
35410 result.push(symbol);
35411 names[symbol.name] = true;
35414 scope = scope.parent;
35418 Symbols.prototype.internalFindSymbol = function (node, referenceTypes) {
35419 var scopeNode = node;
35420 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionParameter"] && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["BodyDeclaration"]) {
35421 scopeNode = node.parent.getParent().getDeclarations();
35423 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["FunctionArgument"] && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Function"]) {
35424 var funcId = node.parent.getParent().getIdentifier();
35426 var functionSymbol = this.internalFindSymbol(funcId, [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Function]);
35427 if (functionSymbol) {
35428 scopeNode = functionSymbol.node.getDeclarations();
35435 var name = node.getText();
35436 var scope = this.global.findScope(scopeNode.offset, scopeNode.length);
35438 for (var index = 0; index < referenceTypes.length; index++) {
35439 var type = referenceTypes[index];
35440 var symbol = scope.getSymbol(name, type);
35445 scope = scope.parent;
35449 Symbols.prototype.evaluateReferenceTypes = function (node) {
35450 if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Identifier"]) {
35451 var referenceTypes = node.referenceTypes;
35452 if (referenceTypes) {
35453 return referenceTypes;
35456 if (node.isCustomProperty) {
35457 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable];
35459 // are a reference to a keyframe?
35460 var decl = _cssNodes__WEBPACK_IMPORTED_MODULE_0__["getParentDeclaration"](node);
35462 var propertyName = decl.getNonPrefixedPropertyName();
35463 if ((propertyName === 'animation' || propertyName === 'animation-name')
35464 && decl.getValue() && decl.getValue().offset === node.offset) {
35465 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Keyframe];
35470 else if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__["Variable"]) {
35471 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Variable];
35473 var selector = node.findAParent(_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Selector, _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ExtendsReference);
35475 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ReferenceType"].Rule];
35479 Symbols.prototype.findSymbolFromNode = function (node) {
35483 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Interpolation) {
35484 node = node.getParent();
35486 var referenceTypes = this.evaluateReferenceTypes(node);
35487 if (referenceTypes) {
35488 return this.internalFindSymbol(node, referenceTypes);
35492 Symbols.prototype.matchesSymbol = function (node, symbol) {
35496 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Interpolation) {
35497 node = node.getParent();
35499 if (!node.matches(symbol.name)) {
35502 var referenceTypes = this.evaluateReferenceTypes(node);
35503 if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) {
35506 var nodeSymbol = this.internalFindSymbol(node, referenceTypes);
35507 return nodeSymbol === symbol;
35509 Symbols.prototype.findSymbol = function (name, type, offset) {
35510 var scope = this.global.findScope(offset);
35512 var symbol = scope.getSymbol(name, type);
35516 scope = scope.parent;
35527 /***/ (function(module, __webpack_exports__, __webpack_require__) {
35530 __webpack_require__.r(__webpack_exports__);
35531 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findFirst", function() { return findFirst; });
35532 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includes", function() { return includes; });
35533 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "union", function() { return union; });
35534 /*---------------------------------------------------------------------------------------------
35535 * Copyright (c) Microsoft Corporation. All rights reserved.
35536 * Licensed under the MIT License. See License.txt in the project root for license information.
35537 *--------------------------------------------------------------------------------------------*/
35540 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
35541 * are located before all elements where p(x) is true.
35542 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
35544 function findFirst(array, p) {
35545 var low = 0, high = array.length;
35547 return 0; // no children
35549 while (low < high) {
35550 var mid = Math.floor((low + high) / 2);
35551 if (p(array[mid])) {
35560 function includes(array, item) {
35561 return array.indexOf(item) !== -1;
35565 for (var _i = 0; _i < arguments.length; _i++) {
35566 arrays[_i] = arguments[_i];
35569 for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
35570 var array = arrays_1[_a];
35571 for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
35572 var item = array_1[_b];
35573 if (!includes(result, item)) {
35584 /***/ (function(module, __webpack_exports__, __webpack_require__) {
35587 __webpack_require__.r(__webpack_exports__);
35588 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; });
35589 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; });
35590 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return difference; });
35591 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLimitedString", function() { return getLimitedString; });
35592 /*---------------------------------------------------------------------------------------------
35593 * Copyright (c) Microsoft Corporation. All rights reserved.
35594 * Licensed under the MIT License. See License.txt in the project root for license information.
35595 *--------------------------------------------------------------------------------------------*/
35597 function startsWith(haystack, needle) {
35598 if (haystack.length < needle.length) {
35601 for (var i = 0; i < needle.length; i++) {
35602 if (haystack[i] !== needle[i]) {
35609 * Determines if haystack ends with needle.
35611 function endsWith(haystack, needle) {
35612 var diff = haystack.length - needle.length;
35614 return haystack.lastIndexOf(needle) === diff;
35616 else if (diff === 0) {
35617 return haystack === needle;
35624 * Computes the difference score for two strings. More similar strings have a higher score.
35625 * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
35626 * Strings that have a large length difference will get a bad default score 0.
35627 * Complexity - both time and space O(first.length * second.length)
35628 * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
35630 * @param first a string
35631 * @param second a string
35633 function difference(first, second, maxLenDelta) {
35634 if (maxLenDelta === void 0) { maxLenDelta = 4; }
35635 var lengthDifference = Math.abs(first.length - second.length);
35636 // We only compute score if length of the currentWord and length of entry.name are similar.
35637 if (lengthDifference > maxLenDelta) {
35640 // Initialize LCS (largest common subsequence) matrix.
35642 var zeroArray = [];
35644 for (i = 0; i < second.length + 1; ++i) {
35647 for (i = 0; i < first.length + 1; ++i) {
35648 LCS.push(zeroArray);
35650 for (i = 1; i < first.length + 1; ++i) {
35651 for (j = 1; j < second.length + 1; ++j) {
35652 if (first[i - 1] === second[j - 1]) {
35653 LCS[i][j] = LCS[i - 1][j - 1] + 1;
35656 LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
35660 return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
35663 * Limit of string length.
35665 function getLimitedString(str, ellipsis) {
35666 if (ellipsis === void 0) { ellipsis = true; }
35670 if (str.length < 140) {
35673 return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
35679 /***/ (function(module, __webpack_exports__, __webpack_require__) {
35682 __webpack_require__.r(__webpack_exports__);
35683 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return ClientCapabilities; });
35684 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileType", function() { return FileType; });
35685 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
35686 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
35687 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__["TextDocument"]; });
35689 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"]; });
35691 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"]; });
35693 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Location"]; });
35695 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["LocationLink"]; });
35697 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Color"]; });
35699 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorInformation"]; });
35701 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorPresentation"]; });
35703 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"]; });
35705 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRange"]; });
35707 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticRelatedInformation"]; });
35709 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticSeverity"]; });
35711 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticTag"]; });
35713 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Diagnostic"]; });
35715 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Command"]; });
35717 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"]; });
35719 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentEdit"]; });
35721 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CreateFile"]; });
35723 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["RenameFile"]; });
35725 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DeleteFile"]; });
35727 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["WorkspaceEdit"]; });
35729 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["WorkspaceChange"]; });
35731 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentIdentifier"]; });
35733 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["VersionedTextDocumentIdentifier"]; });
35735 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocumentItem"]; });
35737 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"]; });
35739 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupContent"]; });
35741 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"]; });
35743 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"]; });
35745 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemTag"]; });
35747 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItem"]; });
35749 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionList"]; });
35751 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkedString"]; });
35753 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Hover"]; });
35755 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ParameterInformation"]; });
35757 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SignatureInformation"]; });
35759 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"]; });
35761 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlight"]; });
35763 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"]; });
35765 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolTag"]; });
35767 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolInformation"]; });
35769 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentSymbol"]; });
35771 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeActionKind"]; });
35773 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeActionContext"]; });
35775 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeAction"]; });
35777 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CodeLens"]; });
35779 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FormattingOptions"]; });
35781 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentLink"]; });
35783 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"]; });
35785 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["EOL"]; });
35787 /*---------------------------------------------------------------------------------------------
35788 * Copyright (c) Microsoft Corporation. All rights reserved.
35789 * Licensed under the MIT License. See License.txt in the project root for license information.
35790 *--------------------------------------------------------------------------------------------*/
35795 var ClientCapabilities;
35796 (function (ClientCapabilities) {
35797 ClientCapabilities.LATEST = {
35801 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
35805 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
35809 })(ClientCapabilities || (ClientCapabilities = {}));
35811 (function (FileType) {
35813 * The file type is unknown.
35815 FileType[FileType["Unknown"] = 0] = "Unknown";
35819 FileType[FileType["File"] = 1] = "File";
35823 FileType[FileType["Directory"] = 2] = "Directory";
35825 * A symbolic link to a file.
35827 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
35828 })(FileType || (FileType = {}));
35833 /***/ (function(module, __webpack_exports__, __webpack_require__) {
35836 __webpack_require__.r(__webpack_exports__);
35837 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
35838 /* --------------------------------------------------------------------------------------------
35839 * Copyright (c) Microsoft Corporation. All rights reserved.
35840 * Licensed under the MIT License. See License.txt in the project root for license information.
35841 * ------------------------------------------------------------------------------------------ */
35843 var FullTextDocument = /** @class */ (function () {
35844 function FullTextDocument(uri, languageId, version, content) {
35846 this._languageId = languageId;
35847 this._version = version;
35848 this._content = content;
35849 this._lineOffsets = undefined;
35851 Object.defineProperty(FullTextDocument.prototype, "uri", {
35858 Object.defineProperty(FullTextDocument.prototype, "languageId", {
35860 return this._languageId;
35865 Object.defineProperty(FullTextDocument.prototype, "version", {
35867 return this._version;
35872 FullTextDocument.prototype.getText = function (range) {
35874 var start = this.offsetAt(range.start);
35875 var end = this.offsetAt(range.end);
35876 return this._content.substring(start, end);
35878 return this._content;
35880 FullTextDocument.prototype.update = function (changes, version) {
35881 for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {
35882 var change = changes_1[_i];
35883 if (FullTextDocument.isIncremental(change)) {
35884 // makes sure start is before end
35885 var range = getWellformedRange(change.range);
35887 var startOffset = this.offsetAt(range.start);
35888 var endOffset = this.offsetAt(range.end);
35889 this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
35890 // update the offsets
35891 var startLine = Math.max(range.start.line, 0);
35892 var endLine = Math.max(range.end.line, 0);
35893 var lineOffsets = this._lineOffsets;
35894 var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
35895 if (endLine - startLine === addedLineOffsets.length) {
35896 for (var i = 0, len = addedLineOffsets.length; i < len; i++) {
35897 lineOffsets[i + startLine + 1] = addedLineOffsets[i];
35901 if (addedLineOffsets.length < 10000) {
35902 lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));
35904 else { // avoid too many arguments for splice
35905 this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
35908 var diff = change.text.length - (endOffset - startOffset);
35910 for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
35911 lineOffsets[i] = lineOffsets[i] + diff;
35915 else if (FullTextDocument.isFull(change)) {
35916 this._content = change.text;
35917 this._lineOffsets = undefined;
35920 throw new Error('Unknown change event received');
35923 this._version = version;
35925 FullTextDocument.prototype.getLineOffsets = function () {
35926 if (this._lineOffsets === undefined) {
35927 this._lineOffsets = computeLineOffsets(this._content, true);
35929 return this._lineOffsets;
35931 FullTextDocument.prototype.positionAt = function (offset) {
35932 offset = Math.max(Math.min(offset, this._content.length), 0);
35933 var lineOffsets = this.getLineOffsets();
35934 var low = 0, high = lineOffsets.length;
35936 return { line: 0, character: offset };
35938 while (low < high) {
35939 var mid = Math.floor((low + high) / 2);
35940 if (lineOffsets[mid] > offset) {
35947 // low is the least x for which the line offset is larger than the current offset
35948 // or array.length if no line offset is larger than the current offset
35949 var line = low - 1;
35950 return { line: line, character: offset - lineOffsets[line] };
35952 FullTextDocument.prototype.offsetAt = function (position) {
35953 var lineOffsets = this.getLineOffsets();
35954 if (position.line >= lineOffsets.length) {
35955 return this._content.length;
35957 else if (position.line < 0) {
35960 var lineOffset = lineOffsets[position.line];
35961 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
35962 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
35964 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
35966 return this.getLineOffsets().length;
35971 FullTextDocument.isIncremental = function (event) {
35972 var candidate = event;
35973 return candidate !== undefined && candidate !== null &&
35974 typeof candidate.text === 'string' && candidate.range !== undefined &&
35975 (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
35977 FullTextDocument.isFull = function (event) {
35978 var candidate = event;
35979 return candidate !== undefined && candidate !== null &&
35980 typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
35982 return FullTextDocument;
35985 (function (TextDocument) {
35987 * Creates a new text document.
35989 * @param uri The document's uri.
35990 * @param languageId The document's language Id.
35991 * @param version The document's initial version number.
35992 * @param content The document's content.
35994 function create(uri, languageId, version, content) {
35995 return new FullTextDocument(uri, languageId, version, content);
35997 TextDocument.create = create;
35999 * Updates a TextDocument by modifing its content.
36001 * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
36002 * @param changes the changes to apply to the document.
36003 * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
36006 function update(document, changes, version) {
36007 if (document instanceof FullTextDocument) {
36008 document.update(changes, version);
36012 throw new Error('TextDocument.update: document must be created by TextDocument.create');
36015 TextDocument.update = update;
36016 function applyEdits(document, edits) {
36017 var text = document.getText();
36018 var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {
36019 var diff = a.range.start.line - b.range.start.line;
36021 return a.range.start.character - b.range.start.character;
36025 var lastModifiedOffset = 0;
36027 for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {
36028 var e = sortedEdits_1[_i];
36029 var startOffset = document.offsetAt(e.range.start);
36030 if (startOffset < lastModifiedOffset) {
36031 throw new Error('Overlapping edit');
36033 else if (startOffset > lastModifiedOffset) {
36034 spans.push(text.substring(lastModifiedOffset, startOffset));
36036 if (e.newText.length) {
36037 spans.push(e.newText);
36039 lastModifiedOffset = document.offsetAt(e.range.end);
36041 spans.push(text.substr(lastModifiedOffset));
36042 return spans.join('');
36044 TextDocument.applyEdits = applyEdits;
36045 })(TextDocument || (TextDocument = {}));
36046 function mergeSort(data, compare) {
36047 if (data.length <= 1) {
36051 var p = (data.length / 2) | 0;
36052 var left = data.slice(0, p);
36053 var right = data.slice(p);
36054 mergeSort(left, compare);
36055 mergeSort(right, compare);
36059 while (leftIdx < left.length && rightIdx < right.length) {
36060 var ret = compare(left[leftIdx], right[rightIdx]);
36062 // smaller_equal -> take left to preserve order
36063 data[i++] = left[leftIdx++];
36066 // greater -> take right
36067 data[i++] = right[rightIdx++];
36070 while (leftIdx < left.length) {
36071 data[i++] = left[leftIdx++];
36073 while (rightIdx < right.length) {
36074 data[i++] = right[rightIdx++];
36078 function computeLineOffsets(text, isAtLineStart, textOffset) {
36079 if (textOffset === void 0) { textOffset = 0; }
36080 var result = isAtLineStart ? [textOffset] : [];
36081 for (var i = 0; i < text.length; i++) {
36082 var ch = text.charCodeAt(i);
36083 if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
36084 if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
36087 result.push(textOffset + i + 1);
36092 function getWellformedRange(range) {
36093 var start = range.start;
36094 var end = range.end;
36095 if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
36096 return { start: end, end: start };
36100 function getWellformedEdit(textEdit) {
36101 var range = getWellformedRange(textEdit.range);
36102 if (range !== textEdit.range) {
36103 return { newText: textEdit.newText, range: range };
36111 /***/ (function(module, __webpack_exports__, __webpack_require__) {
36114 __webpack_require__.r(__webpack_exports__);
36115 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSHover", function() { return CSSHover; });
36116 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
36117 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78);
36118 /* harmony import */ var _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93);
36119 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89);
36120 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90);
36121 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81);
36122 /*---------------------------------------------------------------------------------------------
36123 * Copyright (c) Microsoft Corporation. All rights reserved.
36124 * Licensed under the MIT License. See License.txt in the project root for license information.
36125 *--------------------------------------------------------------------------------------------*/
36133 var CSSHover = /** @class */ (function () {
36134 function CSSHover(clientCapabilities) {
36135 this.clientCapabilities = clientCapabilities;
36137 CSSHover.prototype.doHover = function (document, position, stylesheet) {
36138 function getRange(node) {
36139 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Range"].create(document.positionAt(node.offset), document.positionAt(node.end));
36141 var offset = document.offsetAt(position);
36142 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](stylesheet, offset);
36144 * nodepath is top-down
36145 * Build up the hover by appending inner node's information
36148 for (var i = 0; i < nodepath.length; i++) {
36149 var node = nodepath[i];
36150 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Selector"]) {
36152 contents: Object(_selectorPrinting__WEBPACK_IMPORTED_MODULE_2__["selectorToMarkedString"])(node),
36153 range: getRange(node)
36157 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
36159 * Some sass specific at rules such as `@at-root` are parsed as `SimpleSelector`
36161 if (!Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["startsWith"])(node.getText(), '@')) {
36163 contents: Object(_selectorPrinting__WEBPACK_IMPORTED_MODULE_2__["simpleSelectorToMarkedString"])(node),
36164 range: getRange(node)
36169 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
36170 var propertyName = node.getFullPropertyName();
36171 var entry = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["cssDataManager"].getProperty(propertyName);
36173 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
36176 contents: contents,
36177 range: getRange(node)
36186 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["UnknownAtRule"]) {
36187 var atRuleName = node.getText();
36188 var entry = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["cssDataManager"].getAtDirective(atRuleName);
36190 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
36193 contents: contents,
36194 range: getRange(node)
36203 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Node"] && node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector) {
36204 var selectorName = node.getText();
36205 var entry = selectorName.slice(0, 2) === '::'
36206 ? _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["cssDataManager"].getPseudoElement(selectorName)
36207 : _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["cssDataManager"].getPseudoClass(selectorName);
36209 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["getEntryDescription"](entry, this.doesSupportMarkdown());
36212 contents: contents,
36213 range: getRange(node)
36224 hover.contents = this.convertContents(hover.contents);
36228 CSSHover.prototype.convertContents = function (contents) {
36229 if (!this.doesSupportMarkdown()) {
36230 if (typeof contents === 'string') {
36234 else if ('kind' in contents) {
36237 value: contents.value
36241 else if (Array.isArray(contents)) {
36242 return contents.map(function (c) {
36243 return typeof c === 'string' ? c : c.value;
36248 return contents.value;
36253 CSSHover.prototype.doesSupportMarkdown = function () {
36254 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(this.supportsMarkdown)) {
36255 if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(this.clientCapabilities)) {
36256 this.supportsMarkdown = true;
36257 return this.supportsMarkdown;
36259 var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
36260 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["MarkupKind"].Markdown) !== -1;
36262 return this.supportsMarkdown;
36271 /***/ (function(module, __webpack_exports__, __webpack_require__) {
36274 __webpack_require__.r(__webpack_exports__);
36275 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
36276 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RootElement", function() { return RootElement; });
36277 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelElement", function() { return LabelElement; });
36278 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toElement", function() { return toElement; });
36279 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectorToMarkedString", function() { return selectorToMarkedString; });
36280 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleSelectorToMarkedString", function() { return simpleSelectorToMarkedString; });
36281 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectorToElement", function() { return selectorToElement; });
36282 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
36283 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
36284 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78);
36285 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77);
36286 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_3__);
36287 /*---------------------------------------------------------------------------------------------
36288 * Copyright (c) Microsoft Corporation. All rights reserved.
36289 * Licensed under the MIT License. See License.txt in the project root for license information.
36290 *--------------------------------------------------------------------------------------------*/
36292 var __extends = (undefined && undefined.__extends) || (function () {
36293 var extendStatics = function (d, b) {
36294 extendStatics = Object.setPrototypeOf ||
36295 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36296 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
36297 return extendStatics(d, b);
36299 return function (d, b) {
36300 extendStatics(d, b);
36301 function __() { this.constructor = d; }
36302 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36309 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__["loadMessageBundle"]();
36310 var Element = /** @class */ (function () {
36311 function Element() {
36312 this.parent = null;
36313 this.children = null;
36314 this.attributes = null;
36316 Element.prototype.findAttribute = function (name) {
36317 if (this.attributes) {
36318 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
36319 var attribute = _a[_i];
36320 if (attribute.name === name) {
36321 return attribute.value;
36327 Element.prototype.addChild = function (child) {
36328 if (child instanceof Element) {
36329 child.parent = this;
36331 if (!this.children) {
36332 this.children = [];
36334 this.children.push(child);
36336 Element.prototype.append = function (text) {
36337 if (this.attributes) {
36338 var last = this.attributes[this.attributes.length - 1];
36339 last.value = last.value + text;
36342 Element.prototype.prepend = function (text) {
36343 if (this.attributes) {
36344 var first = this.attributes[0];
36345 first.value = text + first.value;
36348 Element.prototype.findRoot = function () {
36350 while (curr.parent && !(curr.parent instanceof RootElement)) {
36351 curr = curr.parent;
36355 Element.prototype.removeChild = function (child) {
36356 if (this.children) {
36357 var index = this.children.indexOf(child);
36358 if (index !== -1) {
36359 this.children.splice(index, 1);
36365 Element.prototype.addAttr = function (name, value) {
36366 if (!this.attributes) {
36367 this.attributes = [];
36369 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
36370 var attribute = _a[_i];
36371 if (attribute.name === name) {
36372 attribute.value += ' ' + value;
36376 this.attributes.push({ name: name, value: value });
36378 Element.prototype.clone = function (cloneChildren) {
36379 if (cloneChildren === void 0) { cloneChildren = true; }
36380 var elem = new Element();
36381 if (this.attributes) {
36382 elem.attributes = [];
36383 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
36384 var attribute = _a[_i];
36385 elem.addAttr(attribute.name, attribute.value);
36388 if (cloneChildren && this.children) {
36389 elem.children = [];
36390 for (var index = 0; index < this.children.length; index++) {
36391 elem.addChild(this.children[index].clone());
36396 Element.prototype.cloneWithParent = function () {
36397 var clone = this.clone(false);
36398 if (this.parent && !(this.parent instanceof RootElement)) {
36399 var parentClone = this.parent.cloneWithParent();
36400 parentClone.addChild(clone);
36407 var RootElement = /** @class */ (function (_super) {
36408 __extends(RootElement, _super);
36409 function RootElement() {
36410 return _super !== null && _super.apply(this, arguments) || this;
36412 return RootElement;
36415 var LabelElement = /** @class */ (function (_super) {
36416 __extends(LabelElement, _super);
36417 function LabelElement(label) {
36418 var _this = _super.call(this) || this;
36419 _this.addAttr('name', label);
36422 return LabelElement;
36425 var MarkedStringPrinter = /** @class */ (function () {
36426 function MarkedStringPrinter(quote) {
36427 this.quote = quote;
36431 MarkedStringPrinter.prototype.print = function (element) {
36433 if (element instanceof RootElement) {
36434 if (element.children) {
36435 this.doPrint(element.children, 0);
36439 this.doPrint([element], 0);
36441 var value = this.result.join('\n');
36442 return [{ language: 'html', value: value }];
36444 MarkedStringPrinter.prototype.doPrint = function (elements, indent) {
36445 for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
36446 var element = elements_1[_i];
36447 this.doPrintElement(element, indent);
36448 if (element.children) {
36449 this.doPrint(element.children, indent + 1);
36453 MarkedStringPrinter.prototype.writeLine = function (level, content) {
36454 var indent = new Array(level + 1).join(' ');
36455 this.result.push(indent + content);
36457 MarkedStringPrinter.prototype.doPrintElement = function (element, indent) {
36458 var name = element.findAttribute('name');
36459 // special case: a simple label
36460 if (element instanceof LabelElement || name === '\u2026') {
36461 this.writeLine(indent, name);
36465 var content = ['<'];
36468 content.push(name);
36471 content.push('element');
36474 if (element.attributes) {
36475 for (var _i = 0, _a = element.attributes; _i < _a.length; _i++) {
36477 if (attr.name !== 'name') {
36479 content.push(attr.name);
36480 var value = attr.value;
36483 content.push(quotes.ensure(value, this.quote));
36489 this.writeLine(indent, content.join(''));
36491 return MarkedStringPrinter;
36494 (function (quotes) {
36495 function ensure(value, which) {
36496 return which + remove(value) + which;
36498 quotes.ensure = ensure;
36499 function remove(value) {
36500 var match = value.match(/^['"](.*)["']$/);
36506 quotes.remove = remove;
36507 })(quotes || (quotes = {}));
36508 var Specificity = /** @class */ (function () {
36509 function Specificity() {
36510 /** Count of identifiers (e.g., `#app`) */
36512 /** Count of attributes (`[type="number"]`), classes (`.container-fluid`), and pseudo-classes (`:hover`) */
36514 /** Count of tag names (`div`), and pseudo-elements (`::before`) */
36517 return Specificity;
36519 function toElement(node, parentElement) {
36520 var result = new Element();
36521 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
36522 var child = _a[_i];
36523 switch (child.type) {
36524 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinator:
36525 if (parentElement) {
36526 var segments = child.getText().split('&');
36527 if (segments.length === 1) {
36528 // should not happen
36529 result.addAttr('name', segments[0]);
36532 result = parentElement.cloneWithParent();
36534 var root = result.findRoot();
36535 root.prepend(segments[0]);
36537 for (var i = 1; i < segments.length; i++) {
36539 var clone = parentElement.cloneWithParent();
36540 result.addChild(clone.findRoot());
36543 result.append(segments[i]);
36547 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorPlaceholder:
36548 if (child.matches('@at-root')) {
36552 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ElementNameSelector:
36553 var text = child.getText();
36554 result.addAttr('name', text === '*' ? 'element' : unescape(text));
36556 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ClassSelector:
36557 result.addAttr('class', unescape(child.getText().substring(1)));
36559 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].IdentifierSelector:
36560 result.addAttr('id', unescape(child.getText().substring(1)));
36562 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
36563 result.addAttr('class', child.getName());
36565 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector:
36566 result.addAttr(unescape(child.getText()), '');
36568 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].AttributeSelector:
36569 var selector = child;
36570 var identifier = selector.getIdentifier();
36572 var expression = selector.getValue();
36573 var operator = selector.getOperator();
36574 var value = void 0;
36575 if (expression && operator) {
36576 switch (unescape(operator.getText())) {
36578 // excatly or followed by -words
36579 value = quotes.remove(unescape(expression.getText())) + "-\u2026";
36583 value = quotes.remove(unescape(expression.getText())) + "\u2026";
36587 value = "\u2026" + quotes.remove(unescape(expression.getText()));
36590 // one of a list of words
36591 value = " \u2026 " + quotes.remove(unescape(expression.getText())) + " \u2026 ";
36595 value = "\u2026" + quotes.remove(unescape(expression.getText())) + "\u2026";
36598 value = quotes.remove(unescape(expression.getText()));
36602 result.addAttr(unescape(identifier.getText()), value);
36609 function unescape(content) {
36610 var scanner = new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__["Scanner"]();
36611 scanner.setSource(content);
36612 var token = scanner.scanUnquotedString();
36618 function isPseudoElementIdentifier(text) {
36619 var match = text.match(/^::?([\w-]+)/);
36623 return !!_languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__["cssDataManager"].getPseudoElement("::" + match[1]);
36625 function selectorToSpecificityMarkedString(node) {
36626 //https://www.w3.org/TR/selectors-3/#specificity
36627 function calculateScore(node) {
36628 node.getChildren().forEach(function (element) {
36629 switch (element.type) {
36630 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].IdentifierSelector:
36633 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ClassSelector:
36634 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].AttributeSelector:
36635 specificity.attr++;
36637 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].ElementNameSelector:
36638 //ignore universal selector
36639 if (element.matches("*")) {
36644 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].PseudoSelector:
36645 var text = element.getText();
36646 if (isPseudoElementIdentifier(text)) {
36647 specificity.tag++; // pseudo element
36650 //ignore psuedo class NOT
36651 if (text.match(/^:not/i)) {
36654 specificity.attr++; //pseudo class
36658 if (element.getChildren().length > 0) {
36659 calculateScore(element);
36663 var specificity = new Specificity();
36664 calculateScore(node);
36665 return localize('specificity', "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
36667 function selectorToMarkedString(node) {
36668 var root = selectorToElement(node);
36670 var markedStrings = new MarkedStringPrinter('"').print(root);
36671 markedStrings.push(selectorToSpecificityMarkedString(node));
36672 return markedStrings;
36678 function simpleSelectorToMarkedString(node) {
36679 var element = toElement(node);
36680 var markedStrings = new MarkedStringPrinter('"').print(element);
36681 markedStrings.push(selectorToSpecificityMarkedString(node));
36682 return markedStrings;
36684 var SelectorElementBuilder = /** @class */ (function () {
36685 function SelectorElementBuilder(element) {
36687 this.element = element;
36689 SelectorElementBuilder.prototype.processSelector = function (selector) {
36690 var parentElement = null;
36691 if (!(this.element instanceof RootElement)) {
36692 if (selector.getChildren().some(function (c) { return c.hasChildren() && c.getChild(0).type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinator; })) {
36693 var curr = this.element.findRoot();
36694 if (curr.parent instanceof RootElement) {
36695 parentElement = this.element;
36696 this.element = curr.parent;
36697 this.element.removeChild(curr);
36702 for (var _i = 0, _a = selector.getChildren(); _i < _a.length; _i++) {
36703 var selectorChild = _a[_i];
36704 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
36705 if (this.prev instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"]) {
36706 var labelElement = new LabelElement('\u2026');
36707 this.element.addChild(labelElement);
36708 this.element = labelElement;
36710 else if (this.prev && (this.prev.matches('+') || this.prev.matches('~')) && this.element.parent) {
36711 this.element = this.element.parent;
36713 if (this.prev && this.prev.matches('~')) {
36714 this.element.addChild(toElement(selectorChild));
36715 this.element.addChild(new LabelElement('\u22EE'));
36717 var thisElement = toElement(selectorChild, parentElement);
36718 var root = thisElement.findRoot();
36719 this.element.addChild(root);
36720 this.element = thisElement;
36722 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["SimpleSelector"] ||
36723 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorParent ||
36724 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorShadowPiercingDescendant ||
36725 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorSibling ||
36726 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].SelectorCombinatorAllSiblings) {
36727 this.prev = selectorChild;
36731 return SelectorElementBuilder;
36733 function isNewSelectorContext(node) {
36734 switch (node.type) {
36735 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].MixinDeclaration:
36736 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["NodeType"].Stylesheet:
36741 function selectorToElement(node) {
36742 if (node.matches('@at-root')) {
36745 var root = new RootElement();
36746 var parentRuleSets = [];
36747 var ruleSet = node.getParent();
36748 if (ruleSet instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
36749 var parent = ruleSet.getParent(); // parent of the selector's ruleset
36750 while (parent && !isNewSelectorContext(parent)) {
36751 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["RuleSet"]) {
36752 if (parent.getSelectors().matches('@at-root')) {
36755 parentRuleSets.push(parent);
36757 parent = parent.getParent();
36760 var builder = new SelectorElementBuilder(root);
36761 for (var i = parentRuleSets.length - 1; i >= 0; i--) {
36762 var selector = parentRuleSets[i].getSelectors().getChild(0);
36764 builder.processSelector(selector);
36767 builder.processSelector(node);
36774 /***/ (function(module, __webpack_exports__, __webpack_require__) {
36777 __webpack_require__.r(__webpack_exports__);
36778 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSNavigation", function() { return CSSNavigation; });
36779 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
36780 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
36781 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
36782 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75);
36783 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87);
36784 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78);
36785 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89);
36786 /*---------------------------------------------------------------------------------------------
36787 * Copyright (c) Microsoft Corporation. All rights reserved.
36788 * Licensed under the MIT License. See License.txt in the project root for license information.
36789 *--------------------------------------------------------------------------------------------*/
36791 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
36792 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
36793 return new (P || (P = Promise))(function (resolve, reject) {
36794 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36795 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
36796 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36797 step((generator = generator.apply(thisArg, _arguments || [])).next());
36800 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
36801 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36802 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
36803 function verb(n) { return function (v) { return step([n, v]); }; }
36804 function step(op) {
36805 if (f) throw new TypeError("Generator is already executing.");
36807 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;
36808 if (y = 0, t) op = [op[0] & 2, t.value];
36810 case 0: case 1: t = op; break;
36811 case 4: _.label++; return { value: op[1], done: false };
36812 case 5: _.label++; y = op[1]; op = [0]; continue;
36813 case 7: op = _.ops.pop(); _.trys.pop(); continue;
36815 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
36816 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
36817 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
36818 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
36819 if (t[2]) _.ops.pop();
36820 _.trys.pop(); continue;
36822 op = body.call(thisArg, _);
36823 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
36824 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36833 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
36834 var CSSNavigation = /** @class */ (function () {
36835 function CSSNavigation() {
36837 CSSNavigation.prototype.findDefinition = function (document, position, stylesheet) {
36838 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__["Symbols"](stylesheet);
36839 var offset = document.offsetAt(position);
36840 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["getNodeAtOffset"](stylesheet, offset);
36844 var symbol = symbols.findSymbolFromNode(node);
36850 range: getRange(symbol.node, document)
36853 CSSNavigation.prototype.findReferences = function (document, position, stylesheet) {
36854 var highlights = this.findDocumentHighlights(document, position, stylesheet);
36855 return highlights.map(function (h) {
36862 CSSNavigation.prototype.findDocumentHighlights = function (document, position, stylesheet) {
36864 var offset = document.offsetAt(position);
36865 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["getNodeAtOffset"](stylesheet, offset);
36866 if (!node || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Stylesheet || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Declarations) {
36869 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Identifier && node.parent && node.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].ClassSelector) {
36870 node = node.parent;
36872 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__["Symbols"](stylesheet);
36873 var symbol = symbols.findSymbolFromNode(node);
36874 var name = node.getText();
36875 stylesheet.accept(function (candidate) {
36877 if (symbols.matchesSymbol(candidate, symbol)) {
36879 kind: getHighlightKind(candidate),
36880 range: getRange(candidate, document)
36885 else if (node && node.type === candidate.type && candidate.matches(name)) {
36886 // Same node type and data
36888 kind: getHighlightKind(candidate),
36889 range: getRange(candidate, document)
36896 CSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
36897 return node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Import;
36899 CSSNavigation.prototype.findDocumentLinks = function (document, stylesheet, documentContext) {
36902 stylesheet.accept(function (candidate) {
36903 if (candidate.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].URILiteral) {
36904 var link = uriLiteralNodeToDocumentLink(document, candidate, documentContext);
36911 * In @import, it is possible to include links that do not use `url()`
36912 * For example, `@import 'foo.css';`
36914 if (candidate.parent && _this.isRawStringDocumentLinkNode(candidate.parent)) {
36915 var rawText = candidate.getText();
36916 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawText, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawText, "\"")) {
36917 var link = uriStringNodeToDocumentLink(document, candidate, documentContext);
36928 CSSNavigation.prototype.findDocumentLinks2 = function (document, stylesheet, documentContext) {
36929 return __awaiter(this, void 0, void 0, function () {
36930 return __generator(this, function (_a) {
36931 return [2 /*return*/, this.findDocumentLinks(document, stylesheet, documentContext)];
36935 CSSNavigation.prototype.findDocumentSymbols = function (document, stylesheet) {
36937 stylesheet.accept(function (node) {
36940 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Class,
36943 var locationNode = node;
36944 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Selector"]) {
36945 entry.name = node.getText();
36946 locationNode = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Ruleset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].ExtendsReference);
36947 if (locationNode) {
36948 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Location"].create(document.uri, getRange(locationNode, document));
36949 result.push(entry);
36953 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["VariableDeclaration"]) {
36954 entry.name = node.getName();
36955 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Variable;
36957 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["MixinDeclaration"]) {
36958 entry.name = node.getName();
36959 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Method;
36961 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["FunctionDeclaration"]) {
36962 entry.name = node.getName();
36963 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Function;
36965 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Keyframe"]) {
36966 entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
36968 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["FontFace"]) {
36969 entry.name = localize('literal.fontface', "@font-face");
36971 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Media"]) {
36972 var mediaList = node.getChild(0);
36973 if (mediaList instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Medialist"]) {
36974 entry.name = '@media ' + mediaList.getText();
36975 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Module;
36979 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Location"].create(document.uri, getRange(locationNode, document));
36980 result.push(entry);
36986 CSSNavigation.prototype.findDocumentColors = function (document, stylesheet) {
36988 stylesheet.accept(function (node) {
36989 var colorInfo = getColorInformation(node, document);
36991 result.push(colorInfo);
36997 CSSNavigation.prototype.getColorPresentations = function (document, stylesheet, color, range) {
36999 var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
37001 if (color.alpha === 1) {
37002 label = "rgb(" + red256 + ", " + green256 + ", " + blue256 + ")";
37005 label = "rgba(" + red256 + ", " + green256 + ", " + blue256 + ", " + color.alpha + ")";
37007 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
37008 if (color.alpha === 1) {
37009 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
37012 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
37014 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
37015 var hsl = Object(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__["hslFromColor"])(color);
37017 label = "hsl(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%)";
37020 label = "hsla(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%, " + hsl.a + ")";
37022 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label) });
37025 CSSNavigation.prototype.doRename = function (document, position, newName, stylesheet) {
37027 var highlights = this.findDocumentHighlights(document, position, stylesheet);
37028 var edits = highlights.map(function (h) { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(h.range, newName); });
37030 changes: (_a = {}, _a[document.uri] = edits, _a)
37033 return CSSNavigation;
37036 function getColorInformation(node, document) {
37037 var color = Object(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__["getColorValue"])(node);
37039 var range = getRange(node, document);
37040 return { color: color, range: range };
37044 function uriLiteralNodeToDocumentLink(document, uriLiteralNode, documentContext) {
37045 if (uriLiteralNode.getChildren().length === 0) {
37048 var uriStringNode = uriLiteralNode.getChild(0);
37049 return uriStringNodeToDocumentLink(document, uriStringNode, documentContext);
37051 function uriStringNodeToDocumentLink(document, uriStringNode, documentContext) {
37052 if (!uriStringNode) {
37055 var rawUri = uriStringNode.getText();
37056 var range = getRange(uriStringNode, document);
37057 // Make sure the range is not empty
37058 if (range.start.line === range.end.line && range.start.character === range.end.character) {
37061 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, "'") || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, "\"")) {
37062 rawUri = rawUri.slice(1, -1);
37065 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, 'http://') || Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(rawUri, 'https://')) {
37068 else if (/^\w+:\/\//g.test(rawUri)) {
37072 target = documentContext.resolveReference(rawUri, document.uri);
37079 function getRange(node, document) {
37080 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(node.offset), document.positionAt(node.end));
37082 function getHighlightKind(node) {
37083 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Selector) {
37084 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
37086 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Identifier"]) {
37087 if (node.parent && node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Property"]) {
37088 if (node.isCustomProperty) {
37089 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
37094 switch (node.parent.type) {
37095 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FunctionDeclaration:
37096 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].MixinDeclaration:
37097 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Keyframe:
37098 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].VariableDeclaration:
37099 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FunctionParameter:
37100 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Write;
37103 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["DocumentHighlightKind"].Read;
37105 function toTwoDigitHex(n) {
37106 var r = n.toString(16);
37107 return r.length !== 2 ? '0' + r : r;
37113 /***/ (function(module, __webpack_exports__, __webpack_require__) {
37116 __webpack_require__.r(__webpack_exports__);
37117 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSCodeActions", function() { return CSSCodeActions; });
37118 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
37119 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78);
37120 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
37121 /* harmony import */ var _services_lintRules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96);
37122 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90);
37123 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
37124 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_5__);
37125 /*---------------------------------------------------------------------------------------------
37126 * Copyright (c) Microsoft Corporation. All rights reserved.
37127 * Licensed under the MIT License. See License.txt in the project root for license information.
37128 *--------------------------------------------------------------------------------------------*/
37136 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__["loadMessageBundle"]();
37137 var CSSCodeActions = /** @class */ (function () {
37138 function CSSCodeActions() {
37140 CSSCodeActions.prototype.doCodeActions = function (document, range, context, stylesheet) {
37141 return this.doCodeActions2(document, range, context, stylesheet).map(function (ca) {
37142 var textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0];
37143 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["Command"].create(ca.title, '_css.applyCodeAction', document.uri, document.version, textDocumentEdit && textDocumentEdit.edits);
37146 CSSCodeActions.prototype.doCodeActions2 = function (document, range, context, stylesheet) {
37148 if (context.diagnostics) {
37149 for (var _i = 0, _a = context.diagnostics; _i < _a.length; _i++) {
37150 var diagnostic = _a[_i];
37151 this.appendFixesForMarker(document, stylesheet, diagnostic, result);
37156 CSSCodeActions.prototype.getFixesForUnknownProperty = function (document, property, marker, result) {
37157 var propertyName = property.getName();
37158 var candidates = [];
37159 _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__["cssDataManager"].getProperties().forEach(function (p) {
37160 var score = Object(_utils_strings__WEBPACK_IMPORTED_MODULE_2__["difference"])(propertyName, p.name);
37161 if (score >= propertyName.length / 2 /*score_lim*/) {
37162 candidates.push({ property: p.name, score: score });
37165 // Sort in descending order.
37166 candidates.sort(function (a, b) {
37167 return b.score - a.score;
37169 var maxActions = 3;
37170 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
37171 var candidate = candidates_1[_i];
37172 var propertyName_1 = candidate.property;
37173 var title = localize('css.codeaction.rename', "Rename to '{0}'", propertyName_1);
37174 var edit = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextEdit"].replace(marker.range, propertyName_1);
37175 var documentIdentifier = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["VersionedTextDocumentIdentifier"].create(document.uri, document.version);
37176 var workspaceEdit = { documentChanges: [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TextDocumentEdit"].create(documentIdentifier, [edit])] };
37177 var codeAction = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CodeAction"].create(title, workspaceEdit, _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["CodeActionKind"].QuickFix);
37178 codeAction.diagnostics = [marker];
37179 result.push(codeAction);
37180 if (--maxActions <= 0) {
37185 CSSCodeActions.prototype.appendFixesForMarker = function (document, stylesheet, marker, result) {
37186 if (marker.code !== _services_lintRules__WEBPACK_IMPORTED_MODULE_3__["Rules"].UnknownProperty.id) {
37189 var offset = document.offsetAt(marker.range.start);
37190 var end = document.offsetAt(marker.range.end);
37191 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](stylesheet, offset);
37192 for (var i = nodepath.length - 1; i >= 0; i--) {
37193 var node = nodepath[i];
37194 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Declaration"]) {
37195 var property = node.getProperty();
37196 if (property && property.offset === offset && property.end === end) {
37197 this.getFixesForUnknownProperty(document, property, marker, result);
37203 return CSSCodeActions;
37210 /***/ (function(module, __webpack_exports__, __webpack_require__) {
37213 __webpack_require__.r(__webpack_exports__);
37214 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rule", function() { return Rule; });
37215 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Setting", function() { return Setting; });
37216 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rules", function() { return Rules; });
37217 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Settings", function() { return Settings; });
37218 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LintConfigurationSettings", function() { return LintConfigurationSettings; });
37219 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
37220 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
37221 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_1__);
37222 /*---------------------------------------------------------------------------------------------
37223 * Copyright (c) Microsoft Corporation. All rights reserved.
37224 * Licensed under the MIT License. See License.txt in the project root for license information.
37225 *--------------------------------------------------------------------------------------------*/
37229 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__["loadMessageBundle"]();
37230 var Warning = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Warning;
37231 var Error = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Error;
37232 var Ignore = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore;
37233 var Rule = /** @class */ (function () {
37234 function Rule(id, message, defaultValue) {
37236 this.message = message;
37237 this.defaultValue = defaultValue;
37243 var Setting = /** @class */ (function () {
37244 function Setting(id, message, defaultValue) {
37246 this.message = message;
37247 this.defaultValue = defaultValue;
37254 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),
37255 IncludeStandardPropertyWhenUsingVendorPrefix: new Rule('vendorPrefix', localize('rule.standardvendorprefix.all', "When using a vendor-specific prefix also include the standard property"), Warning),
37256 DuplicateDeclarations: new Rule('duplicateProperties', localize('rule.duplicateDeclarations', "Do not use duplicate style definitions"), Ignore),
37257 EmptyRuleSet: new Rule('emptyRules', localize('rule.emptyRuleSets', "Do not use empty rulesets"), Warning),
37258 ImportStatemement: new Rule('importStatement', localize('rule.importDirective', "Import statements do not load in parallel"), Ignore),
37259 BewareOfBoxModelSize: new Rule('boxModel', localize('rule.bewareOfBoxModelSize', "Do not use width or height when using padding or border"), Ignore),
37260 UniversalSelector: new Rule('universalSelector', localize('rule.universalSelector', "The universal selector (*) is known to be slow"), Ignore),
37261 ZeroWithUnit: new Rule('zeroUnits', localize('rule.zeroWidthUnit', "No unit for zero needed"), Ignore),
37262 RequiredPropertiesForFontFace: new Rule('fontFaceProperties', localize('rule.fontFaceProperties', "@font-face rule must define 'src' and 'font-family' properties"), Warning),
37263 HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three, four, six or eight hex numbers"), Error),
37264 ArgsInColorFunction: new Rule('argumentsInColorFunction', localize('rule.colorFunction', "Invalid number of parameters"), Error),
37265 UnknownProperty: new Rule('unknownProperties', localize('rule.unknownProperty', "Unknown property."), Warning),
37266 UnknownAtRules: new Rule('unknownAtRules', localize('rule.unknownAtRules', "Unknown at-rule."), Warning),
37267 IEStarHack: new Rule('ieHack', localize('rule.ieHack', "IE hacks are only necessary when supporting IE7 and older"), Ignore),
37268 UnknownVendorSpecificProperty: new Rule('unknownVendorSpecificProperties', localize('rule.unknownVendorSpecificProperty', "Unknown vendor specific property."), Ignore),
37269 PropertyIgnoredDueToDisplay: new Rule('propertyIgnoredDueToDisplay', localize('rule.propertyIgnoredDueToDisplay', "Property is ignored due to the display."), Warning),
37270 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),
37271 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),
37272 AvoidIdSelector: new Rule('idSelector', localize('rule.avoidIdSelector', "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore),
37275 ValidProperties: new Setting('validProperties', localize('rule.validProperties', "A list of properties that are not validated against the `unknownProperties` rule."), [])
37277 var LintConfigurationSettings = /** @class */ (function () {
37278 function LintConfigurationSettings(conf) {
37279 if (conf === void 0) { conf = {}; }
37282 LintConfigurationSettings.prototype.getRule = function (rule) {
37283 if (this.conf.hasOwnProperty(rule.id)) {
37284 var level = toLevel(this.conf[rule.id]);
37289 return rule.defaultValue;
37291 LintConfigurationSettings.prototype.getSetting = function (setting) {
37292 return this.conf[setting.id];
37294 return LintConfigurationSettings;
37297 function toLevel(level) {
37299 case 'ignore': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore;
37300 case 'warning': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Warning;
37301 case 'error': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Error;
37309 /***/ (function(module, __webpack_exports__, __webpack_require__) {
37312 __webpack_require__.r(__webpack_exports__);
37313 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSValidation", function() { return CSSValidation; });
37314 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
37315 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96);
37316 /* harmony import */ var _lint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98);
37317 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90);
37318 /*---------------------------------------------------------------------------------------------
37319 * Copyright (c) Microsoft Corporation. All rights reserved.
37320 * Licensed under the MIT License. See License.txt in the project root for license information.
37321 *--------------------------------------------------------------------------------------------*/
37327 var CSSValidation = /** @class */ (function () {
37328 function CSSValidation() {
37330 CSSValidation.prototype.configure = function (settings) {
37331 this.settings = settings;
37333 CSSValidation.prototype.doValidation = function (document, stylesheet, settings) {
37334 if (settings === void 0) { settings = this.settings; }
37335 if (settings && settings.validate === false) {
37339 entries.push.apply(entries, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["ParseErrorCollector"].entries(stylesheet));
37340 entries.push.apply(entries, _lint__WEBPACK_IMPORTED_MODULE_2__["LintVisitor"].entries(stylesheet, document, new _lintRules__WEBPACK_IMPORTED_MODULE_1__["LintConfigurationSettings"](settings && settings.lint)));
37342 for (var r in _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"]) {
37343 ruleIds.push(_lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"][r].id);
37345 function toDiagnostic(marker) {
37346 var range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Range"].create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength()));
37347 var source = document.languageId;
37349 code: marker.getRule().id,
37351 message: marker.getMessage(),
37352 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,
37356 return entries.filter(function (entry) { return entry.getLevel() !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__["Level"].Ignore; }).map(toDiagnostic);
37358 return CSSValidation;
37365 /***/ (function(module, __webpack_exports__, __webpack_require__) {
37368 __webpack_require__.r(__webpack_exports__);
37369 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LintVisitor", function() { return LintVisitor; });
37370 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78);
37371 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96);
37372 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75);
37373 /* harmony import */ var _lintUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99);
37374 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88);
37375 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
37376 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_5__);
37377 /*---------------------------------------------------------------------------------------------
37378 * Copyright (c) Microsoft Corporation. All rights reserved.
37379 * Licensed under the MIT License. See License.txt in the project root for license information.
37380 *--------------------------------------------------------------------------------------------*/
37388 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__["loadMessageBundle"]();
37389 var NodesByRootMap = /** @class */ (function () {
37390 function NodesByRootMap() {
37393 NodesByRootMap.prototype.add = function (root, name, node) {
37394 var entry = this.data[root];
37396 entry = { nodes: [], names: [] };
37397 this.data[root] = entry;
37399 entry.names.push(name);
37401 entry.nodes.push(node);
37404 return NodesByRootMap;
37406 var LintVisitor = /** @class */ (function () {
37407 function LintVisitor(document, settings) {
37409 this.warnings = [];
37410 this.settings = settings;
37411 this.documentText = document.getText();
37412 this.keyframes = new NodesByRootMap();
37413 this.validProperties = {};
37414 var properties = settings.getSetting(_lintRules__WEBPACK_IMPORTED_MODULE_1__["Settings"].ValidProperties);
37415 if (Array.isArray(properties)) {
37416 properties.forEach(function (p) {
37417 if (typeof p === 'string') {
37418 var name = p.trim().toLowerCase();
37420 _this.validProperties[name] = true;
37426 LintVisitor.entries = function (node, document, settings, entryFilter) {
37427 var visitor = new LintVisitor(document, settings);
37428 node.acceptVisitor(visitor);
37429 visitor.completeValidations();
37430 return visitor.getEntries(entryFilter);
37432 LintVisitor.prototype.isValidPropertyDeclaration = function (element) {
37433 var propertyName = element.fullPropertyName;
37434 return this.validProperties[propertyName];
37436 LintVisitor.prototype.fetch = function (input, s) {
37438 for (var _i = 0, input_1 = input; _i < input_1.length; _i++) {
37439 var curr = input_1[_i];
37440 if (curr.fullPropertyName === s) {
37441 elements.push(curr);
37446 LintVisitor.prototype.fetchWithValue = function (input, s, v) {
37448 for (var _i = 0, input_2 = input; _i < input_2.length; _i++) {
37449 var inputElement = input_2[_i];
37450 if (inputElement.fullPropertyName === s) {
37451 var expression = inputElement.node.getValue();
37452 if (expression && this.findValueInExpression(expression, v)) {
37453 elements.push(inputElement);
37459 LintVisitor.prototype.findValueInExpression = function (expression, v) {
37461 expression.accept(function (node) {
37462 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Identifier && node.matches(v)) {
37469 LintVisitor.prototype.getEntries = function (filter) {
37470 if (filter === void 0) { filter = (_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Level"].Warning | _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Level"].Error); }
37471 return this.warnings.filter(function (entry) {
37472 return (entry.getLevel() & filter) !== 0;
37475 LintVisitor.prototype.addEntry = function (node, rule, details) {
37476 var entry = new _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Marker"](node, rule, this.settings.getRule(rule), details);
37477 this.warnings.push(entry);
37479 LintVisitor.prototype.getMissingNames = function (expected, actual) {
37480 var expectedClone = expected.slice(0); // clone
37481 for (var i = 0; i < actual.length; i++) {
37482 var k = expectedClone.indexOf(actual[i]);
37484 expectedClone[k] = null;
37488 for (var i = 0; i < expectedClone.length; i++) {
37489 var curr = expectedClone[i];
37491 if (result === null) {
37492 result = localize('namelist.single', "'{0}'", curr);
37495 result = localize('namelist.concatenated', "{0}, '{1}'", result, curr);
37501 LintVisitor.prototype.visitNode = function (node) {
37502 switch (node.type) {
37503 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].UnknownAtRule:
37504 return this.visitUnknownAtRule(node);
37505 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Keyframe:
37506 return this.visitKeyframe(node);
37507 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].FontFace:
37508 return this.visitFontFace(node);
37509 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Ruleset:
37510 return this.visitRuleSet(node);
37511 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].SimpleSelector:
37512 return this.visitSimpleSelector(node);
37513 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Function:
37514 return this.visitFunction(node);
37515 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].NumericValue:
37516 return this.visitNumericValue(node);
37517 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Import:
37518 return this.visitImport(node);
37519 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].HexColorValue:
37520 return this.visitHexColorValue(node);
37521 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Prio:
37522 return this.visitPrio(node);
37526 LintVisitor.prototype.completeValidations = function () {
37527 this.validateKeyframes();
37529 LintVisitor.prototype.visitUnknownAtRule = function (node) {
37530 var atRuleName = node.getChild(0);
37534 var atDirective = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].getAtDirective(atRuleName.getText());
37538 this.addEntry(atRuleName, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownAtRules, "Unknown at rule " + atRuleName.getText());
37541 LintVisitor.prototype.visitKeyframe = function (node) {
37542 var keyword = node.getKeyword();
37546 var text = keyword.getText();
37547 this.keyframes.add(node.getName(), text, (text !== '@keyframes') ? keyword : null);
37550 LintVisitor.prototype.validateKeyframes = function () {
37551 // @keyframe and it's vendor specific alternatives
37552 // @keyframe should be included
37553 var expected = ['@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes'];
37554 for (var name in this.keyframes.data) {
37555 var actual = this.keyframes.data[name].names;
37556 var needsStandard = (actual.indexOf('@keyframes') === -1);
37557 if (!needsStandard && actual.length === 1) {
37558 continue; // only the non-vendor specific keyword is used, that's fine, no warning
37560 var missingVendorSpecific = this.getMissingNames(expected, actual);
37561 if (missingVendorSpecific || needsStandard) {
37562 for (var _i = 0, _a = this.keyframes.data[name].nodes; _i < _a.length; _i++) {
37564 if (needsStandard) {
37565 var message = localize('keyframes.standardrule.missing', "Always define standard rule '@keyframes' when defining keyframes.");
37566 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IncludeStandardPropertyWhenUsingVendorPrefix, message);
37568 if (missingVendorSpecific) {
37569 var message = localize('keyframes.vendorspecific.missing', "Always include all vendor specific rules: Missing: {0}", missingVendorSpecific);
37570 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AllVendorPrefixes, message);
37577 LintVisitor.prototype.visitSimpleSelector = function (node) {
37578 var firstChar = this.documentText.charAt(node.offset);
37579 /////////////////////////////////////////////////////////////
37580 // Lint - The universal selector (*) is known to be slow.
37581 /////////////////////////////////////////////////////////////
37582 if (node.length === 1 && firstChar === '*') {
37583 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UniversalSelector);
37585 /////////////////////////////////////////////////////////////
37586 // Lint - Avoid id selectors
37587 /////////////////////////////////////////////////////////////
37588 if (firstChar === '#') {
37589 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidIdSelector);
37593 LintVisitor.prototype.visitImport = function (node) {
37594 /////////////////////////////////////////////////////////////
37595 // Lint - Import statements shouldn't be used, because they aren't offering parallel downloads.
37596 /////////////////////////////////////////////////////////////
37597 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ImportStatemement);
37600 LintVisitor.prototype.visitRuleSet = function (node) {
37601 /////////////////////////////////////////////////////////////
37602 // Lint - Don't use empty rulesets.
37603 /////////////////////////////////////////////////////////////
37604 var declarations = node.getDeclarations();
37605 if (!declarations) {
37609 if (!declarations.hasChildren()) {
37610 this.addEntry(node.getSelectors(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].EmptyRuleSet);
37612 var propertyTable = [];
37613 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
37614 var element = _a[_i];
37615 if (element instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Declaration"]) {
37616 propertyTable.push(new _lintUtil__WEBPACK_IMPORTED_MODULE_3__["Element"](element));
37619 /////////////////////////////////////////////////////////////
37620 // the rule warns when it finds:
37621 // width being used with border, border-left, border-right, padding, padding-left, or padding-right
37622 // height being used with border, border-top, border-bottom, padding, padding-top, or padding-bottom
37623 // No error when box-sizing property is specified, as it assumes the user knows what he's doing.
37624 // see https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size
37625 /////////////////////////////////////////////////////////////
37626 var boxModel = Object(_lintUtil__WEBPACK_IMPORTED_MODULE_3__["default"])(propertyTable);
37627 if (boxModel.width) {
37628 var properties = [];
37629 if (boxModel.right.value) {
37630 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.right.properties);
37632 if (boxModel.left.value) {
37633 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.left.properties);
37635 if (properties.length !== 0) {
37636 for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
37637 var item = properties_1[_b];
37638 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
37640 this.addEntry(boxModel.width.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
37643 if (boxModel.height) {
37644 var properties = [];
37645 if (boxModel.top.value) {
37646 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.top.properties);
37648 if (boxModel.bottom.value) {
37649 properties = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_4__["union"])(properties, boxModel.bottom.properties);
37651 if (properties.length !== 0) {
37652 for (var _c = 0, properties_2 = properties; _c < properties_2.length; _c++) {
37653 var item = properties_2[_c];
37654 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
37656 this.addEntry(boxModel.height.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].BewareOfBoxModelSize);
37659 /////////////////////////////////////////////////////////////
37660 // Properties ignored due to display
37661 /////////////////////////////////////////////////////////////
37662 // With 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect
37663 var displayElems = this.fetchWithValue(propertyTable, 'display', 'inline');
37664 if (displayElems.length > 0) {
37665 for (var _d = 0, _e = ['width', 'height', 'margin-top', 'margin-bottom', 'float']; _d < _e.length; _d++) {
37667 var elem = this.fetch(propertyTable, prop);
37668 for (var index = 0; index < elem.length; index++) {
37669 var node_1 = elem[index].node;
37670 var value = node_1.getValue();
37671 if (prop === 'float' && (!value || value.matches('none'))) {
37674 this.addEntry(node_1, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayInline', "Property is ignored due to the display. With 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect."));
37678 // With 'display: inline-block', 'float' has no effect
37679 displayElems = this.fetchWithValue(propertyTable, 'display', 'inline-block');
37680 if (displayElems.length > 0) {
37681 var elem = this.fetch(propertyTable, 'float');
37682 for (var index = 0; index < elem.length; index++) {
37683 var node_2 = elem[index].node;
37684 var value = node_2.getValue();
37685 if (value && !value.matches('none')) {
37686 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayInlineBlock', "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"));
37690 // With 'display: block', 'vertical-align' has no effect
37691 displayElems = this.fetchWithValue(propertyTable, 'display', 'block');
37692 if (displayElems.length > 0) {
37693 var elem = this.fetch(propertyTable, 'vertical-align');
37694 for (var index = 0; index < elem.length; index++) {
37695 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."));
37698 /////////////////////////////////////////////////////////////
37700 /////////////////////////////////////////////////////////////
37701 var elements = this.fetch(propertyTable, 'float');
37702 for (var index = 0; index < elements.length; index++) {
37703 var element = elements[index];
37704 if (!this.isValidPropertyDeclaration(element)) {
37705 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidFloat);
37708 /////////////////////////////////////////////////////////////
37709 // Don't use duplicate declarations.
37710 /////////////////////////////////////////////////////////////
37711 for (var i = 0; i < propertyTable.length; i++) {
37712 var element = propertyTable[i];
37713 if (element.fullPropertyName !== 'background' && !this.validProperties[element.fullPropertyName]) {
37714 var value = element.node.getValue();
37715 if (value && this.documentText.charAt(value.offset) !== '-') {
37716 var elements_1 = this.fetch(propertyTable, element.fullPropertyName);
37717 if (elements_1.length > 1) {
37718 for (var k = 0; k < elements_1.length; k++) {
37719 var value_1 = elements_1[k].node.getValue();
37720 if (value_1 && this.documentText.charAt(value_1.offset) !== '-' && elements_1[k] !== element) {
37721 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].DuplicateDeclarations);
37728 /////////////////////////////////////////////////////////////
37729 // Unknown propery & When using a vendor-prefixed gradient, make sure to use them all.
37730 /////////////////////////////////////////////////////////////
37731 var isExportBlock = node.getSelectors().matches(":export");
37732 if (!isExportBlock) {
37733 var propertiesBySuffix = new NodesByRootMap();
37734 var containsUnknowns = false;
37735 for (var _f = 0, propertyTable_1 = propertyTable; _f < propertyTable_1.length; _f++) {
37736 var element = propertyTable_1[_f];
37737 var decl = element.node;
37738 if (this.isCSSDeclaration(decl)) {
37739 var name = element.fullPropertyName;
37740 var firstChar = name.charAt(0);
37741 if (firstChar === '-') {
37742 if (name.charAt(1) !== '-') { // avoid css variables
37743 if (!_languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].isKnownProperty(name) && !this.validProperties[name]) {
37744 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownVendorSpecificProperty);
37746 var nonPrefixedName = decl.getNonPrefixedPropertyName();
37747 propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty());
37751 var fullName = name;
37752 if (firstChar === '*' || firstChar === '_') {
37753 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IEStarHack);
37754 name = name.substr(1);
37756 // _property and *property might be contributed via custom data
37757 if (!_languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].isKnownProperty(fullName) && !_languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].isKnownProperty(name)) {
37758 if (!this.validProperties[name]) {
37759 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].UnknownProperty, localize('property.unknownproperty.detailed', "Unknown property: '{0}'", name));
37762 propertiesBySuffix.add(name, name, null); // don't pass the node as we don't show errors on the standard
37766 containsUnknowns = true;
37769 if (!containsUnknowns) { // don't perform this test if there are
37770 for (var suffix in propertiesBySuffix.data) {
37771 var entry = propertiesBySuffix.data[suffix];
37772 var actual = entry.names;
37773 var needsStandard = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].isStandardProperty(suffix) && (actual.indexOf(suffix) === -1);
37774 if (!needsStandard && actual.length === 1) {
37775 continue; // only the non-vendor specific rule is used, that's fine, no warning
37778 for (var i = 0, len = LintVisitor.prefixes.length; i < len; i++) {
37779 var prefix = LintVisitor.prefixes[i];
37780 if (_languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["cssDataManager"].isStandardProperty(prefix + suffix)) {
37781 expected.push(prefix + suffix);
37784 var missingVendorSpecific = this.getMissingNames(expected, actual);
37785 if (missingVendorSpecific || needsStandard) {
37786 for (var _g = 0, _h = entry.nodes; _g < _h.length; _g++) {
37787 var node_3 = _h[_g];
37788 if (needsStandard) {
37789 var message = localize('property.standard.missing', "Also define the standard property '{0}' for compatibility", suffix);
37790 this.addEntry(node_3, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].IncludeStandardPropertyWhenUsingVendorPrefix, message);
37792 if (missingVendorSpecific) {
37793 var message = localize('property.vendorspecific.missing', "Always include all vendor specific properties: Missing: {0}", missingVendorSpecific);
37794 this.addEntry(node_3, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AllVendorPrefixes, message);
37803 LintVisitor.prototype.visitPrio = function (node) {
37804 /////////////////////////////////////////////////////////////
37805 // Don't use !important
37806 /////////////////////////////////////////////////////////////
37807 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].AvoidImportant);
37810 LintVisitor.prototype.visitNumericValue = function (node) {
37811 /////////////////////////////////////////////////////////////
37812 // 0 has no following unit
37813 /////////////////////////////////////////////////////////////
37814 var funcDecl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Function);
37815 if (funcDecl && funcDecl.getName() === 'calc') {
37818 var decl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Declaration);
37820 var declValue = decl.getValue();
37822 var value = node.getValue();
37823 if (!value.unit || _languageFacts_facts__WEBPACK_IMPORTED_MODULE_0__["units"].length.indexOf(value.unit.toLowerCase()) === -1) {
37826 if (parseFloat(value.value) === 0.0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) {
37827 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ZeroWithUnit);
37833 LintVisitor.prototype.visitFontFace = function (node) {
37834 var declarations = node.getDeclarations();
37835 if (!declarations) {
37839 var definesSrc = false, definesFontFamily = false;
37840 var containsUnknowns = false;
37841 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
37842 var node_4 = _a[_i];
37843 if (this.isCSSDeclaration(node_4)) {
37844 var name = node_4.getProperty().getName().toLowerCase();
37845 if (name === 'src') {
37848 if (name === 'font-family') {
37849 definesFontFamily = true;
37853 containsUnknowns = true;
37856 if (!containsUnknowns && (!definesSrc || !definesFontFamily)) {
37857 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].RequiredPropertiesForFontFace);
37861 LintVisitor.prototype.isCSSDeclaration = function (node) {
37862 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["Declaration"]) {
37863 if (!node.getValue()) {
37866 var property = node.getProperty();
37870 var identifier = property.getIdentifier();
37871 if (!identifier || identifier.containsInterpolation()) {
37878 LintVisitor.prototype.visitHexColorValue = function (node) {
37879 // Rule: #eeff0011 or #eeff00 or #ef01 or #ef0
37880 var length = node.length;
37881 if (length !== 9 && length !== 7 && length !== 5 && length !== 4) {
37882 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].HexColorLength);
37886 LintVisitor.prototype.visitFunction = function (node) {
37887 var fnName = node.getName().toLowerCase();
37888 var expectedAttrCount = -1;
37889 var actualAttrCount = 0;
37893 expectedAttrCount = 3;
37897 expectedAttrCount = 4;
37900 if (expectedAttrCount !== -1) {
37901 node.getArguments().accept(function (n) {
37902 if (n instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["BinaryExpression"]) {
37903 actualAttrCount += 1;
37908 if (actualAttrCount !== expectedAttrCount) {
37909 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_1__["Rules"].ArgsInColorFunction);
37914 LintVisitor.prefixes = [
37915 '-ms-', '-moz-', '-o-', '-webkit-',
37917 return LintVisitor;
37924 /***/ (function(module, __webpack_exports__, __webpack_require__) {
37927 __webpack_require__.r(__webpack_exports__);
37928 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
37929 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return calculateBoxModel; });
37930 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88);
37931 /*---------------------------------------------------------------------------------------------
37932 * Copyright (c) Microsoft Corporation. All rights reserved.
37933 * Licensed under the MIT License. See License.txt in the project root for license information.
37934 *--------------------------------------------------------------------------------------------*/
37937 var Element = /** @class */ (function () {
37938 function Element(decl) {
37939 this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
37945 function setSide(model, side, value, property) {
37946 var state = model[side];
37947 state.value = value;
37949 if (!Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_0__["includes"])(state.properties, property)) {
37950 state.properties.push(property);
37954 function setAllSides(model, value, property) {
37955 setSide(model, 'top', value, property);
37956 setSide(model, 'right', value, property);
37957 setSide(model, 'bottom', value, property);
37958 setSide(model, 'left', value, property);
37960 function updateModelWithValue(model, side, value, property) {
37961 if (side === 'top' || side === 'right' ||
37962 side === 'bottom' || side === 'left') {
37963 setSide(model, side, value, property);
37966 setAllSides(model, value, property);
37969 function updateModelWithList(model, values, property) {
37970 switch (values.length) {
37972 updateModelWithValue(model, undefined, values[0], property);
37975 updateModelWithValue(model, 'top', values[0], property);
37976 updateModelWithValue(model, 'bottom', values[0], property);
37977 updateModelWithValue(model, 'right', values[1], property);
37978 updateModelWithValue(model, 'left', values[1], property);
37981 updateModelWithValue(model, 'top', values[0], property);
37982 updateModelWithValue(model, 'right', values[1], property);
37983 updateModelWithValue(model, 'left', values[1], property);
37984 updateModelWithValue(model, 'bottom', values[2], property);
37987 updateModelWithValue(model, 'top', values[0], property);
37988 updateModelWithValue(model, 'right', values[1], property);
37989 updateModelWithValue(model, 'bottom', values[2], property);
37990 updateModelWithValue(model, 'left', values[3], property);
37994 function matches(value, candidates) {
37995 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
37996 var candidate = candidates_1[_i];
37997 if (value.matches(candidate)) {
38004 * @param allowsKeywords whether the initial value of property is zero, so keywords `initial` and `unset` count as zero
38005 * @return `true` if this node represents a non-zero border; otherwise, `false`
38007 function checkLineWidth(value, allowsKeywords) {
38008 if (allowsKeywords === void 0) { allowsKeywords = true; }
38009 if (allowsKeywords && matches(value, ['initial', 'unset'])) {
38012 // a <length> is a value and a unit
38013 // so use `parseFloat` to strip the unit
38014 return parseFloat(value.getText()) !== 0;
38016 function checkLineWidthList(nodes, allowsKeywords) {
38017 if (allowsKeywords === void 0) { allowsKeywords = true; }
38018 return nodes.map(function (node) { return checkLineWidth(node, allowsKeywords); });
38021 * @param allowsKeywords whether keywords `initial` and `unset` count as zero
38022 * @return `true` if this node represents a non-zero border; otherwise, `false`
38024 function checkLineStyle(valueNode, allowsKeywords) {
38025 if (allowsKeywords === void 0) { allowsKeywords = true; }
38026 if (matches(valueNode, ['none', 'hidden'])) {
38029 if (allowsKeywords && matches(valueNode, ['initial', 'unset'])) {
38034 function checkLineStyleList(nodes, allowsKeywords) {
38035 if (allowsKeywords === void 0) { allowsKeywords = true; }
38036 return nodes.map(function (node) { return checkLineStyle(node, allowsKeywords); });
38038 function checkBorderShorthand(node) {
38039 var children = node.getChildren();
38040 // the only child can be a keyword, a <line-width>, or a <line-style>
38041 // if either check returns false, the result is no border
38042 if (children.length === 1) {
38043 var value = children[0];
38044 return checkLineWidth(value) && checkLineStyle(value);
38046 // multiple children can't contain keywords
38047 // if any child means no border, the result is no border
38048 for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
38049 var child = children_1[_i];
38051 if (!checkLineWidth(value, /* allowsKeywords: */ false) ||
38052 !checkLineStyle(value, /* allowsKeywords: */ false)) {
38058 function calculateBoxModel(propertyTable) {
38060 top: { value: false, properties: [] },
38061 right: { value: false, properties: [] },
38062 bottom: { value: false, properties: [] },
38063 left: { value: false, properties: [] },
38065 for (var _i = 0, propertyTable_1 = propertyTable; _i < propertyTable_1.length; _i++) {
38066 var property = propertyTable_1[_i];
38067 var value = property.node.value;
38068 if (typeof value === 'undefined') {
38071 switch (property.fullPropertyName) {
38073 // has `box-sizing`, bail out
38075 top: { value: false, properties: [] },
38076 right: { value: false, properties: [] },
38077 bottom: { value: false, properties: [] },
38078 left: { value: false, properties: [] },
38081 model.width = property;
38084 model.height = property;
38087 var segments = property.fullPropertyName.split('-');
38088 switch (segments[0]) {
38090 switch (segments[1]) {
38096 switch (segments[2]) {
38098 updateModelWithValue(model, segments[1], checkBorderShorthand(value), property);
38101 // the initial value of `border-width` is `medium`, not zero
38102 updateModelWithValue(model, segments[1], checkLineWidth(value, false), property);
38105 // the initial value of `border-style` is `none`
38106 updateModelWithValue(model, segments[1], checkLineStyle(value, true), property);
38111 // the initial value of `border-width` is `medium`, not zero
38112 updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property);
38115 // the initial value of `border-style` is `none`
38116 updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property);
38121 if (segments.length === 1) {
38122 // the initial value of `padding` is zero
38123 updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property);
38126 // the initial value of `padding` is zero
38127 updateModelWithValue(model, segments[1], checkLineWidth(value, true), property);
38140 /***/ (function(module, __webpack_exports__, __webpack_require__) {
38143 __webpack_require__.r(__webpack_exports__);
38144 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSParser", function() { return SCSSParser; });
38145 /* harmony import */ var _scssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(101);
38146 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
38147 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73);
38148 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75);
38149 /* harmony import */ var _scssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(102);
38150 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76);
38151 /*---------------------------------------------------------------------------------------------
38152 * Copyright (c) Microsoft Corporation. All rights reserved.
38153 * Licensed under the MIT License. See License.txt in the project root for license information.
38154 *--------------------------------------------------------------------------------------------*/
38156 var __extends = (undefined && undefined.__extends) || (function () {
38157 var extendStatics = function (d, b) {
38158 extendStatics = Object.setPrototypeOf ||
38159 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38160 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38161 return extendStatics(d, b);
38163 return function (d, b) {
38164 extendStatics(d, b);
38165 function __() { this.constructor = d; }
38166 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38176 /// A parser for scss
38177 /// http://sass-lang.com/documentation/file.SASS_REFERENCE.html
38179 var SCSSParser = /** @class */ (function (_super) {
38180 __extends(SCSSParser, _super);
38181 function SCSSParser() {
38182 return _super.call(this, new _scssScanner__WEBPACK_IMPORTED_MODULE_0__["SCSSScanner"]()) || this;
38184 SCSSParser.prototype._parseStylesheetStart = function () {
38185 return this._parseForward()
38186 || this._parseUse()
38187 || _super.prototype._parseStylesheetStart.call(this);
38189 SCSSParser.prototype._parseStylesheetStatement = function () {
38190 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
38191 return this._parseWarnAndDebug()
38192 || this._parseControlStatement()
38193 || this._parseMixinDeclaration()
38194 || this._parseMixinContent()
38195 || this._parseMixinReference() // @include
38196 || this._parseFunctionDeclaration()
38197 || _super.prototype._parseStylesheetAtStatement.call(this);
38199 return this._parseRuleset(true) || this._parseVariableDeclaration();
38201 SCSSParser.prototype._parseImport = function () {
38202 if (!this.peekKeyword('@import')) {
38205 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Import"]);
38206 this.consumeToken();
38207 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
38208 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].URIOrStringExpected);
38210 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38211 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
38212 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].URIOrStringExpected);
38215 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
38216 node.setMedialist(this._parseMediaQueryList());
38218 return this.finish(node);
38220 // scss variables: $font-size: 12px;
38221 SCSSParser.prototype._parseVariableDeclaration = function (panic) {
38222 if (panic === void 0) { panic = []; }
38223 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["VariableName"])) {
38226 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["VariableDeclaration"]);
38227 if (!node.setVariable(this._parseVariable())) {
38230 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
38231 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ColonExpected);
38233 if (this.prevToken) {
38234 node.colonPosition = this.prevToken.offset;
38236 if (!node.setValue(this._parseExpr())) {
38237 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableValueExpected, [], panic);
38239 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Exclamation)) {
38240 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /^(default|global)$/)) {
38241 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
38243 this.consumeToken();
38245 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
38246 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
38248 return this.finish(node);
38250 SCSSParser.prototype._parseMediaContentStart = function () {
38251 return this._parseInterpolation();
38253 SCSSParser.prototype._parseMediaFeatureName = function () {
38254 return this._parseModuleMember()
38255 || this._parseFunction() // function before ident
38256 || this._parseIdent()
38257 || this._parseVariable();
38259 SCSSParser.prototype._parseKeyframeSelector = function () {
38260 return this._tryParseKeyframeSelector()
38261 || this._parseControlStatement(this._parseKeyframeSelector.bind(this))
38262 || this._parseVariableDeclaration()
38263 || this._parseMixinContent();
38265 SCSSParser.prototype._parseVariable = function () {
38266 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["VariableName"])) {
38269 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Variable"]);
38270 this.consumeToken();
38273 SCSSParser.prototype._parseModuleMember = function () {
38274 var pos = this.mark();
38275 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Module"]);
38276 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module]))) {
38279 if (this.hasWhitespace()
38280 || !this.acceptDelim('.')
38281 || this.hasWhitespace()) {
38282 this.restoreAtMark(pos);
38285 if (!node.addChild(this._parseVariable() || this._parseFunction())) {
38286 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrVariableExpected);
38290 SCSSParser.prototype._parseIdent = function (referenceTypes) {
38292 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) && !this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["InterpolationFunction"]) && !this.peekDelim('-')) {
38295 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
38296 node.referenceTypes = referenceTypes;
38297 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /^--/);
38298 var hasContent = false;
38299 var indentInterpolation = function () {
38300 var pos = _this.mark();
38301 if (_this.acceptDelim('-')) {
38302 if (!_this.hasWhitespace()) {
38303 _this.acceptDelim('-');
38305 if (_this.hasWhitespace()) {
38306 _this.restoreAtMark(pos);
38310 return _this._parseInterpolation();
38312 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) || node.addChild(indentInterpolation()) || (hasContent && (this.acceptDelim('-') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Num)))) {
38314 if (this.hasWhitespace()) {
38318 return hasContent ? this.finish(node) : null;
38320 SCSSParser.prototype._parseTerm = function () {
38321 var term = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Term"]);
38322 if (term.setExpression(this._parseModuleMember())) {
38323 return this.finish(term);
38325 var superTerm = _super.prototype._parseTerm.call(this);
38329 if (term.setExpression(this._parseVariable())
38330 || term.setExpression(this._parseSelectorCombinator())
38331 || term.setExpression(this._tryParsePrio())) {
38332 return this.finish(term);
38336 SCSSParser.prototype._parseInterpolation = function () {
38337 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["InterpolationFunction"])) {
38338 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Interpolation"]);
38339 this.consumeToken();
38340 if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
38341 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
38342 return this.finish(node);
38344 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
38346 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
38347 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightCurlyExpected);
38349 return this.finish(node);
38353 SCSSParser.prototype._parseOperator = function () {
38354 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["EqualsOperator"]) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["NotEqualsOperator"])
38355 || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["GreaterEqualsOperator"]) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["SmallerEqualsOperator"])
38356 || this.peekDelim('>') || this.peekDelim('<')
38357 || this.peekIdent('and') || this.peekIdent('or')
38358 || this.peekDelim('%')) {
38359 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
38360 this.consumeToken();
38361 return this.finish(node);
38363 return _super.prototype._parseOperator.call(this);
38365 SCSSParser.prototype._parseUnaryOperator = function () {
38366 if (this.peekIdent('not')) {
38367 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
38368 this.consumeToken();
38369 return this.finish(node);
38371 return _super.prototype._parseUnaryOperator.call(this);
38373 SCSSParser.prototype._parseRuleSetDeclaration = function () {
38374 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
38375 return this._parseKeyframe() // nested @keyframe
38376 || this._parseImport() // nested @import
38377 || this._parseMedia(true) // nested @media
38378 || this._parseFontFace() // nested @font-face
38379 || this._parseWarnAndDebug() // @warn, @debug and @error statements
38380 || this._parseControlStatement() // @if, @while, @for, @each
38381 || this._parseFunctionDeclaration() // @function
38382 || this._parseExtends() // @extends
38383 || this._parseMixinReference() // @include
38384 || this._parseMixinContent() // @content
38385 || this._parseMixinDeclaration() // nested @mixin
38386 || this._parseRuleset(true) // @at-rule
38387 || this._parseSupports(true); // @supports
38389 return this._parseVariableDeclaration() // variable declaration
38390 || this._tryParseRuleset(true) // nested ruleset
38391 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
38393 SCSSParser.prototype._parseDeclaration = function (resyncStopTokens) {
38394 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Declaration"]);
38395 if (!node.setProperty(this._parseProperty())) {
38398 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
38399 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon], resyncStopTokens);
38401 if (this.prevToken) {
38402 node.colonPosition = this.prevToken.offset;
38404 var hasContent = false;
38405 if (node.setValue(this._parseExpr())) {
38407 node.addChild(this._parsePrio());
38409 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
38410 node.setNestedProperties(this._parseNestedProperties());
38414 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].PropertyValueExpected);
38417 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
38418 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
38420 return this.finish(node);
38422 SCSSParser.prototype._parseNestedProperties = function () {
38423 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NestedProperties"]);
38424 return this._parseBody(node, this._parseDeclaration.bind(this));
38426 SCSSParser.prototype._parseExtends = function () {
38427 if (this.peekKeyword('@extend')) {
38428 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
38429 this.consumeToken();
38430 if (!node.getSelectors().addChild(this._parseSimpleSelector())) {
38431 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SelectorExpected);
38433 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38434 node.getSelectors().addChild(this._parseSimpleSelector());
38436 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Exclamation)) {
38437 if (!this.acceptIdent('optional')) {
38438 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
38441 return this.finish(node);
38445 SCSSParser.prototype._parseSimpleSelectorBody = function () {
38446 return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || _super.prototype._parseSimpleSelectorBody.call(this);
38448 SCSSParser.prototype._parseSelectorCombinator = function () {
38449 if (this.peekDelim('&')) {
38450 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorCombinator);
38451 this.consumeToken();
38452 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('&'))) {
38455 return this.finish(node);
38459 SCSSParser.prototype._parseSelectorPlaceholder = function () {
38460 if (this.peekDelim('%')) {
38461 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorPlaceholder);
38462 this.consumeToken();
38463 this._parseIdent();
38464 return this.finish(node);
38466 else if (this.peekKeyword('@at-root')) {
38467 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorPlaceholder);
38468 this.consumeToken();
38469 return this.finish(node);
38473 SCSSParser.prototype._parseElementName = function () {
38474 var pos = this.mark();
38475 var node = _super.prototype._parseElementName.call(this);
38476 if (node && !this.hasWhitespace() && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) { // for #49589
38477 this.restoreAtMark(pos);
38482 SCSSParser.prototype._tryParsePseudoIdentifier = function () {
38483 return this._parseInterpolation() || _super.prototype._tryParsePseudoIdentifier.call(this); // for #49589
38485 SCSSParser.prototype._parseWarnAndDebug = function () {
38486 if (!this.peekKeyword('@debug')
38487 && !this.peekKeyword('@warn')
38488 && !this.peekKeyword('@error')) {
38491 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Debug);
38492 this.consumeToken(); // @debug, @warn or @error
38493 node.addChild(this._parseExpr()); // optional
38494 return this.finish(node);
38496 SCSSParser.prototype._parseControlStatement = function (parseStatement) {
38497 if (parseStatement === void 0) { parseStatement = this._parseRuleSetDeclaration.bind(this); }
38498 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
38501 return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement)
38502 || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement);
38504 SCSSParser.prototype._parseIfStatement = function (parseStatement) {
38505 if (!this.peekKeyword('@if')) {
38508 return this._internalParseIfStatement(parseStatement);
38510 SCSSParser.prototype._internalParseIfStatement = function (parseStatement) {
38511 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["IfStatement"]);
38512 this.consumeToken(); // @if or if
38513 if (!node.setExpression(this._parseExpr(true))) {
38514 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
38516 this._parseBody(node, parseStatement);
38517 if (this.acceptKeyword('@else')) {
38518 if (this.peekIdent('if')) {
38519 node.setElseClause(this._internalParseIfStatement(parseStatement));
38521 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
38522 var elseNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ElseStatement"]);
38523 this._parseBody(elseNode, parseStatement);
38524 node.setElseClause(elseNode);
38527 return this.finish(node);
38529 SCSSParser.prototype._parseForStatement = function (parseStatement) {
38530 if (!this.peekKeyword('@for')) {
38533 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ForStatement"]);
38534 this.consumeToken(); // @for
38535 if (!node.setVariable(this._parseVariable())) {
38536 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38538 if (!this.acceptIdent('from')) {
38539 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].FromExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38541 if (!node.addChild(this._parseBinaryExpr())) {
38542 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38544 if (!this.acceptIdent('to') && !this.acceptIdent('through')) {
38545 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].ThroughOrToExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38547 if (!node.addChild(this._parseBinaryExpr())) {
38548 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38550 return this._parseBody(node, parseStatement);
38552 SCSSParser.prototype._parseEachStatement = function (parseStatement) {
38553 if (!this.peekKeyword('@each')) {
38556 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["EachStatement"]);
38557 this.consumeToken(); // @each
38558 var variables = node.getVariables();
38559 if (!variables.addChild(this._parseVariable())) {
38560 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38562 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38563 if (!variables.addChild(this._parseVariable())) {
38564 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38567 this.finish(variables);
38568 if (!this.acceptIdent('in')) {
38569 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__["SCSSParseError"].InExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38571 if (!node.addChild(this._parseExpr())) {
38572 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38574 return this._parseBody(node, parseStatement);
38576 SCSSParser.prototype._parseWhileStatement = function (parseStatement) {
38577 if (!this.peekKeyword('@while')) {
38580 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["WhileStatement"]);
38581 this.consumeToken(); // @while
38582 if (!node.addChild(this._parseBinaryExpr())) {
38583 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38585 return this._parseBody(node, parseStatement);
38587 SCSSParser.prototype._parseFunctionBodyDeclaration = function () {
38588 return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug()
38589 || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this));
38591 SCSSParser.prototype._parseFunctionDeclaration = function () {
38592 if (!this.peekKeyword('@function')) {
38595 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionDeclaration"]);
38596 this.consumeToken(); // @function
38597 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Function]))) {
38598 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38600 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
38601 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38603 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
38604 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38605 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38608 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
38609 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
38613 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38614 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38616 return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this));
38618 SCSSParser.prototype._parseReturnStatement = function () {
38619 if (!this.peekKeyword('@return')) {
38622 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].ReturnStatement);
38623 this.consumeToken(); // @function
38624 if (!node.addChild(this._parseExpr())) {
38625 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
38627 return this.finish(node);
38629 SCSSParser.prototype._parseMixinDeclaration = function () {
38630 if (!this.peekKeyword('@mixin')) {
38633 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
38634 this.consumeToken();
38635 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]))) {
38636 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38638 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
38639 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
38640 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38641 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38644 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
38645 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
38649 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38650 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38653 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
38655 SCSSParser.prototype._parseParameterDeclaration = function () {
38656 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionParameter"]);
38657 if (!node.setIdentifier(this._parseVariable())) {
38660 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
38663 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
38664 if (!node.setDefaultValue(this._parseExpr(true))) {
38665 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]);
38668 return this.finish(node);
38670 SCSSParser.prototype._parseMixinContent = function () {
38671 if (!this.peekKeyword('@content')) {
38674 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].MixinContent);
38675 this.consumeToken();
38676 return this.finish(node);
38678 SCSSParser.prototype._parseMixinReference = function () {
38679 if (!this.peekKeyword('@include')) {
38682 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
38683 this.consumeToken();
38684 // Could be module or mixin identifier, set as mixin as default.
38685 var firstIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]);
38686 if (!node.setIdentifier(firstIdent)) {
38687 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38689 // Is a module accessor.
38690 if (!this.hasWhitespace() && this.acceptDelim('.') && !this.hasWhitespace()) {
38691 var secondIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin]);
38692 if (!secondIdent) {
38693 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR]);
38695 var moduleToken = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Module"]);
38696 // Re-purpose first matched ident as identifier for module token.
38697 firstIdent.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module];
38698 moduleToken.setIdentifier(firstIdent);
38699 // Override identifier with second ident.
38700 node.setIdentifier(secondIdent);
38701 node.addChild(moduleToken);
38703 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
38704 if (node.getArguments().addChild(this._parseFunctionArgument())) {
38705 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38706 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38709 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
38710 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
38714 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38715 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
38718 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
38719 var content = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["BodyDeclaration"]);
38720 this._parseBody(content, this._parseMixinReferenceBodyStatement.bind(this));
38721 node.setContent(content);
38723 return this.finish(node);
38725 SCSSParser.prototype._parseMixinReferenceBodyStatement = function () {
38726 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
38728 SCSSParser.prototype._parseFunctionArgument = function () {
38729 // [variableName ':'] expression | variableName '...'
38730 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionArgument"]);
38731 var pos = this.mark();
38732 var argument = this._parseVariable();
38734 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
38735 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) { // optional
38736 node.setValue(argument);
38737 return this.finish(node);
38740 this.restoreAtMark(pos);
38744 node.setIdentifier(argument);
38747 if (node.setValue(this._parseExpr(true))) {
38748 this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"]); // #43746
38749 node.addChild(this._parsePrio()); // #9859
38750 return this.finish(node);
38754 SCSSParser.prototype._parseURLArgument = function () {
38755 var pos = this.mark();
38756 var node = _super.prototype._parseURLArgument.call(this);
38757 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38758 this.restoreAtMark(pos);
38759 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
38760 node_1.addChild(this._parseBinaryExpr());
38761 return this.finish(node_1);
38765 SCSSParser.prototype._parseOperation = function () {
38766 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
38769 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
38770 this.consumeToken();
38771 while (node.addChild(this._parseListElement())) {
38772 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma); // optional
38774 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38775 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
38777 return this.finish(node);
38779 SCSSParser.prototype._parseListElement = function () {
38780 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ListEntry"]);
38781 var child = this._parseBinaryExpr();
38785 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
38786 node.setKey(child);
38787 if (!node.setValue(this._parseBinaryExpr())) {
38788 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].ExpressionExpected);
38792 node.setValue(child);
38794 return this.finish(node);
38796 SCSSParser.prototype._parseUse = function () {
38797 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Use"])) {
38800 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Use"]);
38801 this.consumeToken();
38802 if (!node.addChild(this._parseStringLiteral())) {
38803 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].StringLiteralExpected);
38805 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
38806 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /as|with/)) {
38807 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
38809 if (this.acceptIdent('as') &&
38810 (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Module])) && !this.acceptDelim('*'))) {
38811 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrWildcardExpected);
38813 if (this.acceptIdent('with')) {
38814 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
38815 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
38817 // First variable statement, no comma.
38818 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
38819 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
38821 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
38822 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38825 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
38826 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].VariableNameExpected);
38829 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
38830 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].RightParenthesisExpected);
38834 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
38835 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SemiColonExpected);
38837 return this.finish(node);
38839 SCSSParser.prototype._parseModuleConfigDeclaration = function () {
38840 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ModuleConfiguration"]);
38841 if (!node.setIdentifier(this._parseVariable())) {
38844 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon) || !node.setValue(this._parseExpr(true))) {
38845 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]);
38847 return this.finish(node);
38849 SCSSParser.prototype._parseForward = function () {
38850 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__["Forward"])) {
38853 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Forward"]);
38854 this.consumeToken();
38855 if (!node.addChild(this._parseStringLiteral())) {
38856 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].StringLiteralExpected);
38858 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
38859 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident, /as|hide|show/)) {
38860 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].UnknownKeyword);
38862 if (this.acceptIdent('as')) {
38863 var identifier = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Forward]);
38864 if (!node.setIdentifier(identifier)) {
38865 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierExpected);
38867 // Wildcard must be the next character after the identifier string.
38868 if (this.hasWhitespace() || !this.acceptDelim('*')) {
38869 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].WildcardExpected);
38872 if (this.peekIdent('hide') || this.peekIdent('show')) {
38873 if (!node.addChild(this._parseForwardVisibility())) {
38874 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].IdentifierOrVariableExpected);
38878 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
38879 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__["ParseError"].SemiColonExpected);
38881 return this.finish(node);
38883 SCSSParser.prototype._parseForwardVisibility = function () {
38884 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ForwardVisibility"]);
38885 // Assume to be "hide" or "show".
38886 node.setIdentifier(this._parseIdent());
38887 while (node.addChild(this._parseVariable() || this._parseIdent())) {
38888 // Consume all variables and idents ahead.
38890 // More than just identifier
38891 return node.getChildren().length > 1 ? node : null;
38894 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__["Parser"]));
38900 /***/ (function(module, __webpack_exports__, __webpack_require__) {
38903 __webpack_require__.r(__webpack_exports__);
38904 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableName", function() { return VariableName; });
38905 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterpolationFunction", function() { return InterpolationFunction; });
38906 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Default", function() { return Default; });
38907 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EqualsOperator", function() { return EqualsOperator; });
38908 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotEqualsOperator", function() { return NotEqualsOperator; });
38909 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GreaterEqualsOperator", function() { return GreaterEqualsOperator; });
38910 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmallerEqualsOperator", function() { return SmallerEqualsOperator; });
38911 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ellipsis", function() { return Ellipsis; });
38912 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Module", function() { return Module; });
38913 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Forward", function() { return Forward; });
38914 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Use", function() { return Use; });
38915 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSScanner", function() { return SCSSScanner; });
38916 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
38917 /*---------------------------------------------------------------------------------------------
38918 * Copyright (c) Microsoft Corporation. All rights reserved.
38919 * Licensed under the MIT License. See License.txt in the project root for license information.
38920 *--------------------------------------------------------------------------------------------*/
38922 var __extends = (undefined && undefined.__extends) || (function () {
38923 var extendStatics = function (d, b) {
38924 extendStatics = Object.setPrototypeOf ||
38925 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38926 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
38927 return extendStatics(d, b);
38929 return function (d, b) {
38930 extendStatics(d, b);
38931 function __() { this.constructor = d; }
38932 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38936 var _FSL = '/'.charCodeAt(0);
38937 var _NWL = '\n'.charCodeAt(0);
38938 var _CAR = '\r'.charCodeAt(0);
38939 var _LFD = '\f'.charCodeAt(0);
38940 var _DLR = '$'.charCodeAt(0);
38941 var _HSH = '#'.charCodeAt(0);
38942 var _CUL = '{'.charCodeAt(0);
38943 var _EQS = '='.charCodeAt(0);
38944 var _BNG = '!'.charCodeAt(0);
38945 var _LAN = '<'.charCodeAt(0);
38946 var _RAN = '>'.charCodeAt(0);
38947 var _DOT = '.'.charCodeAt(0);
38948 var _ATS = '@'.charCodeAt(0);
38949 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CustomToken;
38950 var VariableName = customTokenValue++;
38951 var InterpolationFunction = customTokenValue++;
38952 var Default = customTokenValue++;
38953 var EqualsOperator = customTokenValue++;
38954 var NotEqualsOperator = customTokenValue++;
38955 var GreaterEqualsOperator = customTokenValue++;
38956 var SmallerEqualsOperator = customTokenValue++;
38957 var Ellipsis = customTokenValue++;
38958 var Module = customTokenValue++;
38959 var Forward = customTokenValue++;
38960 var Use = customTokenValue++;
38961 var SCSSScanner = /** @class */ (function (_super) {
38962 __extends(SCSSScanner, _super);
38963 function SCSSScanner() {
38964 return _super !== null && _super.apply(this, arguments) || this;
38966 SCSSScanner.prototype.scanNext = function (offset) {
38968 if (this.stream.advanceIfChar(_DLR)) {
38969 var content = ['$'];
38970 if (this.ident(content)) {
38971 return this.finishToken(offset, VariableName, content.join(''));
38974 this.stream.goBackTo(offset);
38977 // scss: interpolation function #{..})
38978 if (this.stream.advanceIfChars([_HSH, _CUL])) {
38979 return this.finishToken(offset, InterpolationFunction);
38982 if (this.stream.advanceIfChars([_EQS, _EQS])) {
38983 return this.finishToken(offset, EqualsOperator);
38986 if (this.stream.advanceIfChars([_BNG, _EQS])) {
38987 return this.finishToken(offset, NotEqualsOperator);
38990 if (this.stream.advanceIfChar(_LAN)) {
38991 if (this.stream.advanceIfChar(_EQS)) {
38992 return this.finishToken(offset, SmallerEqualsOperator);
38994 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim);
38996 // ooperators >, >=
38997 if (this.stream.advanceIfChar(_RAN)) {
38998 if (this.stream.advanceIfChar(_EQS)) {
38999 return this.finishToken(offset, GreaterEqualsOperator);
39001 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Delim);
39004 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
39005 return this.finishToken(offset, Ellipsis);
39007 // module loaders, @forward and @use
39008 if (this.stream.advanceIfChar(_ATS)) {
39009 var content = ['@'];
39010 if (this.ident(content)) {
39011 var keywordText = content.join('');
39012 if (keywordText === '@forward') {
39013 return this.finishToken(offset, Forward, keywordText);
39015 else if (keywordText === '@use') {
39016 return this.finishToken(offset, Use, keywordText);
39019 this.stream.goBackTo(offset);
39021 return _super.prototype.scanNext.call(this, offset);
39023 SCSSScanner.prototype.comment = function () {
39024 if (_super.prototype.comment.call(this)) {
39027 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
39028 this.stream.advanceWhileChar(function (ch) {
39044 return SCSSScanner;
39045 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]));
39051 /***/ (function(module, __webpack_exports__, __webpack_require__) {
39054 __webpack_require__.r(__webpack_exports__);
39055 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSIssueType", function() { return SCSSIssueType; });
39056 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSParseError", function() { return SCSSParseError; });
39057 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
39058 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
39059 /*---------------------------------------------------------------------------------------------
39060 * Copyright (c) Microsoft Corporation. All rights reserved.
39061 * Licensed under the MIT License. See License.txt in the project root for license information.
39062 *--------------------------------------------------------------------------------------------*/
39065 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
39066 var SCSSIssueType = /** @class */ (function () {
39067 function SCSSIssueType(id, message) {
39069 this.message = message;
39071 return SCSSIssueType;
39074 var SCSSParseError = {
39075 FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
39076 ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
39077 InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
39083 /***/ (function(module, __webpack_exports__, __webpack_require__) {
39086 __webpack_require__.r(__webpack_exports__);
39087 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSCompletion", function() { return SCSSCompletion; });
39088 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86);
39089 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75);
39090 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90);
39091 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77);
39092 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_3__);
39093 /*---------------------------------------------------------------------------------------------
39094 * Copyright (c) Microsoft Corporation. All rights reserved.
39095 * Licensed under the MIT License. See License.txt in the project root for license information.
39096 *--------------------------------------------------------------------------------------------*/
39098 var __extends = (undefined && undefined.__extends) || (function () {
39099 var extendStatics = function (d, b) {
39100 extendStatics = Object.setPrototypeOf ||
39101 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39102 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
39103 return extendStatics(d, b);
39105 return function (d, b) {
39106 extendStatics(d, b);
39107 function __() { this.constructor = d; }
39108 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39115 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__["loadMessageBundle"]();
39116 var SCSSCompletion = /** @class */ (function (_super) {
39117 __extends(SCSSCompletion, _super);
39118 function SCSSCompletion(clientCapabilities) {
39119 var _this = _super.call(this, '$', clientCapabilities) || this;
39120 addReferencesToDocumentation(SCSSCompletion.scssModuleLoaders);
39121 addReferencesToDocumentation(SCSSCompletion.scssModuleBuiltIns);
39124 SCSSCompletion.prototype.isImportPathParent = function (type) {
39125 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Forward
39126 || type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Use
39127 || _super.prototype.isImportPathParent.call(this, type);
39129 SCSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
39131 var parentType = importPathNode.getParent().type;
39132 if (parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Forward || parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Use) {
39133 (_a = result.items).push.apply(_a, SCSSCompletion.scssModuleBuiltIns);
39135 return _super.prototype.getCompletionForImportPath.call(this, importPathNode, result);
39137 SCSSCompletion.prototype.createReplaceFunction = function () {
39138 var tabStopCounter = 1;
39139 return function (_match, p1) {
39140 return '\\' + p1 + ': ${' + tabStopCounter++ + ':' + (SCSSCompletion.variableDefaults[p1] || '') + '}';
39143 SCSSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
39144 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
39145 var p = proposals_1[_i];
39146 var insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction());
39147 var label = p.func.substr(0, p.func.indexOf('('));
39151 documentation: p.desc,
39152 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TextEdit"].replace(this.getCompletionRange(existingNode), insertText),
39153 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39154 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Function
39157 item.sortText = 'z';
39159 result.items.push(item);
39163 SCSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
39164 this.createFunctionProposals(SCSSCompletion.selectorFuncs, null, true, result);
39165 return _super.prototype.getCompletionsForSelector.call(this, ruleSet, isNested, result);
39167 SCSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
39168 var functions = SCSSCompletion.builtInFuncs;
39170 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
39172 this.createFunctionProposals(functions, existingNode, true, result);
39173 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
39175 SCSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
39176 this.createFunctionProposals(SCSSCompletion.colorProposals, existingNode, false, result);
39177 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
39179 SCSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
39180 this.getCompletionForAtDirectives(result);
39181 this.getCompletionsForSelector(null, true, result);
39182 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
39184 SCSSCompletion.prototype.getCompletionsForExtendsReference = function (_extendsRef, existingNode, result) {
39185 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["ReferenceType"].Rule);
39186 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
39187 var symbol = symbols_1[_i];
39189 label: symbol.name,
39190 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TextEdit"].replace(this.getCompletionRange(existingNode), symbol.name),
39191 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Function,
39193 result.items.push(suggest);
39197 SCSSCompletion.prototype.getCompletionForAtDirectives = function (result) {
39199 (_a = result.items).push.apply(_a, SCSSCompletion.scssAtDirectives);
39202 SCSSCompletion.prototype.getCompletionForTopLevel = function (result) {
39203 this.getCompletionForAtDirectives(result);
39204 this.getCompletionForModuleLoaders(result);
39205 _super.prototype.getCompletionForTopLevel.call(this, result);
39208 SCSSCompletion.prototype.getCompletionForModuleLoaders = function (result) {
39210 (_a = result.items).push.apply(_a, SCSSCompletion.scssModuleLoaders);
39213 SCSSCompletion.variableDefaults = {
39218 '$color': '#000000',
39221 '$saturation': '0%',
39222 '$lightness': '0%',
39226 '$substring': '"s"',
39230 SCSSCompletion.colorProposals = [
39231 { func: 'red($color)', desc: localize('scss.builtin.red', 'Gets the red component of a color.') },
39232 { func: 'green($color)', desc: localize('scss.builtin.green', 'Gets the green component of a color.') },
39233 { func: 'blue($color)', desc: localize('scss.builtin.blue', 'Gets the blue component of a color.') },
39234 { func: 'mix($color, $color, [$weight])', desc: localize('scss.builtin.mix', 'Mixes two colors together.') },
39235 { func: 'hue($color)', desc: localize('scss.builtin.hue', 'Gets the hue component of a color.') },
39236 { func: 'saturation($color)', desc: localize('scss.builtin.saturation', 'Gets the saturation component of a color.') },
39237 { func: 'lightness($color)', desc: localize('scss.builtin.lightness', 'Gets the lightness component of a color.') },
39238 { func: 'adjust-hue($color, $degrees)', desc: localize('scss.builtin.adjust-hue', 'Changes the hue of a color.') },
39239 { func: 'lighten($color, $amount)', desc: localize('scss.builtin.lighten', 'Makes a color lighter.') },
39240 { func: 'darken($color, $amount)', desc: localize('scss.builtin.darken', 'Makes a color darker.') },
39241 { func: 'saturate($color, $amount)', desc: localize('scss.builtin.saturate', 'Makes a color more saturated.') },
39242 { func: 'desaturate($color, $amount)', desc: localize('scss.builtin.desaturate', 'Makes a color less saturated.') },
39243 { func: 'grayscale($color)', desc: localize('scss.builtin.grayscale', 'Converts a color to grayscale.') },
39244 { func: 'complement($color)', desc: localize('scss.builtin.complement', 'Returns the complement of a color.') },
39245 { func: 'invert($color)', desc: localize('scss.builtin.invert', 'Returns the inverse of a color.') },
39246 { func: 'alpha($color)', desc: localize('scss.builtin.alpha', 'Gets the opacity component of a color.') },
39247 { func: 'opacity($color)', desc: 'Gets the alpha component (opacity) of a color.' },
39248 { func: 'rgba($color, $alpha)', desc: localize('scss.builtin.rgba', 'Changes the alpha component for a color.') },
39249 { func: 'opacify($color, $amount)', desc: localize('scss.builtin.opacify', 'Makes a color more opaque.') },
39250 { func: 'fade-in($color, $amount)', desc: localize('scss.builtin.fade-in', 'Makes a color more opaque.') },
39251 { func: 'transparentize($color, $amount)', desc: localize('scss.builtin.transparentize', 'Makes a color more transparent.') },
39252 { func: 'fade-out($color, $amount)', desc: localize('scss.builtin.fade-out', 'Makes a color more transparent.') },
39253 { 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.') },
39254 { 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.') },
39255 { 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.') },
39256 { func: 'ie-hex-str($color)', desc: localize('scss.builtin.ie-hex-str', 'Converts a color into the format understood by IE filters.') }
39258 SCSSCompletion.selectorFuncs = [
39259 { func: 'selector-nest($selectors…)', desc: localize('scss.builtin.selector-nest', 'Nests selector beneath one another like they would be nested in the stylesheet.') },
39260 { func: 'selector-append($selectors…)', desc: localize('scss.builtin.selector-append', 'Appends selectors to one another without spaces in between.') },
39261 { func: 'selector-extend($selector, $extendee, $extender)', desc: localize('scss.builtin.selector-extend', 'Extends $extendee with $extender within $selector.') },
39262 { func: 'selector-replace($selector, $original, $replacement)', desc: localize('scss.builtin.selector-replace', 'Replaces $original with $replacement within $selector.') },
39263 { func: 'selector-unify($selector1, $selector2)', desc: localize('scss.builtin.selector-unify', 'Unifies two selectors to produce a selector that matches elements matched by both.') },
39264 { func: 'is-superselector($super, $sub)', desc: localize('scss.builtin.is-superselector', 'Returns whether $super matches all the elements $sub does, and possibly more.') },
39265 { func: 'simple-selectors($selector)', desc: localize('scss.builtin.simple-selectors', 'Returns the simple selectors that comprise a compound selector.') },
39266 { func: 'selector-parse($selector)', desc: localize('scss.builtin.selector-parse', 'Parses a selector into the format returned by &.') }
39268 SCSSCompletion.builtInFuncs = [
39269 { func: 'unquote($string)', desc: localize('scss.builtin.unquote', 'Removes quotes from a string.') },
39270 { func: 'quote($string)', desc: localize('scss.builtin.quote', 'Adds quotes to a string.') },
39271 { func: 'str-length($string)', desc: localize('scss.builtin.str-length', 'Returns the number of characters in a string.') },
39272 { func: 'str-insert($string, $insert, $index)', desc: localize('scss.builtin.str-insert', 'Inserts $insert into $string at $index.') },
39273 { func: 'str-index($string, $substring)', desc: localize('scss.builtin.str-index', 'Returns the index of the first occurance of $substring in $string.') },
39274 { func: 'str-slice($string, $start-at, [$end-at])', desc: localize('scss.builtin.str-slice', 'Extracts a substring from $string.') },
39275 { func: 'to-upper-case($string)', desc: localize('scss.builtin.to-upper-case', 'Converts a string to upper case.') },
39276 { func: 'to-lower-case($string)', desc: localize('scss.builtin.to-lower-case', 'Converts a string to lower case.') },
39277 { func: 'percentage($number)', desc: localize('scss.builtin.percentage', 'Converts a unitless number to a percentage.'), type: 'percentage' },
39278 { func: 'round($number)', desc: localize('scss.builtin.round', 'Rounds a number to the nearest whole number.') },
39279 { func: 'ceil($number)', desc: localize('scss.builtin.ceil', 'Rounds a number up to the next whole number.') },
39280 { func: 'floor($number)', desc: localize('scss.builtin.floor', 'Rounds a number down to the previous whole number.') },
39281 { func: 'abs($number)', desc: localize('scss.builtin.abs', 'Returns the absolute value of a number.') },
39282 { func: 'min($numbers)', desc: localize('scss.builtin.min', 'Finds the minimum of several numbers.') },
39283 { func: 'max($numbers)', desc: localize('scss.builtin.max', 'Finds the maximum of several numbers.') },
39284 { func: 'random([$limit])', desc: localize('scss.builtin.random', 'Returns a random number.') },
39285 { func: 'length($list)', desc: localize('scss.builtin.length', 'Returns the length of a list.') },
39286 { func: 'nth($list, $n)', desc: localize('scss.builtin.nth', 'Returns a specific item in a list.') },
39287 { func: 'set-nth($list, $n, $value)', desc: localize('scss.builtin.set-nth', 'Replaces the nth item in a list.') },
39288 { func: 'join($list1, $list2, [$separator])', desc: localize('scss.builtin.join', 'Joins together two lists into one.') },
39289 { func: 'append($list1, $val, [$separator])', desc: localize('scss.builtin.append', 'Appends a single value onto the end of a list.') },
39290 { func: 'zip($lists)', desc: localize('scss.builtin.zip', 'Combines several lists into a single multidimensional list.') },
39291 { func: 'index($list, $value)', desc: localize('scss.builtin.index', 'Returns the position of a value within a list.') },
39292 { func: 'list-separator(#list)', desc: localize('scss.builtin.list-separator', 'Returns the separator of a list.') },
39293 { func: 'map-get($map, $key)', desc: localize('scss.builtin.map-get', 'Returns the value in a map associated with a given key.') },
39294 { func: 'map-merge($map1, $map2)', desc: localize('scss.builtin.map-merge', 'Merges two maps together into a new map.') },
39295 { func: 'map-remove($map, $keys)', desc: localize('scss.builtin.map-remove', 'Returns a new map with keys removed.') },
39296 { func: 'map-keys($map)', desc: localize('scss.builtin.map-keys', 'Returns a list of all keys in a map.') },
39297 { func: 'map-values($map)', desc: localize('scss.builtin.map-values', 'Returns a list of all values in a map.') },
39298 { 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.') },
39299 { func: 'keywords($args)', desc: localize('scss.builtin.keywords', 'Returns the keywords passed to a function that takes variable arguments.') },
39300 { func: 'feature-exists($feature)', desc: localize('scss.builtin.feature-exists', 'Returns whether a feature exists in the current Sass runtime.') },
39301 { func: 'variable-exists($name)', desc: localize('scss.builtin.variable-exists', 'Returns whether a variable with the given name exists in the current scope.') },
39302 { 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.') },
39303 { func: 'function-exists($name)', desc: localize('scss.builtin.function-exists', 'Returns whether a function with the given name exists.') },
39304 { func: 'mixin-exists($name)', desc: localize('scss.builtin.mixin-exists', 'Returns whether a mixin with the given name exists.') },
39305 { func: 'inspect($value)', desc: localize('scss.builtin.inspect', 'Returns the string representation of a value as it would be represented in Sass.') },
39306 { func: 'type-of($value)', desc: localize('scss.builtin.type-of', 'Returns the type of a value.') },
39307 { func: 'unit($number)', desc: localize('scss.builtin.unit', 'Returns the unit(s) associated with a number.') },
39308 { func: 'unitless($number)', desc: localize('scss.builtin.unitless', 'Returns whether a number has units.') },
39309 { func: 'comparable($number1, $number2)', desc: localize('scss.builtin.comparable', 'Returns whether two numbers can be added, subtracted, or compared.') },
39310 { func: 'call($name, $args…)', desc: localize('scss.builtin.call', 'Dynamically calls a Sass function.') }
39312 SCSSCompletion.scssAtDirectives = [
39315 documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector."),
39316 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39320 documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."),
39321 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39325 documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
39326 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39330 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."),
39331 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39335 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."),
39336 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39340 documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
39341 insertText: "@if ${1:expr} {\n\t$0\n}",
39342 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39343 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39347 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."),
39348 insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",
39349 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39350 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39354 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`."),
39355 insertText: "@each \\$${1:var} in ${2:list} {\n\t$0\n}",
39356 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39357 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39361 documentation: localize("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),
39362 insertText: "@while ${1:condition} {\n\t$0\n}",
39363 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39364 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39368 documentation: localize("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."),
39369 insertText: "@mixin ${1:name} {\n\t$0\n}",
39370 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39371 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39375 documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."),
39376 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39379 label: "@function",
39380 documentation: localize("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."),
39381 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39384 SCSSCompletion.scssModuleLoaders = [
39387 documentation: localize("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),
39388 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/use' }],
39389 insertText: "@use '$0';",
39390 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39391 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39395 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."),
39396 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/forward' }],
39397 insertText: "@forward '$0';",
39398 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["InsertTextFormat"].Snippet,
39399 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Keyword
39402 SCSSCompletion.scssModuleBuiltIns = [
39404 label: 'sass:math',
39405 documentation: localize('scss.builtin.sass:math', 'Provides functions that operate on numbers.'),
39406 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/math' }],
39407 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39410 label: 'sass:string',
39411 documentation: localize('scss.builtin.sass:string', 'Makes it easy to combine, search, or split apart strings.'),
39412 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/string' }],
39413 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39416 label: 'sass:color',
39417 documentation: localize('scss.builtin.sass:color', 'Generates new colors based on existing ones, making it easy to build color themes.'),
39418 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/color' }],
39419 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39422 label: 'sass:list',
39423 documentation: localize('scss.builtin.sass:list', 'Lets you access and modify values in lists.'),
39424 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/list' }],
39425 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39429 documentation: localize('scss.builtin.sass:map', 'Makes it possible to look up the value associated with a key in a map, and much more.'),
39430 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/map' }],
39431 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39434 label: 'sass:selector',
39435 documentation: localize('scss.builtin.sass:selector', 'Provides access to Sass’s powerful selector engine.'),
39436 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/selector' }],
39437 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39440 label: 'sass:meta',
39441 documentation: localize('scss.builtin.sass:meta', 'Exposes the details of Sass’s inner workings.'),
39442 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/meta' }],
39443 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["CompletionItemKind"].Module,
39446 return SCSSCompletion;
39447 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__["CSSCompletion"]));
39450 * Todo @Pine: Remove this and do it through custom data
39452 function addReferencesToDocumentation(items) {
39453 items.forEach(function (i) {
39454 if (i.documentation && i.references && i.references.length > 0) {
39455 var markdownDoc = typeof i.documentation === 'string'
39456 ? { kind: 'markdown', value: i.documentation }
39457 : { kind: 'markdown', value: i.documentation.value };
39458 markdownDoc.value += '\n\n';
39459 markdownDoc.value += i.references
39460 .map(function (r) {
39461 return "[" + r.name + "](" + r.url + ")";
39464 i.documentation = markdownDoc;
39472 /***/ (function(module, __webpack_exports__, __webpack_require__) {
39475 __webpack_require__.r(__webpack_exports__);
39476 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSParser", function() { return LESSParser; });
39477 /* harmony import */ var _lessScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
39478 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
39479 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73);
39480 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75);
39481 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76);
39482 /*---------------------------------------------------------------------------------------------
39483 * Copyright (c) Microsoft Corporation. All rights reserved.
39484 * Licensed under the MIT License. See License.txt in the project root for license information.
39485 *--------------------------------------------------------------------------------------------*/
39487 var __extends = (undefined && undefined.__extends) || (function () {
39488 var extendStatics = function (d, b) {
39489 extendStatics = Object.setPrototypeOf ||
39490 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
39491 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
39492 return extendStatics(d, b);
39494 return function (d, b) {
39495 extendStatics(d, b);
39496 function __() { this.constructor = d; }
39497 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39506 /// A parser for LESS
39507 /// http://lesscss.org/
39509 var LESSParser = /** @class */ (function (_super) {
39510 __extends(LESSParser, _super);
39511 function LESSParser() {
39512 return _super.call(this, new _lessScanner__WEBPACK_IMPORTED_MODULE_0__["LESSScanner"]()) || this;
39514 LESSParser.prototype._parseStylesheetStatement = function (isNested) {
39515 if (isNested === void 0) { isNested = false; }
39516 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
39517 return this._parseVariableDeclaration()
39518 || this._parsePlugin()
39519 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
39521 return this._tryParseMixinDeclaration()
39522 || this._tryParseMixinReference()
39523 || this._parseFunction()
39524 || this._parseRuleset(true);
39526 LESSParser.prototype._parseImport = function () {
39527 if (!this.peekKeyword('@import') && !this.peekKeyword('@import-once') /* deprecated in less 1.4.1 */) {
39530 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Import"]);
39531 this.consumeToken();
39532 // less 1.4.1: @import (css) "lib"
39533 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
39534 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident)) {
39535 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
39538 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
39541 } while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident));
39542 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
39543 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
39546 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
39547 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].URIOrStringExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon]);
39549 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOF)) {
39550 node.setMedialist(this._parseMediaQueryList());
39552 return this.finish(node);
39554 LESSParser.prototype._parsePlugin = function () {
39555 if (!this.peekKeyword('@plugin')) {
39558 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Plugin);
39559 this.consumeToken(); // @import
39560 if (!node.addChild(this._parseStringLiteral())) {
39561 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].StringLiteralExpected);
39563 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
39564 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SemiColonExpected);
39566 return this.finish(node);
39568 LESSParser.prototype._parseMediaQuery = function (resyncStopToken) {
39569 var node = _super.prototype._parseMediaQuery.call(this, resyncStopToken);
39571 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"]);
39572 if (node_1.addChild(this._parseVariable())) {
39573 return this.finish(node_1);
39579 LESSParser.prototype._parseMediaDeclaration = function (isNested) {
39580 if (isNested === void 0) { isNested = false; }
39581 return this._tryParseRuleset(isNested)
39582 || this._tryToParseDeclaration()
39583 || this._tryParseMixinDeclaration()
39584 || this._tryParseMixinReference()
39585 || this._parseDetachedRuleSetMixin()
39586 || this._parseStylesheetStatement(isNested);
39588 LESSParser.prototype._parseMediaFeatureName = function () {
39589 return this._parseIdent() || this._parseVariable();
39591 LESSParser.prototype._parseVariableDeclaration = function (panic) {
39592 if (panic === void 0) { panic = []; }
39593 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["VariableDeclaration"]);
39594 var mark = this.mark();
39595 if (!node.setVariable(this._parseVariable(true))) {
39598 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
39599 if (this.prevToken) {
39600 node.colonPosition = this.prevToken.offset;
39602 if (node.setValue(this._parseDetachedRuleSet())) {
39603 node.needsSemicolon = false;
39605 else if (!node.setValue(this._parseExpr())) {
39606 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].VariableValueExpected, [], panic);
39608 node.addChild(this._parsePrio());
39611 this.restoreAtMark(mark);
39612 return null; // at keyword, but no ':', not a variable declaration but some at keyword
39614 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
39615 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
39617 return this.finish(node);
39619 LESSParser.prototype._parseDetachedRuleSet = function () {
39620 var mark = this.mark();
39621 // "Anonymous mixin" used in each() and possibly a generic type in the future
39622 if (this.peekDelim('#') || this.peekDelim('.')) {
39623 this.consumeToken();
39624 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
39625 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
39626 if (node.getParameters().addChild(this._parseMixinParameter())) {
39627 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
39628 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
39631 if (!node.getParameters().addChild(this._parseMixinParameter())) {
39632 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
39636 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
39637 this.restoreAtMark(mark);
39642 this.restoreAtMark(mark);
39646 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
39649 var content = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["BodyDeclaration"]);
39650 this._parseBody(content, this._parseDetachedRuleSetBody.bind(this));
39651 return this.finish(content);
39653 LESSParser.prototype._parseDetachedRuleSetBody = function () {
39654 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
39656 LESSParser.prototype._addLookupChildren = function (node) {
39657 if (!node.addChild(this._parseLookupValue())) {
39660 var expectsValue = false;
39662 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
39663 expectsValue = true;
39665 if (!node.addChild(this._parseLookupValue())) {
39668 expectsValue = false;
39670 return !expectsValue;
39672 LESSParser.prototype._parseLookupValue = function () {
39673 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
39674 var mark = this.mark();
39675 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
39676 this.restoreAtMark(mark);
39679 if (((node.addChild(this._parseVariable(false, true)) ||
39680 node.addChild(this._parsePropertyIdentifier())) &&
39681 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketR)) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketR)) {
39684 this.restoreAtMark(mark);
39687 LESSParser.prototype._parseVariable = function (declaration, insideLookup) {
39688 if (declaration === void 0) { declaration = false; }
39689 if (insideLookup === void 0) { insideLookup = false; }
39690 var isPropertyReference = !declaration && this.peekDelim('$');
39691 if (!this.peekDelim('@') && !isPropertyReference && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
39694 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Variable"]);
39695 var mark = this.mark();
39696 while (this.acceptDelim('@') || (!declaration && this.acceptDelim('$'))) {
39697 if (this.hasWhitespace()) {
39698 this.restoreAtMark(mark);
39702 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident)) {
39703 this.restoreAtMark(mark);
39706 if (!insideLookup && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
39707 if (!this._addLookupChildren(node)) {
39708 this.restoreAtMark(mark);
39714 LESSParser.prototype._parseTerm = function () {
39715 var term = _super.prototype._parseTerm.call(this);
39719 term = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Term"]);
39720 if (term.setExpression(this._parseVariable()) ||
39721 term.setExpression(this._parseEscaped()) ||
39722 term.setExpression(this._tryParseMixinReference(false))) {
39723 return this.finish(term);
39727 LESSParser.prototype._parseEscaped = function () {
39728 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EscapedJavaScript) ||
39729 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BadEscapedJavaScript)) {
39730 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].EscapedValue);
39731 this.consumeToken();
39732 return this.finish(node);
39734 if (this.peekDelim('~')) {
39735 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].EscapedValue);
39736 this.consumeToken();
39737 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].String) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EscapedJavaScript)) {
39738 return this.finish(node);
39741 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].TermExpected);
39746 LESSParser.prototype._parseOperator = function () {
39747 var node = this._parseGuardOperator();
39752 return _super.prototype._parseOperator.call(this);
39755 LESSParser.prototype._parseGuardOperator = function () {
39756 if (this.peekDelim('>')) {
39757 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
39758 this.consumeToken();
39759 this.acceptDelim('=');
39762 else if (this.peekDelim('=')) {
39763 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
39764 this.consumeToken();
39765 this.acceptDelim('<');
39768 else if (this.peekDelim('<')) {
39769 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Operator);
39770 this.consumeToken();
39771 this.acceptDelim('=');
39776 LESSParser.prototype._parseRuleSetDeclaration = function () {
39777 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
39778 return this._parseKeyframe()
39779 || this._parseMedia(true)
39780 || this._parseImport()
39781 || this._parseSupports(true) // @supports
39782 || this._parseDetachedRuleSetMixin() // less detached ruleset mixin
39783 || this._parseVariableDeclaration() // Variable declarations
39784 || this._parseUnknownAtRule();
39786 return this._tryParseMixinDeclaration()
39787 || this._tryParseRuleset(true) // nested ruleset
39788 || this._tryParseMixinReference() // less mixin reference
39789 || this._parseFunction()
39790 || this._parseExtend() // less extend declaration
39791 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as the last option
39793 LESSParser.prototype._parseKeyframeIdent = function () {
39794 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Keyframe]) || this._parseVariable();
39796 LESSParser.prototype._parseKeyframeSelector = function () {
39797 return this._parseDetachedRuleSetMixin() // less detached ruleset mixin
39798 || _super.prototype._parseKeyframeSelector.call(this);
39800 LESSParser.prototype._parseSimpleSelectorBody = function () {
39801 return this._parseSelectorCombinator() || _super.prototype._parseSimpleSelectorBody.call(this);
39803 LESSParser.prototype._parseSelector = function (isNested) {
39805 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Selector"]);
39806 var hasContent = false;
39808 // nested selectors can start with a combinator
39809 hasContent = node.addChild(this._parseCombinator());
39811 while (node.addChild(this._parseSimpleSelector())) {
39813 var mark = this.mark();
39814 if (node.addChild(this._parseGuard()) && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
39817 this.restoreAtMark(mark);
39818 node.addChild(this._parseCombinator()); // optional
39820 return hasContent ? this.finish(node) : null;
39822 LESSParser.prototype._parseSelectorCombinator = function () {
39823 if (this.peekDelim('&')) {
39824 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorCombinator);
39825 this.consumeToken();
39826 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('&'))) {
39829 return this.finish(node);
39833 LESSParser.prototype._parseSelectorIdent = function () {
39834 if (!this.peekInterpolatedIdent()) {
39837 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].SelectorInterpolation);
39838 var hasContent = this._acceptInterpolatedIdent(node);
39839 return hasContent ? this.finish(node) : null;
39841 LESSParser.prototype._parsePropertyIdentifier = function (inLookup) {
39842 if (inLookup === void 0) { inLookup = false; }
39843 var propertyRegex = /^[\w-]+/;
39844 if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) {
39847 var mark = this.mark();
39848 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
39849 node.isCustomProperty = this.acceptDelim('-') && this.acceptDelim('-');
39850 var childAdded = false;
39852 if (node.isCustomProperty) {
39853 childAdded = this._acceptInterpolatedIdent(node);
39856 childAdded = this._acceptInterpolatedIdent(node, propertyRegex);
39860 if (node.isCustomProperty) {
39861 childAdded = node.addChild(this._parseIdent());
39864 childAdded = node.addChild(this._parseRegexp(propertyRegex));
39868 this.restoreAtMark(mark);
39871 if (!inLookup && !this.hasWhitespace()) {
39872 this.acceptDelim('+');
39873 if (!this.hasWhitespace()) {
39874 this.acceptIdent('_');
39877 return this.finish(node);
39879 LESSParser.prototype.peekInterpolatedIdent = function () {
39880 return this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident) ||
39881 this.peekDelim('@') ||
39882 this.peekDelim('$') ||
39883 this.peekDelim('-');
39885 LESSParser.prototype._acceptInterpolatedIdent = function (node, identRegex) {
39887 var hasContent = false;
39888 var indentInterpolation = function () {
39889 var pos = _this.mark();
39890 if (_this.acceptDelim('-')) {
39891 if (!_this.hasWhitespace()) {
39892 _this.acceptDelim('-');
39894 if (_this.hasWhitespace()) {
39895 _this.restoreAtMark(pos);
39899 return _this._parseInterpolation();
39901 var accept = identRegex ?
39902 function () { return _this.acceptRegexp(identRegex); } :
39903 function () { return _this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Ident); };
39905 node.addChild(this._parseInterpolation() ||
39906 this.try(indentInterpolation))) {
39908 if (this.hasWhitespace()) {
39914 LESSParser.prototype._parseInterpolation = function () {
39915 // @{name} Variable or
39916 // ${name} Property
39917 var mark = this.mark();
39918 if (this.peekDelim('@') || this.peekDelim('$')) {
39919 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["NodeType"].Interpolation);
39920 this.consumeToken();
39921 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
39922 this.restoreAtMark(mark);
39925 if (!node.addChild(this._parseIdent())) {
39926 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected);
39928 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyR)) {
39929 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightCurlyExpected);
39931 return this.finish(node);
39935 LESSParser.prototype._tryParseMixinDeclaration = function () {
39936 var mark = this.mark();
39937 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinDeclaration"]);
39938 if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
39939 this.restoreAtMark(mark);
39942 if (node.getParameters().addChild(this._parseMixinParameter())) {
39943 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
39944 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
39947 if (!node.getParameters().addChild(this._parseMixinParameter())) {
39948 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR]);
39952 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
39953 this.restoreAtMark(mark);
39956 node.setGuard(this._parseGuard());
39957 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].CurlyL)) {
39958 this.restoreAtMark(mark);
39961 return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this));
39963 LESSParser.prototype._parseMixInBodyDeclaration = function () {
39964 return this._parseFontFace() || this._parseRuleSetDeclaration();
39966 LESSParser.prototype._parseMixinDeclarationIdentifier = function () {
39968 if (this.peekDelim('#') || this.peekDelim('.')) {
39969 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
39970 this.consumeToken(); // # or .
39971 if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) {
39975 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Hash)) {
39976 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
39977 this.consumeToken(); // TokenType.Hash
39982 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin];
39983 return this.finish(identifier);
39985 LESSParser.prototype._parsePseudo = function () {
39986 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
39989 var mark = this.mark();
39990 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
39991 this.consumeToken(); // :
39992 if (this.acceptIdent('extend')) {
39993 return this._completeExtends(node);
39995 this.restoreAtMark(mark);
39996 return _super.prototype._parsePseudo.call(this);
39998 LESSParser.prototype._parseExtend = function () {
39999 if (!this.peekDelim('&')) {
40002 var mark = this.mark();
40003 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ExtendsReference"]);
40004 this.consumeToken(); // &
40005 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon) || !this.acceptIdent('extend')) {
40006 this.restoreAtMark(mark);
40009 return this._completeExtends(node);
40011 LESSParser.prototype._completeExtends = function (node) {
40012 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
40013 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].LeftParenthesisExpected);
40015 var selectors = node.getSelectors();
40016 if (!selectors.addChild(this._parseSelector(true))) {
40017 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SelectorExpected);
40019 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
40020 if (!selectors.addChild(this._parseSelector(true))) {
40021 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].SelectorExpected);
40024 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40025 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
40027 return this.finish(node);
40029 LESSParser.prototype._parseDetachedRuleSetMixin = function () {
40030 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AtKeyword)) {
40033 var mark = this.mark();
40034 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
40035 if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL))) {
40036 this.restoreAtMark(mark);
40039 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40040 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
40042 return this.finish(node);
40044 LESSParser.prototype._tryParseMixinReference = function (atRoot) {
40045 if (atRoot === void 0) { atRoot = true; }
40046 var mark = this.mark();
40047 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["MixinReference"]);
40048 var identifier = this._parseMixinDeclarationIdentifier();
40049 while (identifier) {
40050 this.acceptDelim('>');
40051 var nextId = this._parseMixinDeclarationIdentifier();
40053 node.getNamespaces().addChild(identifier);
40054 identifier = nextId;
40060 if (!node.setIdentifier(identifier)) {
40061 this.restoreAtMark(mark);
40064 var hasArguments = false;
40065 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
40066 hasArguments = true;
40067 if (node.getArguments().addChild(this._parseMixinArgument())) {
40068 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
40069 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40072 if (!node.getArguments().addChild(this._parseMixinArgument())) {
40073 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ExpressionExpected);
40077 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40078 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
40080 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin];
40083 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Mixin, _cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Rule];
40085 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].BracketL)) {
40087 this._addLookupChildren(node);
40091 node.addChild(this._parsePrio());
40093 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)) {
40094 this.restoreAtMark(mark);
40097 return this.finish(node);
40099 LESSParser.prototype._parseMixinArgument = function () {
40100 // [variableName ':'] expression | variableName '...'
40101 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionArgument"]);
40102 var pos = this.mark();
40103 var argument = this._parseVariable();
40105 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon)) {
40106 this.restoreAtMark(pos);
40109 node.setIdentifier(argument);
40112 if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) {
40113 return this.finish(node);
40115 this.restoreAtMark(pos);
40118 LESSParser.prototype._parseMixinParameter = function () {
40119 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["FunctionParameter"]);
40120 // special rest variable: @rest...
40121 if (this.peekKeyword('@rest')) {
40122 var restNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
40123 this.consumeToken();
40124 if (!this.accept(_lessScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
40125 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]);
40127 node.setIdentifier(this.finish(restNode));
40128 return this.finish(node);
40130 // special const args: ...
40131 if (this.peek(_lessScanner__WEBPACK_IMPORTED_MODULE_0__["Ellipsis"])) {
40132 var varargsNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
40133 this.consumeToken();
40134 node.setIdentifier(this.finish(varargsNode));
40135 return this.finish(node);
40137 var hasContent = false;
40138 // default variable declaration: @param: 12 or @name
40139 if (node.setIdentifier(this._parseVariable())) {
40140 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Colon);
40143 if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) {
40146 return this.finish(node);
40148 LESSParser.prototype._parseGuard = function () {
40149 if (!this.peekIdent('when')) {
40152 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["LessGuard"]);
40153 this.consumeToken(); // when
40154 node.isNegated = this.acceptIdent('not');
40155 if (!node.getConditions().addChild(this._parseGuardCondition())) {
40156 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ConditionExpected);
40158 while (this.acceptIdent('and') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma)) {
40159 if (!node.getConditions().addChild(this._parseGuardCondition())) {
40160 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ConditionExpected);
40163 return this.finish(node);
40165 LESSParser.prototype._parseGuardCondition = function () {
40166 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
40169 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["GuardCondition"]);
40170 this.consumeToken(); // ParenthesisL
40171 if (!node.addChild(this._parseExpr())) {
40174 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40175 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
40177 return this.finish(node);
40179 LESSParser.prototype._parseFunction = function () {
40180 var pos = this.mark();
40181 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Function"]);
40182 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
40185 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisL)) {
40186 this.restoreAtMark(pos);
40189 if (node.getArguments().addChild(this._parseMixinArgument())) {
40190 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].SemiColon)) {
40191 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40194 if (!node.getArguments().addChild(this._parseMixinArgument())) {
40195 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].ExpressionExpected);
40199 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40200 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__["ParseError"].RightParenthesisExpected);
40202 return this.finish(node);
40204 LESSParser.prototype._parseFunctionIdentifier = function () {
40205 if (this.peekDelim('%')) {
40206 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Identifier"]);
40207 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__["ReferenceType"].Function];
40208 this.consumeToken();
40209 return this.finish(node);
40211 return _super.prototype._parseFunctionIdentifier.call(this);
40213 LESSParser.prototype._parseURLArgument = function () {
40214 var pos = this.mark();
40215 var node = _super.prototype._parseURLArgument.call(this);
40216 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__["TokenType"].ParenthesisR)) {
40217 this.restoreAtMark(pos);
40218 var node_2 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__["Node"]);
40219 node_2.addChild(this._parseBinaryExpr());
40220 return this.finish(node_2);
40225 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__["Parser"]));
40231 /***/ (function(module, __webpack_exports__, __webpack_require__) {
40234 __webpack_require__.r(__webpack_exports__);
40235 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ellipsis", function() { return Ellipsis; });
40236 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSScanner", function() { return LESSScanner; });
40237 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
40238 /*---------------------------------------------------------------------------------------------
40239 * Copyright (c) Microsoft Corporation. All rights reserved.
40240 * Licensed under the MIT License. See License.txt in the project root for license information.
40241 *--------------------------------------------------------------------------------------------*/
40243 var __extends = (undefined && undefined.__extends) || (function () {
40244 var extendStatics = function (d, b) {
40245 extendStatics = Object.setPrototypeOf ||
40246 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40247 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
40248 return extendStatics(d, b);
40250 return function (d, b) {
40251 extendStatics(d, b);
40252 function __() { this.constructor = d; }
40253 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40257 var _FSL = '/'.charCodeAt(0);
40258 var _NWL = '\n'.charCodeAt(0);
40259 var _CAR = '\r'.charCodeAt(0);
40260 var _LFD = '\f'.charCodeAt(0);
40261 var _TIC = '`'.charCodeAt(0);
40262 var _DOT = '.'.charCodeAt(0);
40263 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CustomToken;
40264 var Ellipsis = customTokenValue++;
40265 var LESSScanner = /** @class */ (function (_super) {
40266 __extends(LESSScanner, _super);
40267 function LESSScanner() {
40268 return _super !== null && _super.apply(this, arguments) || this;
40270 LESSScanner.prototype.scanNext = function (offset) {
40271 // LESS: escaped JavaScript code `const a = "dddd"`
40272 var tokenType = this.escapedJavaScript();
40273 if (tokenType !== null) {
40274 return this.finishToken(offset, tokenType);
40276 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
40277 return this.finishToken(offset, Ellipsis);
40279 return _super.prototype.scanNext.call(this, offset);
40281 LESSScanner.prototype.comment = function () {
40282 if (_super.prototype.comment.call(this)) {
40285 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
40286 this.stream.advanceWhileChar(function (ch) {
40302 LESSScanner.prototype.escapedJavaScript = function () {
40303 var ch = this.stream.peekChar();
40305 this.stream.advance(1);
40306 this.stream.advanceWhileChar(function (ch) { return ch !== _TIC; });
40307 return this.stream.advanceIfChar(_TIC) ? _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EscapedJavaScript : _cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].BadEscapedJavaScript;
40311 return LESSScanner;
40312 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]));
40318 /***/ (function(module, __webpack_exports__, __webpack_require__) {
40321 __webpack_require__.r(__webpack_exports__);
40322 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LESSCompletion", function() { return LESSCompletion; });
40323 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86);
40324 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
40325 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77);
40326 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_2__);
40327 /*---------------------------------------------------------------------------------------------
40328 * Copyright (c) Microsoft Corporation. All rights reserved.
40329 * Licensed under the MIT License. See License.txt in the project root for license information.
40330 *--------------------------------------------------------------------------------------------*/
40332 var __extends = (undefined && undefined.__extends) || (function () {
40333 var extendStatics = function (d, b) {
40334 extendStatics = Object.setPrototypeOf ||
40335 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40336 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
40337 return extendStatics(d, b);
40339 return function (d, b) {
40340 extendStatics(d, b);
40341 function __() { this.constructor = d; }
40342 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40348 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__["loadMessageBundle"]();
40349 var LESSCompletion = /** @class */ (function (_super) {
40350 __extends(LESSCompletion, _super);
40351 function LESSCompletion(clientCapabilities) {
40352 return _super.call(this, '@', clientCapabilities) || this;
40354 LESSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
40355 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
40356 var p = proposals_1[_i];
40360 documentation: p.description,
40361 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TextEdit"].replace(this.getCompletionRange(existingNode), p.name + '($0)'),
40362 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["InsertTextFormat"].Snippet,
40363 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["CompletionItemKind"].Function
40366 item.sortText = 'z';
40368 result.items.push(item);
40372 LESSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
40373 var functions = LESSCompletion.builtInProposals;
40375 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
40377 this.createFunctionProposals(functions, existingNode, true, result);
40378 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
40380 LESSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
40381 this.createFunctionProposals(LESSCompletion.colorProposals, existingNode, false, result);
40382 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
40384 LESSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
40385 this.getCompletionsForSelector(null, true, result);
40386 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
40388 LESSCompletion.builtInProposals = [
40389 // Boolean functions
40392 'example': 'if(condition, trueValue [, falseValue]);',
40393 'description': localize('less.builtin.if', 'returns one of two values depending on a condition.')
40397 'example': 'boolean(condition);',
40398 'description': localize('less.builtin.boolean', '"store" a boolean test for later evaluation in a guard or if().')
40403 'example': 'length(@list);',
40404 'description': localize('less.builtin.length', 'returns the number of elements in a value list')
40408 'example': 'extract(@list, index);',
40409 'description': localize('less.builtin.extract', 'returns a value at the specified position in the list')
40413 'example': 'range([start, ] end [, step]);',
40414 'description': localize('less.builtin.range', 'generate a list spanning a range of values')
40418 'example': 'each(@list, ruleset);',
40419 'description': localize('less.builtin.each', 'bind the evaluation of a ruleset to each member of a list.')
40424 'example': 'escape(@string);',
40425 'description': localize('less.builtin.escape', 'URL encodes a string')
40429 'example': 'e(@string);',
40430 'description': localize('less.builtin.e', 'escape string content')
40434 'example': 'replace(@string, @pattern, @replacement[, @flags]);',
40435 'description': localize('less.builtin.replace', 'string replace')
40439 'example': 'unit(@dimension, [@unit: \'\']);',
40440 'description': localize('less.builtin.unit', 'remove or change the unit of a dimension')
40444 'example': 'color(@string);',
40445 'description': localize('less.builtin.color', 'parses a string to a color'),
40450 'example': 'convert(@value, unit);',
40451 'description': localize('less.builtin.convert', 'converts numbers from one type into another')
40454 'name': 'data-uri',
40455 'example': 'data-uri([mimetype,] url);',
40456 'description': localize('less.builtin.data-uri', 'inlines a resource and falls back to `url()`'),
40461 'description': localize('less.builtin.abs', 'absolute value of a number'),
40462 'example': 'abs(number);'
40466 'description': localize('less.builtin.acos', 'arccosine - inverse of cosine function'),
40467 'example': 'acos(number);'
40471 'description': localize('less.builtin.asin', 'arcsine - inverse of sine function'),
40472 'example': 'asin(number);'
40476 'example': 'ceil(@number);',
40477 'description': localize('less.builtin.ceil', 'rounds up to an integer')
40481 'description': localize('less.builtin.cos', 'cosine function'),
40482 'example': 'cos(number);'
40486 'description': localize('less.builtin.floor', 'rounds down to an integer'),
40487 'example': 'floor(@number);'
40490 'name': 'percentage',
40491 'description': localize('less.builtin.percentage', 'converts to a %, e.g. 0.5 > 50%'),
40492 'example': 'percentage(@number);',
40493 'type': 'percentage'
40497 'description': localize('less.builtin.round', 'rounds a number to a number of places'),
40498 'example': 'round(number, [places: 0]);'
40502 'description': localize('less.builtin.sqrt', 'calculates square root of a number'),
40503 'example': 'sqrt(number);'
40507 'description': localize('less.builtin.sin', 'sine function'),
40508 'example': 'sin(number);'
40512 'description': localize('less.builtin.tan', 'tangent function'),
40513 'example': 'tan(number);'
40517 'description': localize('less.builtin.atan', 'arctangent - inverse of tangent function'),
40518 'example': 'atan(number);'
40522 'description': localize('less.builtin.pi', 'returns pi'),
40527 'description': localize('less.builtin.pow', 'first argument raised to the power of the second argument'),
40528 'example': 'pow(@base, @exponent);'
40532 'description': localize('less.builtin.mod', 'first argument modulus second argument'),
40533 'example': 'mod(number, number);'
40537 'description': localize('less.builtin.min', 'returns the lowest of one or more values'),
40538 'example': 'min(@x, @y);'
40542 'description': localize('less.builtin.max', 'returns the lowest of one or more values'),
40543 'example': 'max(@x, @y);'
40546 LESSCompletion.colorProposals = [
40549 'example': 'argb(@color);',
40550 'description': localize('less.builtin.argb', 'creates a #AARRGGBB')
40554 'example': 'hsl(@hue, @saturation, @lightness);',
40555 'description': localize('less.builtin.hsl', 'creates a color')
40559 'example': 'hsla(@hue, @saturation, @lightness, @alpha);',
40560 'description': localize('less.builtin.hsla', 'creates a color')
40564 'example': 'hsv(@hue, @saturation, @value);',
40565 'description': localize('less.builtin.hsv', 'creates a color')
40569 'example': 'hsva(@hue, @saturation, @value, @alpha);',
40570 'description': localize('less.builtin.hsva', 'creates a color')
40574 'example': 'hue(@color);',
40575 'description': localize('less.builtin.hue', 'returns the `hue` channel of `@color` in the HSL space')
40578 'name': 'saturation',
40579 'example': 'saturation(@color);',
40580 'description': localize('less.builtin.saturation', 'returns the `saturation` channel of `@color` in the HSL space')
40583 'name': 'lightness',
40584 'example': 'lightness(@color);',
40585 'description': localize('less.builtin.lightness', 'returns the `lightness` channel of `@color` in the HSL space')
40589 'example': 'hsvhue(@color);',
40590 'description': localize('less.builtin.hsvhue', 'returns the `hue` channel of `@color` in the HSV space')
40593 'name': 'hsvsaturation',
40594 'example': 'hsvsaturation(@color);',
40595 'description': localize('less.builtin.hsvsaturation', 'returns the `saturation` channel of `@color` in the HSV space')
40598 'name': 'hsvvalue',
40599 'example': 'hsvvalue(@color);',
40600 'description': localize('less.builtin.hsvvalue', 'returns the `value` channel of `@color` in the HSV space')
40604 'example': 'red(@color);',
40605 'description': localize('less.builtin.red', 'returns the `red` channel of `@color`')
40609 'example': 'green(@color);',
40610 'description': localize('less.builtin.green', 'returns the `green` channel of `@color`')
40614 'example': 'blue(@color);',
40615 'description': localize('less.builtin.blue', 'returns the `blue` channel of `@color`')
40619 'example': 'alpha(@color);',
40620 'description': localize('less.builtin.alpha', 'returns the `alpha` channel of `@color`')
40624 'example': 'luma(@color);',
40625 'description': localize('less.builtin.luma', 'returns the `luma` value (perceptual brightness) of `@color`')
40628 'name': 'saturate',
40629 'example': 'saturate(@color, 10%);',
40630 'description': localize('less.builtin.saturate', 'return `@color` 10% points more saturated')
40633 'name': 'desaturate',
40634 'example': 'desaturate(@color, 10%);',
40635 'description': localize('less.builtin.desaturate', 'return `@color` 10% points less saturated')
40639 'example': 'lighten(@color, 10%);',
40640 'description': localize('less.builtin.lighten', 'return `@color` 10% points lighter')
40644 'example': 'darken(@color, 10%);',
40645 'description': localize('less.builtin.darken', 'return `@color` 10% points darker')
40649 'example': 'fadein(@color, 10%);',
40650 'description': localize('less.builtin.fadein', 'return `@color` 10% points less transparent')
40654 'example': 'fadeout(@color, 10%);',
40655 'description': localize('less.builtin.fadeout', 'return `@color` 10% points more transparent')
40659 'example': 'fade(@color, 50%);',
40660 'description': localize('less.builtin.fade', 'return `@color` with 50% transparency')
40664 'example': 'spin(@color, 10);',
40665 'description': localize('less.builtin.spin', 'return `@color` with a 10 degree larger in hue')
40669 'example': 'mix(@color1, @color2, [@weight: 50%]);',
40670 'description': localize('less.builtin.mix', 'return a mix of `@color1` and `@color2`')
40673 'name': 'greyscale',
40674 'example': 'greyscale(@color);',
40675 'description': localize('less.builtin.greyscale', 'returns a grey, 100% desaturated color'),
40678 'name': 'contrast',
40679 'example': 'contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);',
40680 'description': localize('less.builtin.contrast', 'return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes')
40683 'name': 'multiply',
40684 'example': 'multiply(@color1, @color2);'
40688 'example': 'screen(@color1, @color2);'
40692 'example': 'overlay(@color1, @color2);'
40695 'name': 'softlight',
40696 'example': 'softlight(@color1, @color2);'
40699 'name': 'hardlight',
40700 'example': 'hardlight(@color1, @color2);'
40703 'name': 'difference',
40704 'example': 'difference(@color1, @color2);'
40707 'name': 'exclusion',
40708 'example': 'exclusion(@color1, @color2);'
40712 'example': 'average(@color1, @color2);'
40715 'name': 'negation',
40716 'example': 'negation(@color1, @color2);'
40719 return LESSCompletion;
40720 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__["CSSCompletion"]));
40726 /***/ (function(module, __webpack_exports__, __webpack_require__) {
40729 __webpack_require__.r(__webpack_exports__);
40730 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFoldingRanges", function() { return getFoldingRanges; });
40731 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
40732 /* harmony import */ var _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(101);
40733 /* harmony import */ var _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(105);
40734 /*---------------------------------------------------------------------------------------------
40735 * Copyright (c) Microsoft Corporation. All rights reserved.
40736 * Licensed under the MIT License. See License.txt in the project root for license information.
40737 *--------------------------------------------------------------------------------------------*/
40742 function getFoldingRanges(document, context) {
40743 var ranges = computeFoldingRanges(document);
40744 return limitFoldingRanges(ranges, context);
40746 function computeFoldingRanges(document) {
40747 function getStartLine(t) {
40748 return document.positionAt(t.offset).line;
40750 function getEndLine(t) {
40751 return document.positionAt(t.offset + t.len).line;
40753 function getScanner() {
40754 switch (document.languageId) {
40756 return new _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__["SCSSScanner"]();
40758 return new _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__["LESSScanner"]();
40760 return new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["Scanner"]();
40763 function tokenToRange(t, kind) {
40764 var startLine = getStartLine(t);
40765 var endLine = getEndLine(t);
40766 if (startLine !== endLine) {
40768 startLine: startLine,
40778 var delimiterStack = [];
40779 var scanner = getScanner();
40780 scanner.ignoreComment = false;
40781 scanner.setSource(document.getText());
40782 var token = scanner.scan();
40783 var prevToken = null;
40784 var _loop_1 = function () {
40785 switch (token.type) {
40786 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyL:
40787 case _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__["InterpolationFunction"]:
40789 delimiterStack.push({ line: getStartLine(token), type: 'brace', isStart: true });
40792 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].CurlyR: {
40793 if (delimiterStack.length !== 0) {
40794 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
40795 if (!prevDelimiter) {
40798 var endLine = getEndLine(token);
40799 if (prevDelimiter.type === 'brace') {
40801 * Other than the case when curly brace is not on a new line by itself, for example
40804 * Use endLine minus one to show ending curly brace
40806 if (prevToken && getEndLine(prevToken) !== endLine) {
40809 if (prevDelimiter.line !== endLine) {
40811 startLine: prevDelimiter.line,
40821 * In CSS, there is no single line comment prefixed with //
40822 * All comments are marked as `Comment`
40824 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].Comment: {
40825 var commentRegionMarkerToDelimiter_1 = function (marker) {
40826 if (marker === '#region') {
40827 return { line: getStartLine(token), type: 'comment', isStart: true };
40830 return { line: getEndLine(token), type: 'comment', isStart: false };
40833 var getCurrDelimiter = function (token) {
40834 var matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
40836 return commentRegionMarkerToDelimiter_1(matches[1]);
40838 else if (document.languageId === 'scss' || document.languageId === 'less') {
40839 var matches_1 = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
40841 return commentRegionMarkerToDelimiter_1(matches_1[1]);
40846 var currDelimiter = getCurrDelimiter(token);
40847 // /* */ comment region folding
40848 // All #region and #endregion cases
40849 if (currDelimiter) {
40850 if (currDelimiter.isStart) {
40851 delimiterStack.push(currDelimiter);
40854 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
40855 if (!prevDelimiter) {
40858 if (prevDelimiter.type === 'comment') {
40859 if (prevDelimiter.line !== currDelimiter.line) {
40861 startLine: prevDelimiter.line,
40862 endLine: currDelimiter.line,
40869 // Multiline comment case
40871 var range = tokenToRange(token, 'comment');
40873 ranges.push(range);
40880 token = scanner.scan();
40882 while (token.type !== _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__["TokenType"].EOF) {
40887 function popPrevStartDelimiterOfType(stack, type) {
40888 if (stack.length === 0) {
40891 for (var i = stack.length - 1; i >= 0; i--) {
40892 if (stack[i].type === type && stack[i].isStart) {
40893 return stack.splice(i, 1)[0];
40900 * - Remove invalid regions (intersections)
40901 * - If limit exceeds, only return `rangeLimit` amount of ranges
40903 function limitFoldingRanges(ranges, context) {
40904 var maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
40905 var sortedRanges = ranges.sort(function (r1, r2) {
40906 var diff = r1.startLine - r2.startLine;
40908 diff = r1.endLine - r2.endLine;
40912 var validRanges = [];
40913 var prevEndLine = -1;
40914 sortedRanges.forEach(function (r) {
40915 if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
40916 validRanges.push(r);
40917 prevEndLine = r.endLine;
40920 if (validRanges.length < maxRanges) {
40921 return validRanges;
40924 return validRanges.slice(0, maxRanges);
40931 /***/ (function(module, __webpack_exports__, __webpack_require__) {
40934 __webpack_require__.r(__webpack_exports__);
40935 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionRanges", function() { return getSelectionRanges; });
40936 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90);
40937 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75);
40938 /*---------------------------------------------------------------------------------------------
40939 * Copyright (c) Microsoft Corporation. All rights reserved.
40940 * Licensed under the MIT License. See License.txt in the project root for license information.
40941 *--------------------------------------------------------------------------------------------*/
40945 function getSelectionRanges(document, positions, stylesheet) {
40946 function getSelectionRange(position) {
40947 var applicableRanges = getApplicableRanges(position);
40948 var current = undefined;
40949 for (var index = applicableRanges.length - 1; index >= 0; index--) {
40950 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);
40953 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(position, position));
40957 return positions.map(getSelectionRange);
40958 function getApplicableRanges(position) {
40959 var offset = document.offsetAt(position);
40960 var currNode = stylesheet.findChildAtOffset(offset, true);
40966 if (currNode.parent &&
40967 currNode.offset === currNode.parent.offset &&
40968 currNode.end === currNode.parent.end) {
40969 currNode = currNode.parent;
40972 // The `{ }` part of `.a { }`
40973 if (currNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__["NodeType"].Declarations) {
40974 if (offset > currNode.offset && offset < currNode.end) {
40975 // Return `{ }` and the range inside `{` and `}`
40976 result.push([currNode.offset + 1, currNode.end - 1]);
40979 result.push([currNode.offset, currNode.end]);
40980 currNode = currNode.parent;
40989 /***/ (function(module, __webpack_exports__, __webpack_require__) {
40992 __webpack_require__.r(__webpack_exports__);
40993 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCSSNavigation", function() { return SCSSNavigation; });
40994 /* harmony import */ var _cssNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
40995 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
40996 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75);
40997 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110);
40998 /*---------------------------------------------------------------------------------------------
40999 * Copyright (c) Microsoft Corporation. All rights reserved.
41000 * Licensed under the MIT License. See License.txt in the project root for license information.
41001 *--------------------------------------------------------------------------------------------*/
41003 var __extends = (undefined && undefined.__extends) || (function () {
41004 var extendStatics = function (d, b) {
41005 extendStatics = Object.setPrototypeOf ||
41006 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41007 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
41008 return extendStatics(d, b);
41010 return function (d, b) {
41011 extendStatics(d, b);
41012 function __() { this.constructor = d; }
41013 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41016 var __assign = (undefined && undefined.__assign) || function () {
41017 __assign = Object.assign || function(t) {
41018 for (var s, i = 1, n = arguments.length; i < n; i++) {
41020 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
41025 return __assign.apply(this, arguments);
41027 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
41028 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41029 return new (P || (P = Promise))(function (resolve, reject) {
41030 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
41031 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41032 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41033 step((generator = generator.apply(thisArg, _arguments || [])).next());
41036 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
41037 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41038 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
41039 function verb(n) { return function (v) { return step([n, v]); }; }
41040 function step(op) {
41041 if (f) throw new TypeError("Generator is already executing.");
41043 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;
41044 if (y = 0, t) op = [op[0] & 2, t.value];
41046 case 0: case 1: t = op; break;
41047 case 4: _.label++; return { value: op[1], done: false };
41048 case 5: _.label++; y = op[1]; op = [0]; continue;
41049 case 7: op = _.ops.pop(); _.trys.pop(); continue;
41051 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41052 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41053 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41054 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41055 if (t[2]) _.ops.pop();
41056 _.trys.pop(); continue;
41058 op = body.call(thisArg, _);
41059 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
41060 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
41067 var SCSSNavigation = /** @class */ (function (_super) {
41068 __extends(SCSSNavigation, _super);
41069 function SCSSNavigation(fileSystemProvider) {
41070 var _this = _super.call(this) || this;
41071 _this.fileSystemProvider = fileSystemProvider;
41074 SCSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
41075 return (_super.prototype.isRawStringDocumentLinkNode.call(this, node) ||
41076 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Use ||
41077 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__["NodeType"].Forward);
41079 SCSSNavigation.prototype.findDocumentLinks2 = function (document, stylesheet, documentContext) {
41080 return __awaiter(this, void 0, void 0, function () {
41081 function toPathVariations(uri) {
41083 if (uri.path === '') {
41086 // No variation for links that ends with suffix
41087 if (uri.path.endsWith('.scss') || uri.path.endsWith('.css')) {
41090 // If a link is like a/, try resolving a/index.scss and a/_index.scss
41091 if (uri.path.endsWith('/')) {
41093 uri.with({ path: uri.path + 'index.scss' }).toString(),
41094 uri.with({ path: uri.path + '_index.scss' }).toString()
41097 // Use `uri.path` since it's normalized to use `/` in all platforms
41098 var pathFragments = uri.path.split('/');
41099 var basename = pathFragments[pathFragments.length - 1];
41100 var pathWithoutBasename = uri.path.slice(0, -basename.length);
41101 // No variation for links such as _a
41102 if (basename.startsWith('_')) {
41103 if (uri.path.endsWith('.scss')) {
41107 return [uri.with({ path: uri.path + '.scss' }).toString()];
41110 var normalizedBasename = basename + '.scss';
41111 var documentUriWithBasename = function (newBasename) {
41112 return uri.with({ path: pathWithoutBasename + newBasename }).toString();
41114 var normalizedPath = documentUriWithBasename(normalizedBasename);
41115 var underScorePath = documentUriWithBasename('_' + normalizedBasename);
41116 var indexPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/index.scss');
41117 var indexUnderscoreUri = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/_index.scss');
41118 var cssPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '.css');
41119 return [normalizedPath, underScorePath, indexPath, indexUnderscoreUri, cssPath];
41121 function fileExists(documentUri) {
41122 return __awaiter(this, void 0, void 0, function () {
41124 return __generator(this, function (_a) {
41125 switch (_a.label) {
41128 return [2 /*return*/, false];
41132 _a.trys.push([1, 3, , 4]);
41133 return [4 /*yield*/, fsProvider.stat(documentUri)];
41136 if (stat.type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["FileType"].Unknown && stat.size === -1) {
41137 return [2 /*return*/, false];
41139 return [2 /*return*/, true];
41142 return [2 /*return*/, false];
41143 case 4: return [2 /*return*/];
41148 var links, fsProvider, validLinks, i, target, parsedUri, pathVariations, j;
41149 return __generator(this, function (_a) {
41150 switch (_a.label) {
41152 links = this.findDocumentLinks(document, stylesheet, documentContext);
41153 fsProvider = this.fileSystemProvider;
41155 if (!fsProvider) return [3 /*break*/, 9];
41159 if (!(i < links.length)) return [3 /*break*/, 8];
41160 target = links[i].target;
41162 return [3 /*break*/, 7];
41166 parsedUri = vscode_uri__WEBPACK_IMPORTED_MODULE_3__["URI"].parse(target);
41169 if (e instanceof URIError) {
41170 return [3 /*break*/, 7];
41174 pathVariations = toPathVariations(parsedUri);
41175 if (!!pathVariations) return [3 /*break*/, 3];
41176 return [4 /*yield*/, fileExists(target)];
41179 validLinks.push(links[i]);
41181 return [3 /*break*/, 7];
41186 if (!(j < pathVariations.length)) return [3 /*break*/, 7];
41187 return [4 /*yield*/, fileExists(pathVariations[j])];
41190 validLinks.push(__assign(__assign({}, links[i]), { target: pathVariations[j] }));
41191 return [3 /*break*/, 7];
41196 return [3 /*break*/, 4];
41199 return [3 /*break*/, 1];
41200 case 8: return [3 /*break*/, 10];
41202 validLinks.push.apply(validLinks, links);
41204 case 10: return [2 /*return*/, validLinks];
41209 return SCSSNavigation;
41210 }(_cssNavigation__WEBPACK_IMPORTED_MODULE_0__["CSSNavigation"]));
41216 /***/ (function(module, __webpack_exports__, __webpack_require__) {
41219 __webpack_require__.r(__webpack_exports__);
41220 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
41221 /*---------------------------------------------------------------------------------------------
41222 * Copyright (c) Microsoft Corporation. All rights reserved.
41223 * Licensed under the MIT License. See License.txt in the project root for license information.
41224 *--------------------------------------------------------------------------------------------*/
41226 var __extends = (undefined && undefined.__extends) || (function () {
41227 var extendStatics = function (d, b) {
41228 extendStatics = Object.setPrototypeOf ||
41229 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
41230 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
41231 return extendStatics(d, b);
41233 return function (d, b) {
41234 extendStatics(d, b);
41235 function __() { this.constructor = d; }
41236 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41241 if (typeof process === 'object') {
41242 isWindows = process.platform === 'win32';
41244 else if (typeof navigator === 'object') {
41245 var userAgent = navigator.userAgent;
41246 isWindows = userAgent.indexOf('Windows') >= 0;
41248 function isHighSurrogate(charCode) {
41249 return (0xD800 <= charCode && charCode <= 0xDBFF);
41251 function isLowSurrogate(charCode) {
41252 return (0xDC00 <= charCode && charCode <= 0xDFFF);
41254 function isLowerAsciiHex(code) {
41255 return code >= 97 /* a */ && code <= 102 /* f */;
41257 function isLowerAsciiLetter(code) {
41258 return code >= 97 /* a */ && code <= 122 /* z */;
41260 function isUpperAsciiLetter(code) {
41261 return code >= 65 /* A */ && code <= 90 /* Z */;
41263 function isAsciiLetter(code) {
41264 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
41267 var _schemePattern = /^\w[\w\d+.-]*$/;
41268 var _singleSlashStart = /^\//;
41269 var _doubleSlashStart = /^\/\//;
41270 function _validateUri(ret, _strict) {
41271 // scheme, must be set
41272 if (!ret.scheme && _strict) {
41273 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
41275 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
41276 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
41277 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
41278 throw new Error('[UriError]: Scheme contains illegal characters.');
41280 // path, http://tools.ietf.org/html/rfc3986#section-3.3
41281 // If a URI contains an authority component, then the path component
41282 // must either be empty or begin with a slash ("/") character. If a URI
41283 // does not contain an authority component, then the path cannot begin
41284 // with two slash characters ("//").
41286 if (ret.authority) {
41287 if (!_singleSlashStart.test(ret.path)) {
41288 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');
41292 if (_doubleSlashStart.test(ret.path)) {
41293 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
41298 // for a while we allowed uris *without* schemes and this is the migration
41299 // for them, e.g. an uri without scheme and without strict-mode warns and falls
41300 // back to the file-scheme. that should cause the least carnage and still be a
41302 function _schemeFix(scheme, _strict) {
41303 if (!scheme && !_strict) {
41308 // implements a bit of https://tools.ietf.org/html/rfc3986#section-5
41309 function _referenceResolution(scheme, path) {
41310 // the slash-character is our 'default base' as we don't
41311 // support constructing URIs relative to other URIs. This
41312 // also means that we alter and potentially break paths.
41313 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
41321 else if (path[0] !== _slash) {
41322 path = _slash + path;
41330 var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
41332 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
41333 * This class is a simple parser which creates the basic component parts
41334 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
41337 * foo://example.com:8042/over/there?name=ferret#nose
41338 * \_/ \______________/\_________/ \_________/ \__/
41340 * scheme authority path query fragment
41341 * | _____________________|__
41343 * urn:example:animal:ferret:nose
41345 var URI = /** @class */ (function () {
41349 function URI(schemeOrData, authority, path, query, fragment, _strict) {
41350 if (_strict === void 0) { _strict = false; }
41351 if (typeof schemeOrData === 'object') {
41352 this.scheme = schemeOrData.scheme || _empty;
41353 this.authority = schemeOrData.authority || _empty;
41354 this.path = schemeOrData.path || _empty;
41355 this.query = schemeOrData.query || _empty;
41356 this.fragment = schemeOrData.fragment || _empty;
41357 // no validation because it's this URI
41358 // that creates uri components.
41359 // _validateUri(this);
41362 this.scheme = _schemeFix(schemeOrData, _strict);
41363 this.authority = authority || _empty;
41364 this.path = _referenceResolution(this.scheme, path || _empty);
41365 this.query = query || _empty;
41366 this.fragment = fragment || _empty;
41367 _validateUri(this, _strict);
41370 URI.isUri = function (thing) {
41371 if (thing instanceof URI) {
41377 return typeof thing.authority === 'string'
41378 && typeof thing.fragment === 'string'
41379 && typeof thing.path === 'string'
41380 && typeof thing.query === 'string'
41381 && typeof thing.scheme === 'string'
41382 && typeof thing.fsPath === 'function'
41383 && typeof thing.with === 'function'
41384 && typeof thing.toString === 'function';
41386 Object.defineProperty(URI.prototype, "fsPath", {
41387 // ---- filesystem path -----------------------
41389 * Returns a string representing the corresponding file system path of this URI.
41390 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
41391 * platform specific path separator.
41393 * * Will *not* validate the path for invalid characters and semantics.
41394 * * Will *not* look at the scheme of this URI.
41395 * * The result shall *not* be used for display purposes but for accessing a file on disk.
41398 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
41399 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
41402 const u = URI.parse('file://server/c$/folder/file.txt')
41403 u.authority === 'server'
41404 u.path === '/shares/c$/file.txt'
41405 u.fsPath === '\\server\c$\folder\file.txt'
41408 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
41409 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
41410 * with URIs that represent files on disk (`file` scheme).
41413 // if (this.scheme !== 'file') {
41414 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
41416 return _makeFsPath(this);
41421 // ---- modify to new -------------------------
41422 URI.prototype.with = function (change) {
41426 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
41427 if (scheme === undefined) {
41428 scheme = this.scheme;
41430 else if (scheme === null) {
41433 if (authority === undefined) {
41434 authority = this.authority;
41436 else if (authority === null) {
41437 authority = _empty;
41439 if (path === undefined) {
41442 else if (path === null) {
41445 if (query === undefined) {
41446 query = this.query;
41448 else if (query === null) {
41451 if (fragment === undefined) {
41452 fragment = this.fragment;
41454 else if (fragment === null) {
41457 if (scheme === this.scheme
41458 && authority === this.authority
41459 && path === this.path
41460 && query === this.query
41461 && fragment === this.fragment) {
41464 return new _URI(scheme, authority, path, query, fragment);
41466 // ---- parse & validate ------------------------
41468 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
41469 * `file:///usr/home`, or `scheme:with/path`.
41471 * @param value A string which represents an URI (see `URI#toString`).
41473 URI.parse = function (value, _strict) {
41474 if (_strict === void 0) { _strict = false; }
41475 var match = _regexp.exec(value);
41477 return new _URI(_empty, _empty, _empty, _empty, _empty);
41479 return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict);
41482 * Creates a new URI from a file system path, e.g. `c:\my\files`,
41483 * `/usr/home`, or `\\server\share\some\path`.
41485 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
41486 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
41487 * `URI.parse('file://' + path)` because the path might contain characters that are
41488 * interpreted (# and ?). See the following sample:
41490 const good = URI.file('/coding/c#/project1');
41491 good.scheme === 'file';
41492 good.path === '/coding/c#/project1';
41493 good.fragment === '';
41494 const bad = URI.parse('file://' + '/coding/c#/project1');
41495 bad.scheme === 'file';
41496 bad.path === '/coding/c'; // path is now broken
41497 bad.fragment === '/project1';
41500 * @param path A file system path (see `URI#fsPath`)
41502 URI.file = function (path) {
41503 var authority = _empty;
41504 // normalize to fwd-slashes on windows,
41505 // on other systems bwd-slashes are valid
41506 // filename character, eg /f\oo/ba\r.txt
41508 path = path.replace(/\\/g, _slash);
41510 // check for authority as used in UNC shares
41511 // or use the path as given
41512 if (path[0] === _slash && path[1] === _slash) {
41513 var idx = path.indexOf(_slash, 2);
41515 authority = path.substring(2);
41519 authority = path.substring(2, idx);
41520 path = path.substring(idx) || _slash;
41523 return new _URI('file', authority, path, _empty, _empty);
41525 URI.from = function (components) {
41526 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
41528 // ---- printing/externalize ---------------------------
41530 * Creates a string representation for this URI. It's guaranteed that calling
41531 * `URI.parse` with the result of this function creates an URI which is equal
41534 * * The result shall *not* be used for display purposes but for externalization or transport.
41535 * * The result will be encoded using the percentage encoding and encoding happens mostly
41536 * ignore the scheme-specific encoding rules.
41538 * @param skipEncoding Do not encode the result, default is `false`
41540 URI.prototype.toString = function (skipEncoding) {
41541 if (skipEncoding === void 0) { skipEncoding = false; }
41542 return _asFormatted(this, skipEncoding);
41544 URI.prototype.toJSON = function () {
41547 URI.revive = function (data) {
41551 else if (data instanceof URI) {
41555 var result = new _URI(data);
41556 result._formatted = data.external;
41557 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
41564 var _pathSepMarker = isWindows ? 1 : undefined;
41565 // tslint:disable-next-line:class-name
41566 var _URI = /** @class */ (function (_super) {
41567 __extends(_URI, _super);
41569 var _this = _super !== null && _super.apply(this, arguments) || this;
41570 _this._formatted = null;
41571 _this._fsPath = null;
41574 Object.defineProperty(_URI.prototype, "fsPath", {
41576 if (!this._fsPath) {
41577 this._fsPath = _makeFsPath(this);
41579 return this._fsPath;
41584 _URI.prototype.toString = function (skipEncoding) {
41585 if (skipEncoding === void 0) { skipEncoding = false; }
41586 if (!skipEncoding) {
41587 if (!this._formatted) {
41588 this._formatted = _asFormatted(this, false);
41590 return this._formatted;
41593 // we don't cache that
41594 return _asFormatted(this, true);
41597 _URI.prototype.toJSON = function () {
41602 if (this._fsPath) {
41603 res.fsPath = this._fsPath;
41604 res._sep = _pathSepMarker;
41606 if (this._formatted) {
41607 res.external = this._formatted;
41611 res.path = this.path;
41614 res.scheme = this.scheme;
41616 if (this.authority) {
41617 res.authority = this.authority;
41620 res.query = this.query;
41622 if (this.fragment) {
41623 res.fragment = this.fragment;
41629 // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
41630 var encodeTable = (_a = {},
41631 _a[58 /* Colon */] = '%3A',
41632 _a[47 /* Slash */] = '%2F',
41633 _a[63 /* QuestionMark */] = '%3F',
41634 _a[35 /* Hash */] = '%23',
41635 _a[91 /* OpenSquareBracket */] = '%5B',
41636 _a[93 /* CloseSquareBracket */] = '%5D',
41637 _a[64 /* AtSign */] = '%40',
41638 _a[33 /* ExclamationMark */] = '%21',
41639 _a[36 /* DollarSign */] = '%24',
41640 _a[38 /* Ampersand */] = '%26',
41641 _a[39 /* SingleQuote */] = '%27',
41642 _a[40 /* OpenParen */] = '%28',
41643 _a[41 /* CloseParen */] = '%29',
41644 _a[42 /* Asterisk */] = '%2A',
41645 _a[43 /* Plus */] = '%2B',
41646 _a[44 /* Comma */] = '%2C',
41647 _a[59 /* Semicolon */] = '%3B',
41648 _a[61 /* Equals */] = '%3D',
41649 _a[32 /* Space */] = '%20',
41651 function encodeURIComponentFast(uriComponent, allowSlash) {
41652 var res = undefined;
41653 var nativeEncodePos = -1;
41654 for (var pos = 0; pos < uriComponent.length; pos++) {
41655 var code = uriComponent.charCodeAt(pos);
41656 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
41657 if ((code >= 97 /* a */ && code <= 122 /* z */)
41658 || (code >= 65 /* A */ && code <= 90 /* Z */)
41659 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
41660 || code === 45 /* Dash */
41661 || code === 46 /* Period */
41662 || code === 95 /* Underline */
41663 || code === 126 /* Tilde */
41664 || (allowSlash && code === 47 /* Slash */)) {
41665 // check if we are delaying native encode
41666 if (nativeEncodePos !== -1) {
41667 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
41668 nativeEncodePos = -1;
41670 // check if we write into a new string (by default we try to return the param)
41671 if (res !== undefined) {
41672 res += uriComponent.charAt(pos);
41676 // encoding needed, we need to allocate a new string
41677 if (res === undefined) {
41678 res = uriComponent.substr(0, pos);
41680 // check with default table first
41681 var escaped = encodeTable[code];
41682 if (escaped !== undefined) {
41683 // check if we are delaying native encode
41684 if (nativeEncodePos !== -1) {
41685 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
41686 nativeEncodePos = -1;
41688 // append escaped variant to result
41691 else if (nativeEncodePos === -1) {
41692 // use native encode only when needed
41693 nativeEncodePos = pos;
41697 if (nativeEncodePos !== -1) {
41698 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
41700 return res !== undefined ? res : uriComponent;
41702 function encodeURIComponentMinimal(path) {
41703 var res = undefined;
41704 for (var pos = 0; pos < path.length; pos++) {
41705 var code = path.charCodeAt(pos);
41706 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
41707 if (res === undefined) {
41708 res = path.substr(0, pos);
41710 res += encodeTable[code];
41713 if (res !== undefined) {
41718 return res !== undefined ? res : path;
41721 * Compute `fsPath` for the given uri
41723 function _makeFsPath(uri) {
41725 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
41726 // unc path: file://shares/c$/far/boo
41727 value = "//" + uri.authority + uri.path;
41729 else if (uri.path.charCodeAt(0) === 47 /* Slash */
41730 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
41731 && uri.path.charCodeAt(2) === 58 /* Colon */) {
41732 // windows drive letter: file:///c:/far/boo
41733 value = uri.path[1].toLowerCase() + uri.path.substr(2);
41740 value = value.replace(/\//g, '\\');
41745 * Create the external version of a uri
41747 function _asFormatted(uri, skipEncoding) {
41748 var encoder = !skipEncoding
41749 ? encodeURIComponentFast
41750 : encodeURIComponentMinimal;
41752 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
41757 if (authority || scheme === 'file') {
41762 var idx = authority.indexOf('@');
41765 var userinfo = authority.substr(0, idx);
41766 authority = authority.substr(idx + 1);
41767 idx = userinfo.indexOf(':');
41769 res += encoder(userinfo, false);
41772 // <user>:<pass>@<auth>
41773 res += encoder(userinfo.substr(0, idx), false);
41775 res += encoder(userinfo.substr(idx + 1), false);
41779 authority = authority.toLowerCase();
41780 idx = authority.indexOf(':');
41782 res += encoder(authority, false);
41786 res += encoder(authority.substr(0, idx), false);
41787 res += authority.substr(idx);
41791 // lower-case windows drive letters in /C:/fff or C:/fff
41792 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
41793 var code = path.charCodeAt(1);
41794 if (code >= 65 /* A */ && code <= 90 /* Z */) {
41795 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
41798 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
41799 var code = path.charCodeAt(0);
41800 if (code >= 65 /* A */ && code <= 90 /* Z */) {
41801 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
41804 // encode the rest of the path
41805 res += encoder(path, true);
41809 res += encoder(query, false);
41813 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
41821 /***/ (function(module, __webpack_exports__, __webpack_require__) {
41824 __webpack_require__.r(__webpack_exports__);
41825 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLanguageService", function() { return getLanguageService; });
41826 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newHTMLDataProvider", function() { return newHTMLDataProvider; });
41827 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
41828 /* harmony import */ var _parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(114);
41829 /* harmony import */ var _services_htmlCompletion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117);
41830 /* harmony import */ var _services_htmlHover__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(125);
41831 /* harmony import */ var _services_htmlFormatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(126);
41832 /* harmony import */ var _services_htmlLinks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(130);
41833 /* harmony import */ var _services_htmlHighlighting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(131);
41834 /* harmony import */ var _services_htmlSymbolsProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(132);
41835 /* harmony import */ var _services_htmlRename__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(133);
41836 /* harmony import */ var _services_htmlMatchingTagPosition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(134);
41837 /* harmony import */ var _services_htmlFolding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(135);
41838 /* harmony import */ var _services_htmlSelectionRange__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(136);
41839 /* harmony import */ var _languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(120);
41840 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(121);
41841 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(113);
41842 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TokenType", function() { return _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["TokenType"]; });
41844 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScannerState", function() { return _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ScannerState"]; });
41846 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_14__["ClientCapabilities"]; });
41848 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(91);
41849 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_15__["TextDocument"]; });
41851 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(45);
41852 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Position"]; });
41854 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Range"]; });
41856 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Location"]; });
41858 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["LocationLink"]; });
41860 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Color"]; });
41862 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["ColorInformation"]; });
41864 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["ColorPresentation"]; });
41866 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["FoldingRangeKind"]; });
41868 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["FoldingRange"]; });
41870 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DiagnosticRelatedInformation"]; });
41872 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DiagnosticSeverity"]; });
41874 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DiagnosticTag"]; });
41876 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Diagnostic"]; });
41878 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Command"]; });
41880 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["TextEdit"]; });
41882 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["TextDocumentEdit"]; });
41884 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CreateFile"]; });
41886 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["RenameFile"]; });
41888 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DeleteFile"]; });
41890 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["WorkspaceEdit"]; });
41892 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["WorkspaceChange"]; });
41894 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["TextDocumentIdentifier"]; });
41896 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["VersionedTextDocumentIdentifier"]; });
41898 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["TextDocumentItem"]; });
41900 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["MarkupKind"]; });
41902 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["MarkupContent"]; });
41904 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CompletionItemKind"]; });
41906 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["InsertTextFormat"]; });
41908 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CompletionItemTag"]; });
41910 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CompletionItem"]; });
41912 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CompletionList"]; });
41914 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["MarkedString"]; });
41916 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["Hover"]; });
41918 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["ParameterInformation"]; });
41920 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["SignatureInformation"]; });
41922 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DocumentHighlightKind"]; });
41924 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DocumentHighlight"]; });
41926 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["SymbolKind"]; });
41928 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["SymbolTag"]; });
41930 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["SymbolInformation"]; });
41932 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DocumentSymbol"]; });
41934 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CodeActionKind"]; });
41936 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CodeActionContext"]; });
41938 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CodeAction"]; });
41940 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["CodeLens"]; });
41942 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["FormattingOptions"]; });
41944 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["DocumentLink"]; });
41946 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["SelectionRange"]; });
41948 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_16__["EOL"]; });
41950 /*---------------------------------------------------------------------------------------------
41951 * Copyright (c) Microsoft Corporation. All rights reserved.
41952 * Licensed under the MIT License. See License.txt in the project root for license information.
41953 *--------------------------------------------------------------------------------------------*/
41971 function getLanguageService(options) {
41972 var htmlHover = new _services_htmlHover__WEBPACK_IMPORTED_MODULE_3__["HTMLHover"](options && options.clientCapabilities);
41973 var htmlCompletion = new _services_htmlCompletion__WEBPACK_IMPORTED_MODULE_2__["HTMLCompletion"](options && options.clientCapabilities);
41974 if (options && options.customDataProviders) {
41975 Object(_languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_12__["handleCustomDataProviders"])(options.customDataProviders);
41978 createScanner: _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"],
41979 parseHTMLDocument: function (document) { return Object(_parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__["parse"])(document.getText()); },
41980 doComplete: htmlCompletion.doComplete.bind(htmlCompletion),
41981 setCompletionParticipants: htmlCompletion.setCompletionParticipants.bind(htmlCompletion),
41982 doHover: htmlHover.doHover.bind(htmlHover),
41983 format: _services_htmlFormatter__WEBPACK_IMPORTED_MODULE_4__["format"],
41984 findDocumentHighlights: _services_htmlHighlighting__WEBPACK_IMPORTED_MODULE_6__["findDocumentHighlights"],
41985 findDocumentLinks: _services_htmlLinks__WEBPACK_IMPORTED_MODULE_5__["findDocumentLinks"],
41986 findDocumentSymbols: _services_htmlSymbolsProvider__WEBPACK_IMPORTED_MODULE_7__["findDocumentSymbols"],
41987 getFoldingRanges: _services_htmlFolding__WEBPACK_IMPORTED_MODULE_10__["getFoldingRanges"],
41988 getSelectionRanges: _services_htmlSelectionRange__WEBPACK_IMPORTED_MODULE_11__["getSelectionRanges"],
41989 doTagComplete: htmlCompletion.doTagComplete.bind(htmlCompletion),
41990 doRename: _services_htmlRename__WEBPACK_IMPORTED_MODULE_8__["doRename"],
41991 findMatchingTagPosition: _services_htmlMatchingTagPosition__WEBPACK_IMPORTED_MODULE_9__["findMatchingTagPosition"]
41994 function newHTMLDataProvider(id, customData) {
41995 return new _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_13__["HTMLDataProvider"](id, customData);
42001 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42004 __webpack_require__.r(__webpack_exports__);
42005 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createScanner", function() { return createScanner; });
42006 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
42007 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
42008 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113);
42009 /*---------------------------------------------------------------------------------------------
42010 * Copyright (c) Microsoft Corporation. All rights reserved.
42011 * Licensed under the MIT License. See License.txt in the project root for license information.
42012 *--------------------------------------------------------------------------------------------*/
42015 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
42016 var MultiLineStream = /** @class */ (function () {
42017 function MultiLineStream(source, position) {
42018 this.source = source;
42019 this.len = source.length;
42020 this.position = position;
42022 MultiLineStream.prototype.eos = function () {
42023 return this.len <= this.position;
42025 MultiLineStream.prototype.getSource = function () {
42026 return this.source;
42028 MultiLineStream.prototype.pos = function () {
42029 return this.position;
42031 MultiLineStream.prototype.goBackTo = function (pos) {
42032 this.position = pos;
42034 MultiLineStream.prototype.goBack = function (n) {
42035 this.position -= n;
42037 MultiLineStream.prototype.advance = function (n) {
42038 this.position += n;
42040 MultiLineStream.prototype.goToEnd = function () {
42041 this.position = this.source.length;
42043 MultiLineStream.prototype.nextChar = function () {
42044 return this.source.charCodeAt(this.position++) || 0;
42046 MultiLineStream.prototype.peekChar = function (n) {
42047 if (n === void 0) { n = 0; }
42048 return this.source.charCodeAt(this.position + n) || 0;
42050 MultiLineStream.prototype.advanceIfChar = function (ch) {
42051 if (ch === this.source.charCodeAt(this.position)) {
42057 MultiLineStream.prototype.advanceIfChars = function (ch) {
42059 if (this.position + ch.length > this.source.length) {
42062 for (i = 0; i < ch.length; i++) {
42063 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
42070 MultiLineStream.prototype.advanceIfRegExp = function (regex) {
42071 var str = this.source.substr(this.position);
42072 var match = str.match(regex);
42074 this.position = this.position + match.index + match[0].length;
42079 MultiLineStream.prototype.advanceUntilRegExp = function (regex) {
42080 var str = this.source.substr(this.position);
42081 var match = str.match(regex);
42083 this.position = this.position + match.index;
42091 MultiLineStream.prototype.advanceUntilChar = function (ch) {
42092 while (this.position < this.source.length) {
42093 if (this.source.charCodeAt(this.position) === ch) {
42100 MultiLineStream.prototype.advanceUntilChars = function (ch) {
42101 while (this.position + ch.length <= this.source.length) {
42103 for (; i < ch.length && this.source.charCodeAt(this.position + i) === ch[i]; i++) {
42105 if (i === ch.length) {
42113 MultiLineStream.prototype.skipWhitespace = function () {
42114 var n = this.advanceWhileChar(function (ch) {
42115 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
42119 MultiLineStream.prototype.advanceWhileChar = function (condition) {
42120 var posNow = this.position;
42121 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
42124 return this.position - posNow;
42126 return MultiLineStream;
42128 var _BNG = '!'.charCodeAt(0);
42129 var _MIN = '-'.charCodeAt(0);
42130 var _LAN = '<'.charCodeAt(0);
42131 var _RAN = '>'.charCodeAt(0);
42132 var _FSL = '/'.charCodeAt(0);
42133 var _EQS = '='.charCodeAt(0);
42134 var _DQO = '"'.charCodeAt(0);
42135 var _SQO = '\''.charCodeAt(0);
42136 var _NWL = '\n'.charCodeAt(0);
42137 var _CAR = '\r'.charCodeAt(0);
42138 var _LFD = '\f'.charCodeAt(0);
42139 var _WSP = ' '.charCodeAt(0);
42140 var _TAB = '\t'.charCodeAt(0);
42141 var htmlScriptContents = {
42142 'text/x-handlebars-template': true
42144 function createScanner(input, initialOffset, initialState) {
42145 if (initialOffset === void 0) { initialOffset = 0; }
42146 if (initialState === void 0) { initialState = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent; }
42147 var stream = new MultiLineStream(input, initialOffset);
42148 var state = initialState;
42149 var tokenOffset = 0;
42150 var tokenType = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown;
42152 var hasSpaceAfterTag;
42154 var lastAttributeName;
42156 function nextElementName() {
42157 return stream.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase();
42159 function nextAttributeName() {
42160 return stream.advanceIfRegExp(/^[^\s"'>/=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase();
42162 function finishToken(offset, type, errorMessage) {
42164 tokenOffset = offset;
42165 tokenError = errorMessage;
42169 var offset = stream.pos();
42170 var oldState = state;
42171 var token = internalScan();
42172 if (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOS && offset === stream.pos()) {
42173 console.log('Scanner.scan has not advanced at offset ' + offset + ', state before: ' + oldState + ' after: ' + state);
42175 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown);
42179 function internalScan() {
42180 var offset = stream.pos();
42181 if (stream.eos()) {
42182 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOS);
42186 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinComment:
42187 if (stream.advanceIfChars([_MIN, _MIN, _RAN])) { // -->
42188 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42189 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndCommentTag);
42191 stream.advanceUntilChars([_MIN, _MIN, _RAN]); // -->
42192 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comment);
42193 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinDoctype:
42194 if (stream.advanceIfChar(_RAN)) {
42195 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42196 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndDoctypeTag);
42198 stream.advanceUntilChar(_RAN); // >
42199 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Doctype);
42200 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent:
42201 if (stream.advanceIfChar(_LAN)) { // <
42202 if (!stream.eos() && stream.peekChar() === _BNG) { // !
42203 if (stream.advanceIfChars([_BNG, _MIN, _MIN])) { // <!--
42204 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinComment;
42205 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartCommentTag);
42207 if (stream.advanceIfRegExp(/^!doctype/i)) {
42208 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinDoctype;
42209 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartDoctypeTag);
42212 if (stream.advanceIfChar(_FSL)) { // /
42213 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterOpeningEndTag;
42214 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndTagOpen);
42216 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterOpeningStartTag;
42217 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTagOpen);
42219 stream.advanceUntilChar(_LAN);
42220 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Content);
42221 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterOpeningEndTag:
42222 var tagName = nextElementName();
42223 if (tagName.length > 0) {
42224 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinEndTag;
42225 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndTag);
42227 if (stream.skipWhitespace()) { // white space is not valid here
42228 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace, localize('error.unexpectedWhitespace', 'Tag name must directly follow the open bracket.'));
42230 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinEndTag;
42231 stream.advanceUntilChar(_RAN);
42232 if (offset < stream.pos()) {
42233 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown, localize('error.endTagNameExpected', 'End tag name expected.'));
42235 return internalScan();
42236 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinEndTag:
42237 if (stream.skipWhitespace()) { // white space is valid here
42238 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace);
42240 if (stream.advanceIfChar(_RAN)) { // >
42241 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42242 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndTagClose);
42244 errorMessage = localize('error.tagNameExpected', 'Closing bracket expected.');
42246 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterOpeningStartTag:
42247 lastTag = nextElementName();
42248 lastTypeValue = void 0;
42249 lastAttributeName = void 0;
42250 if (lastTag.length > 0) {
42251 hasSpaceAfterTag = false;
42252 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42253 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTag);
42255 if (stream.skipWhitespace()) { // white space is not valid here
42256 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace, localize('error.unexpectedWhitespace', 'Tag name must directly follow the open bracket.'));
42258 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42259 stream.advanceUntilChar(_RAN);
42260 if (offset < stream.pos()) {
42261 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown, localize('error.startTagNameExpected', 'Start tag name expected.'));
42263 return internalScan();
42264 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag:
42265 if (stream.skipWhitespace()) {
42266 hasSpaceAfterTag = true; // remember that we have seen a whitespace
42267 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace);
42269 if (hasSpaceAfterTag) {
42270 lastAttributeName = nextAttributeName();
42271 if (lastAttributeName.length > 0) {
42272 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterAttributeName;
42273 hasSpaceAfterTag = false;
42274 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AttributeName);
42277 if (stream.advanceIfChars([_FSL, _RAN])) { // />
42278 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42279 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTagSelfClose);
42281 if (stream.advanceIfChar(_RAN)) { // >
42282 if (lastTag === 'script') {
42283 if (lastTypeValue && htmlScriptContents[lastTypeValue]) {
42285 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42288 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinScriptContent;
42291 else if (lastTag === 'style') {
42292 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinStyleContent;
42295 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42297 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTagClose);
42300 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown, localize('error.unexpectedCharacterInTag', 'Unexpected character in tag.'));
42301 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].AfterAttributeName:
42302 if (stream.skipWhitespace()) {
42303 hasSpaceAfterTag = true;
42304 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace);
42306 if (stream.advanceIfChar(_EQS)) {
42307 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].BeforeAttributeValue;
42308 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].DelimiterAssign);
42310 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42311 return internalScan(); // no advance yet - jump to WithinTag
42312 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].BeforeAttributeValue:
42313 if (stream.skipWhitespace()) {
42314 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Whitespace);
42316 var attributeValue = stream.advanceIfRegExp(/^[^\s"'`=<>]+/);
42317 if (attributeValue.length > 0) {
42318 if (stream.peekChar() === _RAN && stream.peekChar(-1) === _FSL) { // <foo bar=http://foo/>
42320 attributeValue = attributeValue.substr(0, attributeValue.length - 1);
42322 if (lastAttributeName === 'type') {
42323 lastTypeValue = attributeValue;
42325 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42326 hasSpaceAfterTag = false;
42327 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AttributeValue);
42329 var ch = stream.peekChar();
42330 if (ch === _SQO || ch === _DQO) {
42331 stream.advance(1); // consume quote
42332 if (stream.advanceUntilChar(ch)) {
42333 stream.advance(1); // consume quote
42335 if (lastAttributeName === 'type') {
42336 lastTypeValue = stream.getSource().substring(offset + 1, stream.pos() - 1);
42338 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42339 hasSpaceAfterTag = false;
42340 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].AttributeValue);
42342 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinTag;
42343 hasSpaceAfterTag = false;
42344 return internalScan(); // no advance yet - jump to WithinTag
42345 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinScriptContent:
42346 // see http://stackoverflow.com/questions/14574471/how-do-browsers-parse-a-script-tag-exactly
42347 var sciptState = 1;
42348 while (!stream.eos()) {
42349 var match = stream.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);
42350 if (match.length === 0) {
42352 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Script);
42354 else if (match === '<!--') {
42355 if (sciptState === 1) {
42359 else if (match === '-->') {
42362 else if (match[1] !== '/') { // <script
42363 if (sciptState === 2) {
42368 if (sciptState === 3) {
42372 stream.goBack(match.length); // to the beginning of the closing tag
42377 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42378 if (offset < stream.pos()) {
42379 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Script);
42381 return internalScan(); // no advance yet - jump to content
42382 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinStyleContent:
42383 stream.advanceUntilRegExp(/<\/style/i);
42384 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42385 if (offset < stream.pos()) {
42386 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Styles);
42388 return internalScan(); // no advance yet - jump to content
42391 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ScannerState"].WithinContent;
42392 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Unknown, errorMessage);
42396 getTokenType: function () { return tokenType; },
42397 getTokenOffset: function () { return tokenOffset; },
42398 getTokenLength: function () { return stream.pos() - tokenOffset; },
42399 getTokenEnd: function () { return stream.pos(); },
42400 getTokenText: function () { return stream.getSource().substring(tokenOffset, stream.pos()); },
42401 getScannerState: function () { return state; },
42402 getTokenError: function () { return tokenError; }
42409 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42412 __webpack_require__.r(__webpack_exports__);
42413 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenType", function() { return TokenType; });
42414 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScannerState", function() { return ScannerState; });
42415 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return ClientCapabilities; });
42416 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
42417 /*---------------------------------------------------------------------------------------------
42418 * Copyright (c) Microsoft Corporation. All rights reserved.
42419 * Licensed under the MIT License. See License.txt in the project root for license information.
42420 *--------------------------------------------------------------------------------------------*/
42423 (function (TokenType) {
42424 TokenType[TokenType["StartCommentTag"] = 0] = "StartCommentTag";
42425 TokenType[TokenType["Comment"] = 1] = "Comment";
42426 TokenType[TokenType["EndCommentTag"] = 2] = "EndCommentTag";
42427 TokenType[TokenType["StartTagOpen"] = 3] = "StartTagOpen";
42428 TokenType[TokenType["StartTagClose"] = 4] = "StartTagClose";
42429 TokenType[TokenType["StartTagSelfClose"] = 5] = "StartTagSelfClose";
42430 TokenType[TokenType["StartTag"] = 6] = "StartTag";
42431 TokenType[TokenType["EndTagOpen"] = 7] = "EndTagOpen";
42432 TokenType[TokenType["EndTagClose"] = 8] = "EndTagClose";
42433 TokenType[TokenType["EndTag"] = 9] = "EndTag";
42434 TokenType[TokenType["DelimiterAssign"] = 10] = "DelimiterAssign";
42435 TokenType[TokenType["AttributeName"] = 11] = "AttributeName";
42436 TokenType[TokenType["AttributeValue"] = 12] = "AttributeValue";
42437 TokenType[TokenType["StartDoctypeTag"] = 13] = "StartDoctypeTag";
42438 TokenType[TokenType["Doctype"] = 14] = "Doctype";
42439 TokenType[TokenType["EndDoctypeTag"] = 15] = "EndDoctypeTag";
42440 TokenType[TokenType["Content"] = 16] = "Content";
42441 TokenType[TokenType["Whitespace"] = 17] = "Whitespace";
42442 TokenType[TokenType["Unknown"] = 18] = "Unknown";
42443 TokenType[TokenType["Script"] = 19] = "Script";
42444 TokenType[TokenType["Styles"] = 20] = "Styles";
42445 TokenType[TokenType["EOS"] = 21] = "EOS";
42446 })(TokenType || (TokenType = {}));
42448 (function (ScannerState) {
42449 ScannerState[ScannerState["WithinContent"] = 0] = "WithinContent";
42450 ScannerState[ScannerState["AfterOpeningStartTag"] = 1] = "AfterOpeningStartTag";
42451 ScannerState[ScannerState["AfterOpeningEndTag"] = 2] = "AfterOpeningEndTag";
42452 ScannerState[ScannerState["WithinDoctype"] = 3] = "WithinDoctype";
42453 ScannerState[ScannerState["WithinTag"] = 4] = "WithinTag";
42454 ScannerState[ScannerState["WithinEndTag"] = 5] = "WithinEndTag";
42455 ScannerState[ScannerState["WithinComment"] = 6] = "WithinComment";
42456 ScannerState[ScannerState["WithinScriptContent"] = 7] = "WithinScriptContent";
42457 ScannerState[ScannerState["WithinStyleContent"] = 8] = "WithinStyleContent";
42458 ScannerState[ScannerState["AfterAttributeName"] = 9] = "AfterAttributeName";
42459 ScannerState[ScannerState["BeforeAttributeValue"] = 10] = "BeforeAttributeValue";
42460 })(ScannerState || (ScannerState = {}));
42461 var ClientCapabilities;
42462 (function (ClientCapabilities) {
42463 ClientCapabilities.LATEST = {
42467 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
42471 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
42475 })(ClientCapabilities || (ClientCapabilities = {}));
42480 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42483 __webpack_require__.r(__webpack_exports__);
42484 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; });
42485 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
42486 /* harmony import */ var _htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
42487 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(115);
42488 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
42489 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116);
42490 /*---------------------------------------------------------------------------------------------
42491 * Copyright (c) Microsoft Corporation. All rights reserved.
42492 * Licensed under the MIT License. See License.txt in the project root for license information.
42493 *--------------------------------------------------------------------------------------------*/
42498 var Node = /** @class */ (function () {
42499 function Node(start, end, children, parent) {
42500 this.start = start;
42502 this.children = children;
42503 this.parent = parent;
42504 this.closed = false;
42506 Object.defineProperty(Node.prototype, "attributeNames", {
42507 get: function () { return this.attributes ? Object.keys(this.attributes) : []; },
42511 Node.prototype.isSameTag = function (tagInLowerCase) {
42512 return this.tag && tagInLowerCase && this.tag.length === tagInLowerCase.length && this.tag.toLowerCase() === tagInLowerCase;
42514 Object.defineProperty(Node.prototype, "firstChild", {
42515 get: function () { return this.children[0]; },
42519 Object.defineProperty(Node.prototype, "lastChild", {
42520 get: function () { return this.children.length ? this.children[this.children.length - 1] : void 0; },
42524 Node.prototype.findNodeBefore = function (offset) {
42525 var idx = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_1__["findFirst"])(this.children, function (c) { return offset <= c.start; }) - 1;
42527 var child = this.children[idx];
42528 if (offset > child.start) {
42529 if (offset < child.end) {
42530 return child.findNodeBefore(offset);
42532 var lastChild = child.lastChild;
42533 if (lastChild && lastChild.end === child.end) {
42534 return child.findNodeBefore(offset);
42541 Node.prototype.findNodeAt = function (offset) {
42542 var idx = Object(_utils_arrays__WEBPACK_IMPORTED_MODULE_1__["findFirst"])(this.children, function (c) { return offset <= c.start; }) - 1;
42544 var child = this.children[idx];
42545 if (offset > child.start && offset <= child.end) {
42546 return child.findNodeAt(offset);
42554 function parse(text) {
42555 var scanner = Object(_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(text);
42556 var htmlDocument = new Node(0, text.length, [], void 0);
42557 var curr = htmlDocument;
42558 var endTagStart = -1;
42559 var endTagName = null;
42560 var pendingAttribute = null;
42561 var token = scanner.scan();
42562 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS) {
42564 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagOpen:
42565 var child = new Node(scanner.getTokenOffset(), text.length, [], curr);
42566 curr.children.push(child);
42569 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag:
42570 curr.tag = scanner.getTokenText();
42572 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagClose:
42573 curr.end = scanner.getTokenEnd(); // might be later set to end tag position
42574 curr.startTagEnd = scanner.getTokenEnd();
42575 if (curr.tag && Object(_languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__["isVoidElement"])(curr.tag) && curr.parent) {
42576 curr.closed = true;
42577 curr = curr.parent;
42580 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagSelfClose:
42582 curr.closed = true;
42583 curr.end = scanner.getTokenEnd();
42584 curr.startTagEnd = scanner.getTokenEnd();
42585 curr = curr.parent;
42588 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTagOpen:
42589 endTagStart = scanner.getTokenOffset();
42592 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTag:
42593 endTagName = scanner.getTokenText().toLowerCase();
42595 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTagClose:
42598 // see if we can find a matching tag
42599 while (!node.isSameTag(endTagName) && node.parent) {
42600 node = node.parent;
42603 while (curr !== node) {
42604 curr.end = endTagStart;
42605 curr.closed = false;
42606 curr = curr.parent;
42608 curr.closed = true;
42609 curr.endTagStart = endTagStart;
42610 curr.end = scanner.getTokenEnd();
42611 curr = curr.parent;
42615 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeName: {
42616 pendingAttribute = scanner.getTokenText();
42617 var attributes = curr.attributes;
42619 curr.attributes = attributes = {};
42621 attributes[pendingAttribute] = null; // Support valueless attributes such as 'checked'
42624 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeValue: {
42625 var value = scanner.getTokenText();
42626 var attributes = curr.attributes;
42627 if (attributes && pendingAttribute) {
42628 attributes[pendingAttribute] = value;
42629 pendingAttribute = null;
42634 token = scanner.scan();
42636 while (curr.parent) {
42637 curr.end = text.length;
42638 curr.closed = false;
42639 curr = curr.parent;
42642 roots: htmlDocument.children,
42643 findNodeBefore: htmlDocument.findNodeBefore.bind(htmlDocument),
42644 findNodeAt: htmlDocument.findNodeAt.bind(htmlDocument)
42651 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42654 __webpack_require__.r(__webpack_exports__);
42655 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findFirst", function() { return findFirst; });
42656 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binarySearch", function() { return binarySearch; });
42657 /*---------------------------------------------------------------------------------------------
42658 * Copyright (c) Microsoft Corporation. All rights reserved.
42659 * Licensed under the MIT License. See License.txt in the project root for license information.
42660 *--------------------------------------------------------------------------------------------*/
42662 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
42663 * are located before all elements where p(x) is true.
42664 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
42666 function findFirst(array, p) {
42667 var low = 0, high = array.length;
42669 return 0; // no children
42671 while (low < high) {
42672 var mid = Math.floor((low + high) / 2);
42673 if (p(array[mid])) {
42682 function binarySearch(array, key, comparator) {
42683 var low = 0, high = array.length - 1;
42684 while (low <= high) {
42685 var mid = ((low + high) / 2) | 0;
42686 var comp = comparator(array[mid], key);
42690 else if (comp > 0) {
42703 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42706 __webpack_require__.r(__webpack_exports__);
42707 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VOID_ELEMENTS", function() { return VOID_ELEMENTS; });
42708 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVoidElement", function() { return isVoidElement; });
42709 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(115);
42710 /*---------------------------------------------------------------------------------------------
42711 * Copyright (c) Microsoft Corporation. All rights reserved.
42712 * Licensed under the MIT License. See License.txt in the project root for license information.
42713 *--------------------------------------------------------------------------------------------*/
42715 // As defined in https://www.w3.org/TR/html5/syntax.html#void-elements
42716 var VOID_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
42717 function isVoidElement(e) {
42718 return !!e && _utils_arrays__WEBPACK_IMPORTED_MODULE_0__["binarySearch"](VOID_ELEMENTS, e.toLowerCase(), function (s1, s2) { return s1.localeCompare(s2); }) >= 0;
42724 /***/ (function(module, __webpack_exports__, __webpack_require__) {
42727 __webpack_require__.r(__webpack_exports__);
42728 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTMLCompletion", function() { return HTMLCompletion; });
42729 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
42730 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(112);
42731 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
42732 /* harmony import */ var _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(118);
42733 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77);
42734 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_4__);
42735 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(119);
42736 /* harmony import */ var _languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(120);
42737 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(116);
42738 /* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(124);
42739 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(121);
42740 /*---------------------------------------------------------------------------------------------
42741 * Copyright (c) Microsoft Corporation. All rights reserved.
42742 * Licensed under the MIT License. See License.txt in the project root for license information.
42743 *--------------------------------------------------------------------------------------------*/
42754 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__["loadMessageBundle"]();
42755 var HTMLCompletion = /** @class */ (function () {
42756 function HTMLCompletion(clientCapabilities) {
42757 this.clientCapabilities = clientCapabilities;
42758 this.completionParticipants = [];
42760 HTMLCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
42761 this.completionParticipants = registeredCompletionParticipants || [];
42763 HTMLCompletion.prototype.doComplete = function (document, position, htmlDocument, settings) {
42764 var result = this._doComplete(document, position, htmlDocument, settings);
42765 return this.convertCompletionList(result);
42767 HTMLCompletion.prototype._doComplete = function (document, position, htmlDocument, settings) {
42769 isIncomplete: false,
42772 var completionParticipants = this.completionParticipants;
42773 var dataProviders = Object(_languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_6__["getAllDataProviders"])().filter(function (p) { return p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false); });
42774 var doesSupportMarkdown = this.doesSupportMarkdown();
42775 var text = document.getText();
42776 var offset = document.offsetAt(position);
42777 var node = htmlDocument.findNodeBefore(offset);
42781 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(text, node.start);
42782 var currentTag = '';
42783 var currentAttributeName;
42784 function getReplaceRange(replaceStart, replaceEnd) {
42785 if (replaceEnd === void 0) { replaceEnd = offset; }
42786 if (replaceStart > offset) {
42787 replaceStart = offset;
42789 return { start: document.positionAt(replaceStart), end: document.positionAt(replaceEnd) };
42791 function collectOpenTagSuggestions(afterOpenBracket, tagNameEnd) {
42792 var range = getReplaceRange(afterOpenBracket, tagNameEnd);
42793 dataProviders.forEach(function (provider) {
42794 provider.provideTags().forEach(function (tag) {
42795 result.items.push({
42797 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Property,
42798 documentation: Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_9__["generateDocumentation"])(tag, doesSupportMarkdown),
42799 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, tag.name),
42800 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
42806 function getLineIndent(offset) {
42807 var start = offset;
42808 while (start > 0) {
42809 var ch = text.charAt(start - 1);
42810 if ("\n\r".indexOf(ch) >= 0) {
42811 return text.substring(start, offset);
42813 if (!isWhiteSpace(ch)) {
42818 return text.substring(0, offset);
42820 function collectCloseTagSuggestions(afterOpenBracket, inOpenTag, tagNameEnd) {
42821 if (tagNameEnd === void 0) { tagNameEnd = offset; }
42822 var range = getReplaceRange(afterOpenBracket, tagNameEnd);
42823 var closeTag = isFollowedBy(text, tagNameEnd, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].WithinEndTag, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTagClose) ? '' : '>';
42826 curr = curr.parent; // don't suggest the own tag, it's not yet open
42829 var tag = curr.tag;
42830 if (tag && (!curr.closed || curr.endTagStart && (curr.endTagStart > offset))) {
42833 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Property,
42834 filterText: '/' + tag,
42835 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, '/' + tag + closeTag),
42836 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
42838 var startIndent = getLineIndent(curr.start);
42839 var endIndent = getLineIndent(afterOpenBracket - 1);
42840 if (startIndent !== null && endIndent !== null && startIndent !== endIndent) {
42841 var insertText = startIndent + '</' + tag + closeTag;
42842 item.textEdit = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText);
42843 item.filterText = endIndent + '</' + tag;
42845 result.items.push(item);
42848 curr = curr.parent;
42853 dataProviders.forEach(function (provider) {
42854 provider.provideTags().forEach(function (tag) {
42855 result.items.push({
42856 label: '/' + tag.name,
42857 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Property,
42858 documentation: Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_9__["generateDocumentation"])(tag, doesSupportMarkdown),
42859 filterText: '/' + tag + closeTag,
42860 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, '/' + tag + closeTag),
42861 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
42867 function collectAutoCloseTagSuggestion(tagCloseEnd, tag) {
42868 if (settings && settings.hideAutoCompleteProposals) {
42871 if (!Object(_languageFacts_fact__WEBPACK_IMPORTED_MODULE_7__["isVoidElement"])(tag)) {
42872 var pos = document.positionAt(tagCloseEnd);
42873 result.items.push({
42874 label: '</' + tag + '>',
42875 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Property,
42876 filterText: '</' + tag + '>',
42877 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].insert(pos, '$0</' + tag + '>'),
42878 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].Snippet
42883 function collectTagSuggestions(tagStart, tagEnd) {
42884 collectOpenTagSuggestions(tagStart, tagEnd);
42885 collectCloseTagSuggestions(tagStart, true, tagEnd);
42888 function collectAttributeNameSuggestions(nameStart, nameEnd) {
42889 if (nameEnd === void 0) { nameEnd = offset; }
42890 var replaceEnd = offset;
42891 while (replaceEnd < nameEnd && text[replaceEnd] !== '<') { // < is a valid attribute name character, but we rather assume the attribute name ends. See #23236.
42894 var range = getReplaceRange(nameStart, replaceEnd);
42895 var value = isFollowedBy(text, nameEnd, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].AfterAttributeName, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].DelimiterAssign) ? '' : '="$1"';
42896 var tag = currentTag.toLowerCase();
42897 var seenAttributes = Object.create(null);
42898 dataProviders.forEach(function (provider) {
42899 provider.provideAttributes(tag).forEach(function (attr) {
42900 if (seenAttributes[attr.name]) {
42903 seenAttributes[attr.name] = true;
42904 var codeSnippet = attr.name;
42906 if (attr.valueSet !== 'v' && value.length) {
42907 codeSnippet = codeSnippet + value;
42908 if (attr.valueSet || attr.name === 'style') {
42911 command: 'editor.action.triggerSuggest'
42915 result.items.push({
42917 kind: attr.valueSet === 'handler' ? vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Function : vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Value,
42918 documentation: Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_9__["generateDocumentation"])(attr, doesSupportMarkdown),
42919 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, codeSnippet),
42920 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].Snippet,
42925 collectDataAttributesSuggestions(range, seenAttributes);
42928 function collectDataAttributesSuggestions(range, seenAttributes) {
42929 var dataAttr = 'data-';
42930 var dataAttributes = {};
42931 dataAttributes[dataAttr] = dataAttr + "$1=\"$2\"";
42932 function addNodeDataAttributes(node) {
42933 node.attributeNames.forEach(function (attr) {
42934 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["startsWith"])(attr, dataAttr) && !dataAttributes[attr] && !seenAttributes[attr]) {
42935 dataAttributes[attr] = attr + '="$1"';
42938 node.children.forEach(function (child) { return addNodeDataAttributes(child); });
42940 if (htmlDocument) {
42941 htmlDocument.roots.forEach(function (root) { return addNodeDataAttributes(root); });
42943 Object.keys(dataAttributes).forEach(function (attr) { return result.items.push({
42945 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Value,
42946 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, dataAttributes[attr]),
42947 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].Snippet
42950 function collectAttributeValueSuggestions(valueStart, valueEnd) {
42951 if (valueEnd === void 0) { valueEnd = offset; }
42955 if (offset > valueStart && offset <= valueEnd && isQuote(text[valueStart])) {
42956 // inside quoted attribute
42957 var valueContentStart = valueStart + 1;
42958 var valueContentEnd = valueEnd;
42959 // valueEnd points to the char after quote, which encloses the replace range
42960 if (valueEnd > valueStart && text[valueEnd - 1] === text[valueStart]) {
42963 var wsBefore = getWordStart(text, offset, valueContentStart);
42964 var wsAfter = getWordEnd(text, offset, valueContentEnd);
42965 range = getReplaceRange(wsBefore, wsAfter);
42966 valuePrefix = offset >= valueContentStart && offset <= valueContentEnd ? text.substring(valueContentStart, offset) : '';
42970 range = getReplaceRange(valueStart, valueEnd);
42971 valuePrefix = text.substring(valueStart, offset);
42974 var tag = currentTag.toLowerCase();
42975 var attribute = currentAttributeName.toLowerCase();
42976 if (completionParticipants.length > 0) {
42977 var fullRange = getReplaceRange(valueStart, valueEnd);
42978 for (var _i = 0, completionParticipants_1 = completionParticipants; _i < completionParticipants_1.length; _i++) {
42979 var participant = completionParticipants_1[_i];
42980 if (participant.onHtmlAttributeValue) {
42981 participant.onHtmlAttributeValue({ document: document, position: position, tag: tag, attribute: attribute, value: valuePrefix, range: fullRange });
42985 dataProviders.forEach(function (provider) {
42986 provider.provideValues(tag, attribute).forEach(function (value) {
42987 var insertText = addQuotes ? '"' + value.name + '"' : value.name;
42988 result.items.push({
42990 filterText: insertText,
42991 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Unit,
42992 documentation: Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_9__["generateDocumentation"])(value, doesSupportMarkdown),
42993 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, insertText),
42994 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
42998 collectCharacterEntityProposals();
43001 function scanNextForEndPos(nextToken) {
43002 if (offset === scanner.getTokenEnd()) {
43003 token = scanner.scan();
43004 if (token === nextToken && scanner.getTokenOffset() === offset) {
43005 return scanner.getTokenEnd();
43010 function collectInsideContent() {
43011 for (var _i = 0, completionParticipants_2 = completionParticipants; _i < completionParticipants_2.length; _i++) {
43012 var participant = completionParticipants_2[_i];
43013 if (participant.onHtmlContent) {
43014 participant.onHtmlContent({ document: document, position: position });
43017 return collectCharacterEntityProposals();
43019 function collectCharacterEntityProposals() {
43020 // character entities
43021 var k = offset - 1;
43022 var characterStart = position.character;
43023 while (k >= 0 && Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["isLetterOrDigit"])(text, k)) {
43027 if (k >= 0 && text[k] === '&') {
43028 var range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"].create(position.line, characterStart - 1), position);
43029 for (var entity in _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_3__["entities"]) {
43030 if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_5__["endsWith"])(entity, ';')) {
43031 var label = '&' + entity;
43032 result.items.push({
43034 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Keyword,
43035 documentation: localize('entity.propose', "Character entity representing '" + _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_3__["entities"][entity] + "'"),
43036 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, label),
43037 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
43044 function suggestDoctype(replaceStart, replaceEnd) {
43045 var range = getReplaceRange(replaceStart, replaceEnd);
43046 result.items.push({
43048 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"].Property,
43049 documentation: 'A preamble for an HTML document.',
43050 textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(range, '!DOCTYPE html>'),
43051 insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"].PlainText
43054 var token = scanner.scan();
43055 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && scanner.getTokenOffset() <= offset) {
43057 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagOpen:
43058 if (scanner.getTokenEnd() === offset) {
43059 var endPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag);
43060 if (position.line === 0) {
43061 suggestDoctype(offset, endPos);
43063 return collectTagSuggestions(offset, endPos);
43066 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag:
43067 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
43068 return collectOpenTagSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
43070 currentTag = scanner.getTokenText();
43072 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeName:
43073 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
43074 return collectAttributeNameSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
43076 currentAttributeName = scanner.getTokenText();
43078 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].DelimiterAssign:
43079 if (scanner.getTokenEnd() === offset) {
43080 var endPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeValue);
43081 return collectAttributeValueSuggestions(offset, endPos);
43084 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeValue:
43085 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
43086 return collectAttributeValueSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
43089 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].Whitespace:
43090 if (offset <= scanner.getTokenEnd()) {
43091 switch (scanner.getScannerState()) {
43092 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].AfterOpeningStartTag:
43093 var startPos = scanner.getTokenOffset();
43094 var endTagPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag);
43095 return collectTagSuggestions(startPos, endTagPos);
43096 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].WithinTag:
43097 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].AfterAttributeName:
43098 return collectAttributeNameSuggestions(scanner.getTokenEnd());
43099 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].BeforeAttributeValue:
43100 return collectAttributeValueSuggestions(scanner.getTokenEnd());
43101 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].AfterOpeningEndTag:
43102 return collectCloseTagSuggestions(scanner.getTokenOffset() - 1, false);
43103 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ScannerState"].WithinContent:
43104 return collectInsideContent();
43108 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTagOpen:
43109 if (offset <= scanner.getTokenEnd()) {
43110 var afterOpenBracket = scanner.getTokenOffset() + 1;
43111 var endOffset = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTag);
43112 return collectCloseTagSuggestions(afterOpenBracket, false, endOffset);
43115 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTag:
43116 if (offset <= scanner.getTokenEnd()) {
43117 var start = scanner.getTokenOffset() - 1;
43118 while (start >= 0) {
43119 var ch = text.charAt(start);
43121 return collectCloseTagSuggestions(start, false, scanner.getTokenEnd());
43123 else if (!isWhiteSpace(ch)) {
43130 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagClose:
43131 if (offset <= scanner.getTokenEnd()) {
43133 return collectAutoCloseTagSuggestion(scanner.getTokenEnd(), currentTag);
43137 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].Content:
43138 if (offset <= scanner.getTokenEnd()) {
43139 return collectInsideContent();
43143 if (offset <= scanner.getTokenEnd()) {
43148 token = scanner.scan();
43152 HTMLCompletion.prototype.doTagComplete = function (document, position, htmlDocument) {
43153 var offset = document.offsetAt(position);
43157 var char = document.getText().charAt(offset - 1);
43158 if (char === '>') {
43159 var node = htmlDocument.findNodeBefore(offset);
43160 if (node && node.tag && !Object(_languageFacts_fact__WEBPACK_IMPORTED_MODULE_7__["isVoidElement"])(node.tag) && node.start < offset && (!node.endTagStart || node.endTagStart > offset)) {
43161 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(document.getText(), node.start);
43162 var token = scanner.scan();
43163 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && scanner.getTokenEnd() <= offset) {
43164 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTagClose && scanner.getTokenEnd() === offset) {
43165 return "$0</" + node.tag + ">";
43167 token = scanner.scan();
43171 else if (char === '/') {
43172 var node = htmlDocument.findNodeBefore(offset);
43173 while (node && node.closed) {
43174 node = node.parent;
43176 if (node && node.tag) {
43177 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(document.getText(), node.start);
43178 var token = scanner.scan();
43179 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && scanner.getTokenEnd() <= offset) {
43180 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTagOpen && scanner.getTokenEnd() === offset) {
43181 return node.tag + ">";
43183 token = scanner.scan();
43189 HTMLCompletion.prototype.convertCompletionList = function (list) {
43190 if (!this.doesSupportMarkdown()) {
43191 list.items.forEach(function (item) {
43192 if (item.documentation && typeof item.documentation !== 'string') {
43193 item.documentation = {
43195 value: item.documentation.value
43202 HTMLCompletion.prototype.doesSupportMarkdown = function () {
43203 if (!Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["isDefined"])(this.supportsMarkdown)) {
43204 if (!Object(_utils_object__WEBPACK_IMPORTED_MODULE_8__["isDefined"])(this.clientCapabilities)) {
43205 this.supportsMarkdown = true;
43206 return this.supportsMarkdown;
43208 var hover = this.clientCapabilities && this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
43209 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown) !== -1;
43211 return this.supportsMarkdown;
43213 return HTMLCompletion;
43216 function isQuote(s) {
43217 return /^["']*$/.test(s);
43219 function isWhiteSpace(s) {
43220 return /^\s*$/.test(s);
43222 function isFollowedBy(s, offset, intialState, expectedToken) {
43223 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(s, offset, intialState);
43224 var token = scanner.scan();
43225 while (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].Whitespace) {
43226 token = scanner.scan();
43228 return token === expectedToken;
43230 function getWordStart(s, offset, limit) {
43231 while (offset > limit && !isWhiteSpace(s[offset - 1])) {
43236 function getWordEnd(s, offset, limit) {
43237 while (offset < limit && !isWhiteSpace(s[offset])) {
43246 /***/ (function(module, __webpack_exports__, __webpack_require__) {
43249 __webpack_require__.r(__webpack_exports__);
43250 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "entities", function() { return entities; });
43251 /*---------------------------------------------------------------------------------------------
43252 * Copyright (c) Microsoft Corporation. All rights reserved.
43253 * Licensed under the MIT License. See License.txt in the project root for license information.
43254 *--------------------------------------------------------------------------------------------*/
43256 * HTML 5 character entities
43257 * https://www.w3.org/TR/html5/syntax.html#named-character-references
43260 "Aacute;": "\u00C1",
43261 "Aacute": "\u00C1",
43262 "aacute;": "\u00E1",
43263 "aacute": "\u00E1",
43264 "Abreve;": "\u0102",
43265 "abreve;": "\u0103",
43268 "acE;": "\u223E\u0333",
43269 "Acirc;": "\u00C2",
43271 "acirc;": "\u00E2",
43273 "acute;": "\u00B4",
43277 "AElig;": "\u00C6",
43279 "aelig;": "\u00E6",
43282 "Afr;": "\uD835\uDD04",
43283 "afr;": "\uD835\uDD1E",
43284 "Agrave;": "\u00C0",
43285 "Agrave": "\u00C0",
43286 "agrave;": "\u00E0",
43287 "agrave": "\u00E0",
43288 "alefsym;": "\u2135",
43289 "aleph;": "\u2135",
43290 "Alpha;": "\u0391",
43291 "alpha;": "\u03B1",
43292 "Amacr;": "\u0100",
43293 "amacr;": "\u0101",
43294 "amalg;": "\u2A3F",
43301 "andand;": "\u2A55",
43303 "andslope;": "\u2A58",
43307 "angle;": "\u2220",
43308 "angmsd;": "\u2221",
43309 "angmsdaa;": "\u29A8",
43310 "angmsdab;": "\u29A9",
43311 "angmsdac;": "\u29AA",
43312 "angmsdad;": "\u29AB",
43313 "angmsdae;": "\u29AC",
43314 "angmsdaf;": "\u29AD",
43315 "angmsdag;": "\u29AE",
43316 "angmsdah;": "\u29AF",
43317 "angrt;": "\u221F",
43318 "angrtvb;": "\u22BE",
43319 "angrtvbd;": "\u299D",
43320 "angsph;": "\u2222",
43321 "angst;": "\u00C5",
43322 "angzarr;": "\u237C",
43323 "Aogon;": "\u0104",
43324 "aogon;": "\u0105",
43325 "Aopf;": "\uD835\uDD38",
43326 "aopf;": "\uD835\uDD52",
43328 "apacir;": "\u2A6F",
43333 "ApplyFunction;": "\u2061",
43334 "approx;": "\u2248",
43335 "approxeq;": "\u224A",
43336 "Aring;": "\u00C5",
43338 "aring;": "\u00E5",
43340 "Ascr;": "\uD835\uDC9C",
43341 "ascr;": "\uD835\uDCB6",
43342 "Assign;": "\u2254",
43344 "asymp;": "\u2248",
43345 "asympeq;": "\u224D",
43346 "Atilde;": "\u00C3",
43347 "Atilde": "\u00C3",
43348 "atilde;": "\u00E3",
43349 "atilde": "\u00E3",
43354 "awconint;": "\u2233",
43355 "awint;": "\u2A11",
43356 "backcong;": "\u224C",
43357 "backepsilon;": "\u03F6",
43358 "backprime;": "\u2035",
43359 "backsim;": "\u223D",
43360 "backsimeq;": "\u22CD",
43361 "Backslash;": "\u2216",
43363 "barvee;": "\u22BD",
43364 "Barwed;": "\u2306",
43365 "barwed;": "\u2305",
43366 "barwedge;": "\u2305",
43368 "bbrktbrk;": "\u23B6",
43369 "bcong;": "\u224C",
43372 "bdquo;": "\u201E",
43373 "becaus;": "\u2235",
43374 "Because;": "\u2235",
43375 "because;": "\u2235",
43376 "bemptyv;": "\u29B0",
43377 "bepsi;": "\u03F6",
43378 "bernou;": "\u212C",
43379 "Bernoullis;": "\u212C",
43383 "between;": "\u226C",
43384 "Bfr;": "\uD835\uDD05",
43385 "bfr;": "\uD835\uDD1F",
43386 "bigcap;": "\u22C2",
43387 "bigcirc;": "\u25EF",
43388 "bigcup;": "\u22C3",
43389 "bigodot;": "\u2A00",
43390 "bigoplus;": "\u2A01",
43391 "bigotimes;": "\u2A02",
43392 "bigsqcup;": "\u2A06",
43393 "bigstar;": "\u2605",
43394 "bigtriangledown;": "\u25BD",
43395 "bigtriangleup;": "\u25B3",
43396 "biguplus;": "\u2A04",
43397 "bigvee;": "\u22C1",
43398 "bigwedge;": "\u22C0",
43399 "bkarow;": "\u290D",
43400 "blacklozenge;": "\u29EB",
43401 "blacksquare;": "\u25AA",
43402 "blacktriangle;": "\u25B4",
43403 "blacktriangledown;": "\u25BE",
43404 "blacktriangleleft;": "\u25C2",
43405 "blacktriangleright;": "\u25B8",
43406 "blank;": "\u2423",
43407 "blk12;": "\u2592",
43408 "blk14;": "\u2591",
43409 "blk34;": "\u2593",
43410 "block;": "\u2588",
43411 "bne;": "\u003D\u20E5",
43412 "bnequiv;": "\u2261\u20E5",
43415 "Bopf;": "\uD835\uDD39",
43416 "bopf;": "\uD835\uDD53",
43418 "bottom;": "\u22A5",
43419 "bowtie;": "\u22C8",
43420 "boxbox;": "\u29C9",
43421 "boxDL;": "\u2557",
43422 "boxDl;": "\u2556",
43423 "boxdL;": "\u2555",
43424 "boxdl;": "\u2510",
43425 "boxDR;": "\u2554",
43426 "boxDr;": "\u2553",
43427 "boxdR;": "\u2552",
43428 "boxdr;": "\u250C",
43431 "boxHD;": "\u2566",
43432 "boxHd;": "\u2564",
43433 "boxhD;": "\u2565",
43434 "boxhd;": "\u252C",
43435 "boxHU;": "\u2569",
43436 "boxHu;": "\u2567",
43437 "boxhU;": "\u2568",
43438 "boxhu;": "\u2534",
43439 "boxminus;": "\u229F",
43440 "boxplus;": "\u229E",
43441 "boxtimes;": "\u22A0",
43442 "boxUL;": "\u255D",
43443 "boxUl;": "\u255C",
43444 "boxuL;": "\u255B",
43445 "boxul;": "\u2518",
43446 "boxUR;": "\u255A",
43447 "boxUr;": "\u2559",
43448 "boxuR;": "\u2558",
43449 "boxur;": "\u2514",
43452 "boxVH;": "\u256C",
43453 "boxVh;": "\u256B",
43454 "boxvH;": "\u256A",
43455 "boxvh;": "\u253C",
43456 "boxVL;": "\u2563",
43457 "boxVl;": "\u2562",
43458 "boxvL;": "\u2561",
43459 "boxvl;": "\u2524",
43460 "boxVR;": "\u2560",
43461 "boxVr;": "\u255F",
43462 "boxvR;": "\u255E",
43463 "boxvr;": "\u251C",
43464 "bprime;": "\u2035",
43465 "Breve;": "\u02D8",
43466 "breve;": "\u02D8",
43467 "brvbar;": "\u00A6",
43468 "brvbar": "\u00A6",
43470 "bscr;": "\uD835\uDCB7",
43471 "bsemi;": "\u204F",
43473 "bsime;": "\u22CD",
43475 "bsolb;": "\u29C5",
43476 "bsolhsub;": "\u27C8",
43478 "bullet;": "\u2022",
43480 "bumpE;": "\u2AAE",
43481 "bumpe;": "\u224F",
43482 "Bumpeq;": "\u224E",
43483 "bumpeq;": "\u224F",
43484 "Cacute;": "\u0106",
43485 "cacute;": "\u0107",
43488 "capand;": "\u2A44",
43489 "capbrcup;": "\u2A49",
43490 "capcap;": "\u2A4B",
43491 "capcup;": "\u2A47",
43492 "capdot;": "\u2A40",
43493 "CapitalDifferentialD;": "\u2145",
43494 "caps;": "\u2229\uFE00",
43495 "caret;": "\u2041",
43496 "caron;": "\u02C7",
43497 "Cayleys;": "\u212D",
43498 "ccaps;": "\u2A4D",
43499 "Ccaron;": "\u010C",
43500 "ccaron;": "\u010D",
43501 "Ccedil;": "\u00C7",
43502 "Ccedil": "\u00C7",
43503 "ccedil;": "\u00E7",
43504 "ccedil": "\u00E7",
43505 "Ccirc;": "\u0108",
43506 "ccirc;": "\u0109",
43507 "Cconint;": "\u2230",
43508 "ccups;": "\u2A4C",
43509 "ccupssm;": "\u2A50",
43512 "cedil;": "\u00B8",
43514 "Cedilla;": "\u00B8",
43515 "cemptyv;": "\u29B2",
43518 "CenterDot;": "\u00B7",
43519 "centerdot;": "\u00B7",
43521 "cfr;": "\uD835\uDD20",
43524 "check;": "\u2713",
43525 "checkmark;": "\u2713",
43530 "circeq;": "\u2257",
43531 "circlearrowleft;": "\u21BA",
43532 "circlearrowright;": "\u21BB",
43533 "circledast;": "\u229B",
43534 "circledcirc;": "\u229A",
43535 "circleddash;": "\u229D",
43536 "CircleDot;": "\u2299",
43537 "circledR;": "\u00AE",
43538 "circledS;": "\u24C8",
43539 "CircleMinus;": "\u2296",
43540 "CirclePlus;": "\u2295",
43541 "CircleTimes;": "\u2297",
43544 "cirfnint;": "\u2A10",
43545 "cirmid;": "\u2AEF",
43546 "cirscir;": "\u29C2",
43547 "ClockwiseContourIntegral;": "\u2232",
43548 "CloseCurlyDoubleQuote;": "\u201D",
43549 "CloseCurlyQuote;": "\u2019",
43550 "clubs;": "\u2663",
43551 "clubsuit;": "\u2663",
43552 "Colon;": "\u2237",
43553 "colon;": "\u003A",
43554 "Colone;": "\u2A74",
43555 "colone;": "\u2254",
43556 "coloneq;": "\u2254",
43557 "comma;": "\u002C",
43558 "commat;": "\u0040",
43560 "compfn;": "\u2218",
43561 "complement;": "\u2201",
43562 "complexes;": "\u2102",
43564 "congdot;": "\u2A6D",
43565 "Congruent;": "\u2261",
43566 "Conint;": "\u222F",
43567 "conint;": "\u222E",
43568 "ContourIntegral;": "\u222E",
43570 "copf;": "\uD835\uDD54",
43571 "coprod;": "\u2210",
43572 "Coproduct;": "\u2210",
43577 "copysr;": "\u2117",
43578 "CounterClockwiseContourIntegral;": "\u2233",
43579 "crarr;": "\u21B5",
43580 "Cross;": "\u2A2F",
43581 "cross;": "\u2717",
43582 "Cscr;": "\uD835\uDC9E",
43583 "cscr;": "\uD835\uDCB8",
43585 "csube;": "\u2AD1",
43587 "csupe;": "\u2AD2",
43588 "ctdot;": "\u22EF",
43589 "cudarrl;": "\u2938",
43590 "cudarrr;": "\u2935",
43591 "cuepr;": "\u22DE",
43592 "cuesc;": "\u22DF",
43593 "cularr;": "\u21B6",
43594 "cularrp;": "\u293D",
43597 "cupbrcap;": "\u2A48",
43598 "CupCap;": "\u224D",
43599 "cupcap;": "\u2A46",
43600 "cupcup;": "\u2A4A",
43601 "cupdot;": "\u228D",
43602 "cupor;": "\u2A45",
43603 "cups;": "\u222A\uFE00",
43604 "curarr;": "\u21B7",
43605 "curarrm;": "\u293C",
43606 "curlyeqprec;": "\u22DE",
43607 "curlyeqsucc;": "\u22DF",
43608 "curlyvee;": "\u22CE",
43609 "curlywedge;": "\u22CF",
43610 "curren;": "\u00A4",
43611 "curren": "\u00A4",
43612 "curvearrowleft;": "\u21B6",
43613 "curvearrowright;": "\u21B7",
43614 "cuvee;": "\u22CE",
43615 "cuwed;": "\u22CF",
43616 "cwconint;": "\u2232",
43617 "cwint;": "\u2231",
43618 "cylcty;": "\u232D",
43619 "Dagger;": "\u2021",
43620 "dagger;": "\u2020",
43621 "daleth;": "\u2138",
43626 "Dashv;": "\u2AE4",
43627 "dashv;": "\u22A3",
43628 "dbkarow;": "\u290F",
43629 "dblac;": "\u02DD",
43630 "Dcaron;": "\u010E",
43631 "dcaron;": "\u010F",
43636 "ddagger;": "\u2021",
43637 "ddarr;": "\u21CA",
43638 "DDotrahd;": "\u2911",
43639 "ddotseq;": "\u2A77",
43643 "Delta;": "\u0394",
43644 "delta;": "\u03B4",
43645 "demptyv;": "\u29B1",
43646 "dfisht;": "\u297F",
43647 "Dfr;": "\uD835\uDD07",
43648 "dfr;": "\uD835\uDD21",
43650 "dharl;": "\u21C3",
43651 "dharr;": "\u21C2",
43652 "DiacriticalAcute;": "\u00B4",
43653 "DiacriticalDot;": "\u02D9",
43654 "DiacriticalDoubleAcute;": "\u02DD",
43655 "DiacriticalGrave;": "\u0060",
43656 "DiacriticalTilde;": "\u02DC",
43658 "Diamond;": "\u22C4",
43659 "diamond;": "\u22C4",
43660 "diamondsuit;": "\u2666",
43661 "diams;": "\u2666",
43663 "DifferentialD;": "\u2146",
43664 "digamma;": "\u03DD",
43665 "disin;": "\u22F2",
43667 "divide;": "\u00F7",
43668 "divide": "\u00F7",
43669 "divideontimes;": "\u22C7",
43670 "divonx;": "\u22C7",
43673 "dlcorn;": "\u231E",
43674 "dlcrop;": "\u230D",
43675 "dollar;": "\u0024",
43676 "Dopf;": "\uD835\uDD3B",
43677 "dopf;": "\uD835\uDD55",
43680 "DotDot;": "\u20DC",
43681 "doteq;": "\u2250",
43682 "doteqdot;": "\u2251",
43683 "DotEqual;": "\u2250",
43684 "dotminus;": "\u2238",
43685 "dotplus;": "\u2214",
43686 "dotsquare;": "\u22A1",
43687 "doublebarwedge;": "\u2306",
43688 "DoubleContourIntegral;": "\u222F",
43689 "DoubleDot;": "\u00A8",
43690 "DoubleDownArrow;": "\u21D3",
43691 "DoubleLeftArrow;": "\u21D0",
43692 "DoubleLeftRightArrow;": "\u21D4",
43693 "DoubleLeftTee;": "\u2AE4",
43694 "DoubleLongLeftArrow;": "\u27F8",
43695 "DoubleLongLeftRightArrow;": "\u27FA",
43696 "DoubleLongRightArrow;": "\u27F9",
43697 "DoubleRightArrow;": "\u21D2",
43698 "DoubleRightTee;": "\u22A8",
43699 "DoubleUpArrow;": "\u21D1",
43700 "DoubleUpDownArrow;": "\u21D5",
43701 "DoubleVerticalBar;": "\u2225",
43702 "DownArrow;": "\u2193",
43703 "Downarrow;": "\u21D3",
43704 "downarrow;": "\u2193",
43705 "DownArrowBar;": "\u2913",
43706 "DownArrowUpArrow;": "\u21F5",
43707 "DownBreve;": "\u0311",
43708 "downdownarrows;": "\u21CA",
43709 "downharpoonleft;": "\u21C3",
43710 "downharpoonright;": "\u21C2",
43711 "DownLeftRightVector;": "\u2950",
43712 "DownLeftTeeVector;": "\u295E",
43713 "DownLeftVector;": "\u21BD",
43714 "DownLeftVectorBar;": "\u2956",
43715 "DownRightTeeVector;": "\u295F",
43716 "DownRightVector;": "\u21C1",
43717 "DownRightVectorBar;": "\u2957",
43718 "DownTee;": "\u22A4",
43719 "DownTeeArrow;": "\u21A7",
43720 "drbkarow;": "\u2910",
43721 "drcorn;": "\u231F",
43722 "drcrop;": "\u230C",
43723 "Dscr;": "\uD835\uDC9F",
43724 "dscr;": "\uD835\uDCB9",
43728 "Dstrok;": "\u0110",
43729 "dstrok;": "\u0111",
43730 "dtdot;": "\u22F1",
43732 "dtrif;": "\u25BE",
43733 "duarr;": "\u21F5",
43734 "duhar;": "\u296F",
43735 "dwangle;": "\u29A6",
43738 "dzigrarr;": "\u27FF",
43739 "Eacute;": "\u00C9",
43740 "Eacute": "\u00C9",
43741 "eacute;": "\u00E9",
43742 "eacute": "\u00E9",
43743 "easter;": "\u2A6E",
43744 "Ecaron;": "\u011A",
43745 "ecaron;": "\u011B",
43747 "Ecirc;": "\u00CA",
43749 "ecirc;": "\u00EA",
43751 "ecolon;": "\u2255",
43754 "eDDot;": "\u2A77",
43759 "efDot;": "\u2252",
43760 "Efr;": "\uD835\uDD08",
43761 "efr;": "\uD835\uDD22",
43763 "Egrave;": "\u00C8",
43764 "Egrave": "\u00C8",
43765 "egrave;": "\u00E8",
43766 "egrave": "\u00E8",
43768 "egsdot;": "\u2A98",
43770 "Element;": "\u2208",
43771 "elinters;": "\u23E7",
43774 "elsdot;": "\u2A97",
43775 "Emacr;": "\u0112",
43776 "emacr;": "\u0113",
43777 "empty;": "\u2205",
43778 "emptyset;": "\u2205",
43779 "EmptySmallSquare;": "\u25FB",
43780 "emptyv;": "\u2205",
43781 "EmptyVerySmallSquare;": "\u25AB",
43783 "emsp13;": "\u2004",
43784 "emsp14;": "\u2005",
43788 "Eogon;": "\u0118",
43789 "eogon;": "\u0119",
43790 "Eopf;": "\uD835\uDD3C",
43791 "eopf;": "\uD835\uDD56",
43793 "eparsl;": "\u29E3",
43794 "eplus;": "\u2A71",
43796 "Epsilon;": "\u0395",
43797 "epsilon;": "\u03B5",
43798 "epsiv;": "\u03F5",
43799 "eqcirc;": "\u2256",
43800 "eqcolon;": "\u2255",
43801 "eqsim;": "\u2242",
43802 "eqslantgtr;": "\u2A96",
43803 "eqslantless;": "\u2A95",
43804 "Equal;": "\u2A75",
43805 "equals;": "\u003D",
43806 "EqualTilde;": "\u2242",
43807 "equest;": "\u225F",
43808 "Equilibrium;": "\u21CC",
43809 "equiv;": "\u2261",
43810 "equivDD;": "\u2A78",
43811 "eqvparsl;": "\u29E5",
43812 "erarr;": "\u2971",
43813 "erDot;": "\u2253",
43816 "esdot;": "\u2250",
43831 "exist;": "\u2203",
43832 "Exists;": "\u2203",
43833 "expectation;": "\u2130",
43834 "ExponentialE;": "\u2147",
43835 "exponentiale;": "\u2147",
43836 "fallingdotseq;": "\u2252",
43839 "female;": "\u2640",
43840 "ffilig;": "\uFB03",
43841 "fflig;": "\uFB00",
43842 "ffllig;": "\uFB04",
43843 "Ffr;": "\uD835\uDD09",
43844 "ffr;": "\uD835\uDD23",
43845 "filig;": "\uFB01",
43846 "FilledSmallSquare;": "\u25FC",
43847 "FilledVerySmallSquare;": "\u25AA",
43848 "fjlig;": "\u0066\u006A",
43850 "fllig;": "\uFB02",
43851 "fltns;": "\u25B1",
43853 "Fopf;": "\uD835\uDD3D",
43854 "fopf;": "\uD835\uDD57",
43855 "ForAll;": "\u2200",
43856 "forall;": "\u2200",
43858 "forkv;": "\u2AD9",
43859 "Fouriertrf;": "\u2131",
43860 "fpartint;": "\u2A0D",
43861 "frac12;": "\u00BD",
43862 "frac12": "\u00BD",
43863 "frac13;": "\u2153",
43864 "frac14;": "\u00BC",
43865 "frac14": "\u00BC",
43866 "frac15;": "\u2155",
43867 "frac16;": "\u2159",
43868 "frac18;": "\u215B",
43869 "frac23;": "\u2154",
43870 "frac25;": "\u2156",
43871 "frac34;": "\u00BE",
43872 "frac34": "\u00BE",
43873 "frac35;": "\u2157",
43874 "frac38;": "\u215C",
43875 "frac45;": "\u2158",
43876 "frac56;": "\u215A",
43877 "frac58;": "\u215D",
43878 "frac78;": "\u215E",
43879 "frasl;": "\u2044",
43880 "frown;": "\u2322",
43882 "fscr;": "\uD835\uDCBB",
43883 "gacute;": "\u01F5",
43884 "Gamma;": "\u0393",
43885 "gamma;": "\u03B3",
43886 "Gammad;": "\u03DC",
43887 "gammad;": "\u03DD",
43889 "Gbreve;": "\u011E",
43890 "gbreve;": "\u011F",
43891 "Gcedil;": "\u0122",
43892 "Gcirc;": "\u011C",
43893 "gcirc;": "\u011D",
43904 "geqslant;": "\u2A7E",
43906 "gescc;": "\u2AA9",
43907 "gesdot;": "\u2A80",
43908 "gesdoto;": "\u2A82",
43909 "gesdotol;": "\u2A84",
43910 "gesl;": "\u22DB\uFE00",
43911 "gesles;": "\u2A94",
43912 "Gfr;": "\uD835\uDD0A",
43913 "gfr;": "\uD835\uDD24",
43917 "gimel;": "\u2137",
43925 "gnapprox;": "\u2A8A",
43929 "gneqq;": "\u2269",
43930 "gnsim;": "\u22E7",
43931 "Gopf;": "\uD835\uDD3E",
43932 "gopf;": "\uD835\uDD58",
43933 "grave;": "\u0060",
43934 "GreaterEqual;": "\u2265",
43935 "GreaterEqualLess;": "\u22DB",
43936 "GreaterFullEqual;": "\u2267",
43937 "GreaterGreater;": "\u2AA2",
43938 "GreaterLess;": "\u2277",
43939 "GreaterSlantEqual;": "\u2A7E",
43940 "GreaterTilde;": "\u2273",
43941 "Gscr;": "\uD835\uDCA2",
43944 "gsime;": "\u2A8E",
43945 "gsiml;": "\u2A90",
43952 "gtcir;": "\u2A7A",
43953 "gtdot;": "\u22D7",
43954 "gtlPar;": "\u2995",
43955 "gtquest;": "\u2A7C",
43956 "gtrapprox;": "\u2A86",
43957 "gtrarr;": "\u2978",
43958 "gtrdot;": "\u22D7",
43959 "gtreqless;": "\u22DB",
43960 "gtreqqless;": "\u2A8C",
43961 "gtrless;": "\u2277",
43962 "gtrsim;": "\u2273",
43963 "gvertneqq;": "\u2269\uFE00",
43964 "gvnE;": "\u2269\uFE00",
43965 "Hacek;": "\u02C7",
43966 "hairsp;": "\u200A",
43968 "hamilt;": "\u210B",
43969 "HARDcy;": "\u042A",
43970 "hardcy;": "\u044A",
43973 "harrcir;": "\u2948",
43974 "harrw;": "\u21AD",
43977 "Hcirc;": "\u0124",
43978 "hcirc;": "\u0125",
43979 "hearts;": "\u2665",
43980 "heartsuit;": "\u2665",
43981 "hellip;": "\u2026",
43982 "hercon;": "\u22B9",
43984 "hfr;": "\uD835\uDD25",
43985 "HilbertSpace;": "\u210B",
43986 "hksearow;": "\u2925",
43987 "hkswarow;": "\u2926",
43988 "hoarr;": "\u21FF",
43989 "homtht;": "\u223B",
43990 "hookleftarrow;": "\u21A9",
43991 "hookrightarrow;": "\u21AA",
43993 "hopf;": "\uD835\uDD59",
43994 "horbar;": "\u2015",
43995 "HorizontalLine;": "\u2500",
43997 "hscr;": "\uD835\uDCBD",
43998 "hslash;": "\u210F",
43999 "Hstrok;": "\u0126",
44000 "hstrok;": "\u0127",
44001 "HumpDownHump;": "\u224E",
44002 "HumpEqual;": "\u224F",
44003 "hybull;": "\u2043",
44004 "hyphen;": "\u2010",
44005 "Iacute;": "\u00CD",
44006 "Iacute": "\u00CD",
44007 "iacute;": "\u00ED",
44008 "iacute": "\u00ED",
44010 "Icirc;": "\u00CE",
44012 "icirc;": "\u00EE",
44019 "iexcl;": "\u00A1",
44023 "ifr;": "\uD835\uDD26",
44024 "Igrave;": "\u00CC",
44025 "Igrave": "\u00CC",
44026 "igrave;": "\u00EC",
44027 "igrave": "\u00EC",
44029 "iiiint;": "\u2A0C",
44030 "iiint;": "\u222D",
44031 "iinfin;": "\u29DC",
44032 "iiota;": "\u2129",
44033 "IJlig;": "\u0132",
44034 "ijlig;": "\u0133",
44036 "Imacr;": "\u012A",
44037 "imacr;": "\u012B",
44038 "image;": "\u2111",
44039 "ImaginaryI;": "\u2148",
44040 "imagline;": "\u2110",
44041 "imagpart;": "\u2111",
44042 "imath;": "\u0131",
44044 "imped;": "\u01B5",
44045 "Implies;": "\u21D2",
44047 "incare;": "\u2105",
44048 "infin;": "\u221E",
44049 "infintie;": "\u29DD",
44050 "inodot;": "\u0131",
44053 "intcal;": "\u22BA",
44054 "integers;": "\u2124",
44055 "Integral;": "\u222B",
44056 "intercal;": "\u22BA",
44057 "Intersection;": "\u22C2",
44058 "intlarhk;": "\u2A17",
44059 "intprod;": "\u2A3C",
44060 "InvisibleComma;": "\u2063",
44061 "InvisibleTimes;": "\u2062",
44064 "Iogon;": "\u012E",
44065 "iogon;": "\u012F",
44066 "Iopf;": "\uD835\uDD40",
44067 "iopf;": "\uD835\uDD5A",
44070 "iprod;": "\u2A3C",
44071 "iquest;": "\u00BF",
44072 "iquest": "\u00BF",
44074 "iscr;": "\uD835\uDCBE",
44076 "isindot;": "\u22F5",
44077 "isinE;": "\u22F9",
44078 "isins;": "\u22F4",
44079 "isinsv;": "\u22F3",
44080 "isinv;": "\u2208",
44082 "Itilde;": "\u0128",
44083 "itilde;": "\u0129",
44084 "Iukcy;": "\u0406",
44085 "iukcy;": "\u0456",
44090 "Jcirc;": "\u0134",
44091 "jcirc;": "\u0135",
44094 "Jfr;": "\uD835\uDD0D",
44095 "jfr;": "\uD835\uDD27",
44096 "jmath;": "\u0237",
44097 "Jopf;": "\uD835\uDD41",
44098 "jopf;": "\uD835\uDD5B",
44099 "Jscr;": "\uD835\uDCA5",
44100 "jscr;": "\uD835\uDCBF",
44101 "Jsercy;": "\u0408",
44102 "jsercy;": "\u0458",
44103 "Jukcy;": "\u0404",
44104 "jukcy;": "\u0454",
44105 "Kappa;": "\u039A",
44106 "kappa;": "\u03BA",
44107 "kappav;": "\u03F0",
44108 "Kcedil;": "\u0136",
44109 "kcedil;": "\u0137",
44112 "Kfr;": "\uD835\uDD0E",
44113 "kfr;": "\uD835\uDD28",
44114 "kgreen;": "\u0138",
44119 "Kopf;": "\uD835\uDD42",
44120 "kopf;": "\uD835\uDD5C",
44121 "Kscr;": "\uD835\uDCA6",
44122 "kscr;": "\uD835\uDCC0",
44123 "lAarr;": "\u21DA",
44124 "Lacute;": "\u0139",
44125 "lacute;": "\u013A",
44126 "laemptyv;": "\u29B4",
44127 "lagran;": "\u2112",
44128 "Lambda;": "\u039B",
44129 "lambda;": "\u03BB",
44132 "langd;": "\u2991",
44133 "langle;": "\u27E8",
44135 "Laplacetrf;": "\u2112",
44136 "laquo;": "\u00AB",
44141 "larrb;": "\u21E4",
44142 "larrbfs;": "\u291F",
44143 "larrfs;": "\u291D",
44144 "larrhk;": "\u21A9",
44145 "larrlp;": "\u21AB",
44146 "larrpl;": "\u2939",
44147 "larrsim;": "\u2973",
44148 "larrtl;": "\u21A2",
44150 "lAtail;": "\u291B",
44151 "latail;": "\u2919",
44153 "lates;": "\u2AAD\uFE00",
44154 "lBarr;": "\u290E",
44155 "lbarr;": "\u290C",
44156 "lbbrk;": "\u2772",
44157 "lbrace;": "\u007B",
44158 "lbrack;": "\u005B",
44159 "lbrke;": "\u298B",
44160 "lbrksld;": "\u298F",
44161 "lbrkslu;": "\u298D",
44162 "Lcaron;": "\u013D",
44163 "lcaron;": "\u013E",
44164 "Lcedil;": "\u013B",
44165 "lcedil;": "\u013C",
44166 "lceil;": "\u2308",
44171 "ldquo;": "\u201C",
44172 "ldquor;": "\u201E",
44173 "ldrdhar;": "\u2967",
44174 "ldrushar;": "\u294B",
44178 "LeftAngleBracket;": "\u27E8",
44179 "LeftArrow;": "\u2190",
44180 "Leftarrow;": "\u21D0",
44181 "leftarrow;": "\u2190",
44182 "LeftArrowBar;": "\u21E4",
44183 "LeftArrowRightArrow;": "\u21C6",
44184 "leftarrowtail;": "\u21A2",
44185 "LeftCeiling;": "\u2308",
44186 "LeftDoubleBracket;": "\u27E6",
44187 "LeftDownTeeVector;": "\u2961",
44188 "LeftDownVector;": "\u21C3",
44189 "LeftDownVectorBar;": "\u2959",
44190 "LeftFloor;": "\u230A",
44191 "leftharpoondown;": "\u21BD",
44192 "leftharpoonup;": "\u21BC",
44193 "leftleftarrows;": "\u21C7",
44194 "LeftRightArrow;": "\u2194",
44195 "Leftrightarrow;": "\u21D4",
44196 "leftrightarrow;": "\u2194",
44197 "leftrightarrows;": "\u21C6",
44198 "leftrightharpoons;": "\u21CB",
44199 "leftrightsquigarrow;": "\u21AD",
44200 "LeftRightVector;": "\u294E",
44201 "LeftTee;": "\u22A3",
44202 "LeftTeeArrow;": "\u21A4",
44203 "LeftTeeVector;": "\u295A",
44204 "leftthreetimes;": "\u22CB",
44205 "LeftTriangle;": "\u22B2",
44206 "LeftTriangleBar;": "\u29CF",
44207 "LeftTriangleEqual;": "\u22B4",
44208 "LeftUpDownVector;": "\u2951",
44209 "LeftUpTeeVector;": "\u2960",
44210 "LeftUpVector;": "\u21BF",
44211 "LeftUpVectorBar;": "\u2958",
44212 "LeftVector;": "\u21BC",
44213 "LeftVectorBar;": "\u2952",
44218 "leqslant;": "\u2A7D",
44220 "lescc;": "\u2AA8",
44221 "lesdot;": "\u2A7F",
44222 "lesdoto;": "\u2A81",
44223 "lesdotor;": "\u2A83",
44224 "lesg;": "\u22DA\uFE00",
44225 "lesges;": "\u2A93",
44226 "lessapprox;": "\u2A85",
44227 "lessdot;": "\u22D6",
44228 "lesseqgtr;": "\u22DA",
44229 "lesseqqgtr;": "\u2A8B",
44230 "LessEqualGreater;": "\u22DA",
44231 "LessFullEqual;": "\u2266",
44232 "LessGreater;": "\u2276",
44233 "lessgtr;": "\u2276",
44234 "LessLess;": "\u2AA1",
44235 "lesssim;": "\u2272",
44236 "LessSlantEqual;": "\u2A7D",
44237 "LessTilde;": "\u2272",
44238 "lfisht;": "\u297C",
44239 "lfloor;": "\u230A",
44240 "Lfr;": "\uD835\uDD0F",
44241 "lfr;": "\uD835\uDD29",
44245 "lhard;": "\u21BD",
44246 "lharu;": "\u21BC",
44247 "lharul;": "\u296A",
44248 "lhblk;": "\u2584",
44253 "llarr;": "\u21C7",
44254 "llcorner;": "\u231E",
44255 "Lleftarrow;": "\u21DA",
44256 "llhard;": "\u296B",
44257 "lltri;": "\u25FA",
44258 "Lmidot;": "\u013F",
44259 "lmidot;": "\u0140",
44260 "lmoust;": "\u23B0",
44261 "lmoustache;": "\u23B0",
44263 "lnapprox;": "\u2A89",
44267 "lneqq;": "\u2268",
44268 "lnsim;": "\u22E6",
44269 "loang;": "\u27EC",
44270 "loarr;": "\u21FD",
44271 "lobrk;": "\u27E6",
44272 "LongLeftArrow;": "\u27F5",
44273 "Longleftarrow;": "\u27F8",
44274 "longleftarrow;": "\u27F5",
44275 "LongLeftRightArrow;": "\u27F7",
44276 "Longleftrightarrow;": "\u27FA",
44277 "longleftrightarrow;": "\u27F7",
44278 "longmapsto;": "\u27FC",
44279 "LongRightArrow;": "\u27F6",
44280 "Longrightarrow;": "\u27F9",
44281 "longrightarrow;": "\u27F6",
44282 "looparrowleft;": "\u21AB",
44283 "looparrowright;": "\u21AC",
44284 "lopar;": "\u2985",
44285 "Lopf;": "\uD835\uDD43",
44286 "lopf;": "\uD835\uDD5D",
44287 "loplus;": "\u2A2D",
44288 "lotimes;": "\u2A34",
44289 "lowast;": "\u2217",
44290 "lowbar;": "\u005F",
44291 "LowerLeftArrow;": "\u2199",
44292 "LowerRightArrow;": "\u2198",
44294 "lozenge;": "\u25CA",
44297 "lparlt;": "\u2993",
44298 "lrarr;": "\u21C6",
44299 "lrcorner;": "\u231F",
44300 "lrhar;": "\u21CB",
44301 "lrhard;": "\u296D",
44303 "lrtri;": "\u22BF",
44304 "lsaquo;": "\u2039",
44306 "lscr;": "\uD835\uDCC1",
44310 "lsime;": "\u2A8D",
44311 "lsimg;": "\u2A8F",
44313 "lsquo;": "\u2018",
44314 "lsquor;": "\u201A",
44315 "Lstrok;": "\u0141",
44316 "lstrok;": "\u0142",
44323 "ltcir;": "\u2A79",
44324 "ltdot;": "\u22D6",
44325 "lthree;": "\u22CB",
44326 "ltimes;": "\u22C9",
44327 "ltlarr;": "\u2976",
44328 "ltquest;": "\u2A7B",
44330 "ltrie;": "\u22B4",
44331 "ltrif;": "\u25C2",
44332 "ltrPar;": "\u2996",
44333 "lurdshar;": "\u294A",
44334 "luruhar;": "\u2966",
44335 "lvertneqq;": "\u2268\uFE00",
44336 "lvnE;": "\u2268\uFE00",
44341 "maltese;": "\u2720",
44344 "mapsto;": "\u21A6",
44345 "mapstodown;": "\u21A7",
44346 "mapstoleft;": "\u21A4",
44347 "mapstoup;": "\u21A5",
44348 "marker;": "\u25AE",
44349 "mcomma;": "\u2A29",
44352 "mdash;": "\u2014",
44353 "mDDot;": "\u223A",
44354 "measuredangle;": "\u2221",
44355 "MediumSpace;": "\u205F",
44356 "Mellintrf;": "\u2133",
44357 "Mfr;": "\uD835\uDD10",
44358 "mfr;": "\uD835\uDD2A",
44360 "micro;": "\u00B5",
44363 "midast;": "\u002A",
44364 "midcir;": "\u2AF0",
44365 "middot;": "\u00B7",
44366 "middot": "\u00B7",
44367 "minus;": "\u2212",
44368 "minusb;": "\u229F",
44369 "minusd;": "\u2238",
44370 "minusdu;": "\u2A2A",
44371 "MinusPlus;": "\u2213",
44374 "mnplus;": "\u2213",
44375 "models;": "\u22A7",
44376 "Mopf;": "\uD835\uDD44",
44377 "mopf;": "\uD835\uDD5E",
44380 "mscr;": "\uD835\uDCC2",
44381 "mstpos;": "\u223E",
44384 "multimap;": "\u22B8",
44385 "mumap;": "\u22B8",
44386 "nabla;": "\u2207",
44387 "Nacute;": "\u0143",
44388 "nacute;": "\u0144",
44389 "nang;": "\u2220\u20D2",
44391 "napE;": "\u2A70\u0338",
44392 "napid;": "\u224B\u0338",
44393 "napos;": "\u0149",
44394 "napprox;": "\u2249",
44395 "natur;": "\u266E",
44396 "natural;": "\u266E",
44397 "naturals;": "\u2115",
44400 "nbump;": "\u224E\u0338",
44401 "nbumpe;": "\u224F\u0338",
44403 "Ncaron;": "\u0147",
44404 "ncaron;": "\u0148",
44405 "Ncedil;": "\u0145",
44406 "ncedil;": "\u0146",
44407 "ncong;": "\u2247",
44408 "ncongdot;": "\u2A6D\u0338",
44412 "ndash;": "\u2013",
44414 "nearhk;": "\u2924",
44415 "neArr;": "\u21D7",
44416 "nearr;": "\u2197",
44417 "nearrow;": "\u2197",
44418 "nedot;": "\u2250\u0338",
44419 "NegativeMediumSpace;": "\u200B",
44420 "NegativeThickSpace;": "\u200B",
44421 "NegativeThinSpace;": "\u200B",
44422 "NegativeVeryThinSpace;": "\u200B",
44423 "nequiv;": "\u2262",
44424 "nesear;": "\u2928",
44425 "nesim;": "\u2242\u0338",
44426 "NestedGreaterGreater;": "\u226B",
44427 "NestedLessLess;": "\u226A",
44428 "NewLine;": "\u000A",
44429 "nexist;": "\u2204",
44430 "nexists;": "\u2204",
44431 "Nfr;": "\uD835\uDD11",
44432 "nfr;": "\uD835\uDD2B",
44433 "ngE;": "\u2267\u0338",
44436 "ngeqq;": "\u2267\u0338",
44437 "ngeqslant;": "\u2A7E\u0338",
44438 "nges;": "\u2A7E\u0338",
44439 "nGg;": "\u22D9\u0338",
44440 "ngsim;": "\u2275",
44441 "nGt;": "\u226B\u20D2",
44444 "nGtv;": "\u226B\u0338",
44445 "nhArr;": "\u21CE",
44446 "nharr;": "\u21AE",
44447 "nhpar;": "\u2AF2",
44454 "nlArr;": "\u21CD",
44455 "nlarr;": "\u219A",
44457 "nlE;": "\u2266\u0338",
44459 "nLeftarrow;": "\u21CD",
44460 "nleftarrow;": "\u219A",
44461 "nLeftrightarrow;": "\u21CE",
44462 "nleftrightarrow;": "\u21AE",
44464 "nleqq;": "\u2266\u0338",
44465 "nleqslant;": "\u2A7D\u0338",
44466 "nles;": "\u2A7D\u0338",
44467 "nless;": "\u226E",
44468 "nLl;": "\u22D8\u0338",
44469 "nlsim;": "\u2274",
44470 "nLt;": "\u226A\u20D2",
44472 "nltri;": "\u22EA",
44473 "nltrie;": "\u22EC",
44474 "nLtv;": "\u226A\u0338",
44476 "NoBreak;": "\u2060",
44477 "NonBreakingSpace;": "\u00A0",
44479 "nopf;": "\uD835\uDD5F",
44483 "NotCongruent;": "\u2262",
44484 "NotCupCap;": "\u226D",
44485 "NotDoubleVerticalBar;": "\u2226",
44486 "NotElement;": "\u2209",
44487 "NotEqual;": "\u2260",
44488 "NotEqualTilde;": "\u2242\u0338",
44489 "NotExists;": "\u2204",
44490 "NotGreater;": "\u226F",
44491 "NotGreaterEqual;": "\u2271",
44492 "NotGreaterFullEqual;": "\u2267\u0338",
44493 "NotGreaterGreater;": "\u226B\u0338",
44494 "NotGreaterLess;": "\u2279",
44495 "NotGreaterSlantEqual;": "\u2A7E\u0338",
44496 "NotGreaterTilde;": "\u2275",
44497 "NotHumpDownHump;": "\u224E\u0338",
44498 "NotHumpEqual;": "\u224F\u0338",
44499 "notin;": "\u2209",
44500 "notindot;": "\u22F5\u0338",
44501 "notinE;": "\u22F9\u0338",
44502 "notinva;": "\u2209",
44503 "notinvb;": "\u22F7",
44504 "notinvc;": "\u22F6",
44505 "NotLeftTriangle;": "\u22EA",
44506 "NotLeftTriangleBar;": "\u29CF\u0338",
44507 "NotLeftTriangleEqual;": "\u22EC",
44508 "NotLess;": "\u226E",
44509 "NotLessEqual;": "\u2270",
44510 "NotLessGreater;": "\u2278",
44511 "NotLessLess;": "\u226A\u0338",
44512 "NotLessSlantEqual;": "\u2A7D\u0338",
44513 "NotLessTilde;": "\u2274",
44514 "NotNestedGreaterGreater;": "\u2AA2\u0338",
44515 "NotNestedLessLess;": "\u2AA1\u0338",
44516 "notni;": "\u220C",
44517 "notniva;": "\u220C",
44518 "notnivb;": "\u22FE",
44519 "notnivc;": "\u22FD",
44520 "NotPrecedes;": "\u2280",
44521 "NotPrecedesEqual;": "\u2AAF\u0338",
44522 "NotPrecedesSlantEqual;": "\u22E0",
44523 "NotReverseElement;": "\u220C",
44524 "NotRightTriangle;": "\u22EB",
44525 "NotRightTriangleBar;": "\u29D0\u0338",
44526 "NotRightTriangleEqual;": "\u22ED",
44527 "NotSquareSubset;": "\u228F\u0338",
44528 "NotSquareSubsetEqual;": "\u22E2",
44529 "NotSquareSuperset;": "\u2290\u0338",
44530 "NotSquareSupersetEqual;": "\u22E3",
44531 "NotSubset;": "\u2282\u20D2",
44532 "NotSubsetEqual;": "\u2288",
44533 "NotSucceeds;": "\u2281",
44534 "NotSucceedsEqual;": "\u2AB0\u0338",
44535 "NotSucceedsSlantEqual;": "\u22E1",
44536 "NotSucceedsTilde;": "\u227F\u0338",
44537 "NotSuperset;": "\u2283\u20D2",
44538 "NotSupersetEqual;": "\u2289",
44539 "NotTilde;": "\u2241",
44540 "NotTildeEqual;": "\u2244",
44541 "NotTildeFullEqual;": "\u2247",
44542 "NotTildeTilde;": "\u2249",
44543 "NotVerticalBar;": "\u2224",
44545 "nparallel;": "\u2226",
44546 "nparsl;": "\u2AFD\u20E5",
44547 "npart;": "\u2202\u0338",
44548 "npolint;": "\u2A14",
44550 "nprcue;": "\u22E0",
44551 "npre;": "\u2AAF\u0338",
44552 "nprec;": "\u2280",
44553 "npreceq;": "\u2AAF\u0338",
44554 "nrArr;": "\u21CF",
44555 "nrarr;": "\u219B",
44556 "nrarrc;": "\u2933\u0338",
44557 "nrarrw;": "\u219D\u0338",
44558 "nRightarrow;": "\u21CF",
44559 "nrightarrow;": "\u219B",
44560 "nrtri;": "\u22EB",
44561 "nrtrie;": "\u22ED",
44563 "nsccue;": "\u22E1",
44564 "nsce;": "\u2AB0\u0338",
44565 "Nscr;": "\uD835\uDCA9",
44566 "nscr;": "\uD835\uDCC3",
44567 "nshortmid;": "\u2224",
44568 "nshortparallel;": "\u2226",
44570 "nsime;": "\u2244",
44571 "nsimeq;": "\u2244",
44572 "nsmid;": "\u2224",
44573 "nspar;": "\u2226",
44574 "nsqsube;": "\u22E2",
44575 "nsqsupe;": "\u22E3",
44577 "nsubE;": "\u2AC5\u0338",
44578 "nsube;": "\u2288",
44579 "nsubset;": "\u2282\u20D2",
44580 "nsubseteq;": "\u2288",
44581 "nsubseteqq;": "\u2AC5\u0338",
44582 "nsucc;": "\u2281",
44583 "nsucceq;": "\u2AB0\u0338",
44585 "nsupE;": "\u2AC6\u0338",
44586 "nsupe;": "\u2289",
44587 "nsupset;": "\u2283\u20D2",
44588 "nsupseteq;": "\u2289",
44589 "nsupseteqq;": "\u2AC6\u0338",
44591 "Ntilde;": "\u00D1",
44592 "Ntilde": "\u00D1",
44593 "ntilde;": "\u00F1",
44594 "ntilde": "\u00F1",
44596 "ntriangleleft;": "\u22EA",
44597 "ntrianglelefteq;": "\u22EC",
44598 "ntriangleright;": "\u22EB",
44599 "ntrianglerighteq;": "\u22ED",
44603 "numero;": "\u2116",
44604 "numsp;": "\u2007",
44605 "nvap;": "\u224D\u20D2",
44606 "nVDash;": "\u22AF",
44607 "nVdash;": "\u22AE",
44608 "nvDash;": "\u22AD",
44609 "nvdash;": "\u22AC",
44610 "nvge;": "\u2265\u20D2",
44611 "nvgt;": "\u003E\u20D2",
44612 "nvHarr;": "\u2904",
44613 "nvinfin;": "\u29DE",
44614 "nvlArr;": "\u2902",
44615 "nvle;": "\u2264\u20D2",
44616 "nvlt;": "\u003C\u20D2",
44617 "nvltrie;": "\u22B4\u20D2",
44618 "nvrArr;": "\u2903",
44619 "nvrtrie;": "\u22B5\u20D2",
44620 "nvsim;": "\u223C\u20D2",
44621 "nwarhk;": "\u2923",
44622 "nwArr;": "\u21D6",
44623 "nwarr;": "\u2196",
44624 "nwarrow;": "\u2196",
44625 "nwnear;": "\u2927",
44626 "Oacute;": "\u00D3",
44627 "Oacute": "\u00D3",
44628 "oacute;": "\u00F3",
44629 "oacute": "\u00F3",
44632 "Ocirc;": "\u00D4",
44634 "ocirc;": "\u00F4",
44638 "odash;": "\u229D",
44639 "Odblac;": "\u0150",
44640 "odblac;": "\u0151",
44643 "odsold;": "\u29BC",
44644 "OElig;": "\u0152",
44645 "oelig;": "\u0153",
44646 "ofcir;": "\u29BF",
44647 "Ofr;": "\uD835\uDD12",
44648 "ofr;": "\uD835\uDD2C",
44650 "Ograve;": "\u00D2",
44651 "Ograve": "\u00D2",
44652 "ograve;": "\u00F2",
44653 "ograve": "\u00F2",
44655 "ohbar;": "\u29B5",
44658 "olarr;": "\u21BA",
44659 "olcir;": "\u29BE",
44660 "olcross;": "\u29BB",
44661 "oline;": "\u203E",
44663 "Omacr;": "\u014C",
44664 "omacr;": "\u014D",
44665 "Omega;": "\u03A9",
44666 "omega;": "\u03C9",
44667 "Omicron;": "\u039F",
44668 "omicron;": "\u03BF",
44670 "ominus;": "\u2296",
44671 "Oopf;": "\uD835\uDD46",
44672 "oopf;": "\uD835\uDD60",
44674 "OpenCurlyDoubleQuote;": "\u201C",
44675 "OpenCurlyQuote;": "\u2018",
44676 "operp;": "\u29B9",
44677 "oplus;": "\u2295",
44680 "orarr;": "\u21BB",
44682 "order;": "\u2134",
44683 "orderof;": "\u2134",
44688 "origof;": "\u22B6",
44690 "orslope;": "\u2A57",
44693 "Oscr;": "\uD835\uDCAA",
44695 "Oslash;": "\u00D8",
44696 "Oslash": "\u00D8",
44697 "oslash;": "\u00F8",
44698 "oslash": "\u00F8",
44700 "Otilde;": "\u00D5",
44701 "Otilde": "\u00D5",
44702 "otilde;": "\u00F5",
44703 "otilde": "\u00F5",
44704 "Otimes;": "\u2A37",
44705 "otimes;": "\u2297",
44706 "otimesas;": "\u2A36",
44711 "ovbar;": "\u233D",
44712 "OverBar;": "\u203E",
44713 "OverBrace;": "\u23DE",
44714 "OverBracket;": "\u23B4",
44715 "OverParenthesis;": "\u23DC",
44719 "parallel;": "\u2225",
44720 "parsim;": "\u2AF3",
44721 "parsl;": "\u2AFD",
44723 "PartialD;": "\u2202",
44726 "percnt;": "\u0025",
44727 "period;": "\u002E",
44728 "permil;": "\u2030",
44730 "pertenk;": "\u2031",
44731 "Pfr;": "\uD835\uDD13",
44732 "pfr;": "\uD835\uDD2D",
44736 "phmmat;": "\u2133",
44737 "phone;": "\u260E",
44740 "pitchfork;": "\u22D4",
44742 "planck;": "\u210F",
44743 "planckh;": "\u210E",
44744 "plankv;": "\u210F",
44746 "plusacir;": "\u2A23",
44747 "plusb;": "\u229E",
44748 "pluscir;": "\u2A22",
44749 "plusdo;": "\u2214",
44750 "plusdu;": "\u2A25",
44751 "pluse;": "\u2A72",
44752 "PlusMinus;": "\u00B1",
44753 "plusmn;": "\u00B1",
44754 "plusmn": "\u00B1",
44755 "plussim;": "\u2A26",
44756 "plustwo;": "\u2A27",
44758 "Poincareplane;": "\u210C",
44759 "pointint;": "\u2A15",
44761 "popf;": "\uD835\uDD61",
44762 "pound;": "\u00A3",
44767 "prcue;": "\u227C",
44771 "precapprox;": "\u2AB7",
44772 "preccurlyeq;": "\u227C",
44773 "Precedes;": "\u227A",
44774 "PrecedesEqual;": "\u2AAF",
44775 "PrecedesSlantEqual;": "\u227C",
44776 "PrecedesTilde;": "\u227E",
44777 "preceq;": "\u2AAF",
44778 "precnapprox;": "\u2AB9",
44779 "precneqq;": "\u2AB5",
44780 "precnsim;": "\u22E8",
44781 "precsim;": "\u227E",
44782 "Prime;": "\u2033",
44783 "prime;": "\u2032",
44784 "primes;": "\u2119",
44785 "prnap;": "\u2AB9",
44787 "prnsim;": "\u22E8",
44789 "Product;": "\u220F",
44790 "profalar;": "\u232E",
44791 "profline;": "\u2312",
44792 "profsurf;": "\u2313",
44794 "Proportion;": "\u2237",
44795 "Proportional;": "\u221D",
44796 "propto;": "\u221D",
44797 "prsim;": "\u227E",
44798 "prurel;": "\u22B0",
44799 "Pscr;": "\uD835\uDCAB",
44800 "pscr;": "\uD835\uDCC5",
44803 "puncsp;": "\u2008",
44804 "Qfr;": "\uD835\uDD14",
44805 "qfr;": "\uD835\uDD2E",
44808 "qopf;": "\uD835\uDD62",
44809 "qprime;": "\u2057",
44810 "Qscr;": "\uD835\uDCAC",
44811 "qscr;": "\uD835\uDCC6",
44812 "quaternions;": "\u210D",
44813 "quatint;": "\u2A16",
44814 "quest;": "\u003F",
44815 "questeq;": "\u225F",
44820 "rAarr;": "\u21DB",
44821 "race;": "\u223D\u0331",
44822 "Racute;": "\u0154",
44823 "racute;": "\u0155",
44824 "radic;": "\u221A",
44825 "raemptyv;": "\u29B3",
44828 "rangd;": "\u2992",
44829 "range;": "\u29A5",
44830 "rangle;": "\u27E9",
44831 "raquo;": "\u00BB",
44836 "rarrap;": "\u2975",
44837 "rarrb;": "\u21E5",
44838 "rarrbfs;": "\u2920",
44839 "rarrc;": "\u2933",
44840 "rarrfs;": "\u291E",
44841 "rarrhk;": "\u21AA",
44842 "rarrlp;": "\u21AC",
44843 "rarrpl;": "\u2945",
44844 "rarrsim;": "\u2974",
44845 "Rarrtl;": "\u2916",
44846 "rarrtl;": "\u21A3",
44847 "rarrw;": "\u219D",
44848 "rAtail;": "\u291C",
44849 "ratail;": "\u291A",
44850 "ratio;": "\u2236",
44851 "rationals;": "\u211A",
44852 "RBarr;": "\u2910",
44853 "rBarr;": "\u290F",
44854 "rbarr;": "\u290D",
44855 "rbbrk;": "\u2773",
44856 "rbrace;": "\u007D",
44857 "rbrack;": "\u005D",
44858 "rbrke;": "\u298C",
44859 "rbrksld;": "\u298E",
44860 "rbrkslu;": "\u2990",
44861 "Rcaron;": "\u0158",
44862 "rcaron;": "\u0159",
44863 "Rcedil;": "\u0156",
44864 "rcedil;": "\u0157",
44865 "rceil;": "\u2309",
44870 "rdldhar;": "\u2969",
44871 "rdquo;": "\u201D",
44872 "rdquor;": "\u201D",
44876 "realine;": "\u211B",
44877 "realpart;": "\u211C",
44878 "reals;": "\u211D",
44884 "ReverseElement;": "\u220B",
44885 "ReverseEquilibrium;": "\u21CB",
44886 "ReverseUpEquilibrium;": "\u296F",
44887 "rfisht;": "\u297D",
44888 "rfloor;": "\u230B",
44890 "rfr;": "\uD835\uDD2F",
44892 "rhard;": "\u21C1",
44893 "rharu;": "\u21C0",
44894 "rharul;": "\u296C",
44898 "RightAngleBracket;": "\u27E9",
44899 "RightArrow;": "\u2192",
44900 "Rightarrow;": "\u21D2",
44901 "rightarrow;": "\u2192",
44902 "RightArrowBar;": "\u21E5",
44903 "RightArrowLeftArrow;": "\u21C4",
44904 "rightarrowtail;": "\u21A3",
44905 "RightCeiling;": "\u2309",
44906 "RightDoubleBracket;": "\u27E7",
44907 "RightDownTeeVector;": "\u295D",
44908 "RightDownVector;": "\u21C2",
44909 "RightDownVectorBar;": "\u2955",
44910 "RightFloor;": "\u230B",
44911 "rightharpoondown;": "\u21C1",
44912 "rightharpoonup;": "\u21C0",
44913 "rightleftarrows;": "\u21C4",
44914 "rightleftharpoons;": "\u21CC",
44915 "rightrightarrows;": "\u21C9",
44916 "rightsquigarrow;": "\u219D",
44917 "RightTee;": "\u22A2",
44918 "RightTeeArrow;": "\u21A6",
44919 "RightTeeVector;": "\u295B",
44920 "rightthreetimes;": "\u22CC",
44921 "RightTriangle;": "\u22B3",
44922 "RightTriangleBar;": "\u29D0",
44923 "RightTriangleEqual;": "\u22B5",
44924 "RightUpDownVector;": "\u294F",
44925 "RightUpTeeVector;": "\u295C",
44926 "RightUpVector;": "\u21BE",
44927 "RightUpVectorBar;": "\u2954",
44928 "RightVector;": "\u21C0",
44929 "RightVectorBar;": "\u2953",
44931 "risingdotseq;": "\u2253",
44932 "rlarr;": "\u21C4",
44933 "rlhar;": "\u21CC",
44935 "rmoust;": "\u23B1",
44936 "rmoustache;": "\u23B1",
44937 "rnmid;": "\u2AEE",
44938 "roang;": "\u27ED",
44939 "roarr;": "\u21FE",
44940 "robrk;": "\u27E7",
44941 "ropar;": "\u2986",
44943 "ropf;": "\uD835\uDD63",
44944 "roplus;": "\u2A2E",
44945 "rotimes;": "\u2A35",
44946 "RoundImplies;": "\u2970",
44948 "rpargt;": "\u2994",
44949 "rppolint;": "\u2A12",
44950 "rrarr;": "\u21C9",
44951 "Rrightarrow;": "\u21DB",
44952 "rsaquo;": "\u203A",
44954 "rscr;": "\uD835\uDCC7",
44958 "rsquo;": "\u2019",
44959 "rsquor;": "\u2019",
44960 "rthree;": "\u22CC",
44961 "rtimes;": "\u22CA",
44963 "rtrie;": "\u22B5",
44964 "rtrif;": "\u25B8",
44965 "rtriltri;": "\u29CE",
44966 "RuleDelayed;": "\u29F4",
44967 "ruluhar;": "\u2968",
44969 "Sacute;": "\u015A",
44970 "sacute;": "\u015B",
44971 "sbquo;": "\u201A",
44975 "Scaron;": "\u0160",
44976 "scaron;": "\u0161",
44977 "sccue;": "\u227D",
44980 "Scedil;": "\u015E",
44981 "scedil;": "\u015F",
44982 "Scirc;": "\u015C",
44983 "scirc;": "\u015D",
44984 "scnap;": "\u2ABA",
44986 "scnsim;": "\u22E9",
44987 "scpolint;": "\u2A13",
44988 "scsim;": "\u227F",
44992 "sdotb;": "\u22A1",
44993 "sdote;": "\u2A66",
44994 "searhk;": "\u2925",
44995 "seArr;": "\u21D8",
44996 "searr;": "\u2198",
44997 "searrow;": "\u2198",
45001 "seswar;": "\u2929",
45002 "setminus;": "\u2216",
45003 "setmn;": "\u2216",
45005 "Sfr;": "\uD835\uDD16",
45006 "sfr;": "\uD835\uDD30",
45007 "sfrown;": "\u2322",
45008 "sharp;": "\u266F",
45009 "SHCHcy;": "\u0429",
45010 "shchcy;": "\u0449",
45013 "ShortDownArrow;": "\u2193",
45014 "ShortLeftArrow;": "\u2190",
45015 "shortmid;": "\u2223",
45016 "shortparallel;": "\u2225",
45017 "ShortRightArrow;": "\u2192",
45018 "ShortUpArrow;": "\u2191",
45021 "Sigma;": "\u03A3",
45022 "sigma;": "\u03C3",
45023 "sigmaf;": "\u03C2",
45024 "sigmav;": "\u03C2",
45026 "simdot;": "\u2A6A",
45028 "simeq;": "\u2243",
45030 "simgE;": "\u2AA0",
45032 "simlE;": "\u2A9F",
45033 "simne;": "\u2246",
45034 "simplus;": "\u2A24",
45035 "simrarr;": "\u2972",
45036 "slarr;": "\u2190",
45037 "SmallCircle;": "\u2218",
45038 "smallsetminus;": "\u2216",
45039 "smashp;": "\u2A33",
45040 "smeparsl;": "\u29E4",
45042 "smile;": "\u2323",
45045 "smtes;": "\u2AAC\uFE00",
45046 "SOFTcy;": "\u042C",
45047 "softcy;": "\u044C",
45050 "solbar;": "\u233F",
45051 "Sopf;": "\uD835\uDD4A",
45052 "sopf;": "\uD835\uDD64",
45053 "spades;": "\u2660",
45054 "spadesuit;": "\u2660",
45056 "sqcap;": "\u2293",
45057 "sqcaps;": "\u2293\uFE00",
45058 "sqcup;": "\u2294",
45059 "sqcups;": "\u2294\uFE00",
45061 "sqsub;": "\u228F",
45062 "sqsube;": "\u2291",
45063 "sqsubset;": "\u228F",
45064 "sqsubseteq;": "\u2291",
45065 "sqsup;": "\u2290",
45066 "sqsupe;": "\u2292",
45067 "sqsupset;": "\u2290",
45068 "sqsupseteq;": "\u2292",
45070 "Square;": "\u25A1",
45071 "square;": "\u25A1",
45072 "SquareIntersection;": "\u2293",
45073 "SquareSubset;": "\u228F",
45074 "SquareSubsetEqual;": "\u2291",
45075 "SquareSuperset;": "\u2290",
45076 "SquareSupersetEqual;": "\u2292",
45077 "SquareUnion;": "\u2294",
45078 "squarf;": "\u25AA",
45080 "srarr;": "\u2192",
45081 "Sscr;": "\uD835\uDCAE",
45082 "sscr;": "\uD835\uDCC8",
45083 "ssetmn;": "\u2216",
45084 "ssmile;": "\u2323",
45085 "sstarf;": "\u22C6",
45088 "starf;": "\u2605",
45089 "straightepsilon;": "\u03F5",
45090 "straightphi;": "\u03D5",
45091 "strns;": "\u00AF",
45094 "subdot;": "\u2ABD",
45097 "subedot;": "\u2AC3",
45098 "submult;": "\u2AC1",
45099 "subnE;": "\u2ACB",
45100 "subne;": "\u228A",
45101 "subplus;": "\u2ABF",
45102 "subrarr;": "\u2979",
45103 "Subset;": "\u22D0",
45104 "subset;": "\u2282",
45105 "subseteq;": "\u2286",
45106 "subseteqq;": "\u2AC5",
45107 "SubsetEqual;": "\u2286",
45108 "subsetneq;": "\u228A",
45109 "subsetneqq;": "\u2ACB",
45110 "subsim;": "\u2AC7",
45111 "subsub;": "\u2AD5",
45112 "subsup;": "\u2AD3",
45114 "succapprox;": "\u2AB8",
45115 "succcurlyeq;": "\u227D",
45116 "Succeeds;": "\u227B",
45117 "SucceedsEqual;": "\u2AB0",
45118 "SucceedsSlantEqual;": "\u227D",
45119 "SucceedsTilde;": "\u227F",
45120 "succeq;": "\u2AB0",
45121 "succnapprox;": "\u2ABA",
45122 "succneqq;": "\u2AB6",
45123 "succnsim;": "\u22E9",
45124 "succsim;": "\u227F",
45125 "SuchThat;": "\u220B",
45137 "supdot;": "\u2ABE",
45138 "supdsub;": "\u2AD8",
45141 "supedot;": "\u2AC4",
45142 "Superset;": "\u2283",
45143 "SupersetEqual;": "\u2287",
45144 "suphsol;": "\u27C9",
45145 "suphsub;": "\u2AD7",
45146 "suplarr;": "\u297B",
45147 "supmult;": "\u2AC2",
45148 "supnE;": "\u2ACC",
45149 "supne;": "\u228B",
45150 "supplus;": "\u2AC0",
45151 "Supset;": "\u22D1",
45152 "supset;": "\u2283",
45153 "supseteq;": "\u2287",
45154 "supseteqq;": "\u2AC6",
45155 "supsetneq;": "\u228B",
45156 "supsetneqq;": "\u2ACC",
45157 "supsim;": "\u2AC8",
45158 "supsub;": "\u2AD4",
45159 "supsup;": "\u2AD6",
45160 "swarhk;": "\u2926",
45161 "swArr;": "\u21D9",
45162 "swarr;": "\u2199",
45163 "swarrow;": "\u2199",
45164 "swnwar;": "\u292A",
45165 "szlig;": "\u00DF",
45168 "target;": "\u2316",
45172 "Tcaron;": "\u0164",
45173 "tcaron;": "\u0165",
45174 "Tcedil;": "\u0162",
45175 "tcedil;": "\u0163",
45179 "telrec;": "\u2315",
45180 "Tfr;": "\uD835\uDD17",
45181 "tfr;": "\uD835\uDD31",
45182 "there4;": "\u2234",
45183 "Therefore;": "\u2234",
45184 "therefore;": "\u2234",
45185 "Theta;": "\u0398",
45186 "theta;": "\u03B8",
45187 "thetasym;": "\u03D1",
45188 "thetav;": "\u03D1",
45189 "thickapprox;": "\u2248",
45190 "thicksim;": "\u223C",
45191 "ThickSpace;": "\u205F\u200A",
45192 "thinsp;": "\u2009",
45193 "ThinSpace;": "\u2009",
45194 "thkap;": "\u2248",
45195 "thksim;": "\u223C",
45196 "THORN;": "\u00DE",
45198 "thorn;": "\u00FE",
45200 "Tilde;": "\u223C",
45201 "tilde;": "\u02DC",
45202 "TildeEqual;": "\u2243",
45203 "TildeFullEqual;": "\u2245",
45204 "TildeTilde;": "\u2248",
45205 "times;": "\u00D7",
45207 "timesb;": "\u22A0",
45208 "timesbar;": "\u2A31",
45209 "timesd;": "\u2A30",
45213 "topbot;": "\u2336",
45214 "topcir;": "\u2AF1",
45215 "Topf;": "\uD835\uDD4B",
45216 "topf;": "\uD835\uDD65",
45217 "topfork;": "\u2ADA",
45219 "tprime;": "\u2034",
45220 "TRADE;": "\u2122",
45221 "trade;": "\u2122",
45222 "triangle;": "\u25B5",
45223 "triangledown;": "\u25BF",
45224 "triangleleft;": "\u25C3",
45225 "trianglelefteq;": "\u22B4",
45226 "triangleq;": "\u225C",
45227 "triangleright;": "\u25B9",
45228 "trianglerighteq;": "\u22B5",
45229 "tridot;": "\u25EC",
45231 "triminus;": "\u2A3A",
45232 "TripleDot;": "\u20DB",
45233 "triplus;": "\u2A39",
45234 "trisb;": "\u29CD",
45235 "tritime;": "\u2A3B",
45236 "trpezium;": "\u23E2",
45237 "Tscr;": "\uD835\uDCAF",
45238 "tscr;": "\uD835\uDCC9",
45241 "TSHcy;": "\u040B",
45242 "tshcy;": "\u045B",
45243 "Tstrok;": "\u0166",
45244 "tstrok;": "\u0167",
45245 "twixt;": "\u226C",
45246 "twoheadleftarrow;": "\u219E",
45247 "twoheadrightarrow;": "\u21A0",
45248 "Uacute;": "\u00DA",
45249 "Uacute": "\u00DA",
45250 "uacute;": "\u00FA",
45251 "uacute": "\u00FA",
45255 "Uarrocir;": "\u2949",
45256 "Ubrcy;": "\u040E",
45257 "ubrcy;": "\u045E",
45258 "Ubreve;": "\u016C",
45259 "ubreve;": "\u016D",
45260 "Ucirc;": "\u00DB",
45262 "ucirc;": "\u00FB",
45266 "udarr;": "\u21C5",
45267 "Udblac;": "\u0170",
45268 "udblac;": "\u0171",
45269 "udhar;": "\u296E",
45270 "ufisht;": "\u297E",
45271 "Ufr;": "\uD835\uDD18",
45272 "ufr;": "\uD835\uDD32",
45273 "Ugrave;": "\u00D9",
45274 "Ugrave": "\u00D9",
45275 "ugrave;": "\u00F9",
45276 "ugrave": "\u00F9",
45278 "uharl;": "\u21BF",
45279 "uharr;": "\u21BE",
45280 "uhblk;": "\u2580",
45281 "ulcorn;": "\u231C",
45282 "ulcorner;": "\u231C",
45283 "ulcrop;": "\u230F",
45284 "ultri;": "\u25F8",
45285 "Umacr;": "\u016A",
45286 "umacr;": "\u016B",
45289 "UnderBar;": "\u005F",
45290 "UnderBrace;": "\u23DF",
45291 "UnderBracket;": "\u23B5",
45292 "UnderParenthesis;": "\u23DD",
45293 "Union;": "\u22C3",
45294 "UnionPlus;": "\u228E",
45295 "Uogon;": "\u0172",
45296 "uogon;": "\u0173",
45297 "Uopf;": "\uD835\uDD4C",
45298 "uopf;": "\uD835\uDD66",
45299 "UpArrow;": "\u2191",
45300 "Uparrow;": "\u21D1",
45301 "uparrow;": "\u2191",
45302 "UpArrowBar;": "\u2912",
45303 "UpArrowDownArrow;": "\u21C5",
45304 "UpDownArrow;": "\u2195",
45305 "Updownarrow;": "\u21D5",
45306 "updownarrow;": "\u2195",
45307 "UpEquilibrium;": "\u296E",
45308 "upharpoonleft;": "\u21BF",
45309 "upharpoonright;": "\u21BE",
45310 "uplus;": "\u228E",
45311 "UpperLeftArrow;": "\u2196",
45312 "UpperRightArrow;": "\u2197",
45315 "upsih;": "\u03D2",
45316 "Upsilon;": "\u03A5",
45317 "upsilon;": "\u03C5",
45318 "UpTee;": "\u22A5",
45319 "UpTeeArrow;": "\u21A5",
45320 "upuparrows;": "\u21C8",
45321 "urcorn;": "\u231D",
45322 "urcorner;": "\u231D",
45323 "urcrop;": "\u230E",
45324 "Uring;": "\u016E",
45325 "uring;": "\u016F",
45326 "urtri;": "\u25F9",
45327 "Uscr;": "\uD835\uDCB0",
45328 "uscr;": "\uD835\uDCCA",
45329 "utdot;": "\u22F0",
45330 "Utilde;": "\u0168",
45331 "utilde;": "\u0169",
45333 "utrif;": "\u25B4",
45334 "uuarr;": "\u21C8",
45339 "uwangle;": "\u29A7",
45340 "vangrt;": "\u299C",
45341 "varepsilon;": "\u03F5",
45342 "varkappa;": "\u03F0",
45343 "varnothing;": "\u2205",
45344 "varphi;": "\u03D5",
45345 "varpi;": "\u03D6",
45346 "varpropto;": "\u221D",
45349 "varrho;": "\u03F1",
45350 "varsigma;": "\u03C2",
45351 "varsubsetneq;": "\u228A\uFE00",
45352 "varsubsetneqq;": "\u2ACB\uFE00",
45353 "varsupsetneq;": "\u228B\uFE00",
45354 "varsupsetneqq;": "\u2ACC\uFE00",
45355 "vartheta;": "\u03D1",
45356 "vartriangleleft;": "\u22B2",
45357 "vartriangleright;": "\u22B3",
45360 "vBarv;": "\u2AE9",
45363 "VDash;": "\u22AB",
45364 "Vdash;": "\u22A9",
45365 "vDash;": "\u22A8",
45366 "vdash;": "\u22A2",
45367 "Vdashl;": "\u2AE6",
45370 "veebar;": "\u22BB",
45371 "veeeq;": "\u225A",
45372 "vellip;": "\u22EE",
45373 "Verbar;": "\u2016",
45374 "verbar;": "\u007C",
45377 "VerticalBar;": "\u2223",
45378 "VerticalLine;": "\u007C",
45379 "VerticalSeparator;": "\u2758",
45380 "VerticalTilde;": "\u2240",
45381 "VeryThinSpace;": "\u200A",
45382 "Vfr;": "\uD835\uDD19",
45383 "vfr;": "\uD835\uDD33",
45384 "vltri;": "\u22B2",
45385 "vnsub;": "\u2282\u20D2",
45386 "vnsup;": "\u2283\u20D2",
45387 "Vopf;": "\uD835\uDD4D",
45388 "vopf;": "\uD835\uDD67",
45389 "vprop;": "\u221D",
45390 "vrtri;": "\u22B3",
45391 "Vscr;": "\uD835\uDCB1",
45392 "vscr;": "\uD835\uDCCB",
45393 "vsubnE;": "\u2ACB\uFE00",
45394 "vsubne;": "\u228A\uFE00",
45395 "vsupnE;": "\u2ACC\uFE00",
45396 "vsupne;": "\u228B\uFE00",
45397 "Vvdash;": "\u22AA",
45398 "vzigzag;": "\u299A",
45399 "Wcirc;": "\u0174",
45400 "wcirc;": "\u0175",
45401 "wedbar;": "\u2A5F",
45402 "Wedge;": "\u22C0",
45403 "wedge;": "\u2227",
45404 "wedgeq;": "\u2259",
45405 "weierp;": "\u2118",
45406 "Wfr;": "\uD835\uDD1A",
45407 "wfr;": "\uD835\uDD34",
45408 "Wopf;": "\uD835\uDD4E",
45409 "wopf;": "\uD835\uDD68",
45412 "wreath;": "\u2240",
45413 "Wscr;": "\uD835\uDCB2",
45414 "wscr;": "\uD835\uDCCC",
45416 "xcirc;": "\u25EF",
45418 "xdtri;": "\u25BD",
45419 "Xfr;": "\uD835\uDD1B",
45420 "xfr;": "\uD835\uDD35",
45421 "xhArr;": "\u27FA",
45422 "xharr;": "\u27F7",
45425 "xlArr;": "\u27F8",
45426 "xlarr;": "\u27F5",
45429 "xodot;": "\u2A00",
45430 "Xopf;": "\uD835\uDD4F",
45431 "xopf;": "\uD835\uDD69",
45432 "xoplus;": "\u2A01",
45433 "xotime;": "\u2A02",
45434 "xrArr;": "\u27F9",
45435 "xrarr;": "\u27F6",
45436 "Xscr;": "\uD835\uDCB3",
45437 "xscr;": "\uD835\uDCCD",
45438 "xsqcup;": "\u2A06",
45439 "xuplus;": "\u2A04",
45440 "xutri;": "\u25B3",
45442 "xwedge;": "\u22C0",
45443 "Yacute;": "\u00DD",
45444 "Yacute": "\u00DD",
45445 "yacute;": "\u00FD",
45446 "yacute": "\u00FD",
45449 "Ycirc;": "\u0176",
45450 "ycirc;": "\u0177",
45455 "Yfr;": "\uD835\uDD1C",
45456 "yfr;": "\uD835\uDD36",
45459 "Yopf;": "\uD835\uDD50",
45460 "yopf;": "\uD835\uDD6A",
45461 "Yscr;": "\uD835\uDCB4",
45462 "yscr;": "\uD835\uDCCE",
45468 "Zacute;": "\u0179",
45469 "zacute;": "\u017A",
45470 "Zcaron;": "\u017D",
45471 "zcaron;": "\u017E",
45476 "zeetrf;": "\u2128",
45477 "ZeroWidthSpace;": "\u200B",
45481 "zfr;": "\uD835\uDD37",
45484 "zigrarr;": "\u21DD",
45486 "zopf;": "\uD835\uDD6B",
45487 "Zscr;": "\uD835\uDCB5",
45488 "zscr;": "\uD835\uDCCF",
45496 /***/ (function(module, __webpack_exports__, __webpack_require__) {
45499 __webpack_require__.r(__webpack_exports__);
45500 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; });
45501 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; });
45502 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commonPrefixLength", function() { return commonPrefixLength; });
45503 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
45504 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLetterOrDigit", function() { return isLetterOrDigit; });
45505 /*---------------------------------------------------------------------------------------------
45506 * Copyright (c) Microsoft Corporation. All rights reserved.
45507 * Licensed under the MIT License. See License.txt in the project root for license information.
45508 *--------------------------------------------------------------------------------------------*/
45509 function startsWith(haystack, needle) {
45510 if (haystack.length < needle.length) {
45513 for (var i = 0; i < needle.length; i++) {
45514 if (haystack[i] !== needle[i]) {
45521 * Determines if haystack ends with needle.
45523 function endsWith(haystack, needle) {
45524 var diff = haystack.length - needle.length;
45526 return haystack.lastIndexOf(needle) === diff;
45528 else if (diff === 0) {
45529 return haystack === needle;
45536 * @returns the length of the common prefix of the two strings.
45538 function commonPrefixLength(a, b) {
45540 var len = Math.min(a.length, b.length);
45541 for (i = 0; i < len; i++) {
45542 if (a.charCodeAt(i) !== b.charCodeAt(i)) {
45548 function repeat(value, count) {
45550 while (count > 0) {
45551 if ((count & 1) === 1) {
45555 count = count >>> 1;
45559 var _a = 'a'.charCodeAt(0);
45560 var _z = 'z'.charCodeAt(0);
45561 var _A = 'A'.charCodeAt(0);
45562 var _Z = 'Z'.charCodeAt(0);
45563 var _0 = '0'.charCodeAt(0);
45564 var _9 = '9'.charCodeAt(0);
45565 function isLetterOrDigit(text, index) {
45566 var c = text.charCodeAt(index);
45567 return (_a <= c && c <= _z) || (_A <= c && c <= _Z) || (_0 <= c && c <= _9);
45573 /***/ (function(module, __webpack_exports__, __webpack_require__) {
45576 __webpack_require__.r(__webpack_exports__);
45577 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "builtinDataProviders", function() { return builtinDataProviders; });
45578 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllDataProviders", function() { return getAllDataProviders; });
45579 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handleCustomDataProviders", function() { return handleCustomDataProviders; });
45580 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(121);
45581 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(123);
45582 /*---------------------------------------------------------------------------------------------
45583 * Copyright (c) Microsoft Corporation. All rights reserved.
45584 * Licensed under the MIT License. See License.txt in the project root for license information.
45585 *--------------------------------------------------------------------------------------------*/
45588 var builtinDataProviders = [
45589 new _dataProvider__WEBPACK_IMPORTED_MODULE_0__["HTMLDataProvider"]('html5', _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__["htmlData"])
45591 var customDataProviders = [];
45592 function getAllDataProviders() {
45593 return builtinDataProviders.concat(customDataProviders);
45595 function handleCustomDataProviders(providers) {
45596 providers.forEach(function (p) {
45597 customDataProviders.push(p);
45604 /***/ (function(module, __webpack_exports__, __webpack_require__) {
45607 __webpack_require__.r(__webpack_exports__);
45608 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTMLDataProvider", function() { return HTMLDataProvider; });
45609 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateDocumentation", function() { return generateDocumentation; });
45610 /* harmony import */ var _utils_markup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
45611 /*---------------------------------------------------------------------------------------------
45612 * Copyright (c) Microsoft Corporation. All rights reserved.
45613 * Licensed under the MIT License. See License.txt in the project root for license information.
45614 *--------------------------------------------------------------------------------------------*/
45616 var HTMLDataProvider = /** @class */ (function () {
45618 * Currently, unversioned data uses the V1 implementation
45619 * In the future when the provider handles multiple versions of HTML custom data,
45620 * use the latest implementation for unversioned data
45622 function HTMLDataProvider(id, customData) {
45627 this._attributeMap = {};
45628 this._valueSetMap = {};
45629 this._tags = customData.tags || [];
45630 this._globalAttributes = customData.globalAttributes || [];
45631 this._tags.forEach(function (t) {
45632 _this._tagMap[t.name] = t;
45633 if (t.attributes) {
45634 t.attributes.forEach(function (a) {
45635 _this._attributeMap[a.name] = a;
45639 this._globalAttributes.forEach(function (a) {
45640 _this._attributeMap[a.name] = a;
45642 if (customData.valueSets) {
45643 customData.valueSets.forEach(function (vs) {
45644 _this._valueSetMap[vs.name] = vs.values;
45648 HTMLDataProvider.prototype.isApplicable = function () {
45651 HTMLDataProvider.prototype.getId = function () {
45654 HTMLDataProvider.prototype.provideTags = function () {
45657 HTMLDataProvider.prototype.provideAttributes = function (tag) {
45658 var attributes = [];
45659 var processAttribute = function (a) {
45660 attributes.push(a);
45662 if (this._tagMap[tag]) {
45663 this._tagMap[tag].attributes.forEach(function (a) {
45664 processAttribute(a);
45667 this._globalAttributes.forEach(function (ga) {
45668 processAttribute(ga);
45672 HTMLDataProvider.prototype.provideValues = function (tag, attribute) {
45675 var processAttributes = function (attributes) {
45676 attributes.forEach(function (a) {
45677 if (a.name === attribute) {
45679 a.values.forEach(function (v) {
45684 if (_this._valueSetMap[a.valueSet]) {
45685 _this._valueSetMap[a.valueSet].forEach(function (v) {
45693 if (!this._tagMap[tag]) {
45696 processAttributes(this._tagMap[tag].attributes);
45697 processAttributes(this._globalAttributes);
45700 return HTMLDataProvider;
45704 * Generate Documentation used in hover/complete
45705 * From `documentation` and `references`
45707 function generateDocumentation(item, doesSupportMarkdown) {
45709 kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
45712 if (item.description) {
45713 var normalizedDescription = Object(_utils_markup__WEBPACK_IMPORTED_MODULE_0__["normalizeMarkupContent"])(item.description);
45714 if (normalizedDescription) {
45715 result.value += normalizedDescription.value;
45718 if (item.references && item.references.length > 0) {
45719 result.value += "\n\n";
45720 if (doesSupportMarkdown) {
45721 result.value += item.references.map(function (r) {
45722 return "[" + r.name + "](" + r.url + ")";
45726 result.value += item.references.map(function (r) {
45727 return r.name + ": " + r.url;
45731 if (result.value === '') {
45740 /***/ (function(module, __webpack_exports__, __webpack_require__) {
45743 __webpack_require__.r(__webpack_exports__);
45744 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeMarkupContent", function() { return normalizeMarkupContent; });
45745 /*---------------------------------------------------------------------------------------------
45746 * Copyright (c) Microsoft Corporation. All rights reserved.
45747 * Licensed under the MIT License. See License.txt in the project root for license information.
45748 *--------------------------------------------------------------------------------------------*/
45749 function normalizeMarkupContent(input) {
45753 if (typeof input === 'string') {
45768 /***/ (function(module, __webpack_exports__, __webpack_require__) {
45771 __webpack_require__.r(__webpack_exports__);
45772 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlData", function() { return htmlData; });
45773 /*---------------------------------------------------------------------------------------------
45774 * Copyright (c) Microsoft Corporation. All rights reserved.
45775 * Licensed under the MIT License. See License.txt in the project root for license information.
45776 *--------------------------------------------------------------------------------------------*/
45777 // file generated from vscode-web-custom-data NPM package
45784 "kind": "markdown",
45785 "value": "The html element represents the root of an HTML document."
45789 "name": "manifest",
45791 "kind": "markdown",
45792 "value": "Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."
45797 "description": "Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD \"Document Type Definition: In HTML, the doctype is the required \"<!DOCTYPE html>\" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the \"<!DOCTYPE html>\" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.\") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration."
45801 "description": "Specifies the XML Namespace of the document. Default value is `\"http://www.w3.org/1999/xhtml\"`. This is required in documents parsed with XML parsers, and optional in text/html documents."
45806 "name": "MDN Reference",
45807 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/html"
45814 "kind": "markdown",
45815 "value": "The head element represents a collection of metadata for the Document."
45820 "description": "The URIs of one or more metadata profiles, separated by white space."
45825 "name": "MDN Reference",
45826 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/head"
45833 "kind": "markdown",
45834 "value": "The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."
45839 "name": "MDN Reference",
45840 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/title"
45847 "kind": "markdown",
45848 "value": "The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."
45854 "kind": "markdown",
45855 "value": "The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."
45861 "kind": "markdown",
45862 "value": "A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."
45868 "name": "MDN Reference",
45869 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/base"
45876 "kind": "markdown",
45877 "value": "The link element allows authors to link their document to other resources."
45883 "kind": "markdown",
45884 "value": "This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL \"URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.\") of the linked resource. A URL can be absolute or relative."
45888 "name": "crossorigin",
45891 "kind": "markdown",
45892 "value": "This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials \"The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is \"include\".\") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information."
45898 "kind": "markdown",
45899 "value": "This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
45905 "kind": "markdown",
45906 "value": "This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."
45910 "name": "hreflang",
45912 "kind": "markdown",
45913 "value": "This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."
45919 "kind": "markdown",
45920 "value": "This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel=\"preload\"` link types, to make sure the browser only downloads file types that it supports."
45926 "kind": "markdown",
45927 "value": "This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."
45932 "description": "This attribute is only used when `rel=\"preload\"` or `rel=\"prefetch\"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept \"The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image, video or a script.\") request header."
45935 "name": "importance",
45936 "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
45939 "name": "importance",
45940 "description": "**`auto`**: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the browser that the resource is of **high** priority.\n\n**`low`**: Indicates to the browser that the resource is of **low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel=\"preload\"` or `rel=\"prefetch\"` is present."
45943 "name": "integrity",
45944 "description": "Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."
45947 "name": "referrerpolicy",
45948 "description": "A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer's path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
45952 "description": "The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel=\"stylesheet\">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets)."
45957 "name": "MDN Reference",
45958 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/link"
45965 "kind": "markdown",
45966 "value": "The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements."
45972 "kind": "markdown",
45973 "value": "This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [`itemprop`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.\n\nThis metadata name is associated with the value contained by the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:\n\n* `application-name` which defines the name of the application running in the web page.\n \n **Note:**\n \n * Browsers may use this to identify the application. It is different from the [`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title \"The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.\") element, which usually contain the application name, but may also contain information like the document name or a status.\n * Simple web pages shouldn't define an application-name.\n \n* `author` which defines the name of the document's author.\n* `description` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.\n* `generator` which contains the identifier of the software that generated the page.\n* `keywords` which contains words relevant to the page's content separated by commas.\n* `referrer` which controls the [`Referer` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document:\n \n Values for the `content` attribute of `<meta name=\"referrer\">`\n \n `no-referrer`\n \n Do not send a HTTP `Referrer` header.\n \n `origin`\n \n Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document.\n \n `no-referrer-when-downgrade`\n \n Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https→https), but does not send a referrer to less secure URLs (https→http). This is the default behaviour.\n \n `origin-when-cross-origin`\n \n Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases.\n \n `same-origin`\n \n A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information.\n \n `strict-origin`\n \n Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).\n \n `strict-origin-when-cross-origin`\n \n Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).\n \n `unsafe-URL`\n \n Send the full URL (stripped of parameters) for same-origin or cross-origin requests.\n \n **Notes:**\n \n * Some browsers support the deprecated values of `always`, `default`, and `never` for referrer.\n * Dynamically inserting `<meta name=\"referrer\">` (with [`document.write`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [`appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable.\n * When several conflicting policies are defined, the no-referrer policy is applied.\n \n\nThis attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are:\n\n* `creator` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") elements should be used.\n* `googlebot`, a synonym of `robots`, is only followed by Googlebot (the indexing crawler for Google).\n* `publisher` which defines the name of the document's publisher.\n* `robots` which defines the behaviour that cooperative crawlers, or \"robots\", should use with the page. It is a comma-separated list of the values below:\n \n Values for the content of `<meta name=\"robots\">`\n \n Value\n \n Description\n \n Used by\n \n `index`\n \n Allows the robot to index the page (default).\n \n All\n \n `noindex`\n \n Requests the robot to not index the page.\n \n All\n \n `follow`\n \n Allows the robot to follow the links on the page (default).\n \n All\n \n `nofollow`\n \n Requests the robot to not follow the links on the page.\n \n All\n \n `none`\n \n Equivalent to `noindex, nofollow`\n \n [Google](https://support.google.com/webmasters/answer/79812)\n \n `noodp`\n \n Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results.\n \n [Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `noarchive`\n \n Requests the search engine not to cache the page content.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `nosnippet`\n \n Prevents displaying any description of the page in search engine results.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `noimageindex`\n \n Requests this page not to appear as the referring page of an indexed image.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives)\n \n `nocache`\n \n Synonym of `noarchive`.\n \n [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n **Notes:**\n \n * Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.\n * The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt \"robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether crawlers are permitted or forbidden access to the web site.\")_ file.\n * If you want to remove a page, `noindex` will work, but only after the robot visits the page again. Ensure that the `robots.txt` file is not preventing revisits.\n * Some values are mutually exclusive, like `index` and `noindex`, or `follow` and `nofollow`. In these cases the robot's behaviour is undefined and may vary between them.\n * Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header `X-Robots-Tag`; this allows non-HTML documents like images to use these rules.\n \n* `slurp`, is a synonym of `robots`, but only for Slurp - the crawler for Yahoo Search.\n* `viewport`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport \"viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view.\"). Used by mobile devices only.\n \n Values for the content of `<meta name=\"viewport\">`\n \n Value\n \n Possible subvalues\n \n Description\n \n `width`\n \n A positive integer number, or the text `device-width`\n \n Defines the pixel width of the viewport that you want the web site to be rendered at.\n \n `height`\n \n A positive integer, or the text `device-height`\n \n Defines the height of the viewport. Not used by any browser.\n \n `initial-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the ratio between the device width (`device-width` in portrait mode or `device-height` in landscape mode) and the viewport size.\n \n `maximum-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the maximum amount to zoom in. It must be greater or equal to the `minimum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n \n `minimum-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the minimum zoom level. It must be smaller or equal to the `maximum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n \n `user-scalable`\n \n `yes` or `no`\n \n If set to `no`, the user is not able to zoom in the webpage. The default is `yes`. Browser settings can ignore this rule, and iOS10+ ignores it by default.\n \n Specification\n \n Status\n \n Comment\n \n [CSS Device Adaptation \n The definition of '<meta name=\"viewport\">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta)\n \n Working Draft\n \n Non-normatively describes the Viewport META element\n \n See also: [`@viewport`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport \"The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).\")\n \n **Notes:**\n \n * Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.\n * The default values may vary between devices and browsers.\n * To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag \"Mobile/Viewport meta tag\")."
45977 "name": "http-equiv",
45979 "kind": "markdown",
45980 "value": "Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n* `\"content-language\"` \n Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n \n **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html \"The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.\") element.\n \n* `\"content-security-policy\"` \n Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n* `\"content-type\"` \n Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string '`text/html`' followed by a character set with the following syntax: '`; charset=_IANAcharset_`', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n \n **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element.\n \n **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") can't change documents' types in XHTML or HTML5's XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n \n* `\"refresh\"` \n This instruction specifies:\n * The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n * The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string '`;url=`', and a valid URL.\n* `\"set-cookie\"` \n Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n \n **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead."
45986 "kind": "markdown",
45987 "value": "This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."
45993 "kind": "markdown",
45994 "value": "This attribute declares the page's character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn't request a specific encoding, it suggests:\n\n* Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n* Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don't map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n* Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks with these encodings have been demonstrated.\n* Authors should not use `UTF-32` because not all HTML5 encoding algorithms can distinguish it from `UTF-16`.\n\n**Notes:**\n\n* The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element declaring the encoding must be inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head \"The HTML <head> element provides general information (metadata) about the document, including its title and links to its scripts and style sheets.\") element and **within the first 1024 bytes** of the HTML as some browsers only look at those bytes before choosing an encoding.\n* This [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element is only one part of the [algorithm to determine a page's character set](https://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#encoding-sniffing-algorithm \"Algorithm charset page\"). The [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) and any [Byte-Order Marks](https://developer.mozilla.org/en-US/docs/Glossary/Byte-Order_Mark \"The definition of that term (Byte-Order Marks) has not been written yet; please consider contributing it!\") override this element.\n* It is strongly recommended to define the character encoding. If a page's encoding is undefined, cross-scripting techniques are possible, such as the [`UTF-7` fallback cross-scripting technique](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7).\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element with a `charset` attribute is a synonym for the pre-HTML5 `<meta http-equiv=\"Content-Type\" content=\"text/html; charset=_IANAcharset_\">`, where _`IANAcharset`_ contains the value of the equivalent [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute. This syntax is still allowed, although no longer recommended."
45999 "description": "This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) value, like a format.\n\n**Warning:** Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it."
46004 "name": "MDN Reference",
46005 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/meta"
46012 "kind": "markdown",
46013 "value": "The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user."
46019 "kind": "markdown",
46020 "value": "This attribute defines which media the style should be applied to. Its value is a [media query](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries), which defaults to `all` if the attribute is missing."
46026 "kind": "markdown",
46027 "value": "A cryptographic nonce (number used once) used to whitelist inline styles in a [style-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial."
46033 "kind": "markdown",
46034 "value": "This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to `text/css` if it is not specified — there is very little reason to include this in modern web documents."
46043 "description": "This attribute specifies [alternative style sheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets) sets."
46048 "name": "MDN Reference",
46049 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/style"
46056 "kind": "markdown",
46057 "value": "The body element represents the content of the document."
46061 "name": "onafterprint",
46063 "kind": "markdown",
46064 "value": "Function to call after the user has printed the document."
46068 "name": "onbeforeprint",
46070 "kind": "markdown",
46071 "value": "Function to call when the user requests printing of the document."
46075 "name": "onbeforeunload",
46077 "kind": "markdown",
46078 "value": "Function to call when the document is about to be unloaded."
46082 "name": "onhashchange",
46084 "kind": "markdown",
46085 "value": "Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed."
46089 "name": "onlanguagechange",
46091 "kind": "markdown",
46092 "value": "Function to call when the preferred languages changed."
46096 "name": "onmessage",
46098 "kind": "markdown",
46099 "value": "Function to call when the document has received a message."
46103 "name": "onoffline",
46105 "kind": "markdown",
46106 "value": "Function to call when network communication has failed."
46110 "name": "ononline",
46112 "kind": "markdown",
46113 "value": "Function to call when network communication has been restored."
46117 "name": "onpagehide"
46120 "name": "onpageshow"
46123 "name": "onpopstate",
46125 "kind": "markdown",
46126 "value": "Function to call when the user has navigated session history."
46130 "name": "onstorage",
46132 "kind": "markdown",
46133 "value": "Function to call when the storage area has changed."
46137 "name": "onunload",
46139 "kind": "markdown",
46140 "value": "Function to call when the document is going away."
46145 "description": "Color of text for hyperlinks when selected. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:active`](https://developer.mozilla.org/en-US/docs/Web/CSS/:active \"The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user.\") pseudo-class instead._"
46148 "name": "background",
46149 "description": "URI of a image to use as a background. _This method is non-conforming, use CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background \"The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.\") property on the element instead._"
46153 "description": "Background color for the document. _This method is non-conforming, use CSS [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property on the element instead._"
46156 "name": "bottommargin",
46157 "description": "The margin of the bottom of the body. _This method is non-conforming, use CSS [`margin-bottom`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom \"The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
46160 "name": "leftmargin",
46161 "description": "The margin of the left of the body. _This method is non-conforming, use CSS [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
46165 "description": "Color of text for unvisited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:link`](https://developer.mozilla.org/en-US/docs/Web/CSS/:link \"The :link CSS pseudo-class represents an element that has not yet been visited. It matches every unvisited <a>, <area>, or <link> element that has an href attribute.\") pseudo-class instead._"
46169 "description": "Function to call when the document loses focus."
46173 "description": "Function to call when the document fails to load properly."
46177 "description": "Function to call when the document receives focus."
46181 "description": "Function to call when the document has finished loading."
46185 "description": "Function to call when the user has moved forward in undo transaction history."
46188 "name": "onresize",
46189 "description": "Function to call when the document has been resized."
46193 "description": "Function to call when the user has moved backward in undo transaction history."
46196 "name": "rightmargin",
46197 "description": "The margin of the right of the body. _This method is non-conforming, use CSS [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
46201 "description": "Foreground color of text. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property on the element instead._"
46204 "name": "topmargin",
46205 "description": "The margin of the top of the body. _This method is non-conforming, use CSS [`margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top \"The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
46209 "description": "Color of text for visited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:visited`](https://developer.mozilla.org/en-US/docs/Web/CSS/:visited \"The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.\") pseudo-class instead._"
46214 "name": "MDN Reference",
46215 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/body"
46222 "kind": "markdown",
46223 "value": "The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each article should be identified, typically by including a heading (h1–h6 element) as a child of the article element."
46228 "name": "MDN Reference",
46229 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/article"
46236 "kind": "markdown",
46237 "value": "The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. Each section should be identified, typically by including a heading ( h1- h6 element) as a child of the section element."
46242 "name": "MDN Reference",
46243 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/section"
46250 "kind": "markdown",
46251 "value": "The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links."
46256 "name": "MDN Reference",
46257 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/nav"
46264 "kind": "markdown",
46265 "value": "The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography."
46270 "name": "MDN Reference",
46271 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/aside"
46278 "kind": "markdown",
46279 "value": "The h1 element represents a section heading."
46284 "name": "MDN Reference",
46285 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46292 "kind": "markdown",
46293 "value": "The h2 element represents a section heading."
46298 "name": "MDN Reference",
46299 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46306 "kind": "markdown",
46307 "value": "The h3 element represents a section heading."
46312 "name": "MDN Reference",
46313 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46320 "kind": "markdown",
46321 "value": "The h4 element represents a section heading."
46326 "name": "MDN Reference",
46327 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46334 "kind": "markdown",
46335 "value": "The h5 element represents a section heading."
46340 "name": "MDN Reference",
46341 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46348 "kind": "markdown",
46349 "value": "The h6 element represents a section heading."
46354 "name": "MDN Reference",
46355 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
46362 "kind": "markdown",
46363 "value": "The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page."
46368 "name": "MDN Reference",
46369 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/header"
46376 "kind": "markdown",
46377 "value": "The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like."
46382 "name": "MDN Reference",
46383 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/footer"
46390 "kind": "markdown",
46391 "value": "The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole."
46396 "name": "MDN Reference",
46397 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/address"
46404 "kind": "markdown",
46405 "value": "The p element represents a paragraph."
46410 "name": "MDN Reference",
46411 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/p"
46418 "kind": "markdown",
46419 "value": "The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book."
46424 "description": "Sets the alignment of the rule on the page. If no value is specified, the default value is `left`."
46428 "description": "Sets the color of the rule through color name or hexadecimal value."
46432 "description": "Sets the rule to have no shading."
46436 "description": "Sets the height, in pixels, of the rule."
46440 "description": "Sets the length of the rule on the page through a pixel or percentage value."
46445 "name": "MDN Reference",
46446 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/hr"
46453 "kind": "markdown",
46454 "value": "The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements."
46459 "description": "Contains the _preferred_ count of characters that a line should have. It was a non-standard synonym of [`width`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#attr-width). To achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
46463 "description": "Contains the _preferred_ count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
46467 "description": "Is a _hint_ indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space \"The white-space CSS property sets how white space inside an element is handled.\") instead."
46472 "name": "MDN Reference",
46473 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/pre"
46478 "name": "blockquote",
46480 "kind": "markdown",
46481 "value": "The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations."
46487 "kind": "markdown",
46488 "value": "A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
46494 "name": "MDN Reference",
46495 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/blockquote"
46502 "kind": "markdown",
46503 "value": "The ol element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document."
46507 "name": "reversed",
46510 "kind": "markdown",
46511 "value": "This Boolean attribute specifies that the items of the list are specified in reversed order."
46517 "kind": "markdown",
46518 "value": "This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter \"C\", use `<ol start=\"3\">`.\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5."
46525 "kind": "markdown",
46526 "value": "Indicates the numbering type:\n\n* `'a'` indicates lowercase letters,\n* `'A'` indicates uppercase letters,\n* `'i'` indicates lowercase Roman numerals,\n* `'I'` indicates uppercase Roman numerals,\n* and `'1'` indicates numbers (default).\n\nThe type set is used for the entire list unless a different [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-type) attribute is used within an enclosed [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li \"The HTML <li> element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.\") element.\n\n**Note:** This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\nUnless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property should be used instead."
46531 "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Warning:** Do not use this attribute, as it has been deprecated: the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give an effect similar to the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [`line-height`](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height \"The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.\") can be used with a value of `80%`."
46536 "name": "MDN Reference",
46537 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ol"
46544 "kind": "markdown",
46545 "value": "The ul element represents a list of items, where the order of the items is not important — that is, where changing the order would not materially change the meaning of the document."
46550 "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Usage note: **Do not use this attribute, as it has been deprecated: the [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give a similar effect as the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [line-height](https://developer.mozilla.org/en-US/docs/CSS/line-height) can be used with a value of `80%`."
46555 "name": "MDN Reference",
46556 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ul"
46563 "kind": "markdown",
46564 "value": "The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element."
46570 "kind": "markdown",
46571 "value": "This integer attribute indicates the current ordinal value of the list item as defined by the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The **value** attribute has no meaning for unordered lists ([`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\")) or for menus ([`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\")).\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\n**Note:** Prior to Gecko 9.0, negative values were incorrectly converted to 0. Starting in Gecko 9.0 all integer values are correctly parsed."
46576 "description": "This character attribute indicates the numbering type:\n\n* `a`: lowercase letters\n* `A`: uppercase letters\n* `i`: lowercase Roman numerals\n* `I`: uppercase Roman numerals\n* `1`: numbers\n\nThis type overrides the one used by its parent [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element, if any.\n\n**Usage note:** This attribute has been deprecated: use the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property instead."
46581 "name": "MDN Reference",
46582 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/li"
46589 "kind": "markdown",
46590 "value": "The dl element represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dt elements) followed by one or more values (dd elements), ignoring any nodes other than dt and dd elements. Within a single dl element, there should not be more than one dt element for each name."
46595 "name": "MDN Reference",
46596 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dl"
46603 "kind": "markdown",
46604 "value": "The dt element represents the term, or name, part of a term-description group in a description list (dl element)."
46609 "name": "MDN Reference",
46610 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dt"
46617 "kind": "markdown",
46618 "value": "The dd element represents the description, definition, or value, part of a term-description group in a description list (dl element)."
46623 "description": "If the value of this attribute is set to `yes`, the definition text will not wrap. The default value is `no`."
46628 "name": "MDN Reference",
46629 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dd"
46636 "kind": "markdown",
46637 "value": "The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document."
46642 "name": "MDN Reference",
46643 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/figure"
46648 "name": "figcaption",
46650 "kind": "markdown",
46651 "value": "The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any."
46656 "name": "MDN Reference",
46657 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/figcaption"
46664 "kind": "markdown",
46665 "value": "The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application."
46670 "name": "MDN Reference",
46671 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/main"
46678 "kind": "markdown",
46679 "value": "The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements."
46684 "name": "MDN Reference",
46685 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/div"
46692 "kind": "markdown",
46693 "value": "If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents."
46699 "kind": "markdown",
46700 "value": "Contains a URL or a URL fragment that the hyperlink points to."
46706 "kind": "markdown",
46707 "value": "Specifies where to display the linked URL. It is a name of, or keyword for, a _browsing context_: a tab, window, or `<iframe>`. The following keywords have special meanings:\n\n* `_self`: Load the URL into the same browsing context as the current one. This is the default behavior.\n* `_blank`: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.\n* `_parent`: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as `_self`.\n* `_top`: Load the URL into the top-level browsing context (that is, the \"highest\" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as `_self`.\n\n**Note:** When using `target`, consider adding `rel=\"noreferrer\"` to avoid exploitation of the `window.opener` API.\n\n**Note:** Linking to another page using `target=\"_blank\"` will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use `rel=\"noopener\"`."
46711 "name": "download",
46713 "kind": "markdown",
46714 "value": "This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though `/` and `\\` are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.\n\n**Notes:**\n\n* This attribute only works for [same-origin URLs](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).\n* Although HTTP(s) URLs need to be in the same-origin, [`blob:` URLs](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) and [`data:` URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.\n* If the HTTP header [`Content-Disposition:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) gives a different filename than this attribute, the HTTP header takes priority over this attribute.\n* If `Content-Disposition:` is set to `inline`, Firefox prioritizes `Content-Disposition`, like the filename case, while Chrome prioritizes the `download` attribute."
46720 "kind": "markdown",
46721 "value": "Contains a space-separated list of URLs to which, when the hyperlink is followed, [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST \"The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.\") requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking."
46727 "kind": "markdown",
46728 "value": "Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
46732 "name": "hreflang",
46734 "kind": "markdown",
46735 "value": "This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt \"Tags for Identifying Languages\")."
46741 "kind": "markdown",
46742 "value": "Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type \"MIME type: A MIME type (now properly called \"media type\", but also sometimes \"content type\") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).\") for the linked URL. It is purely advisory, with no built-in functionality."
46746 "name": "referrerpolicy",
46747 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to send when fetching the URL:\n\n* `'no-referrer'` means the `Referer:` header will not be sent.\n* `'no-referrer-when-downgrade'` means no `Referer:` header will be sent when navigating to an origin without HTTPS. This is the default behavior.\n* `'origin'` means the referrer will be the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the page, not including information after the domain.\n* `'origin-when-cross-origin'` meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.\n* `'strict-origin-when-cross-origin'`\n* `'unsafe-url'` means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones."
46752 "name": "MDN Reference",
46753 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/a"
46760 "kind": "markdown",
46761 "value": "The em element represents stress emphasis of its contents."
46766 "name": "MDN Reference",
46767 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/em"
46774 "kind": "markdown",
46775 "value": "The strong element represents strong importance, seriousness, or urgency for its contents."
46780 "name": "MDN Reference",
46781 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/strong"
46788 "kind": "markdown",
46789 "value": "The small element represents side comments such as small print."
46794 "name": "MDN Reference",
46795 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/small"
46802 "kind": "markdown",
46803 "value": "The s element represents contents that are no longer accurate or no longer relevant."
46808 "name": "MDN Reference",
46809 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/s"
46816 "kind": "markdown",
46817 "value": "The cite element represents a reference to a creative work. It must include the title of the work or the name of the author(person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."
46822 "name": "MDN Reference",
46823 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/cite"
46830 "kind": "markdown",
46831 "value": "The q element represents some phrasing content quoted from another source."
46837 "kind": "markdown",
46838 "value": "The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
46844 "name": "MDN Reference",
46845 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/q"
46852 "kind": "markdown",
46853 "value": "The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element."
46858 "name": "MDN Reference",
46859 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dfn"
46866 "kind": "markdown",
46867 "value": "The abbr element represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else."
46872 "name": "MDN Reference",
46873 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/abbr"
46880 "kind": "markdown",
46881 "value": "The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. Ruby text can appear on either side, and sometimes both sides, of the base text, and it is possible to control its position using CSS. A more complete introduction to ruby can be found in the Use Cases & Exploratory Approaches for Ruby Markup document as well as in CSS Ruby Module Level 1. [RUBY-UC] [CSSRUBY]"
46886 "name": "MDN Reference",
46887 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ruby"
46894 "kind": "markdown",
46895 "value": "The rb element marks the base text component of a ruby annotation. When it is the child of a ruby element, it doesn't represent anything itself, but its parent ruby element uses it as part of determining what it represents."
46900 "name": "MDN Reference",
46901 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rb"
46908 "kind": "markdown",
46909 "value": "The rt element marks the ruby text component of a ruby annotation. When it is the child of a ruby element or of an rtc element that is itself the child of a ruby element, it doesn't represent anything itself, but its ancestor ruby element uses it as part of determining what it represents."
46914 "name": "MDN Reference",
46915 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rt"
46922 "kind": "markdown",
46923 "value": "The rp element is used to provide fallback text to be shown by user agents that don't support ruby annotations. One widespread convention is to provide parentheses around the ruby text component of a ruby annotation."
46928 "name": "MDN Reference",
46929 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rp"
46936 "kind": "markdown",
46937 "value": "The time element represents its contents, along with a machine-readable form of those contents in the datetime attribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below."
46941 "name": "datetime",
46943 "kind": "markdown",
46944 "value": "This attribute indicates the time and/or date of the element and must be in one of the formats described below."
46950 "name": "MDN Reference",
46951 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/time"
46958 "kind": "markdown",
46959 "value": "The code element represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize."
46964 "name": "MDN Reference",
46965 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/code"
46972 "kind": "markdown",
46973 "value": "The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose."
46978 "name": "MDN Reference",
46979 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/var"
46986 "kind": "markdown",
46987 "value": "The samp element represents sample or quoted output from another program or computing system."
46992 "name": "MDN Reference",
46993 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/samp"
47000 "kind": "markdown",
47001 "value": "The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)."
47006 "name": "MDN Reference",
47007 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/kbd"
47014 "kind": "markdown",
47015 "value": "The sub element represents a subscript."
47020 "name": "MDN Reference",
47021 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/sub"
47028 "kind": "markdown",
47029 "value": "The sup element represents a superscript."
47034 "name": "MDN Reference",
47035 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/sup"
47042 "kind": "markdown",
47043 "value": "The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts."
47048 "name": "MDN Reference",
47049 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/i"
47056 "kind": "markdown",
47057 "value": "The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede."
47062 "name": "MDN Reference",
47063 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/b"
47070 "kind": "markdown",
47071 "value": "The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt."
47076 "name": "MDN Reference",
47077 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/u"
47084 "kind": "markdown",
47085 "value": "The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity."
47090 "name": "MDN Reference",
47091 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/mark"
47098 "kind": "markdown",
47099 "value": "The bdi element represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. [BIDI]"
47104 "name": "MDN Reference",
47105 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/bdi"
47112 "kind": "markdown",
47113 "value": "The bdo element represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. [BIDI]"
47118 "description": "The direction in which text should be rendered in this element's contents. Possible values are:\n\n* `ltr`: Indicates that the text should go in a left-to-right direction.\n* `rtl`: Indicates that the text should go in a right-to-left direction."
47123 "name": "MDN Reference",
47124 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/bdo"
47131 "kind": "markdown",
47132 "value": "The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children."
47137 "name": "MDN Reference",
47138 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/span"
47145 "kind": "markdown",
47146 "value": "The br element represents a line break."
47151 "description": "Indicates where to begin the next line after the break."
47156 "name": "MDN Reference",
47157 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/br"
47164 "kind": "markdown",
47165 "value": "The wbr element represents a line break opportunity."
47170 "name": "MDN Reference",
47171 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/wbr"
47178 "kind": "markdown",
47179 "value": "The ins element represents an addition to the document."
47184 "description": "This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system."
47187 "name": "datetime",
47188 "description": "This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
47193 "name": "MDN Reference",
47194 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ins"
47201 "kind": "markdown",
47202 "value": "The del element represents a removal from the document."
47208 "kind": "markdown",
47209 "value": "A URI for a resource that explains the change (for example, meeting minutes)."
47213 "name": "datetime",
47215 "kind": "markdown",
47216 "value": "This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
47222 "name": "MDN Reference",
47223 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/del"
47230 "kind": "markdown",
47231 "value": "The picture element is a container which provides multiple sources to its contained img element to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children."
47236 "name": "MDN Reference",
47237 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/picture"
47244 "kind": "markdown",
47245 "value": "An img element represents an image."
47251 "kind": "markdown",
47252 "value": "This attribute defines an alternative text description of the image.\n\n**Note:** Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an [unsupported type](#Supported_image_formats). In these cases, the browser may replace the image with the text defined in this element's `alt` attribute. You should, for these reasons and others, provide a useful value for `alt` whenever possible.\n\n**Note:** Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (`alt=\"\"`) indicates that this image is _not_ a key part of the content (decorative), and that non-visual browsers may omit it from rendering."
47258 "kind": "markdown",
47259 "value": "The image URL. This attribute is mandatory for the `<img>` element. On browsers supporting `srcset`, `src` is treated like a candidate image with a pixel density descriptor `1x` unless an image with this pixel density descriptor is already defined in `srcset,` or unless `srcset` contains '`w`' descriptors."
47265 "kind": "markdown",
47266 "value": "A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:\n\n1. a URL to an image,\n2. optionally, whitespace followed by one of:\n * A width descriptor, or a positive integer directly followed by '`w`'. The width descriptor is divided by the source size given in the `sizes` attribute to calculate the effective pixel density.\n * A pixel density descriptor, which is a positive floating point number directly followed by '`x`'.\n\nIf no descriptor is specified, the source is assigned the default descriptor: `1x`.\n\nIt is incorrect to mix width descriptors and pixel density descriptors in the same `srcset` attribute. Duplicate descriptors (for instance, two sources in the same `srcset` which are both described with '`2x`') are also invalid.\n\nThe user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our [Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) tutorial for an example."
47270 "name": "crossorigin",
47273 "kind": "markdown",
47274 "value": "This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being \"[tainted](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#What_is_a_tainted_canvas).\" The allowed values are:"
47280 "kind": "markdown",
47281 "value": "The partial URL (starting with '#') of an [image map](https://developer.mozilla.org/en-US/docs/HTML/Element/map) associated with the element.\n\n**Note:** You cannot use this attribute if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") element."
47288 "kind": "markdown",
47289 "value": "This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.\n\n**Note:** This attribute is allowed only if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") element with a valid [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute."
47295 "kind": "markdown",
47296 "value": "The intrinsic width of the image in pixels."
47302 "kind": "markdown",
47303 "value": "The intrinsic height of the image in pixels."
47307 "name": "decoding",
47308 "description": "Provides an image decoding hint to the browser. The allowed values are:"
47311 "name": "decoding",
47312 "description": "`sync`\n\nDecode the image synchronously for atomic presentation with other content.\n\n`async`\n\nDecode the image asynchronously to reduce delay in presenting other content.\n\n`auto`\n\nDefault mode, which indicates no preference for the decoding mode. The browser decides what is best for the user."
47315 "name": "importance",
47316 "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
47319 "name": "importance",
47320 "description": "`auto`: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the browser that the image is of **high** priority.\n\n`low`: Indicates to the browser that the image is of **low** priority."
47323 "name": "intrinsicsize",
47324 "description": "This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"
47327 "name": "referrerpolicy",
47328 "description": "A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior if no policy is otherwise specified.\n* `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n* `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n* `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
47332 "description": "A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1. a media condition. This must be omitted for the last item.\n2. a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."
47337 "name": "MDN Reference",
47338 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/img"
47345 "kind": "markdown",
47346 "value": "The iframe element represents a nested browsing context."
47352 "kind": "markdown",
47353 "value": "The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute \"The Element method removeAttribute() removes the attribute with the specified name from the element.\")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS."
47359 "kind": "markdown",
47360 "value": "Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."
47366 "kind": "markdown",
47367 "value": "A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\"), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\"), or [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base \"The HTML <base> element specifies the base URL to use for all relative URLs contained within a document. There can be only one <base> element in a document.\") elements; the `formtarget` attribute of the [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") elements; or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open \"The Window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.\") method."
47374 "kind": "markdown",
47375 "value": "Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:\n\n* `allow-forms`: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.\n* `allow-modals`: Lets the resource [open modal windows](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-modals-flag).\n* `allow-orientation-lock`: Lets the resource [lock the screen orientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).\n* `allow-pointer-lock`: Lets the resource use the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock).\n* `allow-popups`: Allows popups (such as `window.open()`, `target=\"_blank\"`, or `showModalDialog()`). If this keyword is not used, the popup will silently fail to open.\n* `allow-popups-to-escape-sandbox`: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.\n* `allow-presentation`: Lets the resource start a [presentation session](https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest).\n* `allow-same-origin`: If this token is not used, the resource is treated as being from a special origin that always fails the [same-origin policy](https://developer.mozilla.org/en-US/docs/Glossary/same-origin_policy \"same-origin policy: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\").\n* `allow-scripts`: Lets the resource run scripts (but not create popup windows).\n* `allow-storage-access-by-user-activation` : Lets the resource request access to the parent's storage capabilities with the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).\n* `allow-top-navigation`: Lets the resource navigate the top-level browsing context (the one named `_top`).\n* `allow-top-navigation-by-user-activation`: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.\n\n**Notes about sandboxing:**\n\n* When the embedded document has the same origin as the embedding page, it is **strongly discouraged** to use both `allow-scripts` and `allow-same-origin`, as that lets the embedded document remove the `sandbox` attribute — making it no more secure than not using the `sandbox` attribute at all.\n* Sandboxing is useless if the attacker can display content outside a sandboxed `iframe` — such as if the viewer opens the frame in a new tab. Such content should be also served from a _separate origin_ to limit potential damage.\n* The `sandbox` attribute is unsupported in Internet Explorer 9 and earlier."
47379 "name": "seamless",
47383 "name": "allowfullscreen",
47386 "kind": "markdown",
47387 "value": "Set to `true` if the `<iframe>` can activate fullscreen mode by calling the [`requestFullscreen()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen \"The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.\") method."
47393 "kind": "markdown",
47394 "value": "The width of the frame in CSS pixels. Default is `300`."
47400 "kind": "markdown",
47401 "value": "The height of the frame in CSS pixels. Default is `150`."
47406 "description": "Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`."
47409 "name": "allowpaymentrequest",
47410 "description": "Set to `true` if a cross-origin `<iframe>` should be allowed to invoke the [Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API)."
47413 "name": "allowpaymentrequest",
47414 "description": "This attribute is considered a legacy attribute and redefined as `allow=\"payment\"`."
47418 "description": "A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) enforced for the embedded resource. See [`HTMLIFrameElement.csp`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp \"The csp property of the HTMLIFrameElement interface specifies the Content Security Policy that an embedded document must agree to enforce upon itself.\") for details."
47421 "name": "importance",
47422 "description": "The download priority of the resource in the `<iframe>`'s `src` attribute. Allowed values:\n\n`auto` (default)\n\nNo preference. The browser uses its own heuristics to decide the priority of the resource.\n\n`high`\n\nThe resource should be downloaded before other lower-priority page resources.\n\n`low`\n\nThe resource should be downloaded after other higher-priority page resources."
47425 "name": "referrerpolicy",
47426 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame's resource:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins."
47431 "name": "MDN Reference",
47432 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/iframe"
47439 "kind": "markdown",
47440 "value": "The embed element provides an integration point for an external (typically non-HTML) application or interactive content."
47446 "kind": "markdown",
47447 "value": "The URL of the resource being embedded."
47453 "kind": "markdown",
47454 "value": "The MIME type to use to select the plug-in to instantiate."
47460 "kind": "markdown",
47461 "value": "The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
47467 "kind": "markdown",
47468 "value": "The displayed height of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
47474 "name": "MDN Reference",
47475 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/embed"
47482 "kind": "markdown",
47483 "value": "The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin."
47489 "kind": "markdown",
47490 "value": "The address of the resource as a valid URL. At least one of **data** and **type** must be defined."
47496 "kind": "markdown",
47497 "value": "The [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource specified by **data**. At least one of **data** and **type** must be defined."
47501 "name": "typemustmatch",
47504 "kind": "markdown",
47505 "value": "This Boolean attribute indicates if the **type** attribute and the actual [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource must match to be used."
47511 "kind": "markdown",
47512 "value": "The name of valid browsing context (HTML5), or the name of the control (HTML 4)."
47518 "kind": "markdown",
47519 "value": "A hash-name reference to a [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map \"The HTML <map> element is used with <area> elements to define an image map (a clickable link area).\") element; that is a '#' followed by the value of a [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name) of a map element."
47525 "kind": "markdown",
47526 "value": "The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document."
47532 "kind": "markdown",
47533 "value": "The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
47539 "kind": "markdown",
47540 "value": "The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
47545 "description": "A space-separated list of URIs for archives of resources for the object."
47549 "description": "The width of a border around the control, in pixels."
47553 "description": "The URI of the object's implementation. It can be used together with, or in place of, the **data** attribute."
47556 "name": "codebase",
47557 "description": "The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document."
47560 "name": "codetype",
47561 "description": "The content type of the data specified by **classid**."
47565 "description": "The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent `<object>` element. In HTML5, repeat the <object> element completely each that that the resource is reused."
47569 "description": "A message that the browser can show while loading the object's implementation and data."
47572 "name": "tabindex",
47573 "description": "The position of the element in the tabbing navigation order for the current document."
47578 "name": "MDN Reference",
47579 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/object"
47586 "kind": "markdown",
47587 "value": "The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own."
47593 "kind": "markdown",
47594 "value": "Name of the parameter."
47600 "kind": "markdown",
47601 "value": "Specifies the value of the parameter."
47606 "description": "Only used if the `valuetype` is set to \"ref\". Specifies the MIME type of values found at the URI specified by value."
47609 "name": "valuetype",
47610 "description": "Specifies the type of the `value` attribute. Possible values are:\n\n* data: Default value. The value is passed to the object's implementation as a string.\n* ref: The value is a URI to a resource where run-time values are stored.\n* object: An ID of another [`<object>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object \"The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.\") in the same document."
47615 "name": "MDN Reference",
47616 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/param"
47623 "kind": "markdown",
47624 "value": "A video element is used for playing videos or movies, and audio files with captions."
47631 "name": "crossorigin",
47642 "name": "autoplay",
47645 "kind": "markdown",
47646 "value": "A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data."
47650 "name": "mediagroup"
47661 "name": "controls",
47673 "name": "MDN Reference",
47674 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/video"
47681 "kind": "markdown",
47682 "value": "An audio element represents a sound or audio stream."
47688 "kind": "markdown",
47689 "value": "The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element within the audio block to specify the audio to embed."
47693 "name": "crossorigin",
47696 "kind": "markdown",
47697 "value": "This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
47704 "kind": "markdown",
47705 "value": "This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n* `none`: Indicates that the audio should not be preloaded.\n* `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n* `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n* _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n* The `autoplay` attribute has precedence over `preload`. If `autoplay` is specified, the browser would obviously need to start downloading the audio for playback.\n* The browser is not forced by the specification to follow the value of this attribute; it is a mere hint."
47709 "name": "autoplay",
47712 "kind": "markdown",
47713 "value": "A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.\n\n**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control."
47717 "name": "mediagroup"
47723 "kind": "markdown",
47724 "value": "A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio."
47731 "kind": "markdown",
47732 "value": "A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."
47736 "name": "controls",
47739 "kind": "markdown",
47740 "value": "If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."
47746 "name": "MDN Reference",
47747 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/audio"
47754 "kind": "markdown",
47755 "value": "The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."
47761 "kind": "markdown",
47762 "value": "Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\"), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
47768 "kind": "markdown",
47769 "value": "The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."
47774 "description": "Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use. \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
47778 "description": "A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1. one URL to an image,\n2. a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3. a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. \nThe browser chooses the most adequate image to display at a given point of time. \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
47782 "description": "[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource's intended media; this should be used only in a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
47787 "name": "MDN Reference",
47788 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/source"
47795 "kind": "markdown",
47796 "value": "The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own."
47803 "kind": "markdown",
47804 "value": "This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element."
47811 "kind": "markdown",
47812 "value": "How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute is not present, it will use the `subtitles`. If the attribute contains an invalid value, it will use `metadata`. (Versions of Chrome earlier than 52 treated an invalid value as `subtitles`.) The following keywords are allowed:\n\n* `subtitles`\n * Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.\n * Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.\n* `captions`\n * Closed captions provide a transcription and possibly a translation of audio.\n * It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).\n * Suitable for users who are deaf or when the sound is muted.\n* `descriptions`\n * Textual description of the video content.\n * Suitable for users who are blind or where the video cannot be seen.\n* `chapters`\n * Chapter titles are intended to be used when the user is navigating the media resource.\n* `metadata`\n * Tracks used by scripts. Not visible to the user."
47818 "kind": "markdown",
47819 "value": "A user-readable title of the text track which is used by the browser when listing available text tracks."
47825 "kind": "markdown",
47826 "value": "Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") or [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\") parent element of the `track` element has a [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute."
47832 "kind": "markdown",
47833 "value": "Language of the track text data. It must be a valid [BCP 47](https://r12a.github.io/app-subtags/) language tag. If the `kind` attribute is set to `subtitles,` then `srclang` must be defined."
47839 "name": "MDN Reference",
47840 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/track"
47847 "kind": "markdown",
47848 "value": "The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children."
47854 "kind": "markdown",
47855 "value": "The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value."
47861 "name": "MDN Reference",
47862 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/map"
47869 "kind": "markdown",
47870 "value": "The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."
47905 "name": "accesskey",
47906 "description": "Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5."
47911 "name": "MDN Reference",
47912 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/area"
47919 "kind": "markdown",
47920 "value": "The table element represents data with more than one dimension, in the form of a table."
47928 "description": "This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:\n\n* left: the table is displayed on the left side of the document;\n* center: the table is displayed in the center of the document;\n* right: the table is displayed on the right side of the document.\n\n**Usage Note**\n\n* **Do not use this attribute**, as it has been deprecated. The [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table \"The HTML <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). Set [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") and [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") to `auto` or [`margin`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin \"The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.\") to `0 auto` to achieve an effect that is similar to the align attribute.\n* Prior to Firefox 4, Firefox also supported the `middle`, `absmiddle`, and `abscenter` values as synonyms of `center`, in quirks mode only."
47933 "name": "MDN Reference",
47934 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/table"
47941 "kind": "markdown",
47942 "value": "The caption element represents the title of the table that is its parent, if it has a parent and that is a table element."
47947 "description": "This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:\n\n`left`\n\nThe caption is displayed to the left of the table.\n\n`top`\n\nThe caption is displayed above the table.\n\n`right`\n\nThe caption is displayed to the right of the table.\n\n`bottom`\n\nThe caption is displayed below the table.\n\n**Usage note:** Do not use this attribute, as it has been deprecated. The [`<caption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption \"The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.\") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [`caption-side`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side \"The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.\") and [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\")."
47952 "name": "MDN Reference",
47953 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/caption"
47958 "name": "colgroup",
47960 "kind": "markdown",
47961 "value": "The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."
47969 "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element, they won't inherit it.\n * If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property can be used.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
47974 "name": "MDN Reference",
47975 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/colgroup"
47982 "kind": "markdown",
47983 "value": "If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup."
47991 "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, its value is inherited from the [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-align) of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element this `<col>` element belongs too. If there are none, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element, they won't inherit it.\n * If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use the `td:nth-child(an+b)` CSS selector. Set `a` to zero and `b` to the position of the column in the table, e.g. `td:nth-child(2) { text-align: right; }` to right-align the second column.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
47996 "name": "MDN Reference",
47997 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/col"
48004 "kind": "markdown",
48005 "value": "The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table."
48010 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes.\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
48015 "name": "MDN Reference",
48016 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tbody"
48023 "kind": "markdown",
48024 "value": "The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table."
48029 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
48034 "name": "MDN Reference",
48035 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/thead"
48042 "kind": "markdown",
48043 "value": "The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table."
48048 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
48053 "name": "MDN Reference",
48054 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tfoot"
48061 "kind": "markdown",
48062 "value": "The tr element represents a row of cells in a table."
48067 "description": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using `align` on every cell in the row individually. Possible values are:\n\n`left`\n\nAlign the content of each cell at its left edge.\n\n`center`\n\nCenter the contents of each cell between their left and right edges.\n\n`right`\n\nAlign the content of each cell at its right edge.\n\n`justify`\n\nWiden whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).\n\n`char`\n\nAlign each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-charoff) to establish the alignment character (typically \".\" or \",\" when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.\n\nIf no value is expressly set for `align`, the parent node's value is inherited.\n\nInstead of using the obsolete `align` attribute, you should instead use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to establish `left`, `center`, `right`, or `justify` alignment for the row's cells. To apply character-based alignment, set the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the alignment character (such as `\".\"` or `\",\"`)."
48072 "name": "MDN Reference",
48073 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tr"
48080 "kind": "markdown",
48081 "value": "The td element represents a data cell in a table."
48095 "description": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute."
48099 "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3."
48103 "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard."
48107 "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead."
48112 "name": "MDN Reference",
48113 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/td"
48120 "kind": "markdown",
48121 "value": "The th element represents a header cell in a table."
48143 "kind": "markdown",
48144 "value": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."
48149 "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3."
48153 "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead."
48157 "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th \"The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead."
48162 "name": "MDN Reference",
48163 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/th"
48170 "kind": "markdown",
48171 "value": "The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."
48175 "name": "accept-charset",
48177 "kind": "markdown",
48178 "value": "A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `\"UNKNOWN\"`, indicates the same encoding as that of the document containing the form element. \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters."
48184 "kind": "markdown",
48185 "value": "The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
48189 "name": "autocomplete",
48192 "kind": "markdown",
48193 "value": "Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n* `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n* `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields)."
48200 "kind": "markdown",
48201 "value": "When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the `type` attribute set to \"file\".\n* `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
48208 "kind": "markdown",
48209 "value": "The [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) method that the browser uses to submit the form. Possible values are:\n\n* `post`: Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5) ; form data are included in the body of the form and sent to the server.\n* `get`: Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n* `dialog`: Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog \"The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window.\") element to close the dialog when submitted.\n\nThis value can be overridden by a [`formmethod`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formmethod) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
48215 "kind": "markdown",
48216 "value": "The name of the form. In HTML 4, its use is deprecated (`id` should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5."
48220 "name": "novalidate",
48223 "kind": "markdown",
48224 "value": "This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a [`formnovalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element belonging to the form."
48230 "kind": "markdown",
48231 "value": "A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a _browsing context_ (for example, tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed HTML 4 window or HTML5 browsing context.\n* `_parent`: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n* _iframename_: The response is displayed in a named [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe \"The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.\").\n\nHTML5: This value can be overridden by a [`formtarget`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formtarget) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
48236 "description": "A comma-separated list of content types that the server accepts.\n\n**Usage note:** This attribute has been removed in HTML5 and should no longer be used. Instead, use the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) attribute of the specific [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
48239 "name": "autocapitalize",
48240 "description": "This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the `autocapitalize` attribute is specified on an individual form control descendant, it trumps the form-wide `autocapitalize` setting. The non-deprecated values are available in iOS 5 and later. The default value is `sentences`. Possible values are:\n\n* `none`: Completely disables automatic capitalization\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."
48245 "name": "MDN Reference",
48246 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/form"
48253 "kind": "markdown",
48254 "value": "The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself."
48260 "kind": "markdown",
48261 "value": "The [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element with which the label is associated (its _form owner_). If specified, the value of the attribute is the `id` of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements."
48267 "kind": "markdown",
48268 "value": "The [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of a [labelable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable) form-related element in the same document as the `<label>` element. The first element in the document with an `id` matching the value of the `for` attribute is the _labeled control_ for this label element, if it is a labelable element. If it is not labelable then the `for` attribute has no effect. If there are other elements which also match the `id` value, later in the document, they are not considered.\n\n**Note**: A `<label>` element can have both a `for` attribute and a contained control element, as long as the `for` attribute points to the contained control element."
48274 "name": "MDN Reference",
48275 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/label"
48282 "kind": "markdown",
48283 "value": "The input element represents a typed data field, usually with a form control to allow the user to edit the data."
48293 "name": "autocomplete",
48294 "valueSet": "inputautocomplete"
48297 "name": "autofocus",
48308 "name": "disabled",
48315 "name": "formaction"
48318 "name": "formenctype",
48322 "name": "formmethod",
48326 "name": "formnovalidate",
48330 "name": "formtarget"
48336 "name": "inputmode",
48346 "name": "maxlength"
48352 "name": "minlength"
48355 "name": "multiple",
48365 "name": "placeholder"
48368 "name": "readonly",
48372 "name": "required",
48397 "name": "MDN Reference",
48398 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/input"
48405 "kind": "markdown",
48406 "value": "The button element represents a button labeled by its contents."
48410 "name": "autofocus",
48413 "kind": "markdown",
48414 "value": "This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified."
48418 "name": "disabled",
48421 "kind": "markdown",
48422 "value": "This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element with the **disabled** attribute set, then the button is enabled.\n\nFirefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Use the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-autocomplete) attribute to control this feature."
48428 "kind": "markdown",
48429 "value": "The form element that the button is associated with (its _form owner_). The value of the attribute must be the **id** attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. If this attribute is not specified, the `<button>` element will be associated to an ancestor [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element, if one exists. This attribute enables you to associate `<button>` elements to [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements anywhere within a document, not just as descendants of [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements."
48433 "name": "formaction",
48435 "kind": "markdown",
48436 "value": "The URI of a program that processes the information submitted by the button. If specified, it overrides the [`action`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-action) attribute of the button's form owner."
48440 "name": "formenctype",
48443 "kind": "markdown",
48444 "value": "If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: Use this value if you are using an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) attribute set to `file`.\n* `text/plain`\n\nIf this attribute is specified, it overrides the [`enctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-enctype) attribute of the button's form owner."
48448 "name": "formmethod",
48451 "kind": "markdown",
48452 "value": "If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:\n\n* `post`: The data from the form are included in the body of the form and sent to the server.\n* `get`: The data from the form are appended to the **form** attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n\nIf specified, this attribute overrides the [`method`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method) attribute of the button's form owner."
48456 "name": "formnovalidate",
48459 "kind": "markdown",
48460 "value": "If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the [`novalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate) attribute of the button's form owner."
48464 "name": "formtarget",
48466 "kind": "markdown",
48467 "value": "If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a _browsing context_ (for example, tab, window, or inline frame). If this attribute is specified, it overrides the [`target`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target) attribute of the button's form owner. The following keywords have special meanings:\n\n* `_self`: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed browsing context.\n* `_parent`: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`."
48473 "kind": "markdown",
48474 "value": "The name of the button, which is submitted with the form data."
48481 "kind": "markdown",
48482 "value": "The type of the button. Possible values are:\n\n* `submit`: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.\n* `reset`: The button resets all the controls to their initial values.\n* `button`: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."
48488 "kind": "markdown",
48489 "value": "The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted."
48493 "name": "autocomplete",
48494 "description": "The use of this attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") is nonstandard and Firefox-specific. By default, unlike other browsers, [Firefox persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Setting the value of this attribute to `off` (i.e. `autocomplete=\"off\"`) disables this feature. See [bug 654072](https://bugzilla.mozilla.org/show_bug.cgi?id=654072 \"if disabled state is changed with javascript, the normal state doesn't return after refreshing the page\")."
48499 "name": "MDN Reference",
48500 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/button"
48507 "kind": "markdown",
48508 "value": "The select element represents a control for selecting amongst a set of options."
48512 "name": "autocomplete",
48513 "valueSet": "inputautocomplete",
48515 "kind": "markdown",
48516 "value": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") providing a hint for a [user agent's](https://developer.mozilla.org/en-US/docs/Glossary/user_agent \"user agent's: A user agent is a computer program representing a person, for example, a browser in a Web context.\") autocomplete feature. See [The HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for a complete list of values and details on how to use autocomplete."
48520 "name": "autofocus",
48523 "kind": "markdown",
48524 "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the `autofocus` attribute."
48528 "name": "disabled",
48531 "kind": "markdown",
48532 "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example `fieldset`; if there is no containing element with the `disabled` attribute set, then the control is enabled."
48538 "kind": "markdown",
48539 "value": "This attribute lets you specify the form element to which the select element is associated (that is, its \"form owner\"). If this attribute is specified, its value must be the same as the `id` of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements."
48543 "name": "multiple",
48546 "kind": "markdown",
48547 "value": "This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When `multiple` is specified, most browsers will show a scrolling list box instead of a single line dropdown."
48553 "kind": "markdown",
48554 "value": "This attribute is used to specify the name of the control."
48558 "name": "required",
48561 "kind": "markdown",
48562 "value": "A Boolean attribute indicating that an option with a non-empty string value must be selected."
48568 "kind": "markdown",
48569 "value": "If the control is presented as a scrolling list box (e.g. when `multiple` is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.\n\n**Note:** According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox."
48575 "name": "MDN Reference",
48576 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/select"
48581 "name": "datalist",
48583 "kind": "markdown",
48584 "value": "The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden."
48589 "name": "MDN Reference",
48590 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/datalist"
48595 "name": "optgroup",
48597 "kind": "markdown",
48598 "value": "The optgroup element represents a group of option elements with a common label."
48602 "name": "disabled",
48605 "kind": "markdown",
48606 "value": "If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones."
48612 "kind": "markdown",
48613 "value": "The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used."
48619 "name": "MDN Reference",
48620 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/optgroup"
48627 "kind": "markdown",
48628 "value": "The option element represents an option in a select element or as part of a list of suggestions in a datalist element."
48632 "name": "disabled",
48635 "kind": "markdown",
48636 "value": "If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup \"The HTML <optgroup> element creates a grouping of options within a <select> element.\") element."
48642 "kind": "markdown",
48643 "value": "This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content."
48647 "name": "selected",
48650 "kind": "markdown",
48651 "value": "If present, this Boolean attribute indicates that the option is initially selected. If the `<option>` element is the descendant of a [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element whose [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple) attribute is not set, only one single `<option>` of this [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element may have the `selected` attribute."
48657 "kind": "markdown",
48658 "value": "The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element."
48664 "name": "MDN Reference",
48665 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/option"
48670 "name": "textarea",
48672 "kind": "markdown",
48673 "value": "The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value."
48677 "name": "autocomplete",
48678 "valueSet": "inputautocomplete",
48680 "kind": "markdown",
48681 "value": "This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:\n\n* `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.\n* `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.\n\nIf the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element's form owner. The form owner is either the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete) attribute in [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\")."
48685 "name": "autofocus",
48688 "kind": "markdown",
48689 "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified."
48695 "kind": "markdown",
48696 "value": "The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is `20`."
48703 "name": "disabled",
48706 "kind": "markdown",
48707 "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element when the `disabled` attribute is set, the control is enabled."
48713 "kind": "markdown",
48714 "value": "The form element that the `<textarea>` element is associated with (its \"form owner\"). The value of the attribute must be the `id` of a form element in the same document. If this attribute is not specified, the `<textarea>` element must be a descendant of a form element. This attribute enables you to place `<textarea>` elements anywhere within a document, not just as descendants of form elements."
48718 "name": "inputmode",
48722 "name": "maxlength",
48724 "kind": "markdown",
48725 "value": "The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters."
48729 "name": "minlength",
48731 "kind": "markdown",
48732 "value": "The minimum number of characters (unicode code points) required that the user should enter."
48738 "kind": "markdown",
48739 "value": "The name of the control."
48743 "name": "placeholder",
48745 "kind": "markdown",
48746 "value": "A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.\n\n**Note:** Placeholders should only be used to show an example of the type of data that should be entered into a form; they are _not_ a substitute for a proper [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label \"The HTML <label> element represents a caption for an item in a user interface.\") element tied to the input. See [Labels and placeholders](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Labels_and_placeholders \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") in [<input>: The Input (Form Input) element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") for a full explanation."
48750 "name": "readonly",
48753 "kind": "markdown",
48754 "value": "This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the `disabled` attribute, the `readonly` attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form."
48758 "name": "required",
48761 "kind": "markdown",
48762 "value": "This attribute specifies that the user must fill in a value before submitting a form."
48768 "kind": "markdown",
48769 "value": "The number of visible text lines for the control."
48776 "kind": "markdown",
48777 "value": "Indicates how the control wraps text. Possible values are:\n\n* `hard`: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the `cols` attribute must also be specified for this to take effect.\n* `soft`: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.\n* `off` : Like `soft` but changes appearance to `white-space: pre` so line segments exceeding `cols` are not wrapped and the `<textarea>` becomes horizontally scrollable.\n\nIf this attribute is not specified, `soft` is its default value."
48781 "name": "autocapitalize",
48782 "description": "This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:\n\n* `none`: Completely disables automatic capitalization.\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."
48785 "name": "spellcheck",
48786 "description": "Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS. the value can be:\n\n* `true`: Indicates that the element needs to have its spelling and grammar checked.\n* `default` : Indicates that the element is to act according to a default behavior, possibly based on the parent element's own `spellcheck` value.\n* `false` : Indicates that the element should not be spell checked."
48791 "name": "MDN Reference",
48792 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/textarea"
48799 "kind": "markdown",
48800 "value": "The output element represents the result of a calculation performed by the application, or the result of a user action."
48806 "kind": "markdown",
48807 "value": "A space-separated list of other elements’ [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)s, indicating that those elements contributed input values to (or otherwise affected) the calculation."
48813 "kind": "markdown",
48814 "value": "The [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that this element is associated with (its \"form owner\"). The value of the attribute must be an `id` of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements."
48820 "kind": "markdown",
48821 "value": "The name of the element, exposed in the [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement \"The HTMLFormElement interface represents a <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.\") API."
48827 "name": "MDN Reference",
48828 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/output"
48833 "name": "progress",
48835 "kind": "markdown",
48836 "value": "The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed."
48842 "kind": "markdown",
48843 "value": "This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and `max`, or between 0 and 1 if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."
48849 "kind": "markdown",
48850 "value": "This attribute describes how much work the task indicated by the `progress` element requires. The `max` attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1."
48856 "name": "MDN Reference",
48857 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/progress"
48864 "kind": "markdown",
48865 "value": "The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate."
48871 "kind": "markdown",
48872 "value": "The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.\n\n**Usage note:** Unless the `value` attribute is between `0` and `1` (inclusive), the `min` and `max` attributes should define the range so that the `value` attribute's value is within it."
48878 "kind": "markdown",
48879 "value": "The lower numeric bound of the measured range. This must be less than the maximum value (`max` attribute), if specified. If unspecified, the minimum value is 0."
48885 "kind": "markdown",
48886 "value": "The upper numeric bound of the measured range. This must be greater than the minimum value (`min` attribute), if specified. If unspecified, the maximum value is 1."
48892 "kind": "markdown",
48893 "value": "The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value."
48899 "kind": "markdown",
48900 "value": "The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and **min** attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value."
48906 "kind": "markdown",
48907 "value": "This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred."
48912 "description": "This attribute associates the element with a `form` element that has ownership of the `meter` element. For example, a `meter` might be displaying a range corresponding to an `input` element of `type` _number_. This attribute is only used if the `meter` element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a `form` element."
48917 "name": "MDN Reference",
48918 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/meter"
48923 "name": "fieldset",
48925 "kind": "markdown",
48926 "value": "The fieldset element represents a set of form controls optionally grouped under a common name."
48930 "name": "disabled",
48933 "kind": "markdown",
48934 "value": "If this Boolean attribute is set, all form controls that are descendants of the `<fieldset>`, are disabled, meaning they are not editable and won't be submitted along with the `<form>`. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element won't be disabled."
48940 "kind": "markdown",
48941 "value": "This attribute takes the value of the `id` attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element you want the `<fieldset>` to be part of, even if it is not inside the form."
48947 "kind": "markdown",
48948 "value": "The name associated with the group.\n\n**Note**: The caption for the fieldset is given by the first [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element nested inside it."
48954 "name": "MDN Reference",
48955 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/fieldset"
48962 "kind": "markdown",
48963 "value": "The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any."
48968 "name": "MDN Reference",
48969 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/legend"
48976 "kind": "markdown",
48977 "value": "The details element represents a disclosure widget from which the user can obtain additional information or controls."
48984 "kind": "markdown",
48985 "value": "This Boolean attribute indicates whether or not the details — that is, the contents of the `<details>` element — are currently visible. The default, `false`, means the details are not visible."
48991 "name": "MDN Reference",
48992 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/details"
48999 "kind": "markdown",
49000 "value": "The summary element represents a summary, caption, or legend for the rest of the contents of the summary element's parent details element, if any."
49005 "name": "MDN Reference",
49006 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/summary"
49013 "kind": "markdown",
49014 "value": "The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window."
49019 "description": "Indicates that the dialog is active and available for interaction. When the `open` attribute is not set, the dialog shouldn't be shown to the user."
49024 "name": "MDN Reference",
49025 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dialog"
49032 "kind": "markdown",
49033 "value": "The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user."
49039 "kind": "markdown",
49040 "value": "This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.\n\nIf a `script` element has a `src` attribute specified, it should not have a script embedded inside its tags."
49046 "kind": "markdown",
49047 "value": "This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:\n\n* **Omitted or a JavaScript MIME type:** For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the `src` attribute) code. JavaScript MIME types are [listed in the specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types).\n* **`module`:** For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the `charset` and `defer` attributes. For information on using `module`, see [ES6 in Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/). Code may behave differently when the `module` keyword is used.\n* **Any other value:** The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The `src` attribute will be ignored.\n\n**Note:** in Firefox you could specify the version of JavaScript contained in a `<script>` element by including a non-standard `version` parameter inside the `type` attribute — for example `type=\"text/javascript;version=1.8\"`. This has been removed in Firefox 59 (see [bug 1428745](https://bugzilla.mozilla.org/show_bug.cgi?id=1428745 \"FIXED: Remove support for version parameter from script loader\"))."
49057 "kind": "markdown",
49058 "value": "This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.\n\nBrowsers usually assume the worst case scenario and load scripts synchronously, (i.e. `async=\"false\"`) during HTML parsing.\n\nDynamically inserted scripts (using [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement \"In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.\")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set `async=\"false\"`.\n\nSee [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts)."
49065 "kind": "markdown",
49066 "value": "This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded \"/en-US/docs/Web/Events/DOMContentLoaded\").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async=\"false\"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document."
49070 "name": "crossorigin",
49073 "kind": "markdown",
49074 "value": "Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror \"The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.\") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments."
49080 "kind": "markdown",
49081 "value": "A cryptographic nonce (number used once) to whitelist inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."
49085 "name": "integrity",
49086 "description": "This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."
49089 "name": "nomodule",
49090 "description": "This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code."
49093 "name": "referrerpolicy",
49094 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.\n\n**Note**: An empty string value (`\"\"`) is both the default value, and a fallback value if `referrerpolicy` is not supported. If `referrerpolicy` is not explicitly specified on the `<script>` element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available, the empty string is treated as being equivalent to `no-referrer-when-downgrade`."
49098 "description": "Like the `textContent` attribute, this attribute sets the text content of the element. Unlike the `textContent` attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM."
49103 "name": "MDN Reference",
49104 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/script"
49109 "name": "noscript",
49111 "kind": "markdown",
49112 "value": "The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed."
49117 "name": "MDN Reference",
49118 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/noscript"
49123 "name": "template",
49125 "kind": "markdown",
49126 "value": "The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script."
49131 "name": "MDN Reference",
49132 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/template"
49139 "kind": "markdown",
49140 "value": "The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly."
49146 "kind": "markdown",
49147 "value": "The width of the coordinate space in CSS pixels. Defaults to 300."
49153 "kind": "markdown",
49154 "value": "The height of the coordinate space in CSS pixels. Defaults to 150."
49158 "name": "moz-opaque",
49159 "description": "Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized [`canvas.getContext('2d', { alpha: false })`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext \"The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\") instead."
49164 "name": "MDN Reference",
49165 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/canvas"
49170 "globalAttributes": [
49172 "name": "accesskey",
49174 "kind": "markdown",
49175 "value": "Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout."
49179 "name": "MDN Reference",
49180 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/accesskey"
49185 "name": "autocapitalize",
49187 "kind": "markdown",
49188 "value": "Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:\n\n* `off` or `none`, no autocapitalization is applied (all letters default to lowercase)\n* `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase\n* `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase\n* `characters`, all letters should default to uppercase"
49192 "name": "MDN Reference",
49193 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/autocapitalize"
49200 "kind": "markdown",
49201 "value": "A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the [class selectors](/en-US/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](/en-US/docs/Web/API/Document/getElementsByClassName \"returns an array-like object of all child elements which have all of the given class names.\")."
49205 "name": "MDN Reference",
49206 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/class"
49211 "name": "contenteditable",
49213 "kind": "markdown",
49214 "value": "An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:\n\n* `true` or the _empty string_, which indicates that the element must be editable;\n* `false`, which indicates that the element must not be editable."
49218 "name": "MDN Reference",
49219 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contenteditable"
49224 "name": "contextmenu",
49226 "kind": "markdown",
49227 "value": "The `[**id**](#attr-id)` of a [`<menu>`](/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\") to use as the contextual menu for this element."
49231 "name": "MDN Reference",
49232 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contextmenu"
49239 "kind": "markdown",
49240 "value": "An enumerated attribute indicating the directionality of the element's text. It can have the following values:\n\n* `ltr`, which means _left to right_ and is to be used for languages that are written from the left to the right (like English);\n* `rtl`, which means _right to left_ and is to be used for languages that are written from the right to the left (like Arabic);\n* `auto`, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."
49245 "name": "MDN Reference",
49246 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dir"
49251 "name": "draggable",
49253 "kind": "markdown",
49254 "value": "An enumerated attribute indicating whether the element can be dragged, using the [Drag and Drop API](/en-us/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `true`, which indicates that the element may be dragged\n* `false`, which indicates that the element may not be dragged."
49259 "name": "MDN Reference",
49260 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/draggable"
49265 "name": "dropzone",
49267 "kind": "markdown",
49268 "value": "An enumerated attribute indicating what types of content can be dropped on an element, using the [Drag and Drop API](/en-US/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `copy`, which indicates that dropping will create a copy of the element that was dragged\n* `move`, which indicates that the element that was dragged will be moved to this new location.\n* `link`, will create a link to the dragged data."
49272 "name": "MDN Reference",
49273 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dropzone"
49278 "name": "exportparts",
49280 "kind": "markdown",
49281 "value": "Used to transitively export shadow parts from a nested shadow tree into a containing light tree."
49285 "name": "MDN Reference",
49286 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/exportparts"
49293 "kind": "markdown",
49294 "value": "A Boolean attribute indicates that the element is not yet, or is no longer, _relevant_. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown."
49299 "name": "MDN Reference",
49300 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/hidden"
49307 "kind": "markdown",
49308 "value": "Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS)."
49312 "name": "MDN Reference",
49313 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/id"
49318 "name": "inputmode",
49320 "kind": "markdown",
49321 "value": "Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on [`<input>`](/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") elements, but is usable on any element while in `[contenteditable](/en-US/docs/Web/HTML/Global_attributes#attr-contenteditable)` mode."
49325 "name": "MDN Reference",
49326 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/inputmode"
49333 "kind": "markdown",
49334 "value": "Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](/en-US/docs/Web/Web_Components/Using_custom_elements) for more details)."
49338 "name": "MDN Reference",
49339 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/is"
49346 "kind": "markdown",
49347 "value": "The unique, global identifier of an item."
49351 "name": "MDN Reference",
49352 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemid"
49357 "name": "itemprop",
49359 "kind": "markdown",
49360 "value": "Used to add properties to an item. Every HTML element may have an `itemprop` attribute specified, where an `itemprop` consists of a name and value pair."
49364 "name": "MDN Reference",
49365 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemprop"
49372 "kind": "markdown",
49373 "value": "Properties that are not descendants of an element with the `itemscope` attribute can be associated with the item using an `itemref`. It provides a list of element ids (not `itemid`s) with additional properties elsewhere in the document."
49377 "name": "MDN Reference",
49378 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemref"
49383 "name": "itemscope",
49385 "kind": "markdown",
49386 "value": "`itemscope` (usually) works along with `[itemtype](/en-US/docs/Web/HTML/Global_attributes#attr-itemtype)` to specify that the HTML contained in a block is about a particular item. `itemscope` creates the Item and defines the scope of the `itemtype` associated with it. `itemtype` is a valid URL of a vocabulary (such as [schema.org](https://schema.org/)) that describes the item and its properties context."
49391 "name": "MDN Reference",
49392 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemscope"
49397 "name": "itemtype",
49399 "kind": "markdown",
49400 "value": "Specifies the URL of the vocabulary that will be used to define `itemprop`s (item properties) in the data structure. `[itemscope](/en-US/docs/Web/HTML/Global_attributes#attr-itemscope)` is used to set the scope of where in the data structure the vocabulary set by `itemtype` will be active."
49404 "name": "MDN Reference",
49405 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemtype"
49412 "kind": "markdown",
49413 "value": "Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in [_Tags for Identifying Languages (BCP47)_](https://www.ietf.org/rfc/bcp/bcp47.txt). [**xml:lang**](#attr-xml:lang) has priority over it."
49417 "name": "MDN Reference",
49418 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang"
49425 "kind": "markdown",
49426 "value": "A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](/en-US/docs/Web/CSS/::part \"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute.\") pseudo-element."
49430 "name": "MDN Reference",
49431 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/part"
49437 "valueSet": "roles"
49442 "kind": "markdown",
49443 "value": "Assigns a slot in a [shadow DOM](/en-US/docs/Web/Web_Components/Shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the [`<slot>`](/en-US/docs/Web/HTML/Element/slot \"The HTML <slot> element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.\") element whose `[name](/en-US/docs/Web/HTML/Element/slot#attr-name)` attribute's value matches that `slot` attribute's value."
49447 "name": "MDN Reference",
49448 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/slot"
49453 "name": "spellcheck",
49455 "kind": "markdown",
49456 "value": "An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:\n\n* `true`, which indicates that the element should be, if possible, checked for spelling errors;\n* `false`, which indicates that the element should not be checked for spelling errors."
49461 "name": "MDN Reference",
49462 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck"
49469 "kind": "markdown",
49470 "value": "Contains [CSS](/en-US/docs/Web/CSS) styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the [`<style>`](/en-US/docs/Web/HTML/Element/style \"The HTML <style> element contains style information for a document, or part of a document.\") element have mainly the purpose of allowing for quick styling, for example for testing purposes."
49474 "name": "MDN Reference",
49475 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style"
49480 "name": "tabindex",
49482 "kind": "markdown",
49483 "value": "An integer attribute indicating if the element can take input focus (is _focusable_), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:\n\n* a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;\n* `0` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;\n* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document."
49487 "name": "MDN Reference",
49488 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"
49495 "kind": "markdown",
49496 "value": "Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."
49500 "name": "MDN Reference",
49501 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"
49506 "name": "translate",
49508 "kind": "markdown",
49509 "value": "An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](/en-US/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."
49514 "name": "MDN Reference",
49515 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"
49522 "kind": "markdown",
49523 "value": "The loading of a resource has been aborted."
49529 "kind": "markdown",
49530 "value": "An element has lost focus (does not bubble)."
49534 "name": "oncanplay",
49536 "kind": "markdown",
49537 "value": "The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."
49541 "name": "oncanplaythrough",
49543 "kind": "markdown",
49544 "value": "The user agent can play the media up to its end without having to stop for further buffering of content."
49548 "name": "onchange",
49550 "kind": "markdown",
49551 "value": "The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."
49557 "kind": "markdown",
49558 "value": "A pointing device button has been pressed and released on an element."
49562 "name": "oncontextmenu",
49564 "kind": "markdown",
49565 "value": "The right button of the mouse is clicked (before the context menu is displayed)."
49569 "name": "ondblclick",
49571 "kind": "markdown",
49572 "value": "A pointing device button is clicked twice on an element."
49578 "kind": "markdown",
49579 "value": "An element or text selection is being dragged (every 350ms)."
49583 "name": "ondragend",
49585 "kind": "markdown",
49586 "value": "A drag operation is being ended (by releasing a mouse button or hitting the escape key)."
49590 "name": "ondragenter",
49592 "kind": "markdown",
49593 "value": "A dragged element or text selection enters a valid drop target."
49597 "name": "ondragleave",
49599 "kind": "markdown",
49600 "value": "A dragged element or text selection leaves a valid drop target."
49604 "name": "ondragover",
49606 "kind": "markdown",
49607 "value": "An element or text selection is being dragged over a valid drop target (every 350ms)."
49611 "name": "ondragstart",
49613 "kind": "markdown",
49614 "value": "The user starts dragging an element or text selection."
49620 "kind": "markdown",
49621 "value": "An element is dropped on a valid drop target."
49625 "name": "ondurationchange",
49627 "kind": "markdown",
49628 "value": "The duration attribute has been updated."
49632 "name": "onemptied",
49634 "kind": "markdown",
49635 "value": "The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."
49641 "kind": "markdown",
49642 "value": "Playback has stopped because the end of the media was reached."
49648 "kind": "markdown",
49649 "value": "A resource failed to load."
49655 "kind": "markdown",
49656 "value": "An element has received focus (does not bubble)."
49660 "name": "onformchange"
49663 "name": "onforminput"
49668 "kind": "markdown",
49669 "value": "The value of an element changes or the content of an element with the attribute contenteditable is modified."
49673 "name": "oninvalid",
49675 "kind": "markdown",
49676 "value": "A submittable element has been checked and doesn't satisfy its constraints."
49680 "name": "onkeydown",
49682 "kind": "markdown",
49683 "value": "A key is pressed down."
49687 "name": "onkeypress",
49689 "kind": "markdown",
49690 "value": "A key is pressed down and that key normally produces a character value (use input instead)."
49696 "kind": "markdown",
49697 "value": "A key is released."
49703 "kind": "markdown",
49704 "value": "A resource and its dependent resources have finished loading."
49708 "name": "onloadeddata",
49710 "kind": "markdown",
49711 "value": "The first frame of the media has finished loading."
49715 "name": "onloadedmetadata",
49717 "kind": "markdown",
49718 "value": "The metadata has been loaded."
49722 "name": "onloadstart",
49724 "kind": "markdown",
49725 "value": "Progress has begun."
49729 "name": "onmousedown",
49731 "kind": "markdown",
49732 "value": "A pointing device button (usually a mouse) is pressed on an element."
49736 "name": "onmousemove",
49738 "kind": "markdown",
49739 "value": "A pointing device is moved over an element."
49743 "name": "onmouseout",
49745 "kind": "markdown",
49746 "value": "A pointing device is moved off the element that has the listener attached or off one of its children."
49750 "name": "onmouseover",
49752 "kind": "markdown",
49753 "value": "A pointing device is moved onto the element that has the listener attached or onto one of its children."
49757 "name": "onmouseup",
49759 "kind": "markdown",
49760 "value": "A pointing device button is released over an element."
49764 "name": "onmousewheel"
49769 "kind": "markdown",
49770 "value": "Playback has been paused."
49776 "kind": "markdown",
49777 "value": "Playback has begun."
49781 "name": "onplaying",
49783 "kind": "markdown",
49784 "value": "Playback is ready to start after having been paused or delayed due to lack of data."
49788 "name": "onprogress",
49790 "kind": "markdown",
49791 "value": "In progress."
49795 "name": "onratechange",
49797 "kind": "markdown",
49798 "value": "The playback rate has changed."
49804 "kind": "markdown",
49805 "value": "A form is reset."
49809 "name": "onresize",
49811 "kind": "markdown",
49812 "value": "The document view has been resized."
49816 "name": "onreadystatechange",
49818 "kind": "markdown",
49819 "value": "The readyState attribute of a document has changed."
49823 "name": "onscroll",
49825 "kind": "markdown",
49826 "value": "The document view or an element has been scrolled."
49830 "name": "onseeked",
49832 "kind": "markdown",
49833 "value": "A seek operation completed."
49837 "name": "onseeking",
49839 "kind": "markdown",
49840 "value": "A seek operation began."
49844 "name": "onselect",
49846 "kind": "markdown",
49847 "value": "Some text is being selected."
49853 "kind": "markdown",
49854 "value": "A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute"
49858 "name": "onstalled",
49860 "kind": "markdown",
49861 "value": "The user agent is trying to fetch media data, but data is unexpectedly not forthcoming."
49865 "name": "onsubmit",
49867 "kind": "markdown",
49868 "value": "A form is submitted."
49872 "name": "onsuspend",
49874 "kind": "markdown",
49875 "value": "Media data loading has been suspended."
49879 "name": "ontimeupdate",
49881 "kind": "markdown",
49882 "value": "The time indicated by the currentTime attribute has been updated."
49886 "name": "onvolumechange",
49888 "kind": "markdown",
49889 "value": "The volume has changed."
49893 "name": "onwaiting",
49895 "kind": "markdown",
49896 "value": "Playback has stopped because of a temporary lack of data."
49900 "name": "aria-activedescendant",
49903 "name": "WAI-ARIA Reference",
49904 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-activedescendant"
49908 "kind": "markdown",
49909 "value": "Identifies the currently active element when DOM focus is on a [`composite`](https://www.w3.org/TR/wai-aria-1.1/#composite) widget, [`textbox`](https://www.w3.org/TR/wai-aria-1.1/#textbox), [`group`](https://www.w3.org/TR/wai-aria-1.1/#group), or [`application`](https://www.w3.org/TR/wai-aria-1.1/#application)."
49913 "name": "aria-atomic",
49917 "name": "WAI-ARIA Reference",
49918 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-atomic"
49922 "kind": "markdown",
49923 "value": "Indicates whether [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology) will present all, or only parts of, the changed region based on the change notifications defined by the [`aria-relevant`](https://www.w3.org/TR/wai-aria-1.1/#aria-relevant) attribute."
49927 "name": "aria-autocomplete",
49928 "valueSet": "autocomplete",
49931 "name": "WAI-ARIA Reference",
49932 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete"
49936 "kind": "markdown",
49937 "value": "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made."
49941 "name": "aria-busy",
49945 "name": "WAI-ARIA Reference",
49946 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-busy"
49950 "kind": "markdown",
49951 "value": "Indicates an element is being modified and that assistive technologies _MAY_ want to wait until the modifications are complete before exposing them to the user."
49955 "name": "aria-checked",
49956 "valueSet": "tristate",
49959 "name": "WAI-ARIA Reference",
49960 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-checked"
49964 "kind": "markdown",
49965 "value": "Indicates the current \"checked\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of checkboxes, radio buttons, and other [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
49969 "name": "aria-colcount",
49972 "name": "WAI-ARIA Reference",
49973 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colcount"
49977 "kind": "markdown",
49978 "value": "Defines the total number of columns in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex)."
49982 "name": "aria-colindex",
49985 "name": "WAI-ARIA Reference",
49986 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colindex"
49990 "kind": "markdown",
49991 "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) column index or position with respect to the total number of columns within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-colcount) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
49995 "name": "aria-colspan",
49998 "name": "WAI-ARIA Reference",
49999 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colspan"
50003 "kind": "markdown",
50004 "value": "Defines the number of columns spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
50008 "name": "aria-controls",
50011 "name": "WAI-ARIA Reference",
50012 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-controls"
50016 "kind": "markdown",
50017 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) whose contents or presence are controlled by the current element. See related [`aria-owns`](https://www.w3.org/TR/wai-aria-1.1/#aria-owns)."
50021 "name": "aria-current",
50022 "valueSet": "current",
50025 "name": "WAI-ARIA Reference",
50026 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-current"
50030 "kind": "markdown",
50031 "value": "Indicates the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that represents the current item within a container or set of related elements."
50035 "name": "aria-describedat",
50038 "name": "WAI-ARIA Reference",
50039 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedat"
50044 "name": "aria-describedby",
50047 "name": "WAI-ARIA Reference",
50048 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedby"
50052 "kind": "markdown",
50053 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that describes the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
50057 "name": "aria-disabled",
50061 "name": "WAI-ARIA Reference",
50062 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-disabled"
50066 "kind": "markdown",
50067 "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is [perceivable](https://www.w3.org/TR/wai-aria-1.1/#dfn-perceivable) but disabled, so it is not editable or otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden) and [`aria-readonly`](https://www.w3.org/TR/wai-aria-1.1/#aria-readonly)."
50071 "name": "aria-dropeffect",
50072 "valueSet": "dropeffect",
50075 "name": "WAI-ARIA Reference",
50076 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect"
50080 "kind": "markdown",
50081 "value": "\\[Deprecated in ARIA 1.1\\] Indicates what functions can be performed when a dragged object is released on the drop target."
50085 "name": "aria-errormessage",
50088 "name": "WAI-ARIA Reference",
50089 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage"
50093 "kind": "markdown",
50094 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides an error message for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-invalid`](https://www.w3.org/TR/wai-aria-1.1/#aria-invalid) and [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
50098 "name": "aria-expanded",
50102 "name": "WAI-ARIA Reference",
50103 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-expanded"
50107 "kind": "markdown",
50108 "value": "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed."
50112 "name": "aria-flowto",
50115 "name": "WAI-ARIA Reference",
50116 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-flowto"
50120 "kind": "markdown",
50121 "value": "Identifies the next [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order."
50125 "name": "aria-grabbed",
50129 "name": "WAI-ARIA Reference",
50130 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-grabbed"
50134 "kind": "markdown",
50135 "value": "\\[Deprecated in ARIA 1.1\\] Indicates an element's \"grabbed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) in a drag-and-drop operation."
50139 "name": "aria-haspopup",
50143 "name": "WAI-ARIA Reference",
50144 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup"
50148 "kind": "markdown",
50149 "value": "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
50153 "name": "aria-hidden",
50157 "name": "WAI-ARIA Reference",
50158 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"
50162 "kind": "markdown",
50163 "value": "Indicates whether the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is exposed to an accessibility API. See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
50167 "name": "aria-invalid",
50168 "valueSet": "invalid",
50171 "name": "WAI-ARIA Reference",
50172 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-invalid"
50176 "kind": "markdown",
50177 "value": "Indicates the entered value does not conform to the format expected by the application. See related [`aria-errormessage`](https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage)."
50181 "name": "aria-kbdshortcuts",
50184 "name": "WAI-ARIA Reference",
50185 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-kbdshortcuts"
50190 "name": "aria-label",
50193 "name": "WAI-ARIA Reference",
50194 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-label"
50198 "kind": "markdown",
50199 "value": "Defines a string value that labels the current element. See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
50203 "name": "aria-labelledby",
50206 "name": "WAI-ARIA Reference",
50207 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"
50211 "kind": "markdown",
50212 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that labels the current element. See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
50216 "name": "aria-level",
50219 "name": "WAI-ARIA Reference",
50220 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-level"
50224 "kind": "markdown",
50225 "value": "Defines the hierarchical level of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) within a structure."
50229 "name": "aria-live",
50230 "valueSet": "live",
50233 "name": "WAI-ARIA Reference",
50234 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-live"
50238 "kind": "markdown",
50239 "value": "Indicates that an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) will be updated, and describes the types of updates the [user agents](https://www.w3.org/TR/wai-aria-1.1/#dfn-user-agent), [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology), and user can expect from the [live region](https://www.w3.org/TR/wai-aria-1.1/#dfn-live-region)."
50243 "name": "aria-modal",
50247 "name": "WAI-ARIA Reference",
50248 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-modal"
50252 "kind": "markdown",
50253 "value": "Indicates whether an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is modal when displayed."
50257 "name": "aria-multiline",
50261 "name": "WAI-ARIA Reference",
50262 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiline"
50266 "kind": "markdown",
50267 "value": "Indicates whether a text box accepts multiple lines of input or only a single line."
50271 "name": "aria-multiselectable",
50275 "name": "WAI-ARIA Reference",
50276 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable"
50280 "kind": "markdown",
50281 "value": "Indicates that the user may select more than one item from the current selectable descendants."
50285 "name": "aria-orientation",
50286 "valueSet": "orientation",
50289 "name": "WAI-ARIA Reference",
50290 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-orientation"
50294 "kind": "markdown",
50295 "value": "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous."
50299 "name": "aria-owns",
50302 "name": "WAI-ARIA Reference",
50303 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-owns"
50307 "kind": "markdown",
50308 "value": "Identifies an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in order to define a visual, functional, or contextual parent/child [relationship](https://www.w3.org/TR/wai-aria-1.1/#dfn-relationship) between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls)."
50312 "name": "aria-placeholder",
50315 "name": "WAI-ARIA Reference",
50316 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-placeholder"
50320 "kind": "markdown",
50321 "value": "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format."
50325 "name": "aria-posinset",
50328 "name": "WAI-ARIA Reference",
50329 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-posinset"
50333 "kind": "markdown",
50334 "value": "Defines an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)'s number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-setsize`](https://www.w3.org/TR/wai-aria-1.1/#aria-setsize)."
50338 "name": "aria-pressed",
50339 "valueSet": "tristate",
50342 "name": "WAI-ARIA Reference",
50343 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-pressed"
50347 "kind": "markdown",
50348 "value": "Indicates the current \"pressed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of toggle buttons. See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
50352 "name": "aria-readonly",
50356 "name": "WAI-ARIA Reference",
50357 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-readonly"
50361 "kind": "markdown",
50362 "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is not editable, but is otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
50366 "name": "aria-relevant",
50367 "valueSet": "relevant",
50370 "name": "WAI-ARIA Reference",
50371 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-relevant"
50375 "kind": "markdown",
50376 "value": "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related [`aria-atomic`](https://www.w3.org/TR/wai-aria-1.1/#aria-atomic)."
50380 "name": "aria-required",
50384 "name": "WAI-ARIA Reference",
50385 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-required"
50389 "kind": "markdown",
50390 "value": "Indicates that user input is required on the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) before a form may be submitted."
50394 "name": "aria-roledescription",
50397 "name": "WAI-ARIA Reference",
50398 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription"
50402 "kind": "markdown",
50403 "value": "Defines a human-readable, author-localized description for the [role](https://www.w3.org/TR/wai-aria-1.1/#dfn-role) of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
50407 "name": "aria-rowcount",
50410 "name": "WAI-ARIA Reference",
50411 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount"
50415 "kind": "markdown",
50416 "value": "Defines the total number of rows in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex)."
50420 "name": "aria-rowindex",
50423 "name": "WAI-ARIA Reference",
50424 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex"
50428 "kind": "markdown",
50429 "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) row index or position with respect to the total number of rows within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
50433 "name": "aria-rowspan",
50436 "name": "WAI-ARIA Reference",
50437 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan"
50441 "kind": "markdown",
50442 "value": "Defines the number of rows spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
50446 "name": "aria-selected",
50450 "name": "WAI-ARIA Reference",
50451 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-selected"
50455 "kind": "markdown",
50456 "value": "Indicates the current \"selected\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of various [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed)."
50460 "name": "aria-setsize",
50463 "name": "WAI-ARIA Reference",
50464 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-setsize"
50468 "kind": "markdown",
50469 "value": "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-posinset`](https://www.w3.org/TR/wai-aria-1.1/#aria-posinset)."
50473 "name": "aria-sort",
50474 "valueSet": "sort",
50477 "name": "WAI-ARIA Reference",
50478 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-sort"
50482 "kind": "markdown",
50483 "value": "Indicates if items in a table or grid are sorted in ascending or descending order."
50487 "name": "aria-valuemax",
50490 "name": "WAI-ARIA Reference",
50491 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemax"
50495 "kind": "markdown",
50496 "value": "Defines the maximum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
50500 "name": "aria-valuemin",
50503 "name": "WAI-ARIA Reference",
50504 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemin"
50508 "kind": "markdown",
50509 "value": "Defines the minimum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
50513 "name": "aria-valuenow",
50516 "name": "WAI-ARIA Reference",
50517 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow"
50521 "kind": "markdown",
50522 "value": "Defines the current value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-valuetext`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext)."
50526 "name": "aria-valuetext",
50529 "name": "WAI-ARIA Reference",
50530 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext"
50534 "kind": "markdown",
50535 "value": "Defines the human readable text alternative of [`aria-valuenow`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow) for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
50539 "name": "aria-details",
50541 "kind": "markdown",
50542 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides a detailed, extended description for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
50546 "name": "aria-keyshortcuts",
50548 "kind": "markdown",
50549 "value": "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element."
50575 "name": "undefined"
50632 "kind": "markdown",
50633 "value": "Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."
50639 "kind": "markdown",
50640 "value": "Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5); form data are included in the body of the form and sent to the server."
50646 "kind": "markdown",
50647 "value": "Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element to close the dialog when submitted."
50720 "name": "datetime-local"
50764 "name": "latin-name"
50767 "name": "latin-prose"
50770 "name": "full-width-latin"
50776 "name": "kana-name"
50861 "name": "application/x-www-form-urlencoded"
50864 "name": "multipart/form-data"
50867 "name": "text/plain"
50875 "name": "subtitles"
50881 "name": "descriptions"
50926 "name": "anonymous"
50929 "name": "use-credentials"
50937 "name": "allow-forms"
50940 "name": "allow-modals"
50943 "name": "allow-pointer-lock"
50946 "name": "allow-popups"
50949 "name": "allow-popups-to-escape-sandbox"
50952 "name": "allow-same-origin"
50955 "name": "allow-scripts"
50958 "name": "allow-top-navigation"
50963 "name": "tristate",
50975 "name": "undefined"
50980 "name": "inputautocomplete",
50983 "name": "additional-name"
50986 "name": "address-level1"
50989 "name": "address-level2"
50992 "name": "address-level3"
50995 "name": "address-level4"
50998 "name": "address-line1"
51001 "name": "address-line2"
51004 "name": "address-line3"
51010 "name": "bday-year"
51016 "name": "bday-month"
51022 "name": "cc-additional-name"
51031 "name": "cc-exp-month"
51034 "name": "cc-exp-year"
51037 "name": "cc-family-name"
51040 "name": "cc-given-name"
51046 "name": "cc-number"
51055 "name": "country-name"
51058 "name": "current-password"
51064 "name": "family-name"
51070 "name": "given-name"
51076 "name": "honorific-prefix"
51079 "name": "honorific-suffix"
51094 "name": "new-password"
51100 "name": "organization"
51103 "name": "organization-title"
51112 "name": "postal-code"
51121 "name": "street-address"
51124 "name": "tel-area-code"
51130 "name": "tel-country-code"
51133 "name": "tel-extension"
51136 "name": "tel-local"
51139 "name": "tel-local-prefix"
51142 "name": "tel-local-suffix"
51145 "name": "tel-national"
51148 "name": "transaction-amount"
51151 "name": "transaction-currency"
51165 "name": "autocomplete",
51208 "name": "dropeffect",
51257 "name": "assertive"
51262 "name": "orientation",
51268 "name": "horizontal"
51271 "name": "undefined"
51276 "name": "relevant",
51279 "name": "additions"
51291 "name": "additions text"
51299 "name": "ascending"
51302 "name": "descending"
51319 "name": "alertdialog"
51346 "name": "menuitemcheckbox"
51349 "name": "menuitemradio"
51355 "name": "progressbar"
51361 "name": "scrollbar"
51364 "name": "searchbox"
51370 "name": "spinbutton"
51412 "name": "radiogroup"
51424 "name": "application"
51433 "name": "columnheader"
51436 "name": "definition"
51439 "name": "directory"
51475 "name": "presentation"
51487 "name": "rowheader"
51490 "name": "separator"
51508 "name": "complementary"
51511 "name": "contentinfo"
51520 "name": "navigation"
51529 "name": "doc-abstract"
51532 "name": "doc-acknowledgments"
51535 "name": "doc-afterword"
51538 "name": "doc-appendix"
51541 "name": "doc-backlink"
51544 "name": "doc-biblioentry"
51547 "name": "doc-bibliography"
51550 "name": "doc-biblioref"
51553 "name": "doc-chapter"
51556 "name": "doc-colophon"
51559 "name": "doc-conclusion"
51562 "name": "doc-cover"
51565 "name": "doc-credit"
51568 "name": "doc-credits"
51571 "name": "doc-dedication"
51574 "name": "doc-endnote"
51577 "name": "doc-endnotes"
51580 "name": "doc-epigraph"
51583 "name": "doc-epilogue"
51586 "name": "doc-errata"
51589 "name": "doc-example"
51592 "name": "doc-footnote"
51595 "name": "doc-foreword"
51598 "name": "doc-glossary"
51601 "name": "doc-glossref"
51604 "name": "doc-index"
51607 "name": "doc-introduction"
51610 "name": "doc-noteref"
51613 "name": "doc-notice"
51616 "name": "doc-pagebreak"
51619 "name": "doc-pagelist"
51625 "name": "doc-preface"
51628 "name": "doc-prologue"
51631 "name": "doc-pullquote"
51637 "name": "doc-subtitle"
51648 "name": "metanames",
51651 "name": "application-name"
51657 "name": "description"
51660 "name": "format-detection"
51663 "name": "generator"
51669 "name": "publisher"
51678 "name": "theme-color"
51691 /***/ (function(module, __webpack_exports__, __webpack_require__) {
51694 __webpack_require__.r(__webpack_exports__);
51695 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDefined", function() { return isDefined; });
51696 /*---------------------------------------------------------------------------------------------
51697 * Copyright (c) Microsoft Corporation. All rights reserved.
51698 * Licensed under the MIT License. See License.txt in the project root for license information.
51699 *--------------------------------------------------------------------------------------------*/
51701 function isDefined(obj) {
51702 return typeof obj !== 'undefined';
51708 /***/ (function(module, __webpack_exports__, __webpack_require__) {
51711 __webpack_require__.r(__webpack_exports__);
51712 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTMLHover", function() { return HTMLHover; });
51713 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
51714 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
51715 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
51716 /* harmony import */ var _languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(120);
51717 /* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(124);
51718 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121);
51719 /*---------------------------------------------------------------------------------------------
51720 * Copyright (c) Microsoft Corporation. All rights reserved.
51721 * Licensed under the MIT License. See License.txt in the project root for license information.
51722 *--------------------------------------------------------------------------------------------*/
51729 var HTMLHover = /** @class */ (function () {
51730 function HTMLHover(clientCapabilities) {
51731 this.clientCapabilities = clientCapabilities;
51733 HTMLHover.prototype.doHover = function (document, position, htmlDocument) {
51734 var convertContents = this.convertContents.bind(this);
51735 var doesSupportMarkdown = this.doesSupportMarkdown();
51736 var offset = document.offsetAt(position);
51737 var node = htmlDocument.findNodeAt(offset);
51738 if (!node || !node.tag) {
51741 var dataProviders = Object(_languageFacts_builtinDataProviders__WEBPACK_IMPORTED_MODULE_3__["getAllDataProviders"])().filter(function (p) { return p.isApplicable(document.languageId); });
51742 function getTagHover(currTag, range, open) {
51743 currTag = currTag.toLowerCase();
51744 var _loop_1 = function (provider) {
51746 provider.provideTags().forEach(function (tag) {
51747 if (tag.name.toLowerCase() === currTag.toLowerCase()) {
51748 var tagLabel = open ? '<' + currTag + '>' : '</' + currTag + '>';
51749 var markupContent = Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_5__["generateDocumentation"])(tag, doesSupportMarkdown);
51750 if (!markupContent) {
51752 kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
51756 markupContent.value = '```html\n' + tagLabel + '\n```\n' + markupContent.value;
51757 hover = { contents: markupContent, range: range };
51761 hover.contents = convertContents(hover.contents);
51762 return { value: hover };
51765 for (var _i = 0, dataProviders_1 = dataProviders; _i < dataProviders_1.length; _i++) {
51766 var provider = dataProviders_1[_i];
51767 var state_1 = _loop_1(provider);
51768 if (typeof state_1 === "object")
51769 return state_1.value;
51773 function getAttrHover(currTag, currAttr, range) {
51774 currTag = currTag.toLowerCase();
51775 var _loop_2 = function (provider) {
51777 provider.provideAttributes(currTag).forEach(function (attr) {
51778 if (currAttr === attr.name && attr.description) {
51779 var contentsDoc = Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_5__["generateDocumentation"])(attr, doesSupportMarkdown);
51781 hover = { contents: contentsDoc, range: range };
51789 hover.contents = convertContents(hover.contents);
51790 return { value: hover };
51793 for (var _i = 0, dataProviders_2 = dataProviders; _i < dataProviders_2.length; _i++) {
51794 var provider = dataProviders_2[_i];
51795 var state_2 = _loop_2(provider);
51796 if (typeof state_2 === "object")
51797 return state_2.value;
51801 function getAttrValueHover(currTag, currAttr, currAttrValue, range) {
51802 currTag = currTag.toLowerCase();
51803 var _loop_3 = function (provider) {
51805 provider.provideValues(currTag, currAttr).forEach(function (attrValue) {
51806 if (currAttrValue === attrValue.name && attrValue.description) {
51807 var contentsDoc = Object(_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_5__["generateDocumentation"])(attrValue, doesSupportMarkdown);
51809 hover = { contents: contentsDoc, range: range };
51817 hover.contents = convertContents(hover.contents);
51818 return { value: hover };
51821 for (var _i = 0, dataProviders_3 = dataProviders; _i < dataProviders_3.length; _i++) {
51822 var provider = dataProviders_3[_i];
51823 var state_3 = _loop_3(provider);
51824 if (typeof state_3 === "object")
51825 return state_3.value;
51829 function getTagNameRange(tokenType, startOffset) {
51830 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(document.getText(), startOffset);
51831 var token = scanner.scan();
51832 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && (scanner.getTokenEnd() < offset || scanner.getTokenEnd() === offset && token !== tokenType)) {
51833 token = scanner.scan();
51835 if (token === tokenType && offset <= scanner.getTokenEnd()) {
51836 return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
51840 if (node.endTagStart && offset >= node.endTagStart) {
51841 var tagRange_1 = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTag, node.endTagStart);
51843 return getTagHover(node.tag, tagRange_1, false);
51847 var tagRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag, node.start);
51849 return getTagHover(node.tag, tagRange, true);
51851 var attrRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeName, node.start);
51853 var tag = node.tag;
51854 var attr = document.getText(attrRange);
51855 return getAttrHover(tag, attr, attrRange);
51857 function scanAttrAndAttrValue(nodeStart, attrValueStart) {
51858 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(document.getText(), nodeStart);
51859 var token = scanner.scan();
51860 var prevAttr = undefined;
51861 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && (scanner.getTokenEnd() <= attrValueStart)) {
51862 token = scanner.scan();
51863 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeName) {
51864 prevAttr = scanner.getTokenText();
51869 var attrValueRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].AttributeValue, node.start);
51870 if (attrValueRange) {
51871 var tag = node.tag;
51872 var attrValue = trimQuotes(document.getText(attrValueRange));
51873 var matchAttr = scanAttrAndAttrValue(node.start, document.offsetAt(attrValueRange.start));
51875 return getAttrValueHover(tag, matchAttr, attrValue, attrValueRange);
51880 HTMLHover.prototype.convertContents = function (contents) {
51881 if (!this.doesSupportMarkdown()) {
51882 if (typeof contents === 'string') {
51886 else if ('kind' in contents) {
51889 value: contents.value
51893 else if (Array.isArray(contents)) {
51894 contents.map(function (c) {
51895 return typeof c === 'string' ? c : c.value;
51900 return contents.value;
51905 HTMLHover.prototype.doesSupportMarkdown = function () {
51906 if (!Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(this.supportsMarkdown)) {
51907 if (!Object(_utils_object__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(this.clientCapabilities)) {
51908 this.supportsMarkdown = true;
51909 return this.supportsMarkdown;
51911 var hover = this.clientCapabilities && this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
51912 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["MarkupKind"].Markdown) !== -1;
51914 return this.supportsMarkdown;
51919 function trimQuotes(s) {
51920 if (s.length <= 1) {
51921 return s.replace(/['"]/, '');
51923 if (s[0] === "'" || s[0] === "\"") {
51926 if (s[s.length - 1] === "'" || s[s.length - 1] === "\"") {
51927 s = s.slice(0, -1);
51935 /***/ (function(module, __webpack_exports__, __webpack_require__) {
51938 __webpack_require__.r(__webpack_exports__);
51939 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
51940 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
51941 /* harmony import */ var _beautify_beautify_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(127);
51942 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
51943 /*---------------------------------------------------------------------------------------------
51944 * Copyright (c) Microsoft Corporation. All rights reserved.
51945 * Licensed under the MIT License. See License.txt in the project root for license information.
51946 *--------------------------------------------------------------------------------------------*/
51950 function format(document, range, options) {
51951 var value = document.getText();
51952 var includesEnd = true;
51953 var initialIndentLevel = 0;
51954 var tabSize = options.tabSize || 4;
51956 var startOffset = document.offsetAt(range.start);
51957 // include all leading whitespace iff at the beginning of the line
51958 var extendedStart = startOffset;
51959 while (extendedStart > 0 && isWhitespace(value, extendedStart - 1)) {
51962 if (extendedStart === 0 || isEOL(value, extendedStart - 1)) {
51963 startOffset = extendedStart;
51966 // else keep at least one whitespace
51967 if (extendedStart < startOffset) {
51968 startOffset = extendedStart + 1;
51971 // include all following whitespace until the end of the line
51972 var endOffset = document.offsetAt(range.end);
51973 var extendedEnd = endOffset;
51974 while (extendedEnd < value.length && isWhitespace(value, extendedEnd)) {
51977 if (extendedEnd === value.length || isEOL(value, extendedEnd)) {
51978 endOffset = extendedEnd;
51980 range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(startOffset), document.positionAt(endOffset));
51981 // Do not modify if substring starts in inside an element
51982 // Ending inside an element is fine as it doesn't cause formatting errors
51983 var firstHalf = value.substring(0, startOffset);
51984 if (new RegExp(/.*[<][^>]*$/).test(firstHalf)) {
51985 //return without modification
51986 value = value.substring(startOffset, endOffset);
51992 includesEnd = endOffset === value.length;
51993 value = value.substring(startOffset, endOffset);
51994 if (startOffset !== 0) {
51995 var startOfLineOffset = document.offsetAt(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"].create(range.start.line, 0));
51996 initialIndentLevel = computeIndentLevel(document.getText(), startOfLineOffset, options);
52000 range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"].create(0, 0), document.positionAt(value.length));
52002 var htmlOptions = {
52003 indent_size: tabSize,
52004 indent_char: options.insertSpaces ? ' ' : '\t',
52005 indent_empty_lines: getFormatOption(options, 'indentEmptyLines', false),
52006 wrap_line_length: getFormatOption(options, 'wrapLineLength', 120),
52007 unformatted: getTagsFormatOption(options, 'unformatted', void 0),
52008 content_unformatted: getTagsFormatOption(options, 'contentUnformatted', void 0),
52009 indent_inner_html: getFormatOption(options, 'indentInnerHtml', false),
52010 preserve_newlines: getFormatOption(options, 'preserveNewLines', true),
52011 max_preserve_newlines: getFormatOption(options, 'maxPreserveNewLines', 32786),
52012 indent_handlebars: getFormatOption(options, 'indentHandlebars', false),
52013 end_with_newline: includesEnd && getFormatOption(options, 'endWithNewline', false),
52014 extra_liners: getTagsFormatOption(options, 'extraLiners', void 0),
52015 wrap_attributes: getFormatOption(options, 'wrapAttributes', 'auto'),
52016 wrap_attributes_indent_size: getFormatOption(options, 'wrapAttributesIndentSize', void 0),
52019 var result = Object(_beautify_beautify_html__WEBPACK_IMPORTED_MODULE_1__["html_beautify"])(trimLeft(value), htmlOptions);
52020 if (initialIndentLevel > 0) {
52021 var indent = options.insertSpaces ? Object(_utils_strings__WEBPACK_IMPORTED_MODULE_2__["repeat"])(' ', tabSize * initialIndentLevel) : Object(_utils_strings__WEBPACK_IMPORTED_MODULE_2__["repeat"])('\t', initialIndentLevel);
52022 result = result.split('\n').join('\n' + indent);
52023 if (range.start.character === 0) {
52024 result = indent + result; // keep the indent
52032 function trimLeft(str) {
52033 return str.replace(/^\s+/, '');
52035 function getFormatOption(options, key, dflt) {
52036 if (options && options.hasOwnProperty(key)) {
52037 var value = options[key];
52038 if (value !== null) {
52044 function getTagsFormatOption(options, key, dflt) {
52045 var list = getFormatOption(options, key, null);
52046 if (typeof list === 'string') {
52047 if (list.length > 0) {
52048 return list.split(',').map(function (t) { return t.trim().toLowerCase(); });
52054 function computeIndentLevel(content, offset, options) {
52057 var tabSize = options.tabSize || 4;
52058 while (i < content.length) {
52059 var ch = content.charAt(i);
52063 else if (ch === '\t') {
52071 return Math.floor(nChars / tabSize);
52073 function getEOL(document) {
52074 var text = document.getText();
52075 if (document.lineCount > 1) {
52076 var to = document.offsetAt(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"].create(1, 0));
52078 while (from > 0 && isEOL(text, from - 1)) {
52081 return text.substr(from, to - from);
52085 function isEOL(text, offset) {
52086 return '\r\n'.indexOf(text.charAt(offset)) !== -1;
52088 function isWhitespace(text, offset) {
52089 return ' \t'.indexOf(text.charAt(offset)) !== -1;
52095 /***/ (function(module, __webpack_exports__, __webpack_require__) {
52098 __webpack_require__.r(__webpack_exports__);
52099 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html_beautify", function() { return html_beautify; });
52100 /* harmony import */ var _beautify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(128);
52101 /* harmony import */ var _beautify_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(129);
52102 // copied from js-beautify/js/lib/beautify-html.js
52104 /* AUTO-GENERATED. DO NOT MODIFY. */
52107 The MIT License (MIT)
52109 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
52111 Permission is hereby granted, free of charge, to any person
52112 obtaining a copy of this software and associated documentation files
52113 (the "Software"), to deal in the Software without restriction,
52114 including without limitation the rights to use, copy, modify, merge,
52115 publish, distribute, sublicense, and/or sell copies of the Software,
52116 and to permit persons to whom the Software is furnished to do so,
52117 subject to the following conditions:
52119 The above copyright notice and this permission notice shall be
52120 included in all copies or substantial portions of the Software.
52122 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52123 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52124 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52125 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
52126 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52127 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52128 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52135 Written by Nochum Sossonko, (nsossonko@hotmail.com)
52137 Based on code initially developed by: Einar Lielmanis, <einar@beautifier.io>
52138 https://beautifier.io/
52141 style_html(html_source);
52143 style_html(html_source, options);
52146 indent_inner_html (default false) — indent <head> and <body> sections,
52147 indent_size (default 4) — indentation size,
52148 indent_char (default space) — character to indent with,
52149 wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)
52150 brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none"
52151 put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
52152 inline (defaults to inline tags) - list of tags to be considered inline tags
52153 unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
52154 content_unformatted (defaults to ["pre", "textarea"] tags) - list of tags, whose content shouldn't be reformatted
52155 indent_scripts (default normal) - "keep"|"separate"|"normal"
52156 preserve_newlines (default true) - whether existing line breaks before elements should be preserved
52157 Only works before elements, not inside tags or for text.
52158 max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
52159 indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
52160 end_with_newline (false) - end with a newline
52161 extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.
52165 style_html(html_source, {
52166 'indent_inner_html': false,
52168 'indent_char': ' ',
52169 'wrap_line_length': 78,
52170 'brace_style': 'expand',
52171 'preserve_newlines': true,
52172 'max_preserve_newlines': 5,
52173 'indent_handlebars': false,
52174 'extra_liners': ['/html']
52181 var legacy_beautify_html =
52182 /******/ (function(modules) { // webpackBootstrap
52183 /******/ // The module cache
52184 /******/ var installedModules = {};
52186 /******/ // The require function
52187 /******/ function __webpack_require__(moduleId) {
52189 /******/ // Check if module is in cache
52190 /******/ if(installedModules[moduleId]) {
52191 /******/ return installedModules[moduleId].exports;
52193 /******/ // Create a new module (and put it into the cache)
52194 /******/ var module = installedModules[moduleId] = {
52195 /******/ i: moduleId,
52197 /******/ exports: {}
52200 /******/ // Execute the module function
52201 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
52203 /******/ // Flag the module as loaded
52204 /******/ module.l = true;
52206 /******/ // Return the exports of the module
52207 /******/ return module.exports;
52211 /******/ // expose the modules object (__webpack_modules__)
52212 /******/ __webpack_require__.m = modules;
52214 /******/ // expose the module cache
52215 /******/ __webpack_require__.c = installedModules;
52217 /******/ // define getter function for harmony exports
52218 /******/ __webpack_require__.d = function(exports, name, getter) {
52219 /******/ if(!__webpack_require__.o(exports, name)) {
52220 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
52224 /******/ // define __esModule on exports
52225 /******/ __webpack_require__.r = function(exports) {
52226 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52227 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
52229 /******/ Object.defineProperty(exports, '__esModule', { value: true });
52232 /******/ // create a fake namespace object
52233 /******/ // mode & 1: value is a module id, require it
52234 /******/ // mode & 2: merge all properties of value into the ns
52235 /******/ // mode & 4: return value when already ns object
52236 /******/ // mode & 8|1: behave like require
52237 /******/ __webpack_require__.t = function(value, mode) {
52238 /******/ if(mode & 1) value = __webpack_require__(value);
52239 /******/ if(mode & 8) return value;
52240 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
52241 /******/ var ns = Object.create(null);
52242 /******/ __webpack_require__.r(ns);
52243 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
52244 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
52245 /******/ return ns;
52248 /******/ // getDefaultExport function for compatibility with non-harmony modules
52249 /******/ __webpack_require__.n = function(module) {
52250 /******/ var getter = module && module.__esModule ?
52251 /******/ function getDefault() { return module['default']; } :
52252 /******/ function getModuleExports() { return module; };
52253 /******/ __webpack_require__.d(getter, 'a', getter);
52254 /******/ return getter;
52257 /******/ // Object.prototype.hasOwnProperty.call
52258 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
52260 /******/ // __webpack_public_path__
52261 /******/ __webpack_require__.p = "";
52264 /******/ // Load entry module and return exports
52265 /******/ return __webpack_require__(__webpack_require__.s = 18);
52267 /************************************************************************/
52272 /***/ (function(module, exports, __webpack_require__) {
52275 /*jshint node:true */
52277 The MIT License (MIT)
52279 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
52281 Permission is hereby granted, free of charge, to any person
52282 obtaining a copy of this software and associated documentation files
52283 (the "Software"), to deal in the Software without restriction,
52284 including without limitation the rights to use, copy, modify, merge,
52285 publish, distribute, sublicense, and/or sell copies of the Software,
52286 and to permit persons to whom the Software is furnished to do so,
52287 subject to the following conditions:
52289 The above copyright notice and this permission notice shall be
52290 included in all copies or substantial portions of the Software.
52292 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52293 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52294 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52295 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
52296 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52297 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52298 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52304 function OutputLine(parent) {
52305 this.__parent = parent;
52306 this.__character_count = 0;
52307 // use indent_count as a marker for this.__lines that have preserved indentation
52308 this.__indent_count = -1;
52309 this.__alignment_count = 0;
52310 this.__wrap_point_index = 0;
52311 this.__wrap_point_character_count = 0;
52312 this.__wrap_point_indent_count = -1;
52313 this.__wrap_point_alignment_count = 0;
52318 OutputLine.prototype.clone_empty = function() {
52319 var line = new OutputLine(this.__parent);
52320 line.set_indent(this.__indent_count, this.__alignment_count);
52324 OutputLine.prototype.item = function(index) {
52326 return this.__items[this.__items.length + index];
52328 return this.__items[index];
52332 OutputLine.prototype.has_match = function(pattern) {
52333 for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
52334 if (this.__items[lastCheckedOutput].match(pattern)) {
52341 OutputLine.prototype.set_indent = function(indent, alignment) {
52342 if (this.is_empty()) {
52343 this.__indent_count = indent || 0;
52344 this.__alignment_count = alignment || 0;
52345 this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
52349 OutputLine.prototype._set_wrap_point = function() {
52350 if (this.__parent.wrap_line_length) {
52351 this.__wrap_point_index = this.__items.length;
52352 this.__wrap_point_character_count = this.__character_count;
52353 this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
52354 this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
52358 OutputLine.prototype._should_wrap = function() {
52359 return this.__wrap_point_index &&
52360 this.__character_count > this.__parent.wrap_line_length &&
52361 this.__wrap_point_character_count > this.__parent.next_line.__character_count;
52364 OutputLine.prototype._allow_wrap = function() {
52365 if (this._should_wrap()) {
52366 this.__parent.add_new_line();
52367 var next = this.__parent.current_line;
52368 next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
52369 next.__items = this.__items.slice(this.__wrap_point_index);
52370 this.__items = this.__items.slice(0, this.__wrap_point_index);
52372 next.__character_count += this.__character_count - this.__wrap_point_character_count;
52373 this.__character_count = this.__wrap_point_character_count;
52375 if (next.__items[0] === " ") {
52376 next.__items.splice(0, 1);
52377 next.__character_count -= 1;
52384 OutputLine.prototype.is_empty = function() {
52385 return this.__items.length === 0;
52388 OutputLine.prototype.last = function() {
52389 if (!this.is_empty()) {
52390 return this.__items[this.__items.length - 1];
52396 OutputLine.prototype.push = function(item) {
52397 this.__items.push(item);
52398 var last_newline_index = item.lastIndexOf('\n');
52399 if (last_newline_index !== -1) {
52400 this.__character_count = item.length - last_newline_index;
52402 this.__character_count += item.length;
52406 OutputLine.prototype.pop = function() {
52408 if (!this.is_empty()) {
52409 item = this.__items.pop();
52410 this.__character_count -= item.length;
52416 OutputLine.prototype._remove_indent = function() {
52417 if (this.__indent_count > 0) {
52418 this.__indent_count -= 1;
52419 this.__character_count -= this.__parent.indent_size;
52423 OutputLine.prototype._remove_wrap_indent = function() {
52424 if (this.__wrap_point_indent_count > 0) {
52425 this.__wrap_point_indent_count -= 1;
52428 OutputLine.prototype.trim = function() {
52429 while (this.last() === ' ') {
52430 this.__items.pop();
52431 this.__character_count -= 1;
52435 OutputLine.prototype.toString = function() {
52437 if (this.is_empty()) {
52438 if (this.__parent.indent_empty_lines) {
52439 result = this.__parent.get_indent_string(this.__indent_count);
52442 result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
52443 result += this.__items.join('');
52448 function IndentStringCache(options, baseIndentString) {
52449 this.__cache = [''];
52450 this.__indent_size = options.indent_size;
52451 this.__indent_string = options.indent_char;
52452 if (!options.indent_with_tabs) {
52453 this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
52456 // Set to null to continue support for auto detection of base indent
52457 baseIndentString = baseIndentString || '';
52458 if (options.indent_level > 0) {
52459 baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
52462 this.__base_string = baseIndentString;
52463 this.__base_string_length = baseIndentString.length;
52466 IndentStringCache.prototype.get_indent_size = function(indent, column) {
52467 var result = this.__base_string_length;
52468 column = column || 0;
52472 result += indent * this.__indent_size;
52477 IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
52478 var result = this.__base_string;
52479 column = column || 0;
52480 if (indent_level < 0) {
52484 column += indent_level * this.__indent_size;
52485 this.__ensure_cache(column);
52486 result += this.__cache[column];
52490 IndentStringCache.prototype.__ensure_cache = function(column) {
52491 while (column >= this.__cache.length) {
52492 this.__add_column();
52496 IndentStringCache.prototype.__add_column = function() {
52497 var column = this.__cache.length;
52500 if (this.__indent_size && column >= this.__indent_size) {
52501 indent = Math.floor(column / this.__indent_size);
52502 column -= indent * this.__indent_size;
52503 result = new Array(indent + 1).join(this.__indent_string);
52506 result += new Array(column + 1).join(' ');
52509 this.__cache.push(result);
52512 function Output(options, baseIndentString) {
52513 this.__indent_cache = new IndentStringCache(options, baseIndentString);
52515 this._end_with_newline = options.end_with_newline;
52516 this.indent_size = options.indent_size;
52517 this.wrap_line_length = options.wrap_line_length;
52518 this.indent_empty_lines = options.indent_empty_lines;
52520 this.previous_line = null;
52521 this.current_line = null;
52522 this.next_line = new OutputLine(this);
52523 this.space_before_token = false;
52524 this.non_breaking_space = false;
52525 this.previous_token_wrapped = false;
52527 this.__add_outputline();
52530 Output.prototype.__add_outputline = function() {
52531 this.previous_line = this.current_line;
52532 this.current_line = this.next_line.clone_empty();
52533 this.__lines.push(this.current_line);
52536 Output.prototype.get_line_number = function() {
52537 return this.__lines.length;
52540 Output.prototype.get_indent_string = function(indent, column) {
52541 return this.__indent_cache.get_indent_string(indent, column);
52544 Output.prototype.get_indent_size = function(indent, column) {
52545 return this.__indent_cache.get_indent_size(indent, column);
52548 Output.prototype.is_empty = function() {
52549 return !this.previous_line && this.current_line.is_empty();
52552 Output.prototype.add_new_line = function(force_newline) {
52553 // never newline at the start of file
52554 // otherwise, newline only if we didn't just add one or we're forced
52555 if (this.is_empty() ||
52556 (!force_newline && this.just_added_newline())) {
52560 // if raw output is enabled, don't print additional newlines,
52561 // but still return True as though you had
52563 this.__add_outputline();
52568 Output.prototype.get_code = function(eol) {
52571 // handle some edge cases where the last tokens
52572 // has text that ends with newline(s)
52573 var last_item = this.current_line.pop();
52575 if (last_item[last_item.length - 1] === '\n') {
52576 last_item = last_item.replace(/\n+$/g, '');
52578 this.current_line.push(last_item);
52581 if (this._end_with_newline) {
52582 this.__add_outputline();
52585 var sweet_code = this.__lines.join('\n');
52587 if (eol !== '\n') {
52588 sweet_code = sweet_code.replace(/[\n]/g, eol);
52593 Output.prototype.set_wrap_point = function() {
52594 this.current_line._set_wrap_point();
52597 Output.prototype.set_indent = function(indent, alignment) {
52598 indent = indent || 0;
52599 alignment = alignment || 0;
52601 // Next line stores alignment values
52602 this.next_line.set_indent(indent, alignment);
52604 // Never indent your first output indent at the start of the file
52605 if (this.__lines.length > 1) {
52606 this.current_line.set_indent(indent, alignment);
52610 this.current_line.set_indent();
52614 Output.prototype.add_raw_token = function(token) {
52615 for (var x = 0; x < token.newlines; x++) {
52616 this.__add_outputline();
52618 this.current_line.set_indent(-1);
52619 this.current_line.push(token.whitespace_before);
52620 this.current_line.push(token.text);
52621 this.space_before_token = false;
52622 this.non_breaking_space = false;
52623 this.previous_token_wrapped = false;
52626 Output.prototype.add_token = function(printable_token) {
52627 this.__add_space_before_token();
52628 this.current_line.push(printable_token);
52629 this.space_before_token = false;
52630 this.non_breaking_space = false;
52631 this.previous_token_wrapped = this.current_line._allow_wrap();
52634 Output.prototype.__add_space_before_token = function() {
52635 if (this.space_before_token && !this.just_added_newline()) {
52636 if (!this.non_breaking_space) {
52637 this.set_wrap_point();
52639 this.current_line.push(' ');
52643 Output.prototype.remove_indent = function(index) {
52644 var output_length = this.__lines.length;
52645 while (index < output_length) {
52646 this.__lines[index]._remove_indent();
52649 this.current_line._remove_wrap_indent();
52652 Output.prototype.trim = function(eat_newlines) {
52653 eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
52655 this.current_line.trim();
52657 while (eat_newlines && this.__lines.length > 1 &&
52658 this.current_line.is_empty()) {
52659 this.__lines.pop();
52660 this.current_line = this.__lines[this.__lines.length - 1];
52661 this.current_line.trim();
52664 this.previous_line = this.__lines.length > 1 ?
52665 this.__lines[this.__lines.length - 2] : null;
52668 Output.prototype.just_added_newline = function() {
52669 return this.current_line.is_empty();
52672 Output.prototype.just_added_blankline = function() {
52673 return this.is_empty() ||
52674 (this.current_line.is_empty() && this.previous_line.is_empty());
52677 Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
52678 var index = this.__lines.length - 2;
52679 while (index >= 0) {
52680 var potentialEmptyLine = this.__lines[index];
52681 if (potentialEmptyLine.is_empty()) {
52683 } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
52684 potentialEmptyLine.item(-1) !== ends_with) {
52685 this.__lines.splice(index + 1, 0, new OutputLine(this));
52686 this.previous_line = this.__lines[this.__lines.length - 2];
52693 module.exports.Output = Output;
52698 /***/ (function(module, exports, __webpack_require__) {
52701 /*jshint node:true */
52704 The MIT License (MIT)
52706 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
52708 Permission is hereby granted, free of charge, to any person
52709 obtaining a copy of this software and associated documentation files
52710 (the "Software"), to deal in the Software without restriction,
52711 including without limitation the rights to use, copy, modify, merge,
52712 publish, distribute, sublicense, and/or sell copies of the Software,
52713 and to permit persons to whom the Software is furnished to do so,
52714 subject to the following conditions:
52716 The above copyright notice and this permission notice shall be
52717 included in all copies or substantial portions of the Software.
52719 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52720 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52721 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52722 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
52723 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52724 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52725 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52731 function Token(type, text, newlines, whitespace_before) {
52735 // comments_before are
52736 // comments that have a new line before them
52737 // and may or may not have a newline after
52738 // this is a set of comments before
52739 this.comments_before = null; /* inline comment*/
52742 // this.comments_after = new TokenStream(); // no new line before and newline after
52743 this.newlines = newlines || 0;
52744 this.whitespace_before = whitespace_before || '';
52745 this.parent = null;
52747 this.previous = null;
52748 this.opened = null;
52749 this.closed = null;
52750 this.directives = null;
52754 module.exports.Token = Token;
52761 /***/ (function(module, exports, __webpack_require__) {
52764 /*jshint node:true */
52767 The MIT License (MIT)
52769 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
52771 Permission is hereby granted, free of charge, to any person
52772 obtaining a copy of this software and associated documentation files
52773 (the "Software"), to deal in the Software without restriction,
52774 including without limitation the rights to use, copy, modify, merge,
52775 publish, distribute, sublicense, and/or sell copies of the Software,
52776 and to permit persons to whom the Software is furnished to do so,
52777 subject to the following conditions:
52779 The above copyright notice and this permission notice shall be
52780 included in all copies or substantial portions of the Software.
52782 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52783 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52784 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52785 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
52786 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52787 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52788 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52794 function Options(options, merge_child_field) {
52795 this.raw_options = _mergeOpts(options, merge_child_field);
52797 // Support passing the source text back with no change
52798 this.disabled = this._get_boolean('disabled');
52800 this.eol = this._get_characters('eol', 'auto');
52801 this.end_with_newline = this._get_boolean('end_with_newline');
52802 this.indent_size = this._get_number('indent_size', 4);
52803 this.indent_char = this._get_characters('indent_char', ' ');
52804 this.indent_level = this._get_number('indent_level');
52806 this.preserve_newlines = this._get_boolean('preserve_newlines', true);
52807 this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
52808 if (!this.preserve_newlines) {
52809 this.max_preserve_newlines = 0;
52812 this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
52813 if (this.indent_with_tabs) {
52814 this.indent_char = '\t';
52816 // indent_size behavior changed after 1.8.6
52817 // It used to be that indent_size would be
52818 // set to 1 for indent_with_tabs. That is no longer needed and
52819 // actually doesn't make sense - why not use spaces? Further,
52820 // that might produce unexpected behavior - tabs being used
52821 // for single-column alignment. So, when indent_with_tabs is true
52822 // and indent_size is 1, reset indent_size to 4.
52823 if (this.indent_size === 1) {
52824 this.indent_size = 4;
52828 // Backwards compat with 1.3.x
52829 this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));
52831 this.indent_empty_lines = this._get_boolean('indent_empty_lines');
52833 // valid templating languages ['django', 'erb', 'handlebars', 'php']
52834 // For now, 'auto' = all off for javascript, all on for html (and inline javascript).
52835 // other values ignored
52836 this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
52839 Options.prototype._get_array = function(name, default_value) {
52840 var option_value = this.raw_options[name];
52841 var result = default_value || [];
52842 if (typeof option_value === 'object') {
52843 if (option_value !== null && typeof option_value.concat === 'function') {
52844 result = option_value.concat();
52846 } else if (typeof option_value === 'string') {
52847 result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
52852 Options.prototype._get_boolean = function(name, default_value) {
52853 var option_value = this.raw_options[name];
52854 var result = option_value === undefined ? !!default_value : !!option_value;
52858 Options.prototype._get_characters = function(name, default_value) {
52859 var option_value = this.raw_options[name];
52860 var result = default_value || '';
52861 if (typeof option_value === 'string') {
52862 result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
52867 Options.prototype._get_number = function(name, default_value) {
52868 var option_value = this.raw_options[name];
52869 default_value = parseInt(default_value, 10);
52870 if (isNaN(default_value)) {
52873 var result = parseInt(option_value, 10);
52874 if (isNaN(result)) {
52875 result = default_value;
52880 Options.prototype._get_selection = function(name, selection_list, default_value) {
52881 var result = this._get_selection_list(name, selection_list, default_value);
52882 if (result.length !== 1) {
52884 "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
52885 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
52892 Options.prototype._get_selection_list = function(name, selection_list, default_value) {
52893 if (!selection_list || selection_list.length === 0) {
52894 throw new Error("Selection list cannot be empty.");
52897 default_value = default_value || [selection_list[0]];
52898 if (!this._is_valid_selection(default_value, selection_list)) {
52899 throw new Error("Invalid Default Value!");
52902 var result = this._get_array(name, default_value);
52903 if (!this._is_valid_selection(result, selection_list)) {
52905 "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
52906 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
52912 Options.prototype._is_valid_selection = function(result, selection_list) {
52913 return result.length && selection_list.length &&
52914 !result.some(function(item) { return selection_list.indexOf(item) === -1; });
52918 // merges child options up with the parent options object
52919 // Example: obj = {a: 1, b: {a: 2}}
52920 // mergeOpts(obj, 'b')
52923 function _mergeOpts(allOptions, childFieldName) {
52924 var finalOpts = {};
52925 allOptions = _normalizeOpts(allOptions);
52928 for (name in allOptions) {
52929 if (name !== childFieldName) {
52930 finalOpts[name] = allOptions[name];
52934 //merge in the per type settings for the childFieldName
52935 if (childFieldName && allOptions[childFieldName]) {
52936 for (name in allOptions[childFieldName]) {
52937 finalOpts[name] = allOptions[childFieldName][name];
52943 function _normalizeOpts(options) {
52944 var convertedOpts = {};
52947 for (key in options) {
52948 var newKey = key.replace(/-/g, "_");
52949 convertedOpts[newKey] = options[key];
52951 return convertedOpts;
52954 module.exports.Options = Options;
52955 module.exports.normalizeOpts = _normalizeOpts;
52956 module.exports.mergeOpts = _mergeOpts;
52962 /***/ (function(module, exports, __webpack_require__) {
52965 /*jshint node:true */
52968 The MIT License (MIT)
52970 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
52972 Permission is hereby granted, free of charge, to any person
52973 obtaining a copy of this software and associated documentation files
52974 (the "Software"), to deal in the Software without restriction,
52975 including without limitation the rights to use, copy, modify, merge,
52976 publish, distribute, sublicense, and/or sell copies of the Software,
52977 and to permit persons to whom the Software is furnished to do so,
52978 subject to the following conditions:
52980 The above copyright notice and this permission notice shall be
52981 included in all copies or substantial portions of the Software.
52983 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52984 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52985 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52986 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
52987 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
52988 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52989 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52995 var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
52997 function InputScanner(input_string) {
52998 this.__input = input_string || '';
52999 this.__input_length = this.__input.length;
53000 this.__position = 0;
53003 InputScanner.prototype.restart = function() {
53004 this.__position = 0;
53007 InputScanner.prototype.back = function() {
53008 if (this.__position > 0) {
53009 this.__position -= 1;
53013 InputScanner.prototype.hasNext = function() {
53014 return this.__position < this.__input_length;
53017 InputScanner.prototype.next = function() {
53019 if (this.hasNext()) {
53020 val = this.__input.charAt(this.__position);
53021 this.__position += 1;
53026 InputScanner.prototype.peek = function(index) {
53028 index = index || 0;
53029 index += this.__position;
53030 if (index >= 0 && index < this.__input_length) {
53031 val = this.__input.charAt(index);
53036 // This is a JavaScript only helper function (not in python)
53037 // Javascript doesn't have a match method
53038 // and not all implementation support "sticky" flag.
53039 // If they do not support sticky then both this.match() and this.test() method
53040 // must get the match and check the index of the match.
53041 // If sticky is supported and set, this method will use it.
53042 // Otherwise it will check that global is set, and fall back to the slower method.
53043 InputScanner.prototype.__match = function(pattern, index) {
53044 pattern.lastIndex = index;
53045 var pattern_match = pattern.exec(this.__input);
53047 if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
53048 if (pattern_match.index !== index) {
53049 pattern_match = null;
53053 return pattern_match;
53056 InputScanner.prototype.test = function(pattern, index) {
53057 index = index || 0;
53058 index += this.__position;
53060 if (index >= 0 && index < this.__input_length) {
53061 return !!this.__match(pattern, index);
53067 InputScanner.prototype.testChar = function(pattern, index) {
53068 // test one character regex match
53069 var val = this.peek(index);
53070 pattern.lastIndex = 0;
53071 return val !== null && pattern.test(val);
53074 InputScanner.prototype.match = function(pattern) {
53075 var pattern_match = this.__match(pattern, this.__position);
53076 if (pattern_match) {
53077 this.__position += pattern_match[0].length;
53079 pattern_match = null;
53081 return pattern_match;
53084 InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
53087 if (starting_pattern) {
53088 match = this.match(starting_pattern);
53093 if (until_pattern && (match || !starting_pattern)) {
53094 val += this.readUntil(until_pattern, until_after);
53099 InputScanner.prototype.readUntil = function(pattern, until_after) {
53101 var match_index = this.__position;
53102 pattern.lastIndex = this.__position;
53103 var pattern_match = pattern.exec(this.__input);
53104 if (pattern_match) {
53105 match_index = pattern_match.index;
53107 match_index += pattern_match[0].length;
53110 match_index = this.__input_length;
53113 val = this.__input.substring(this.__position, match_index);
53114 this.__position = match_index;
53118 InputScanner.prototype.readUntilAfter = function(pattern) {
53119 return this.readUntil(pattern, true);
53122 InputScanner.prototype.get_regexp = function(pattern, match_from) {
53125 if (match_from && regexp_has_sticky) {
53128 // strings are converted to regexp
53129 if (typeof pattern === "string" && pattern !== '') {
53130 // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
53131 result = new RegExp(pattern, flags);
53132 } else if (pattern) {
53133 result = new RegExp(pattern.source, flags);
53138 InputScanner.prototype.get_literal_regexp = function(literal_string) {
53139 return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
53142 /* css beautifier legacy helpers */
53143 InputScanner.prototype.peekUntilAfter = function(pattern) {
53144 var start = this.__position;
53145 var val = this.readUntilAfter(pattern);
53146 this.__position = start;
53150 InputScanner.prototype.lookBack = function(testVal) {
53151 var start = this.__position - 1;
53152 return start >= testVal.length && this.__input.substring(start - testVal.length, start)
53153 .toLowerCase() === testVal;
53156 module.exports.InputScanner = InputScanner;
53161 /***/ (function(module, exports, __webpack_require__) {
53164 /*jshint node:true */
53167 The MIT License (MIT)
53169 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53171 Permission is hereby granted, free of charge, to any person
53172 obtaining a copy of this software and associated documentation files
53173 (the "Software"), to deal in the Software without restriction,
53174 including without limitation the rights to use, copy, modify, merge,
53175 publish, distribute, sublicense, and/or sell copies of the Software,
53176 and to permit persons to whom the Software is furnished to do so,
53177 subject to the following conditions:
53179 The above copyright notice and this permission notice shall be
53180 included in all copies or substantial portions of the Software.
53182 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53183 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53184 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53185 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53186 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53187 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53188 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53194 var InputScanner = __webpack_require__(8).InputScanner;
53195 var Token = __webpack_require__(3).Token;
53196 var TokenStream = __webpack_require__(10).TokenStream;
53197 var WhitespacePattern = __webpack_require__(11).WhitespacePattern;
53205 var Tokenizer = function(input_string, options) {
53206 this._input = new InputScanner(input_string);
53207 this._options = options || {};
53208 this.__tokens = null;
53210 this._patterns = {};
53211 this._patterns.whitespace = new WhitespacePattern(this._input);
53214 Tokenizer.prototype.tokenize = function() {
53215 this._input.restart();
53216 this.__tokens = new TokenStream();
53221 var previous = new Token(TOKEN.START, '');
53222 var open_token = null;
53223 var open_stack = [];
53224 var comments = new TokenStream();
53226 while (previous.type !== TOKEN.EOF) {
53227 current = this._get_next_token(previous, open_token);
53228 while (this._is_comment(current)) {
53229 comments.add(current);
53230 current = this._get_next_token(previous, open_token);
53233 if (!comments.isEmpty()) {
53234 current.comments_before = comments;
53235 comments = new TokenStream();
53238 current.parent = open_token;
53240 if (this._is_opening(current)) {
53241 open_stack.push(open_token);
53242 open_token = current;
53243 } else if (open_token && this._is_closing(current, open_token)) {
53244 current.opened = open_token;
53245 open_token.closed = current;
53246 open_token = open_stack.pop();
53247 current.parent = open_token;
53250 current.previous = previous;
53251 previous.next = current;
53253 this.__tokens.add(current);
53254 previous = current;
53257 return this.__tokens;
53261 Tokenizer.prototype._is_first_token = function() {
53262 return this.__tokens.isEmpty();
53265 Tokenizer.prototype._reset = function() {};
53267 Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
53268 this._readWhitespace();
53269 var resulting_string = this._input.read(/.+/g);
53270 if (resulting_string) {
53271 return this._create_token(TOKEN.RAW, resulting_string);
53273 return this._create_token(TOKEN.EOF, '');
53277 Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
53281 Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false
53285 Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false
53289 Tokenizer.prototype._create_token = function(type, text) {
53290 var token = new Token(type, text,
53291 this._patterns.whitespace.newline_count,
53292 this._patterns.whitespace.whitespace_before_token);
53296 Tokenizer.prototype._readWhitespace = function() {
53297 return this._patterns.whitespace.read();
53302 module.exports.Tokenizer = Tokenizer;
53303 module.exports.TOKEN = TOKEN;
53308 /***/ (function(module, exports, __webpack_require__) {
53311 /*jshint node:true */
53314 The MIT License (MIT)
53316 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53318 Permission is hereby granted, free of charge, to any person
53319 obtaining a copy of this software and associated documentation files
53320 (the "Software"), to deal in the Software without restriction,
53321 including without limitation the rights to use, copy, modify, merge,
53322 publish, distribute, sublicense, and/or sell copies of the Software,
53323 and to permit persons to whom the Software is furnished to do so,
53324 subject to the following conditions:
53326 The above copyright notice and this permission notice shall be
53327 included in all copies or substantial portions of the Software.
53329 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53330 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53331 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53332 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53333 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53334 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53335 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53341 function TokenStream(parent_token) {
53343 this.__tokens = [];
53344 this.__tokens_length = this.__tokens.length;
53345 this.__position = 0;
53346 this.__parent_token = parent_token;
53349 TokenStream.prototype.restart = function() {
53350 this.__position = 0;
53353 TokenStream.prototype.isEmpty = function() {
53354 return this.__tokens_length === 0;
53357 TokenStream.prototype.hasNext = function() {
53358 return this.__position < this.__tokens_length;
53361 TokenStream.prototype.next = function() {
53363 if (this.hasNext()) {
53364 val = this.__tokens[this.__position];
53365 this.__position += 1;
53370 TokenStream.prototype.peek = function(index) {
53372 index = index || 0;
53373 index += this.__position;
53374 if (index >= 0 && index < this.__tokens_length) {
53375 val = this.__tokens[index];
53380 TokenStream.prototype.add = function(token) {
53381 if (this.__parent_token) {
53382 token.parent = this.__parent_token;
53384 this.__tokens.push(token);
53385 this.__tokens_length += 1;
53388 module.exports.TokenStream = TokenStream;
53393 /***/ (function(module, exports, __webpack_require__) {
53396 /*jshint node:true */
53399 The MIT License (MIT)
53401 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53403 Permission is hereby granted, free of charge, to any person
53404 obtaining a copy of this software and associated documentation files
53405 (the "Software"), to deal in the Software without restriction,
53406 including without limitation the rights to use, copy, modify, merge,
53407 publish, distribute, sublicense, and/or sell copies of the Software,
53408 and to permit persons to whom the Software is furnished to do so,
53409 subject to the following conditions:
53411 The above copyright notice and this permission notice shall be
53412 included in all copies or substantial portions of the Software.
53414 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53415 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53416 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53417 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53418 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53419 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53420 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53426 var Pattern = __webpack_require__(12).Pattern;
53428 function WhitespacePattern(input_scanner, parent) {
53429 Pattern.call(this, input_scanner, parent);
53431 this._line_regexp = this._input.get_regexp(parent._line_regexp);
53433 this.__set_whitespace_patterns('', '');
53436 this.newline_count = 0;
53437 this.whitespace_before_token = '';
53439 WhitespacePattern.prototype = new Pattern();
53441 WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {
53442 whitespace_chars += '\\t ';
53443 newline_chars += '\\n\\r';
53445 this._match_pattern = this._input.get_regexp(
53446 '[' + whitespace_chars + newline_chars + ']+', true);
53447 this._newline_regexp = this._input.get_regexp(
53448 '\\r\\n|[' + newline_chars + ']');
53451 WhitespacePattern.prototype.read = function() {
53452 this.newline_count = 0;
53453 this.whitespace_before_token = '';
53455 var resulting_string = this._input.read(this._match_pattern);
53456 if (resulting_string === ' ') {
53457 this.whitespace_before_token = ' ';
53458 } else if (resulting_string) {
53459 var matches = this.__split(this._newline_regexp, resulting_string);
53460 this.newline_count = matches.length - 1;
53461 this.whitespace_before_token = matches[this.newline_count];
53464 return resulting_string;
53467 WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {
53468 var result = this._create();
53469 result.__set_whitespace_patterns(whitespace_chars, newline_chars);
53474 WhitespacePattern.prototype._create = function() {
53475 return new WhitespacePattern(this._input, this);
53478 WhitespacePattern.prototype.__split = function(regexp, input_string) {
53479 regexp.lastIndex = 0;
53480 var start_index = 0;
53482 var next_match = regexp.exec(input_string);
53483 while (next_match) {
53484 result.push(input_string.substring(start_index, next_match.index));
53485 start_index = next_match.index + next_match[0].length;
53486 next_match = regexp.exec(input_string);
53489 if (start_index < input_string.length) {
53490 result.push(input_string.substring(start_index, input_string.length));
53500 module.exports.WhitespacePattern = WhitespacePattern;
53505 /***/ (function(module, exports, __webpack_require__) {
53508 /*jshint node:true */
53511 The MIT License (MIT)
53513 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53515 Permission is hereby granted, free of charge, to any person
53516 obtaining a copy of this software and associated documentation files
53517 (the "Software"), to deal in the Software without restriction,
53518 including without limitation the rights to use, copy, modify, merge,
53519 publish, distribute, sublicense, and/or sell copies of the Software,
53520 and to permit persons to whom the Software is furnished to do so,
53521 subject to the following conditions:
53523 The above copyright notice and this permission notice shall be
53524 included in all copies or substantial portions of the Software.
53526 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53527 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53528 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53529 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53530 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53531 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53532 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53538 function Pattern(input_scanner, parent) {
53539 this._input = input_scanner;
53540 this._starting_pattern = null;
53541 this._match_pattern = null;
53542 this._until_pattern = null;
53543 this._until_after = false;
53546 this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
53547 this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
53548 this._until_pattern = this._input.get_regexp(parent._until_pattern);
53549 this._until_after = parent._until_after;
53553 Pattern.prototype.read = function() {
53554 var result = this._input.read(this._starting_pattern);
53555 if (!this._starting_pattern || result) {
53556 result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
53561 Pattern.prototype.read_match = function() {
53562 return this._input.match(this._match_pattern);
53565 Pattern.prototype.until_after = function(pattern) {
53566 var result = this._create();
53567 result._until_after = true;
53568 result._until_pattern = this._input.get_regexp(pattern);
53573 Pattern.prototype.until = function(pattern) {
53574 var result = this._create();
53575 result._until_after = false;
53576 result._until_pattern = this._input.get_regexp(pattern);
53581 Pattern.prototype.starting_with = function(pattern) {
53582 var result = this._create();
53583 result._starting_pattern = this._input.get_regexp(pattern, true);
53588 Pattern.prototype.matching = function(pattern) {
53589 var result = this._create();
53590 result._match_pattern = this._input.get_regexp(pattern, true);
53595 Pattern.prototype._create = function() {
53596 return new Pattern(this._input, this);
53599 Pattern.prototype._update = function() {};
53601 module.exports.Pattern = Pattern;
53606 /***/ (function(module, exports, __webpack_require__) {
53609 /*jshint node:true */
53612 The MIT License (MIT)
53614 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53616 Permission is hereby granted, free of charge, to any person
53617 obtaining a copy of this software and associated documentation files
53618 (the "Software"), to deal in the Software without restriction,
53619 including without limitation the rights to use, copy, modify, merge,
53620 publish, distribute, sublicense, and/or sell copies of the Software,
53621 and to permit persons to whom the Software is furnished to do so,
53622 subject to the following conditions:
53624 The above copyright notice and this permission notice shall be
53625 included in all copies or substantial portions of the Software.
53627 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53628 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53629 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53630 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53631 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53632 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53633 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53639 function Directives(start_block_pattern, end_block_pattern) {
53640 start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
53641 end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
53642 this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
53643 this.__directive_pattern = / (\w+)[:](\w+)/g;
53645 this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
53648 Directives.prototype.get_directives = function(text) {
53649 if (!text.match(this.__directives_block_pattern)) {
53653 var directives = {};
53654 this.__directive_pattern.lastIndex = 0;
53655 var directive_match = this.__directive_pattern.exec(text);
53657 while (directive_match) {
53658 directives[directive_match[1]] = directive_match[2];
53659 directive_match = this.__directive_pattern.exec(text);
53665 Directives.prototype.readIgnored = function(input) {
53666 return input.readUntilAfter(this.__directives_end_ignore_pattern);
53670 module.exports.Directives = Directives;
53675 /***/ (function(module, exports, __webpack_require__) {
53678 /*jshint node:true */
53681 The MIT License (MIT)
53683 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53685 Permission is hereby granted, free of charge, to any person
53686 obtaining a copy of this software and associated documentation files
53687 (the "Software"), to deal in the Software without restriction,
53688 including without limitation the rights to use, copy, modify, merge,
53689 publish, distribute, sublicense, and/or sell copies of the Software,
53690 and to permit persons to whom the Software is furnished to do so,
53691 subject to the following conditions:
53693 The above copyright notice and this permission notice shall be
53694 included in all copies or substantial portions of the Software.
53696 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53697 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53698 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53699 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53700 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53701 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53702 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53708 var Pattern = __webpack_require__(12).Pattern;
53711 var template_names = {
53718 // This lets templates appear anywhere we would do a readUntil
53719 // The cost is higher but it is pay to play.
53720 function TemplatablePattern(input_scanner, parent) {
53721 Pattern.call(this, input_scanner, parent);
53722 this.__template_pattern = null;
53723 this._disabled = Object.assign({}, template_names);
53724 this._excluded = Object.assign({}, template_names);
53727 this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
53728 this._excluded = Object.assign(this._excluded, parent._excluded);
53729 this._disabled = Object.assign(this._disabled, parent._disabled);
53731 var pattern = new Pattern(input_scanner);
53732 this.__patterns = {
53733 handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
53734 handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
53735 handlebars: pattern.starting_with(/{{/).until_after(/}}/),
53736 php: pattern.starting_with(/<\?(?:[=]|php)/).until_after(/\?>/),
53737 erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
53738 // django coflicts with handlebars a bit.
53739 django: pattern.starting_with(/{%/).until_after(/%}/),
53740 django_value: pattern.starting_with(/{{/).until_after(/}}/),
53741 django_comment: pattern.starting_with(/{#/).until_after(/#}/)
53744 TemplatablePattern.prototype = new Pattern();
53746 TemplatablePattern.prototype._create = function() {
53747 return new TemplatablePattern(this._input, this);
53750 TemplatablePattern.prototype._update = function() {
53751 this.__set_templated_pattern();
53754 TemplatablePattern.prototype.disable = function(language) {
53755 var result = this._create();
53756 result._disabled[language] = true;
53761 TemplatablePattern.prototype.read_options = function(options) {
53762 var result = this._create();
53763 for (var language in template_names) {
53764 result._disabled[language] = options.templating.indexOf(language) === -1;
53770 TemplatablePattern.prototype.exclude = function(language) {
53771 var result = this._create();
53772 result._excluded[language] = true;
53777 TemplatablePattern.prototype.read = function() {
53779 if (this._match_pattern) {
53780 result = this._input.read(this._starting_pattern);
53782 result = this._input.read(this._starting_pattern, this.__template_pattern);
53784 var next = this._read_template();
53786 if (this._match_pattern) {
53787 next += this._input.read(this._match_pattern);
53789 next += this._input.readUntil(this.__template_pattern);
53792 next = this._read_template();
53795 if (this._until_after) {
53796 result += this._input.readUntilAfter(this._until_pattern);
53801 TemplatablePattern.prototype.__set_templated_pattern = function() {
53804 if (!this._disabled.php) {
53805 items.push(this.__patterns.php._starting_pattern.source);
53807 if (!this._disabled.handlebars) {
53808 items.push(this.__patterns.handlebars._starting_pattern.source);
53810 if (!this._disabled.erb) {
53811 items.push(this.__patterns.erb._starting_pattern.source);
53813 if (!this._disabled.django) {
53814 items.push(this.__patterns.django._starting_pattern.source);
53815 items.push(this.__patterns.django_value._starting_pattern.source);
53816 items.push(this.__patterns.django_comment._starting_pattern.source);
53819 if (this._until_pattern) {
53820 items.push(this._until_pattern.source);
53822 this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');
53825 TemplatablePattern.prototype._read_template = function() {
53826 var resulting_string = '';
53827 var c = this._input.peek();
53829 var peek1 = this._input.peek(1);
53830 //if we're in a comment, do something special
53831 // We treat all comments as literals, even more than preformatted tags
53832 // we just look for the appropriate close tag
53833 if (!this._disabled.php && !this._excluded.php && peek1 === '?') {
53834 resulting_string = resulting_string ||
53835 this.__patterns.php.read();
53837 if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {
53838 resulting_string = resulting_string ||
53839 this.__patterns.erb.read();
53841 } else if (c === '{') {
53842 if (!this._disabled.handlebars && !this._excluded.handlebars) {
53843 resulting_string = resulting_string ||
53844 this.__patterns.handlebars_comment.read();
53845 resulting_string = resulting_string ||
53846 this.__patterns.handlebars_unescaped.read();
53847 resulting_string = resulting_string ||
53848 this.__patterns.handlebars.read();
53850 if (!this._disabled.django) {
53851 // django coflicts with handlebars a bit.
53852 if (!this._excluded.django && !this._excluded.handlebars) {
53853 resulting_string = resulting_string ||
53854 this.__patterns.django_value.read();
53856 if (!this._excluded.django) {
53857 resulting_string = resulting_string ||
53858 this.__patterns.django_comment.read();
53859 resulting_string = resulting_string ||
53860 this.__patterns.django.read();
53864 return resulting_string;
53868 module.exports.TemplatablePattern = TemplatablePattern;
53876 /***/ (function(module, exports, __webpack_require__) {
53879 /*jshint node:true */
53882 The MIT License (MIT)
53884 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53886 Permission is hereby granted, free of charge, to any person
53887 obtaining a copy of this software and associated documentation files
53888 (the "Software"), to deal in the Software without restriction,
53889 including without limitation the rights to use, copy, modify, merge,
53890 publish, distribute, sublicense, and/or sell copies of the Software,
53891 and to permit persons to whom the Software is furnished to do so,
53892 subject to the following conditions:
53894 The above copyright notice and this permission notice shall be
53895 included in all copies or substantial portions of the Software.
53897 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53898 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53899 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53900 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53901 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53902 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53903 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53909 var Beautifier = __webpack_require__(19).Beautifier,
53910 Options = __webpack_require__(20).Options;
53912 function style_html(html_source, options, js_beautify, css_beautify) {
53913 var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
53914 return beautifier.beautify();
53917 module.exports = style_html;
53918 module.exports.defaultOptions = function() {
53919 return new Options();
53925 /***/ (function(module, exports, __webpack_require__) {
53928 /*jshint node:true */
53931 The MIT License (MIT)
53933 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53935 Permission is hereby granted, free of charge, to any person
53936 obtaining a copy of this software and associated documentation files
53937 (the "Software"), to deal in the Software without restriction,
53938 including without limitation the rights to use, copy, modify, merge,
53939 publish, distribute, sublicense, and/or sell copies of the Software,
53940 and to permit persons to whom the Software is furnished to do so,
53941 subject to the following conditions:
53943 The above copyright notice and this permission notice shall be
53944 included in all copies or substantial portions of the Software.
53946 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53947 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53948 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53949 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53950 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53951 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53952 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53958 var Options = __webpack_require__(20).Options;
53959 var Output = __webpack_require__(2).Output;
53960 var Tokenizer = __webpack_require__(21).Tokenizer;
53961 var TOKEN = __webpack_require__(21).TOKEN;
53963 var lineBreak = /\r\n|[\r\n]/;
53964 var allLineBreaks = /\r\n|[\r\n]/g;
53966 var Printer = function(options, base_indent_string) { //handles input/output and some other printing functions
53968 this.indent_level = 0;
53969 this.alignment_size = 0;
53970 this.max_preserve_newlines = options.max_preserve_newlines;
53971 this.preserve_newlines = options.preserve_newlines;
53973 this._output = new Output(options, base_indent_string);
53977 Printer.prototype.current_line_has_match = function(pattern) {
53978 return this._output.current_line.has_match(pattern);
53981 Printer.prototype.set_space_before_token = function(value, non_breaking) {
53982 this._output.space_before_token = value;
53983 this._output.non_breaking_space = non_breaking;
53986 Printer.prototype.set_wrap_point = function() {
53987 this._output.set_indent(this.indent_level, this.alignment_size);
53988 this._output.set_wrap_point();
53992 Printer.prototype.add_raw_token = function(token) {
53993 this._output.add_raw_token(token);
53996 Printer.prototype.print_preserved_newlines = function(raw_token) {
53998 if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {
53999 newlines = raw_token.newlines ? 1 : 0;
54002 if (this.preserve_newlines) {
54003 newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;
54005 for (var n = 0; n < newlines; n++) {
54006 this.print_newline(n > 0);
54009 return newlines !== 0;
54012 Printer.prototype.traverse_whitespace = function(raw_token) {
54013 if (raw_token.whitespace_before || raw_token.newlines) {
54014 if (!this.print_preserved_newlines(raw_token)) {
54015 this._output.space_before_token = true;
54022 Printer.prototype.previous_token_wrapped = function() {
54023 return this._output.previous_token_wrapped;
54026 Printer.prototype.print_newline = function(force) {
54027 this._output.add_new_line(force);
54030 Printer.prototype.print_token = function(token) {
54032 this._output.set_indent(this.indent_level, this.alignment_size);
54033 this._output.add_token(token.text);
54037 Printer.prototype.indent = function() {
54038 this.indent_level++;
54041 Printer.prototype.get_full_indent = function(level) {
54042 level = this.indent_level + (level || 0);
54047 return this._output.get_indent_string(level);
54050 var get_type_attribute = function(start_token) {
54052 var raw_token = start_token.next;
54054 // Search attributes for a type attribute
54055 while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {
54056 if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {
54057 if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&
54058 raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {
54059 result = raw_token.next.next.text;
54063 raw_token = raw_token.next;
54069 var get_custom_beautifier_name = function(tag_check, raw_token) {
54070 var typeAttribute = null;
54073 if (!raw_token.closed) {
54077 if (tag_check === 'script') {
54078 typeAttribute = 'text/javascript';
54079 } else if (tag_check === 'style') {
54080 typeAttribute = 'text/css';
54083 typeAttribute = get_type_attribute(raw_token) || typeAttribute;
54085 // For script and style tags that have a type attribute, only enable custom beautifiers for matching values
54086 // For those without a type attribute use default;
54087 if (typeAttribute.search('text/css') > -1) {
54089 } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/) > -1) {
54090 result = 'javascript';
54091 } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) {
54093 } else if (typeAttribute.search(/test\/null/) > -1) {
54094 // Test only mime-type for testing the beautifier when null is passed as beautifing function
54101 function in_array(what, arr) {
54102 return arr.indexOf(what) !== -1;
54105 function TagFrame(parent, parser_token, indent_level) {
54106 this.parent = parent || null;
54107 this.tag = parser_token ? parser_token.tag_name : '';
54108 this.indent_level = indent_level || 0;
54109 this.parser_token = parser_token || null;
54112 function TagStack(printer) {
54113 this._printer = printer;
54114 this._current_frame = null;
54117 TagStack.prototype.get_parser_token = function() {
54118 return this._current_frame ? this._current_frame.parser_token : null;
54121 TagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object
54122 var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);
54123 this._current_frame = new_frame;
54126 TagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer
54127 var parser_token = null;
54130 parser_token = frame.parser_token;
54131 this._printer.indent_level = frame.indent_level;
54132 this._current_frame = frame.parent;
54135 return parser_token;
54138 TagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer
54139 var frame = this._current_frame;
54141 while (frame) { //till we reach '' (the initial value);
54142 if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it
54144 } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {
54148 frame = frame.parent;
54154 TagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer
54155 var frame = this._get_frame([tag], stop_list);
54156 return this._try_pop_frame(frame);
54159 TagStack.prototype.indent_to_tag = function(tag_list) {
54160 var frame = this._get_frame(tag_list);
54162 this._printer.indent_level = frame.indent_level;
54166 function Beautifier(source_text, options, js_beautify, css_beautify) {
54167 //Wrapper function to invoke all the necessary constructors and deal with the output.
54168 this._source_text = source_text || '';
54169 options = options || {};
54170 this._js_beautify = js_beautify;
54171 this._css_beautify = css_beautify;
54172 this._tag_stack = null;
54174 // Allow the setting of language/file-type specific options
54175 // with inheritance of overall settings
54176 var optionHtml = new Options(options, 'html');
54178 this._options = optionHtml;
54180 this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';
54181 this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');
54182 this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');
54183 this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');
54184 this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';
54185 this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');
54188 Beautifier.prototype.beautify = function() {
54190 // if disabled, return the input unchanged.
54191 if (this._options.disabled) {
54192 return this._source_text;
54195 var source_text = this._source_text;
54196 var eol = this._options.eol;
54197 if (this._options.eol === 'auto') {
54199 if (source_text && lineBreak.test(source_text)) {
54200 eol = source_text.match(lineBreak)[0];
54204 // HACK: newline parsing inconsistent. This brute force normalizes the input.
54205 source_text = source_text.replace(allLineBreaks, '\n');
54207 var baseIndentString = source_text.match(/^[\t ]*/)[0];
54214 var last_tag_token = new TagOpenParserToken();
54216 var printer = new Printer(this._options, baseIndentString);
54217 var tokens = new Tokenizer(source_text, this._options).tokenize();
54219 this._tag_stack = new TagStack(printer);
54221 var parser_token = null;
54222 var raw_token = tokens.next();
54223 while (raw_token.type !== TOKEN.EOF) {
54225 if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {
54226 parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token);
54227 last_tag_token = parser_token;
54228 } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||
54229 (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {
54230 parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens);
54231 } else if (raw_token.type === TOKEN.TAG_CLOSE) {
54232 parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);
54233 } else if (raw_token.type === TOKEN.TEXT) {
54234 parser_token = this._handle_text(printer, raw_token, last_tag_token);
54236 // This should never happen, but if it does. Print the raw token
54237 printer.add_raw_token(raw_token);
54240 last_token = parser_token;
54242 raw_token = tokens.next();
54244 var sweet_code = printer._output.get_code(eol);
54249 Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {
54250 var parser_token = {
54251 text: raw_token.text,
54252 type: raw_token.type
54254 printer.alignment_size = 0;
54255 last_tag_token.tag_complete = true;
54257 printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
54258 if (last_tag_token.is_unformatted) {
54259 printer.add_raw_token(raw_token);
54261 if (last_tag_token.tag_start_char === '<') {
54262 printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before >
54263 if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {
54264 printer.print_newline(false);
54267 printer.print_token(raw_token);
54271 if (last_tag_token.indent_content &&
54272 !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
54275 // only indent once per opened tag
54276 last_tag_token.indent_content = false;
54279 if (!last_tag_token.is_inline_element &&
54280 !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
54281 printer.set_wrap_point();
54284 return parser_token;
54287 Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) {
54288 var wrapped = last_tag_token.has_wrapped_attrs;
54289 var parser_token = {
54290 text: raw_token.text,
54291 type: raw_token.type
54294 printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
54295 if (last_tag_token.is_unformatted) {
54296 printer.add_raw_token(raw_token);
54297 } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {
54298 // For the insides of handlebars allow newlines or a single space between open and contents
54299 if (printer.print_preserved_newlines(raw_token)) {
54300 raw_token.newlines = 0;
54301 printer.add_raw_token(raw_token);
54303 printer.print_token(raw_token);
54306 if (raw_token.type === TOKEN.ATTRIBUTE) {
54307 printer.set_space_before_token(true);
54308 last_tag_token.attr_count += 1;
54309 } else if (raw_token.type === TOKEN.EQUALS) { //no space before =
54310 printer.set_space_before_token(false);
54311 } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value
54312 printer.set_space_before_token(false);
54315 if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {
54316 if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {
54317 printer.traverse_whitespace(raw_token);
54318 wrapped = wrapped || raw_token.newlines !== 0;
54322 if (this._is_wrap_attributes_force) {
54323 var force_attr_wrap = last_tag_token.attr_count > 1;
54324 if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) {
54325 var is_only_attribute = true;
54326 var peek_index = 0;
54329 peek_token = tokens.peek(peek_index);
54330 if (peek_token.type === TOKEN.ATTRIBUTE) {
54331 is_only_attribute = false;
54335 } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);
54337 force_attr_wrap = !is_only_attribute;
54340 if (force_attr_wrap) {
54341 printer.print_newline(false);
54346 printer.print_token(raw_token);
54347 wrapped = wrapped || printer.previous_token_wrapped();
54348 last_tag_token.has_wrapped_attrs = wrapped;
54350 return parser_token;
54353 Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {
54354 var parser_token = {
54355 text: raw_token.text,
54358 if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript
54359 this._print_custom_beatifier_text(printer, raw_token, last_tag_token);
54360 } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {
54361 printer.add_raw_token(raw_token);
54363 printer.traverse_whitespace(raw_token);
54364 printer.print_token(raw_token);
54366 return parser_token;
54369 Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {
54371 if (raw_token.text !== '') {
54373 var text = raw_token.text,
54375 script_indent_level = 1,
54378 if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {
54379 _beautifier = this._js_beautify;
54380 } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {
54381 _beautifier = this._css_beautify;
54382 } else if (last_tag_token.custom_beautifier_name === 'html') {
54383 _beautifier = function(html_source, options) {
54384 var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);
54385 return beautifier.beautify();
54389 if (this._options.indent_scripts === "keep") {
54390 script_indent_level = 0;
54391 } else if (this._options.indent_scripts === "separate") {
54392 script_indent_level = -printer.indent_level;
54395 var indentation = printer.get_full_indent(script_indent_level);
54397 // if there is at least one empty line at the end of this text, strip it
54398 // we'll be adding one back after the text but before the containing tag.
54399 text = text.replace(/\n[ \t]*$/, '');
54401 // Handle the case where content is wrapped in a comment or cdata.
54402 if (last_tag_token.custom_beautifier_name !== 'html' &&
54403 text[0] === '<' && text.match(/^(<!--|<!\[CDATA\[)/)) {
54404 var matched = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(text);
54406 // if we start to wrap but don't finish, print raw
54408 printer.add_raw_token(raw_token);
54412 pre = indentation + matched[1] + '\n';
54415 post = indentation + matched[5];
54418 // if there is at least one empty line at the end of this text, strip it
54419 // we'll be adding one back after the text but before the containing tag.
54420 text = text.replace(/\n[ \t]*$/, '');
54422 if (matched[2] || matched[3].indexOf('\n') !== -1) {
54423 // if the first line of the non-comment text has spaces
54424 // use that as the basis for indenting in null case.
54425 matched = matched[3].match(/[ \t]+$/);
54427 raw_token.whitespace_before = matched[0];
54435 // call the Beautifier if avaliable
54436 var Child_options = function() {
54439 Child_options.prototype = this._options.raw_options;
54440 var child_options = new Child_options();
54441 text = _beautifier(indentation + text, child_options);
54443 // simply indent the string otherwise
54444 var white = raw_token.whitespace_before;
54446 text = text.replace(new RegExp('\n(' + white + ')?', 'g'), '\n');
54449 text = indentation + text.replace(/\n/g, '\n' + indentation);
54457 text = pre + text + '\n' + post;
54461 printer.print_newline(false);
54463 raw_token.text = text;
54464 raw_token.whitespace_before = '';
54465 raw_token.newlines = 0;
54466 printer.add_raw_token(raw_token);
54467 printer.print_newline(true);
54472 Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) {
54473 var parser_token = this._get_tag_open_token(raw_token);
54475 if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&
54476 raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf('</') === 0) {
54477 // End element tags for unformatted or content_unformatted elements
54478 // are printed raw to keep any newlines inside them exactly the same.
54479 printer.add_raw_token(raw_token);
54481 printer.traverse_whitespace(raw_token);
54482 this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);
54483 if (!parser_token.is_inline_element) {
54484 printer.set_wrap_point();
54486 printer.print_token(raw_token);
54489 //indent attributes an auto, forced, aligned or forced-align line-wrap
54490 if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {
54491 parser_token.alignment_size = raw_token.text.length + 1;
54494 if (!parser_token.tag_complete && !parser_token.is_unformatted) {
54495 printer.alignment_size = parser_token.alignment_size;
54498 return parser_token;
54501 var TagOpenParserToken = function(parent, raw_token) {
54502 this.parent = parent || null;
54504 this.type = 'TK_TAG_OPEN';
54505 this.tag_name = '';
54506 this.is_inline_element = false;
54507 this.is_unformatted = false;
54508 this.is_content_unformatted = false;
54509 this.is_empty_element = false;
54510 this.is_start_tag = false;
54511 this.is_end_tag = false;
54512 this.indent_content = false;
54513 this.multiline_content = false;
54514 this.custom_beautifier_name = null;
54515 this.start_tag_token = null;
54516 this.attr_count = 0;
54517 this.has_wrapped_attrs = false;
54518 this.alignment_size = 0;
54519 this.tag_complete = false;
54520 this.tag_start_char = '';
54521 this.tag_check = '';
54524 this.tag_complete = true;
54526 var tag_check_match;
54528 this.tag_start_char = raw_token.text[0];
54529 this.text = raw_token.text;
54531 if (this.tag_start_char === '<') {
54532 tag_check_match = raw_token.text.match(/^<([^\s>]*)/);
54533 this.tag_check = tag_check_match ? tag_check_match[1] : '';
54535 tag_check_match = raw_token.text.match(/^{{[#\^]?([^\s}]+)/);
54536 this.tag_check = tag_check_match ? tag_check_match[1] : '';
54538 this.tag_check = this.tag_check.toLowerCase();
54540 if (raw_token.type === TOKEN.COMMENT) {
54541 this.tag_complete = true;
54544 this.is_start_tag = this.tag_check.charAt(0) !== '/';
54545 this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;
54546 this.is_end_tag = !this.is_start_tag ||
54547 (raw_token.closed && raw_token.closed.text === '/>');
54549 // handlebars tags that don't start with # or ^ are single_tags, and so also start and end.
54550 this.is_end_tag = this.is_end_tag ||
54551 (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\^]/.test(this.text.charAt(2)))));
54555 Beautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type
54556 var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);
54558 parser_token.alignment_size = this._options.wrap_attributes_indent_size;
54560 parser_token.is_end_tag = parser_token.is_end_tag ||
54561 in_array(parser_token.tag_check, this._options.void_elements);
54563 parser_token.is_empty_element = parser_token.tag_complete ||
54564 (parser_token.is_start_tag && parser_token.is_end_tag);
54566 parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);
54567 parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);
54568 parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_start_char === '{';
54570 return parser_token;
54573 Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {
54575 if (!parser_token.is_empty_element) {
54576 if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
54577 parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors
54578 } else { // it's a start-tag
54579 // check if this tag is starting an element that has optional end element
54580 // and do an ending needed
54581 if (this._do_optional_end_element(parser_token)) {
54582 if (!parser_token.is_inline_element) {
54583 if (parser_token.parent) {
54584 parser_token.parent.multiline_content = true;
54586 printer.print_newline(false);
54591 this._tag_stack.record_tag(parser_token); //push it on the tag stack
54593 if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&
54594 !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {
54595 parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);
54600 if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line
54601 printer.print_newline(false);
54602 if (!printer._output.just_added_blankline()) {
54603 printer.print_newline(true);
54607 if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /)
54609 // if you hit an else case, reset the indent level if you are inside an:
54610 // 'if', 'unless', or 'each' block.
54611 if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {
54612 this._tag_stack.indent_to_tag(['if', 'unless', 'each']);
54613 parser_token.indent_content = true;
54614 // Don't add a newline if opening {{#if}} tag is on the current line
54615 var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);
54616 if (!foundIfOnCurrentLine) {
54617 printer.print_newline(false);
54621 // Don't add a newline before elements that should remain where they are.
54622 if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&
54623 last_tag_token.is_end_tag && parser_token.text.indexOf('\n') === -1) {
54624 //Do nothing. Leave comments on same line.
54625 } else if (!parser_token.is_inline_element && !parser_token.is_unformatted) {
54626 printer.print_newline(false);
54628 } else if (parser_token.is_unformatted || parser_token.is_content_unformatted) {
54629 if (!parser_token.is_inline_element && !parser_token.is_unformatted) {
54630 printer.print_newline(false);
54632 } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
54633 if ((parser_token.start_tag_token && parser_token.start_tag_token.multiline_content) ||
54634 !(parser_token.is_inline_element ||
54635 (last_tag_token.is_inline_element) ||
54636 (last_token.type === TOKEN.TAG_CLOSE &&
54637 parser_token.start_tag_token === last_tag_token) ||
54638 (last_token.type === 'TK_CONTENT')
54640 printer.print_newline(false);
54642 } else { // it's a start-tag
54643 parser_token.indent_content = !parser_token.custom_beautifier_name;
54645 if (parser_token.tag_start_char === '<') {
54646 if (parser_token.tag_name === 'html') {
54647 parser_token.indent_content = this._options.indent_inner_html;
54648 } else if (parser_token.tag_name === 'head') {
54649 parser_token.indent_content = this._options.indent_head_inner_html;
54650 } else if (parser_token.tag_name === 'body') {
54651 parser_token.indent_content = this._options.indent_body_inner_html;
54655 if (!parser_token.is_inline_element && last_token.type !== 'TK_CONTENT') {
54656 if (parser_token.parent) {
54657 parser_token.parent.multiline_content = true;
54659 printer.print_newline(false);
54664 //To be used for <p> tag special case:
54665 //var p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];
54667 Beautifier.prototype._do_optional_end_element = function(parser_token) {
54669 // NOTE: cases of "if there is no more content in the parent element"
54670 // are handled automatically by the beautifier.
54671 // It assumes parent or ancestor close tag closes all children.
54672 // https://www.w3.org/TR/html5/syntax.html#optional-tags
54673 if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {
54676 } else if (parser_token.tag_name === 'body') {
54677 // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.
54678 result = result || this._tag_stack.try_pop('head');
54680 //} else if (parser_token.tag_name === 'body') {
54681 // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment.
54683 } else if (parser_token.tag_name === 'li') {
54684 // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
54685 result = result || this._tag_stack.try_pop('li', ['ol', 'ul']);
54687 } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {
54688 // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element.
54689 // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.
54690 result = result || this._tag_stack.try_pop('dt', ['dl']);
54691 result = result || this._tag_stack.try_pop('dd', ['dl']);
54693 //} else if (p_closers.indexOf(parser_token.tag_name) !== -1) {
54694 //TODO: THIS IS A BUG FARM. We are not putting this into 1.8.0 as it is likely to blow up.
54695 //A p element’s end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, details, div, dl, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hr, main, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is an HTML element that is not an a, audio, del, ins, map, noscript, or video element, or an autonomous custom element.
54696 //result = result || this._tag_stack.try_pop('p', ['body']);
54698 } else if (parser_token.tag_name === 'rp' || parser_token.tag_name === 'rt') {
54699 // An rt element’s end tag may be omitted if the rt element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
54700 // An rp element’s end tag may be omitted if the rp element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
54701 result = result || this._tag_stack.try_pop('rt', ['ruby', 'rtc']);
54702 result = result || this._tag_stack.try_pop('rp', ['ruby', 'rtc']);
54704 } else if (parser_token.tag_name === 'optgroup') {
54705 // An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.
54706 // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
54707 result = result || this._tag_stack.try_pop('optgroup', ['select']);
54708 //result = result || this._tag_stack.try_pop('option', ['select']);
54710 } else if (parser_token.tag_name === 'option') {
54711 // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
54712 result = result || this._tag_stack.try_pop('option', ['select', 'datalist', 'optgroup']);
54714 } else if (parser_token.tag_name === 'colgroup') {
54715 // DONE: A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.
54716 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
54717 result = result || this._tag_stack.try_pop('caption', ['table']);
54719 } else if (parser_token.tag_name === 'thead') {
54720 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
54721 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
54722 result = result || this._tag_stack.try_pop('caption', ['table']);
54723 result = result || this._tag_stack.try_pop('colgroup', ['table']);
54725 //} else if (parser_token.tag_name === 'caption') {
54726 // DONE: A caption element’s end tag may be omitted if the caption element is not immediately followed by a space character or a comment.
54728 } else if (parser_token.tag_name === 'tbody' || parser_token.tag_name === 'tfoot') {
54729 // A thead element’s end tag may be omitted if the thead element is immediately followed by a tbody or tfoot element.
54730 // A tbody element’s end tag may be omitted if the tbody element is immediately followed by a tbody or tfoot element, or if there is no more content in the parent element.
54731 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
54732 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
54733 result = result || this._tag_stack.try_pop('caption', ['table']);
54734 result = result || this._tag_stack.try_pop('colgroup', ['table']);
54735 result = result || this._tag_stack.try_pop('thead', ['table']);
54736 result = result || this._tag_stack.try_pop('tbody', ['table']);
54738 //} else if (parser_token.tag_name === 'tfoot') {
54739 // DONE: A tfoot element’s end tag may be omitted if there is no more content in the parent element.
54741 } else if (parser_token.tag_name === 'tr') {
54742 // A tr element’s end tag may be omitted if the tr element is immediately followed by another tr element, or if there is no more content in the parent element.
54743 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
54744 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
54745 result = result || this._tag_stack.try_pop('caption', ['table']);
54746 result = result || this._tag_stack.try_pop('colgroup', ['table']);
54747 result = result || this._tag_stack.try_pop('tr', ['table', 'thead', 'tbody', 'tfoot']);
54749 } else if (parser_token.tag_name === 'th' || parser_token.tag_name === 'td') {
54750 // A td element’s end tag may be omitted if the td element is immediately followed by a td or th element, or if there is no more content in the parent element.
54751 // A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element.
54752 result = result || this._tag_stack.try_pop('td', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
54753 result = result || this._tag_stack.try_pop('th', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
54756 // Start element omission not handled currently
54757 // A head element’s start tag may be omitted if the element is empty, or if the first thing inside the head element is an element.
54758 // A tbody element’s start tag may be omitted if the first thing inside the tbody element is a tr element, and if the element is not immediately preceded by a tbody, thead, or tfoot element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
54759 // A colgroup element’s start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
54761 // Fix up the parent of the parser token
54762 parser_token.parent = this._tag_stack.get_parser_token();
54767 module.exports.Beautifier = Beautifier;
54772 /***/ (function(module, exports, __webpack_require__) {
54775 /*jshint node:true */
54778 The MIT License (MIT)
54780 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54782 Permission is hereby granted, free of charge, to any person
54783 obtaining a copy of this software and associated documentation files
54784 (the "Software"), to deal in the Software without restriction,
54785 including without limitation the rights to use, copy, modify, merge,
54786 publish, distribute, sublicense, and/or sell copies of the Software,
54787 and to permit persons to whom the Software is furnished to do so,
54788 subject to the following conditions:
54790 The above copyright notice and this permission notice shall be
54791 included in all copies or substantial portions of the Software.
54793 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54794 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54795 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54796 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54797 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54798 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54799 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54805 var BaseOptions = __webpack_require__(6).Options;
54807 function Options(options) {
54808 BaseOptions.call(this, options, 'html');
54809 if (this.templating.length === 1 && this.templating[0] === 'auto') {
54810 this.templating = ['django', 'erb', 'handlebars', 'php'];
54813 this.indent_inner_html = this._get_boolean('indent_inner_html');
54814 this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true);
54815 this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true);
54817 this.indent_handlebars = this._get_boolean('indent_handlebars', true);
54818 this.wrap_attributes = this._get_selection('wrap_attributes',
54819 ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']);
54820 this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);
54821 this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);
54823 // Block vs inline elements
54824 // https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
54825 // https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
54826 // https://www.w3.org/TR/html5/dom.html#phrasing-content
54827 this.inline = this._get_array('inline', [
54828 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
54829 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
54830 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
54831 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',
54832 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
54833 'video', 'wbr', 'text',
54834 // obsolete inline tags
54835 'acronym', 'big', 'strike', 'tt'
54837 this.void_elements = this._get_array('void_elements', [
54838 // HTLM void elements - aka self-closing tags - aka singletons
54839 // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
54840 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
54841 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
54842 // NOTE: Optional tags are too complex for a simple list
54843 // they are hard coded in _do_optional_end_element
54845 // Doctype and xml elements
54846 '!doctype', '?xml',
54849 // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
54850 // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
54851 'basefont', 'isindex'
54853 this.unformatted = this._get_array('unformatted', []);
54854 this.content_unformatted = this._get_array('content_unformatted', [
54857 this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter');
54858 this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']);
54861 Options.prototype = new BaseOptions();
54865 module.exports.Options = Options;
54870 /***/ (function(module, exports, __webpack_require__) {
54873 /*jshint node:true */
54876 The MIT License (MIT)
54878 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54880 Permission is hereby granted, free of charge, to any person
54881 obtaining a copy of this software and associated documentation files
54882 (the "Software"), to deal in the Software without restriction,
54883 including without limitation the rights to use, copy, modify, merge,
54884 publish, distribute, sublicense, and/or sell copies of the Software,
54885 and to permit persons to whom the Software is furnished to do so,
54886 subject to the following conditions:
54888 The above copyright notice and this permission notice shall be
54889 included in all copies or substantial portions of the Software.
54891 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54892 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54893 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54894 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54895 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54896 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54897 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54903 var BaseTokenizer = __webpack_require__(9).Tokenizer;
54904 var BASETOKEN = __webpack_require__(9).TOKEN;
54905 var Directives = __webpack_require__(13).Directives;
54906 var TemplatablePattern = __webpack_require__(14).TemplatablePattern;
54907 var Pattern = __webpack_require__(12).Pattern;
54910 TAG_OPEN: 'TK_TAG_OPEN',
54911 TAG_CLOSE: 'TK_TAG_CLOSE',
54912 ATTRIBUTE: 'TK_ATTRIBUTE',
54913 EQUALS: 'TK_EQUALS',
54915 COMMENT: 'TK_COMMENT',
54917 UNKNOWN: 'TK_UNKNOWN',
54918 START: BASETOKEN.START,
54919 RAW: BASETOKEN.RAW,
54923 var directives_core = new Directives(/<\!--/, /-->/);
54925 var Tokenizer = function(input_string, options) {
54926 BaseTokenizer.call(this, input_string, options);
54927 this._current_tag_name = '';
54929 // Words end at whitespace or when a tag starts
54930 // if we are indenting handlebars, they are considered tags
54931 var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);
54932 var pattern_reader = new Pattern(this._input);
54934 this.__patterns = {
54935 word: templatable_reader.until(/[\n\r\t <]/),
54936 single_quote: templatable_reader.until_after(/'/),
54937 double_quote: templatable_reader.until_after(/"/),
54938 attribute: templatable_reader.until(/[\n\r\t =>]|\/>/),
54939 element_name: templatable_reader.until(/[\n\r\t >\/]/),
54941 handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),
54942 handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),
54943 handlebars_open: pattern_reader.until(/[\n\r\t }]/),
54944 handlebars_raw_close: pattern_reader.until(/}}/),
54945 comment: pattern_reader.starting_with(/<!--/).until_after(/-->/),
54946 cdata: pattern_reader.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
54947 // https://en.wikipedia.org/wiki/Conditional_comment
54948 conditional_comment: pattern_reader.starting_with(/<!\[/).until_after(/]>/),
54949 processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/)
54952 if (this._options.indent_handlebars) {
54953 this.__patterns.word = this.__patterns.word.exclude('handlebars');
54956 this._unformatted_content_delimiter = null;
54958 if (this._options.unformatted_content_delimiter) {
54959 var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
54960 this.__patterns.unformatted_content_delimiter =
54961 pattern_reader.matching(literal_regexp)
54962 .until_after(literal_regexp);
54965 Tokenizer.prototype = new BaseTokenizer();
54967 Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
54968 return false; //current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.UNKNOWN;
54971 Tokenizer.prototype._is_opening = function(current_token) {
54972 return current_token.type === TOKEN.TAG_OPEN;
54975 Tokenizer.prototype._is_closing = function(current_token, open_token) {
54976 return current_token.type === TOKEN.TAG_CLOSE &&
54978 ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') ||
54979 (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{')));
54982 Tokenizer.prototype._reset = function() {
54983 this._current_tag_name = '';
54986 Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
54988 this._readWhitespace();
54989 var c = this._input.peek();
54992 return this._create_token(TOKEN.EOF, '');
54995 token = token || this._read_open_handlebars(c, open_token);
54996 token = token || this._read_attribute(c, previous_token, open_token);
54997 token = token || this._read_raw_content(c, previous_token, open_token);
54998 token = token || this._read_close(c, open_token);
54999 token = token || this._read_content_word(c);
55000 token = token || this._read_comment_or_cdata(c);
55001 token = token || this._read_processing(c);
55002 token = token || this._read_open(c, open_token);
55003 token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
55008 Tokenizer.prototype._read_comment_or_cdata = function(c) { // jshint unused:false
55010 var resulting_string = null;
55011 var directives = null;
55014 var peek1 = this._input.peek(1);
55015 // We treat all comments as literals, even more than preformatted tags
55016 // we only look for the appropriate closing marker
55017 if (peek1 === '!') {
55018 resulting_string = this.__patterns.comment.read();
55020 // only process directive on html comments
55021 if (resulting_string) {
55022 directives = directives_core.get_directives(resulting_string);
55023 if (directives && directives.ignore === 'start') {
55024 resulting_string += directives_core.readIgnored(this._input);
55027 resulting_string = this.__patterns.cdata.read();
55031 if (resulting_string) {
55032 token = this._create_token(TOKEN.COMMENT, resulting_string);
55033 token.directives = directives;
55040 Tokenizer.prototype._read_processing = function(c) { // jshint unused:false
55042 var resulting_string = null;
55043 var directives = null;
55046 var peek1 = this._input.peek(1);
55047 if (peek1 === '!' || peek1 === '?') {
55048 resulting_string = this.__patterns.conditional_comment.read();
55049 resulting_string = resulting_string || this.__patterns.processing.read();
55052 if (resulting_string) {
55053 token = this._create_token(TOKEN.COMMENT, resulting_string);
55054 token.directives = directives;
55061 Tokenizer.prototype._read_open = function(c, open_token) {
55062 var resulting_string = null;
55067 resulting_string = this._input.next();
55068 if (this._input.peek() === '/') {
55069 resulting_string += this._input.next();
55071 resulting_string += this.__patterns.element_name.read();
55072 token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
55078 Tokenizer.prototype._read_open_handlebars = function(c, open_token) {
55079 var resulting_string = null;
55082 if (this._options.indent_handlebars && c === '{' && this._input.peek(1) === '{') {
55083 if (this._input.peek(2) === '!') {
55084 resulting_string = this.__patterns.handlebars_comment.read();
55085 resulting_string = resulting_string || this.__patterns.handlebars.read();
55086 token = this._create_token(TOKEN.COMMENT, resulting_string);
55088 resulting_string = this.__patterns.handlebars_open.read();
55089 token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
55097 Tokenizer.prototype._read_close = function(c, open_token) {
55098 var resulting_string = null;
55101 if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) {
55102 resulting_string = this._input.next();
55103 if (c === '/') { // for close tag "/>"
55104 resulting_string += this._input.next();
55106 token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);
55107 } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') {
55108 this._input.next();
55109 this._input.next();
55110 token = this._create_token(TOKEN.TAG_CLOSE, '}}');
55117 Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) {
55119 var resulting_string = '';
55120 if (open_token && open_token.text[0] === '<') {
55123 token = this._create_token(TOKEN.EQUALS, this._input.next());
55124 } else if (c === '"' || c === "'") {
55125 var content = this._input.next();
55127 content += this.__patterns.double_quote.read();
55129 content += this.__patterns.single_quote.read();
55131 token = this._create_token(TOKEN.VALUE, content);
55133 resulting_string = this.__patterns.attribute.read();
55135 if (resulting_string) {
55136 if (previous_token.type === TOKEN.EQUALS) {
55137 token = this._create_token(TOKEN.VALUE, resulting_string);
55139 token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);
55147 Tokenizer.prototype._is_content_unformatted = function(tag_name) {
55148 // void_elements have no content and so cannot have unformatted content
55149 // script and style tags should always be read as unformatted content
55150 // finally content_unformatted and unformatted element contents are unformatted
55151 return this._options.void_elements.indexOf(tag_name) === -1 &&
55152 (this._options.content_unformatted.indexOf(tag_name) !== -1 ||
55153 this._options.unformatted.indexOf(tag_name) !== -1);
55157 Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) { // jshint unused:false
55158 var resulting_string = '';
55159 if (open_token && open_token.text[0] === '{') {
55160 resulting_string = this.__patterns.handlebars_raw_close.read();
55161 } else if (previous_token.type === TOKEN.TAG_CLOSE && (previous_token.opened.text[0] === '<')) {
55162 var tag_name = previous_token.opened.text.substr(1).toLowerCase();
55163 if (tag_name === 'script' || tag_name === 'style') {
55164 // Script and style tags are allowed to have comments wrapping their content
55165 // or just have regular content.
55166 var token = this._read_comment_or_cdata(c);
55168 token.type = TOKEN.TEXT;
55171 resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
55172 } else if (this._is_content_unformatted(tag_name)) {
55173 resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
55177 if (resulting_string) {
55178 return this._create_token(TOKEN.TEXT, resulting_string);
55184 Tokenizer.prototype._read_content_word = function(c) {
55185 var resulting_string = '';
55186 if (this._options.unformatted_content_delimiter) {
55187 if (c === this._options.unformatted_content_delimiter[0]) {
55188 resulting_string = this.__patterns.unformatted_content_delimiter.read();
55192 if (!resulting_string) {
55193 resulting_string = this.__patterns.word.read();
55195 if (resulting_string) {
55196 return this._create_token(TOKEN.TEXT, resulting_string);
55200 module.exports.Tokenizer = Tokenizer;
55201 module.exports.TOKEN = TOKEN;
55207 function html_beautify(html_source, options) {
55208 return legacy_beautify_html(html_source, options, _beautify__WEBPACK_IMPORTED_MODULE_0__["js_beautify"], _beautify_css__WEBPACK_IMPORTED_MODULE_1__["css_beautify"]);
55213 /***/ (function(module, __webpack_exports__, __webpack_require__) {
55216 __webpack_require__.r(__webpack_exports__);
55217 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "js_beautify", function() { return js_beautify; });
55218 /*---------------------------------------------------------------------------------------------
55219 * Copyright (c) Microsoft Corporation. All rights reserved.
55220 * Licensed under the MIT License. See License.txt in the project root for license information.
55221 *--------------------------------------------------------------------------------------------*/
55223 * Mock for the JS formatter. Ignore formatting of JS content in HTML.
55225 function js_beautify(js_source_text, options) {
55227 return js_source_text;
55233 /***/ (function(module, __webpack_exports__, __webpack_require__) {
55236 __webpack_require__.r(__webpack_exports__);
55237 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css_beautify", function() { return css_beautify; });
55238 // copied from js-beautify/js/lib/beautify-css.js
55240 /* AUTO-GENERATED. DO NOT MODIFY. */
55243 The MIT License (MIT)
55245 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55247 Permission is hereby granted, free of charge, to any person
55248 obtaining a copy of this software and associated documentation files
55249 (the "Software"), to deal in the Software without restriction,
55250 including without limitation the rights to use, copy, modify, merge,
55251 publish, distribute, sublicense, and/or sell copies of the Software,
55252 and to permit persons to whom the Software is furnished to do so,
55253 subject to the following conditions:
55255 The above copyright notice and this permission notice shall be
55256 included in all copies or substantial portions of the Software.
55258 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55259 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55260 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55261 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55262 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55263 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55264 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55271 Written by Harutyun Amirjanyan, (amirjanyan@gmail.com)
55273 Based on code initially developed by: Einar Lielmanis, <einar@beautifier.io>
55274 https://beautifier.io/
55277 css_beautify(source_text);
55278 css_beautify(source_text, options);
55280 The options are (default in brackets):
55281 indent_size (4) — indentation size,
55282 indent_char (space) — character to indent with,
55283 selector_separator_newline (true) - separate selectors with newline or
55284 not (e.g. "a,\nbr" or "a, br")
55285 end_with_newline (false) - end with a newline
55286 newline_between_rules (true) - add a new line after every css rule
55287 space_around_selector_separator (false) - ensure space around selector separators:
55288 '>', '+', '~' (e.g. "a>b" -> "a > b")
55291 css_beautify(css_source_text, {
55293 'indent_char': '\t',
55294 'selector_separator': ' ',
55295 'end_with_newline': false,
55296 'newline_between_rules': true,
55297 'space_around_selector_separator': true
55301 // http://www.w3.org/TR/CSS21/syndata.html#tokenization
55302 // http://www.w3.org/TR/css3-syntax/
55304 var legacy_beautify_css =
55305 /******/ (function(modules) { // webpackBootstrap
55306 /******/ // The module cache
55307 /******/ var installedModules = {};
55309 /******/ // The require function
55310 /******/ function __webpack_require__(moduleId) {
55312 /******/ // Check if module is in cache
55313 /******/ if(installedModules[moduleId]) {
55314 /******/ return installedModules[moduleId].exports;
55316 /******/ // Create a new module (and put it into the cache)
55317 /******/ var module = installedModules[moduleId] = {
55318 /******/ i: moduleId,
55320 /******/ exports: {}
55323 /******/ // Execute the module function
55324 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
55326 /******/ // Flag the module as loaded
55327 /******/ module.l = true;
55329 /******/ // Return the exports of the module
55330 /******/ return module.exports;
55334 /******/ // expose the modules object (__webpack_modules__)
55335 /******/ __webpack_require__.m = modules;
55337 /******/ // expose the module cache
55338 /******/ __webpack_require__.c = installedModules;
55340 /******/ // define getter function for harmony exports
55341 /******/ __webpack_require__.d = function(exports, name, getter) {
55342 /******/ if(!__webpack_require__.o(exports, name)) {
55343 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
55347 /******/ // define __esModule on exports
55348 /******/ __webpack_require__.r = function(exports) {
55349 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
55350 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55352 /******/ Object.defineProperty(exports, '__esModule', { value: true });
55355 /******/ // create a fake namespace object
55356 /******/ // mode & 1: value is a module id, require it
55357 /******/ // mode & 2: merge all properties of value into the ns
55358 /******/ // mode & 4: return value when already ns object
55359 /******/ // mode & 8|1: behave like require
55360 /******/ __webpack_require__.t = function(value, mode) {
55361 /******/ if(mode & 1) value = __webpack_require__(value);
55362 /******/ if(mode & 8) return value;
55363 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
55364 /******/ var ns = Object.create(null);
55365 /******/ __webpack_require__.r(ns);
55366 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
55367 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
55368 /******/ return ns;
55371 /******/ // getDefaultExport function for compatibility with non-harmony modules
55372 /******/ __webpack_require__.n = function(module) {
55373 /******/ var getter = module && module.__esModule ?
55374 /******/ function getDefault() { return module['default']; } :
55375 /******/ function getModuleExports() { return module; };
55376 /******/ __webpack_require__.d(getter, 'a', getter);
55377 /******/ return getter;
55380 /******/ // Object.prototype.hasOwnProperty.call
55381 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
55383 /******/ // __webpack_public_path__
55384 /******/ __webpack_require__.p = "";
55387 /******/ // Load entry module and return exports
55388 /******/ return __webpack_require__(__webpack_require__.s = 15);
55390 /************************************************************************/
55395 /***/ (function(module, exports, __webpack_require__) {
55398 /*jshint node:true */
55400 The MIT License (MIT)
55402 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55404 Permission is hereby granted, free of charge, to any person
55405 obtaining a copy of this software and associated documentation files
55406 (the "Software"), to deal in the Software without restriction,
55407 including without limitation the rights to use, copy, modify, merge,
55408 publish, distribute, sublicense, and/or sell copies of the Software,
55409 and to permit persons to whom the Software is furnished to do so,
55410 subject to the following conditions:
55412 The above copyright notice and this permission notice shall be
55413 included in all copies or substantial portions of the Software.
55415 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55416 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55417 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55418 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55419 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55420 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55421 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55427 function OutputLine(parent) {
55428 this.__parent = parent;
55429 this.__character_count = 0;
55430 // use indent_count as a marker for this.__lines that have preserved indentation
55431 this.__indent_count = -1;
55432 this.__alignment_count = 0;
55433 this.__wrap_point_index = 0;
55434 this.__wrap_point_character_count = 0;
55435 this.__wrap_point_indent_count = -1;
55436 this.__wrap_point_alignment_count = 0;
55441 OutputLine.prototype.clone_empty = function() {
55442 var line = new OutputLine(this.__parent);
55443 line.set_indent(this.__indent_count, this.__alignment_count);
55447 OutputLine.prototype.item = function(index) {
55449 return this.__items[this.__items.length + index];
55451 return this.__items[index];
55455 OutputLine.prototype.has_match = function(pattern) {
55456 for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
55457 if (this.__items[lastCheckedOutput].match(pattern)) {
55464 OutputLine.prototype.set_indent = function(indent, alignment) {
55465 if (this.is_empty()) {
55466 this.__indent_count = indent || 0;
55467 this.__alignment_count = alignment || 0;
55468 this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
55472 OutputLine.prototype._set_wrap_point = function() {
55473 if (this.__parent.wrap_line_length) {
55474 this.__wrap_point_index = this.__items.length;
55475 this.__wrap_point_character_count = this.__character_count;
55476 this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
55477 this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
55481 OutputLine.prototype._should_wrap = function() {
55482 return this.__wrap_point_index &&
55483 this.__character_count > this.__parent.wrap_line_length &&
55484 this.__wrap_point_character_count > this.__parent.next_line.__character_count;
55487 OutputLine.prototype._allow_wrap = function() {
55488 if (this._should_wrap()) {
55489 this.__parent.add_new_line();
55490 var next = this.__parent.current_line;
55491 next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
55492 next.__items = this.__items.slice(this.__wrap_point_index);
55493 this.__items = this.__items.slice(0, this.__wrap_point_index);
55495 next.__character_count += this.__character_count - this.__wrap_point_character_count;
55496 this.__character_count = this.__wrap_point_character_count;
55498 if (next.__items[0] === " ") {
55499 next.__items.splice(0, 1);
55500 next.__character_count -= 1;
55507 OutputLine.prototype.is_empty = function() {
55508 return this.__items.length === 0;
55511 OutputLine.prototype.last = function() {
55512 if (!this.is_empty()) {
55513 return this.__items[this.__items.length - 1];
55519 OutputLine.prototype.push = function(item) {
55520 this.__items.push(item);
55521 var last_newline_index = item.lastIndexOf('\n');
55522 if (last_newline_index !== -1) {
55523 this.__character_count = item.length - last_newline_index;
55525 this.__character_count += item.length;
55529 OutputLine.prototype.pop = function() {
55531 if (!this.is_empty()) {
55532 item = this.__items.pop();
55533 this.__character_count -= item.length;
55539 OutputLine.prototype._remove_indent = function() {
55540 if (this.__indent_count > 0) {
55541 this.__indent_count -= 1;
55542 this.__character_count -= this.__parent.indent_size;
55546 OutputLine.prototype._remove_wrap_indent = function() {
55547 if (this.__wrap_point_indent_count > 0) {
55548 this.__wrap_point_indent_count -= 1;
55551 OutputLine.prototype.trim = function() {
55552 while (this.last() === ' ') {
55553 this.__items.pop();
55554 this.__character_count -= 1;
55558 OutputLine.prototype.toString = function() {
55560 if (this.is_empty()) {
55561 if (this.__parent.indent_empty_lines) {
55562 result = this.__parent.get_indent_string(this.__indent_count);
55565 result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
55566 result += this.__items.join('');
55571 function IndentStringCache(options, baseIndentString) {
55572 this.__cache = [''];
55573 this.__indent_size = options.indent_size;
55574 this.__indent_string = options.indent_char;
55575 if (!options.indent_with_tabs) {
55576 this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
55579 // Set to null to continue support for auto detection of base indent
55580 baseIndentString = baseIndentString || '';
55581 if (options.indent_level > 0) {
55582 baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
55585 this.__base_string = baseIndentString;
55586 this.__base_string_length = baseIndentString.length;
55589 IndentStringCache.prototype.get_indent_size = function(indent, column) {
55590 var result = this.__base_string_length;
55591 column = column || 0;
55595 result += indent * this.__indent_size;
55600 IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
55601 var result = this.__base_string;
55602 column = column || 0;
55603 if (indent_level < 0) {
55607 column += indent_level * this.__indent_size;
55608 this.__ensure_cache(column);
55609 result += this.__cache[column];
55613 IndentStringCache.prototype.__ensure_cache = function(column) {
55614 while (column >= this.__cache.length) {
55615 this.__add_column();
55619 IndentStringCache.prototype.__add_column = function() {
55620 var column = this.__cache.length;
55623 if (this.__indent_size && column >= this.__indent_size) {
55624 indent = Math.floor(column / this.__indent_size);
55625 column -= indent * this.__indent_size;
55626 result = new Array(indent + 1).join(this.__indent_string);
55629 result += new Array(column + 1).join(' ');
55632 this.__cache.push(result);
55635 function Output(options, baseIndentString) {
55636 this.__indent_cache = new IndentStringCache(options, baseIndentString);
55638 this._end_with_newline = options.end_with_newline;
55639 this.indent_size = options.indent_size;
55640 this.wrap_line_length = options.wrap_line_length;
55641 this.indent_empty_lines = options.indent_empty_lines;
55643 this.previous_line = null;
55644 this.current_line = null;
55645 this.next_line = new OutputLine(this);
55646 this.space_before_token = false;
55647 this.non_breaking_space = false;
55648 this.previous_token_wrapped = false;
55650 this.__add_outputline();
55653 Output.prototype.__add_outputline = function() {
55654 this.previous_line = this.current_line;
55655 this.current_line = this.next_line.clone_empty();
55656 this.__lines.push(this.current_line);
55659 Output.prototype.get_line_number = function() {
55660 return this.__lines.length;
55663 Output.prototype.get_indent_string = function(indent, column) {
55664 return this.__indent_cache.get_indent_string(indent, column);
55667 Output.prototype.get_indent_size = function(indent, column) {
55668 return this.__indent_cache.get_indent_size(indent, column);
55671 Output.prototype.is_empty = function() {
55672 return !this.previous_line && this.current_line.is_empty();
55675 Output.prototype.add_new_line = function(force_newline) {
55676 // never newline at the start of file
55677 // otherwise, newline only if we didn't just add one or we're forced
55678 if (this.is_empty() ||
55679 (!force_newline && this.just_added_newline())) {
55683 // if raw output is enabled, don't print additional newlines,
55684 // but still return True as though you had
55686 this.__add_outputline();
55691 Output.prototype.get_code = function(eol) {
55694 // handle some edge cases where the last tokens
55695 // has text that ends with newline(s)
55696 var last_item = this.current_line.pop();
55698 if (last_item[last_item.length - 1] === '\n') {
55699 last_item = last_item.replace(/\n+$/g, '');
55701 this.current_line.push(last_item);
55704 if (this._end_with_newline) {
55705 this.__add_outputline();
55708 var sweet_code = this.__lines.join('\n');
55710 if (eol !== '\n') {
55711 sweet_code = sweet_code.replace(/[\n]/g, eol);
55716 Output.prototype.set_wrap_point = function() {
55717 this.current_line._set_wrap_point();
55720 Output.prototype.set_indent = function(indent, alignment) {
55721 indent = indent || 0;
55722 alignment = alignment || 0;
55724 // Next line stores alignment values
55725 this.next_line.set_indent(indent, alignment);
55727 // Never indent your first output indent at the start of the file
55728 if (this.__lines.length > 1) {
55729 this.current_line.set_indent(indent, alignment);
55733 this.current_line.set_indent();
55737 Output.prototype.add_raw_token = function(token) {
55738 for (var x = 0; x < token.newlines; x++) {
55739 this.__add_outputline();
55741 this.current_line.set_indent(-1);
55742 this.current_line.push(token.whitespace_before);
55743 this.current_line.push(token.text);
55744 this.space_before_token = false;
55745 this.non_breaking_space = false;
55746 this.previous_token_wrapped = false;
55749 Output.prototype.add_token = function(printable_token) {
55750 this.__add_space_before_token();
55751 this.current_line.push(printable_token);
55752 this.space_before_token = false;
55753 this.non_breaking_space = false;
55754 this.previous_token_wrapped = this.current_line._allow_wrap();
55757 Output.prototype.__add_space_before_token = function() {
55758 if (this.space_before_token && !this.just_added_newline()) {
55759 if (!this.non_breaking_space) {
55760 this.set_wrap_point();
55762 this.current_line.push(' ');
55766 Output.prototype.remove_indent = function(index) {
55767 var output_length = this.__lines.length;
55768 while (index < output_length) {
55769 this.__lines[index]._remove_indent();
55772 this.current_line._remove_wrap_indent();
55775 Output.prototype.trim = function(eat_newlines) {
55776 eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
55778 this.current_line.trim();
55780 while (eat_newlines && this.__lines.length > 1 &&
55781 this.current_line.is_empty()) {
55782 this.__lines.pop();
55783 this.current_line = this.__lines[this.__lines.length - 1];
55784 this.current_line.trim();
55787 this.previous_line = this.__lines.length > 1 ?
55788 this.__lines[this.__lines.length - 2] : null;
55791 Output.prototype.just_added_newline = function() {
55792 return this.current_line.is_empty();
55795 Output.prototype.just_added_blankline = function() {
55796 return this.is_empty() ||
55797 (this.current_line.is_empty() && this.previous_line.is_empty());
55800 Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
55801 var index = this.__lines.length - 2;
55802 while (index >= 0) {
55803 var potentialEmptyLine = this.__lines[index];
55804 if (potentialEmptyLine.is_empty()) {
55806 } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
55807 potentialEmptyLine.item(-1) !== ends_with) {
55808 this.__lines.splice(index + 1, 0, new OutputLine(this));
55809 this.previous_line = this.__lines[this.__lines.length - 2];
55816 module.exports.Output = Output;
55824 /***/ (function(module, exports, __webpack_require__) {
55827 /*jshint node:true */
55830 The MIT License (MIT)
55832 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55834 Permission is hereby granted, free of charge, to any person
55835 obtaining a copy of this software and associated documentation files
55836 (the "Software"), to deal in the Software without restriction,
55837 including without limitation the rights to use, copy, modify, merge,
55838 publish, distribute, sublicense, and/or sell copies of the Software,
55839 and to permit persons to whom the Software is furnished to do so,
55840 subject to the following conditions:
55842 The above copyright notice and this permission notice shall be
55843 included in all copies or substantial portions of the Software.
55845 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55846 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55847 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55848 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55849 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55850 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55851 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55857 function Options(options, merge_child_field) {
55858 this.raw_options = _mergeOpts(options, merge_child_field);
55860 // Support passing the source text back with no change
55861 this.disabled = this._get_boolean('disabled');
55863 this.eol = this._get_characters('eol', 'auto');
55864 this.end_with_newline = this._get_boolean('end_with_newline');
55865 this.indent_size = this._get_number('indent_size', 4);
55866 this.indent_char = this._get_characters('indent_char', ' ');
55867 this.indent_level = this._get_number('indent_level');
55869 this.preserve_newlines = this._get_boolean('preserve_newlines', true);
55870 this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
55871 if (!this.preserve_newlines) {
55872 this.max_preserve_newlines = 0;
55875 this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
55876 if (this.indent_with_tabs) {
55877 this.indent_char = '\t';
55879 // indent_size behavior changed after 1.8.6
55880 // It used to be that indent_size would be
55881 // set to 1 for indent_with_tabs. That is no longer needed and
55882 // actually doesn't make sense - why not use spaces? Further,
55883 // that might produce unexpected behavior - tabs being used
55884 // for single-column alignment. So, when indent_with_tabs is true
55885 // and indent_size is 1, reset indent_size to 4.
55886 if (this.indent_size === 1) {
55887 this.indent_size = 4;
55891 // Backwards compat with 1.3.x
55892 this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));
55894 this.indent_empty_lines = this._get_boolean('indent_empty_lines');
55896 // valid templating languages ['django', 'erb', 'handlebars', 'php']
55897 // For now, 'auto' = all off for javascript, all on for html (and inline javascript).
55898 // other values ignored
55899 this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
55902 Options.prototype._get_array = function(name, default_value) {
55903 var option_value = this.raw_options[name];
55904 var result = default_value || [];
55905 if (typeof option_value === 'object') {
55906 if (option_value !== null && typeof option_value.concat === 'function') {
55907 result = option_value.concat();
55909 } else if (typeof option_value === 'string') {
55910 result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
55915 Options.prototype._get_boolean = function(name, default_value) {
55916 var option_value = this.raw_options[name];
55917 var result = option_value === undefined ? !!default_value : !!option_value;
55921 Options.prototype._get_characters = function(name, default_value) {
55922 var option_value = this.raw_options[name];
55923 var result = default_value || '';
55924 if (typeof option_value === 'string') {
55925 result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
55930 Options.prototype._get_number = function(name, default_value) {
55931 var option_value = this.raw_options[name];
55932 default_value = parseInt(default_value, 10);
55933 if (isNaN(default_value)) {
55936 var result = parseInt(option_value, 10);
55937 if (isNaN(result)) {
55938 result = default_value;
55943 Options.prototype._get_selection = function(name, selection_list, default_value) {
55944 var result = this._get_selection_list(name, selection_list, default_value);
55945 if (result.length !== 1) {
55947 "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
55948 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
55955 Options.prototype._get_selection_list = function(name, selection_list, default_value) {
55956 if (!selection_list || selection_list.length === 0) {
55957 throw new Error("Selection list cannot be empty.");
55960 default_value = default_value || [selection_list[0]];
55961 if (!this._is_valid_selection(default_value, selection_list)) {
55962 throw new Error("Invalid Default Value!");
55965 var result = this._get_array(name, default_value);
55966 if (!this._is_valid_selection(result, selection_list)) {
55968 "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
55969 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
55975 Options.prototype._is_valid_selection = function(result, selection_list) {
55976 return result.length && selection_list.length &&
55977 !result.some(function(item) { return selection_list.indexOf(item) === -1; });
55981 // merges child options up with the parent options object
55982 // Example: obj = {a: 1, b: {a: 2}}
55983 // mergeOpts(obj, 'b')
55986 function _mergeOpts(allOptions, childFieldName) {
55987 var finalOpts = {};
55988 allOptions = _normalizeOpts(allOptions);
55991 for (name in allOptions) {
55992 if (name !== childFieldName) {
55993 finalOpts[name] = allOptions[name];
55997 //merge in the per type settings for the childFieldName
55998 if (childFieldName && allOptions[childFieldName]) {
55999 for (name in allOptions[childFieldName]) {
56000 finalOpts[name] = allOptions[childFieldName][name];
56006 function _normalizeOpts(options) {
56007 var convertedOpts = {};
56010 for (key in options) {
56011 var newKey = key.replace(/-/g, "_");
56012 convertedOpts[newKey] = options[key];
56014 return convertedOpts;
56017 module.exports.Options = Options;
56018 module.exports.normalizeOpts = _normalizeOpts;
56019 module.exports.mergeOpts = _mergeOpts;
56025 /***/ (function(module, exports, __webpack_require__) {
56028 /*jshint node:true */
56031 The MIT License (MIT)
56033 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56035 Permission is hereby granted, free of charge, to any person
56036 obtaining a copy of this software and associated documentation files
56037 (the "Software"), to deal in the Software without restriction,
56038 including without limitation the rights to use, copy, modify, merge,
56039 publish, distribute, sublicense, and/or sell copies of the Software,
56040 and to permit persons to whom the Software is furnished to do so,
56041 subject to the following conditions:
56043 The above copyright notice and this permission notice shall be
56044 included in all copies or substantial portions of the Software.
56046 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56047 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56048 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56049 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56050 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56051 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56052 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56058 var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
56060 function InputScanner(input_string) {
56061 this.__input = input_string || '';
56062 this.__input_length = this.__input.length;
56063 this.__position = 0;
56066 InputScanner.prototype.restart = function() {
56067 this.__position = 0;
56070 InputScanner.prototype.back = function() {
56071 if (this.__position > 0) {
56072 this.__position -= 1;
56076 InputScanner.prototype.hasNext = function() {
56077 return this.__position < this.__input_length;
56080 InputScanner.prototype.next = function() {
56082 if (this.hasNext()) {
56083 val = this.__input.charAt(this.__position);
56084 this.__position += 1;
56089 InputScanner.prototype.peek = function(index) {
56091 index = index || 0;
56092 index += this.__position;
56093 if (index >= 0 && index < this.__input_length) {
56094 val = this.__input.charAt(index);
56099 // This is a JavaScript only helper function (not in python)
56100 // Javascript doesn't have a match method
56101 // and not all implementation support "sticky" flag.
56102 // If they do not support sticky then both this.match() and this.test() method
56103 // must get the match and check the index of the match.
56104 // If sticky is supported and set, this method will use it.
56105 // Otherwise it will check that global is set, and fall back to the slower method.
56106 InputScanner.prototype.__match = function(pattern, index) {
56107 pattern.lastIndex = index;
56108 var pattern_match = pattern.exec(this.__input);
56110 if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
56111 if (pattern_match.index !== index) {
56112 pattern_match = null;
56116 return pattern_match;
56119 InputScanner.prototype.test = function(pattern, index) {
56120 index = index || 0;
56121 index += this.__position;
56123 if (index >= 0 && index < this.__input_length) {
56124 return !!this.__match(pattern, index);
56130 InputScanner.prototype.testChar = function(pattern, index) {
56131 // test one character regex match
56132 var val = this.peek(index);
56133 pattern.lastIndex = 0;
56134 return val !== null && pattern.test(val);
56137 InputScanner.prototype.match = function(pattern) {
56138 var pattern_match = this.__match(pattern, this.__position);
56139 if (pattern_match) {
56140 this.__position += pattern_match[0].length;
56142 pattern_match = null;
56144 return pattern_match;
56147 InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
56150 if (starting_pattern) {
56151 match = this.match(starting_pattern);
56156 if (until_pattern && (match || !starting_pattern)) {
56157 val += this.readUntil(until_pattern, until_after);
56162 InputScanner.prototype.readUntil = function(pattern, until_after) {
56164 var match_index = this.__position;
56165 pattern.lastIndex = this.__position;
56166 var pattern_match = pattern.exec(this.__input);
56167 if (pattern_match) {
56168 match_index = pattern_match.index;
56170 match_index += pattern_match[0].length;
56173 match_index = this.__input_length;
56176 val = this.__input.substring(this.__position, match_index);
56177 this.__position = match_index;
56181 InputScanner.prototype.readUntilAfter = function(pattern) {
56182 return this.readUntil(pattern, true);
56185 InputScanner.prototype.get_regexp = function(pattern, match_from) {
56188 if (match_from && regexp_has_sticky) {
56191 // strings are converted to regexp
56192 if (typeof pattern === "string" && pattern !== '') {
56193 // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
56194 result = new RegExp(pattern, flags);
56195 } else if (pattern) {
56196 result = new RegExp(pattern.source, flags);
56201 InputScanner.prototype.get_literal_regexp = function(literal_string) {
56202 return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
56205 /* css beautifier legacy helpers */
56206 InputScanner.prototype.peekUntilAfter = function(pattern) {
56207 var start = this.__position;
56208 var val = this.readUntilAfter(pattern);
56209 this.__position = start;
56213 InputScanner.prototype.lookBack = function(testVal) {
56214 var start = this.__position - 1;
56215 return start >= testVal.length && this.__input.substring(start - testVal.length, start)
56216 .toLowerCase() === testVal;
56219 module.exports.InputScanner = InputScanner;
56228 /***/ (function(module, exports, __webpack_require__) {
56231 /*jshint node:true */
56234 The MIT License (MIT)
56236 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56238 Permission is hereby granted, free of charge, to any person
56239 obtaining a copy of this software and associated documentation files
56240 (the "Software"), to deal in the Software without restriction,
56241 including without limitation the rights to use, copy, modify, merge,
56242 publish, distribute, sublicense, and/or sell copies of the Software,
56243 and to permit persons to whom the Software is furnished to do so,
56244 subject to the following conditions:
56246 The above copyright notice and this permission notice shall be
56247 included in all copies or substantial portions of the Software.
56249 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56250 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56251 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56252 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56253 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56254 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56255 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56261 function Directives(start_block_pattern, end_block_pattern) {
56262 start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
56263 end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
56264 this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
56265 this.__directive_pattern = / (\w+)[:](\w+)/g;
56267 this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
56270 Directives.prototype.get_directives = function(text) {
56271 if (!text.match(this.__directives_block_pattern)) {
56275 var directives = {};
56276 this.__directive_pattern.lastIndex = 0;
56277 var directive_match = this.__directive_pattern.exec(text);
56279 while (directive_match) {
56280 directives[directive_match[1]] = directive_match[2];
56281 directive_match = this.__directive_pattern.exec(text);
56287 Directives.prototype.readIgnored = function(input) {
56288 return input.readUntilAfter(this.__directives_end_ignore_pattern);
56292 module.exports.Directives = Directives;
56298 /***/ (function(module, exports, __webpack_require__) {
56301 /*jshint node:true */
56304 The MIT License (MIT)
56306 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56308 Permission is hereby granted, free of charge, to any person
56309 obtaining a copy of this software and associated documentation files
56310 (the "Software"), to deal in the Software without restriction,
56311 including without limitation the rights to use, copy, modify, merge,
56312 publish, distribute, sublicense, and/or sell copies of the Software,
56313 and to permit persons to whom the Software is furnished to do so,
56314 subject to the following conditions:
56316 The above copyright notice and this permission notice shall be
56317 included in all copies or substantial portions of the Software.
56319 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56320 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56321 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56322 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56323 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56324 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56325 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56331 var Beautifier = __webpack_require__(16).Beautifier,
56332 Options = __webpack_require__(17).Options;
56334 function css_beautify(source_text, options) {
56335 var beautifier = new Beautifier(source_text, options);
56336 return beautifier.beautify();
56339 module.exports = css_beautify;
56340 module.exports.defaultOptions = function() {
56341 return new Options();
56347 /***/ (function(module, exports, __webpack_require__) {
56350 /*jshint node:true */
56353 The MIT License (MIT)
56355 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56357 Permission is hereby granted, free of charge, to any person
56358 obtaining a copy of this software and associated documentation files
56359 (the "Software"), to deal in the Software without restriction,
56360 including without limitation the rights to use, copy, modify, merge,
56361 publish, distribute, sublicense, and/or sell copies of the Software,
56362 and to permit persons to whom the Software is furnished to do so,
56363 subject to the following conditions:
56365 The above copyright notice and this permission notice shall be
56366 included in all copies or substantial portions of the Software.
56368 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56369 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56370 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56371 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56372 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56373 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56374 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56380 var Options = __webpack_require__(17).Options;
56381 var Output = __webpack_require__(2).Output;
56382 var InputScanner = __webpack_require__(8).InputScanner;
56383 var Directives = __webpack_require__(13).Directives;
56385 var directives_core = new Directives(/\/\*/, /\*\//);
56387 var lineBreak = /\r\n|[\r\n]/;
56388 var allLineBreaks = /\r\n|[\r\n]/g;
56391 var whitespaceChar = /\s/;
56392 var whitespacePattern = /(?:\s|\n)+/g;
56393 var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g;
56394 var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
56396 function Beautifier(source_text, options) {
56397 this._source_text = source_text || '';
56398 // Allow the setting of language/file-type specific options
56399 // with inheritance of overall settings
56400 this._options = new Options(options);
56402 this._input = null;
56404 // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule
56405 this.NESTED_AT_RULE = {
56407 "@font-face": true,
56408 "@keyframes": true,
56409 // also in CONDITIONAL_GROUP_RULE below
56414 this.CONDITIONAL_GROUP_RULE = {
56422 Beautifier.prototype.eatString = function(endChars) {
56424 this._ch = this._input.next();
56426 result += this._ch;
56427 if (this._ch === "\\") {
56428 result += this._input.next();
56429 } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") {
56432 this._ch = this._input.next();
56437 // Skips any white space in the source text from the current position.
56438 // When allowAtLeastOneNewLine is true, will output new lines for each
56439 // newline character found; if the user has preserve_newlines off, only
56440 // the first newline will be output
56441 Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {
56442 var result = whitespaceChar.test(this._input.peek());
56443 var isFirstNewLine = true;
56445 while (whitespaceChar.test(this._input.peek())) {
56446 this._ch = this._input.next();
56447 if (allowAtLeastOneNewLine && this._ch === '\n') {
56448 if (this._options.preserve_newlines || isFirstNewLine) {
56449 isFirstNewLine = false;
56450 this._output.add_new_line(true);
56457 // Nested pseudo-class if we are insideRule
56458 // and the next special character found opens
56460 Beautifier.prototype.foundNestedPseudoClass = function() {
56463 var ch = this._input.peek(i);
56467 } else if (ch === '(') {
56468 // pseudoclasses can contain ()
56470 } else if (ch === ')') {
56471 if (openParen === 0) {
56475 } else if (ch === ";" || ch === "}") {
56479 ch = this._input.peek(i);
56484 Beautifier.prototype.print_string = function(output_string) {
56485 this._output.set_indent(this._indentLevel);
56486 this._output.non_breaking_space = true;
56487 this._output.add_token(output_string);
56490 Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) {
56491 if (isAfterSpace) {
56492 this._output.space_before_token = true;
56496 Beautifier.prototype.indent = function() {
56497 this._indentLevel++;
56500 Beautifier.prototype.outdent = function() {
56501 if (this._indentLevel > 0) {
56502 this._indentLevel--;
56506 /*_____________________--------------------_____________________*/
56508 Beautifier.prototype.beautify = function() {
56509 if (this._options.disabled) {
56510 return this._source_text;
56513 var source_text = this._source_text;
56514 var eol = this._options.eol;
56515 if (eol === 'auto') {
56517 if (source_text && lineBreak.test(source_text || '')) {
56518 eol = source_text.match(lineBreak)[0];
56523 // HACK: newline parsing inconsistent. This brute force normalizes the this._input.
56524 source_text = source_text.replace(allLineBreaks, '\n');
56527 var baseIndentString = source_text.match(/^[\t ]*/)[0];
56529 this._output = new Output(this._options, baseIndentString);
56530 this._input = new InputScanner(source_text);
56531 this._indentLevel = 0;
56532 this._nestedLevel = 0;
56535 var parenLevel = 0;
56537 var insideRule = false;
56538 // This is the value side of a property value pair (blue in the following ex)
56539 // label { content: blue }
56540 var insidePropertyValue = false;
56541 var enteringConditionalGroup = false;
56542 var insideAtExtend = false;
56543 var insideAtImport = false;
56544 var topCharacter = this._ch;
56550 whitespace = this._input.read(whitespacePattern);
56551 isAfterSpace = whitespace !== '';
56552 previous_ch = topCharacter;
56553 this._ch = this._input.next();
56554 if (this._ch === '\\' && this._input.hasNext()) {
56555 this._ch += this._input.next();
56557 topCharacter = this._ch;
56561 } else if (this._ch === '/' && this._input.peek() === '*') {
56562 // /* css comment */
56563 // Always start block comments on a new line.
56564 // This handles scenarios where a block comment immediately
56565 // follows a property definition on the same line or where
56566 // minified code is being beautified.
56567 this._output.add_new_line();
56568 this._input.back();
56570 var comment = this._input.read(block_comment_pattern);
56572 // Handle ignore directive
56573 var directives = directives_core.get_directives(comment);
56574 if (directives && directives.ignore === 'start') {
56575 comment += directives_core.readIgnored(this._input);
56578 this.print_string(comment);
56580 // Ensures any new lines following the comment are preserved
56581 this.eatWhitespace(true);
56583 // Block comments are followed by a new line so they don't
56584 // share a line with other properties
56585 this._output.add_new_line();
56586 } else if (this._ch === '/' && this._input.peek() === '/') {
56587 // // single line comment
56588 // Preserves the space before a comment
56589 // on the same line as a rule
56590 this._output.space_before_token = true;
56591 this._input.back();
56592 this.print_string(this._input.read(comment_pattern));
56594 // Ensures any new lines following the comment are preserved
56595 this.eatWhitespace(true);
56596 } else if (this._ch === '@') {
56597 this.preserveSingleSpace(isAfterSpace);
56599 // deal with less propery mixins @{...}
56600 if (this._input.peek() === '{') {
56601 this.print_string(this._ch + this.eatString('}'));
56603 this.print_string(this._ch);
56605 // strip trailing space, if present, for hash property checks
56606 var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
56608 if (variableOrRule.match(/[ :]$/)) {
56609 // we have a variable or pseudo-class, add it and insert one space before continuing
56610 variableOrRule = this.eatString(": ").replace(/\s$/, '');
56611 this.print_string(variableOrRule);
56612 this._output.space_before_token = true;
56615 variableOrRule = variableOrRule.replace(/\s$/, '');
56617 if (variableOrRule === 'extend') {
56618 insideAtExtend = true;
56619 } else if (variableOrRule === 'import') {
56620 insideAtImport = true;
56623 // might be a nesting at-rule
56624 if (variableOrRule in this.NESTED_AT_RULE) {
56625 this._nestedLevel += 1;
56626 if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
56627 enteringConditionalGroup = true;
56629 // might be less variable
56630 } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {
56631 insidePropertyValue = true;
56635 } else if (this._ch === '#' && this._input.peek() === '{') {
56636 this.preserveSingleSpace(isAfterSpace);
56637 this.print_string(this._ch + this.eatString('}'));
56638 } else if (this._ch === '{') {
56639 if (insidePropertyValue) {
56640 insidePropertyValue = false;
56644 this._output.space_before_token = true;
56645 this.print_string(this._ch);
56647 // when entering conditional groups, only rulesets are allowed
56648 if (enteringConditionalGroup) {
56649 enteringConditionalGroup = false;
56650 insideRule = (this._indentLevel > this._nestedLevel);
56652 // otherwise, declarations are also allowed
56653 insideRule = (this._indentLevel >= this._nestedLevel);
56655 if (this._options.newline_between_rules && insideRule) {
56656 if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {
56657 this._output.ensure_empty_line_above('/', ',');
56660 this.eatWhitespace(true);
56661 this._output.add_new_line();
56662 } else if (this._ch === '}') {
56664 this._output.add_new_line();
56665 if (previous_ch === '{') {
56666 this._output.trim(true);
56668 insideAtImport = false;
56669 insideAtExtend = false;
56670 if (insidePropertyValue) {
56672 insidePropertyValue = false;
56674 this.print_string(this._ch);
56675 insideRule = false;
56676 if (this._nestedLevel) {
56677 this._nestedLevel--;
56680 this.eatWhitespace(true);
56681 this._output.add_new_line();
56683 if (this._options.newline_between_rules && !this._output.just_added_blankline()) {
56684 if (this._input.peek() !== '}') {
56685 this._output.add_new_line(true);
56688 } else if (this._ch === ":") {
56689 if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
56690 // 'property: value' delimiter
56691 // which could be in a conditional group query
56692 this.print_string(':');
56693 if (!insidePropertyValue) {
56694 insidePropertyValue = true;
56695 this._output.space_before_token = true;
56696 this.eatWhitespace(true);
56700 // sass/less parent reference don't use a space
56701 // sass nested pseudo-class don't use a space
56703 // preserve space before pseudoclasses/pseudoelements, as it means "in any child"
56704 if (this._input.lookBack(" ")) {
56705 this._output.space_before_token = true;
56707 if (this._input.peek() === ":") {
56709 this._ch = this._input.next();
56710 this.print_string("::");
56713 this.print_string(':');
56716 } else if (this._ch === '"' || this._ch === '\'') {
56717 this.preserveSingleSpace(isAfterSpace);
56718 this.print_string(this._ch + this.eatString(this._ch));
56719 this.eatWhitespace(true);
56720 } else if (this._ch === ';') {
56721 if (parenLevel === 0) {
56722 if (insidePropertyValue) {
56724 insidePropertyValue = false;
56726 insideAtExtend = false;
56727 insideAtImport = false;
56728 this.print_string(this._ch);
56729 this.eatWhitespace(true);
56731 // This maintains single line comments on the same
56732 // line. Block comments are also affected, but
56733 // a new line is always output before one inside
56735 if (this._input.peek() !== '/') {
56736 this._output.add_new_line();
56739 this.print_string(this._ch);
56740 this.eatWhitespace(true);
56741 this._output.space_before_token = true;
56743 } else if (this._ch === '(') { // may be a url
56744 if (this._input.lookBack("url")) {
56745 this.print_string(this._ch);
56746 this.eatWhitespace();
56749 this._ch = this._input.next();
56750 if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
56751 this._input.back();
56752 } else if (this._ch) {
56753 this.print_string(this._ch + this.eatString(')'));
56760 this.preserveSingleSpace(isAfterSpace);
56761 this.print_string(this._ch);
56762 this.eatWhitespace();
56766 } else if (this._ch === ')') {
56771 this.print_string(this._ch);
56772 } else if (this._ch === ',') {
56773 this.print_string(this._ch);
56774 this.eatWhitespace(true);
56775 if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
56776 this._output.add_new_line();
56778 this._output.space_before_token = true;
56780 } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
56781 //handle combinator spacing
56782 if (this._options.space_around_combinator) {
56783 this._output.space_before_token = true;
56784 this.print_string(this._ch);
56785 this._output.space_before_token = true;
56787 this.print_string(this._ch);
56788 this.eatWhitespace();
56789 // squash extra whitespace
56790 if (this._ch && whitespaceChar.test(this._ch)) {
56794 } else if (this._ch === ']') {
56795 this.print_string(this._ch);
56796 } else if (this._ch === '[') {
56797 this.preserveSingleSpace(isAfterSpace);
56798 this.print_string(this._ch);
56799 } else if (this._ch === '=') { // no whitespace before or after
56800 this.eatWhitespace();
56801 this.print_string('=');
56802 if (whitespaceChar.test(this._ch)) {
56805 } else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important
56806 this.print_string(' ');
56807 this.print_string(this._ch);
56809 this.preserveSingleSpace(isAfterSpace);
56810 this.print_string(this._ch);
56814 var sweetCode = this._output.get_code(eol);
56819 module.exports.Beautifier = Beautifier;
56824 /***/ (function(module, exports, __webpack_require__) {
56827 /*jshint node:true */
56830 The MIT License (MIT)
56832 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56834 Permission is hereby granted, free of charge, to any person
56835 obtaining a copy of this software and associated documentation files
56836 (the "Software"), to deal in the Software without restriction,
56837 including without limitation the rights to use, copy, modify, merge,
56838 publish, distribute, sublicense, and/or sell copies of the Software,
56839 and to permit persons to whom the Software is furnished to do so,
56840 subject to the following conditions:
56842 The above copyright notice and this permission notice shall be
56843 included in all copies or substantial portions of the Software.
56845 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56846 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56847 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56848 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56849 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56850 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56851 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56857 var BaseOptions = __webpack_require__(6).Options;
56859 function Options(options) {
56860 BaseOptions.call(this, options, 'css');
56862 this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);
56863 this.newline_between_rules = this._get_boolean('newline_between_rules', true);
56864 var space_around_selector_separator = this._get_boolean('space_around_selector_separator');
56865 this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;
56868 Options.prototype = new BaseOptions();
56872 module.exports.Options = Options;
56878 var css_beautify = legacy_beautify_css;
56882 /***/ (function(module, __webpack_exports__, __webpack_require__) {
56885 __webpack_require__.r(__webpack_exports__);
56886 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDocumentLinks", function() { return findDocumentLinks; });
56887 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
56888 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
56889 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
56890 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110);
56891 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(113);
56892 /*---------------------------------------------------------------------------------------------
56893 * Copyright (c) Microsoft Corporation. All rights reserved.
56894 * Licensed under the MIT License. See License.txt in the project root for license information.
56895 *--------------------------------------------------------------------------------------------*/
56901 function normalizeRef(url) {
56902 var first = url[0];
56903 var last = url[url.length - 1];
56904 if (first === last && (first === '\'' || first === '\"')) {
56905 url = url.substr(1, url.length - 2);
56909 function validateRef(url, languageId) {
56913 if (languageId === 'handlebars' && /{{.*}}/.test(url)) {
56916 return /\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(url);
56918 function getWorkspaceUrl(documentUri, tokenContent, documentContext, base) {
56919 if (/^\s*javascript\:/i.test(tokenContent) || /[\n\r]/.test(tokenContent)) {
56922 tokenContent = tokenContent.replace(/^\s*/g, '');
56923 if (/^https?:\/\//i.test(tokenContent) || /^file:\/\//i.test(tokenContent)) {
56924 // Absolute link that needs no treatment
56925 return tokenContent;
56927 if (/^\#/i.test(tokenContent)) {
56928 return documentUri + tokenContent;
56930 if (/^\/\//i.test(tokenContent)) {
56931 // Absolute link (that does not name the protocol)
56932 var pickedScheme = _utils_strings__WEBPACK_IMPORTED_MODULE_2__["startsWith"](documentUri, 'https://') ? 'https' : 'http';
56933 return pickedScheme + ':' + tokenContent.replace(/^\s*/g, '');
56935 if (documentContext) {
56936 return documentContext.resolveReference(tokenContent, base || documentUri);
56938 return tokenContent;
56940 function createLink(document, documentContext, attributeValue, startOffset, endOffset, base) {
56941 var tokenContent = normalizeRef(attributeValue);
56942 if (!validateRef(tokenContent, document.languageId)) {
56945 if (tokenContent.length < attributeValue.length) {
56949 var workspaceUrl = getWorkspaceUrl(document.uri, tokenContent, documentContext, base);
56950 if (!workspaceUrl || !isValidURI(workspaceUrl)) {
56954 range: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Range"].create(document.positionAt(startOffset), document.positionAt(endOffset)),
56955 target: workspaceUrl
56958 function isValidURI(uri) {
56960 vscode_uri__WEBPACK_IMPORTED_MODULE_3__["URI"].parse(uri);
56967 function findDocumentLinks(document, documentContext) {
56969 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(document.getText(), 0);
56970 var token = scanner.scan();
56971 var lastAttributeName = undefined;
56972 var afterBase = false;
56974 var idLocations = {};
56975 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TokenType"].EOS) {
56977 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TokenType"].StartTag:
56979 var tagName = scanner.getTokenText().toLowerCase();
56980 afterBase = tagName === 'base';
56983 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TokenType"].AttributeName:
56984 lastAttributeName = scanner.getTokenText().toLowerCase();
56986 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_4__["TokenType"].AttributeValue:
56987 if (lastAttributeName === 'src' || lastAttributeName === 'href') {
56988 var attributeValue = scanner.getTokenText();
56989 if (!afterBase) { // don't highlight the base link itself
56990 var link = createLink(document, documentContext, attributeValue, scanner.getTokenOffset(), scanner.getTokenEnd(), base);
56992 newLinks.push(link);
56995 if (afterBase && typeof base === 'undefined') {
56996 base = normalizeRef(attributeValue);
56997 if (base && documentContext) {
56998 base = documentContext.resolveReference(base, document.uri);
57002 lastAttributeName = undefined;
57004 else if (lastAttributeName === 'id') {
57005 var id = normalizeRef(scanner.getTokenText());
57006 idLocations[id] = scanner.getTokenOffset();
57010 token = scanner.scan();
57012 // change local links with ids to actual positions
57013 for (var _i = 0, newLinks_1 = newLinks; _i < newLinks_1.length; _i++) {
57014 var link = newLinks_1[_i];
57015 var localWithHash = document.uri + '#';
57016 if (link.target && _utils_strings__WEBPACK_IMPORTED_MODULE_2__["startsWith"](link.target, localWithHash)) {
57017 var target = link.target.substr(localWithHash.length);
57018 var offset = idLocations[target];
57019 if (offset !== undefined) {
57020 var pos = document.positionAt(offset);
57021 link.target = "" + localWithHash + (pos.line + 1) + "," + (pos.character + 1);
57031 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57034 __webpack_require__.r(__webpack_exports__);
57035 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDocumentHighlights", function() { return findDocumentHighlights; });
57036 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112);
57037 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
57038 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113);
57039 /*---------------------------------------------------------------------------------------------
57040 * Copyright (c) Microsoft Corporation. All rights reserved.
57041 * Licensed under the MIT License. See License.txt in the project root for license information.
57042 *--------------------------------------------------------------------------------------------*/
57046 function findDocumentHighlights(document, position, htmlDocument) {
57047 var offset = document.offsetAt(position);
57048 var node = htmlDocument.findNodeAt(offset);
57053 var startTagRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].StartTag, document, node.start);
57054 var endTagRange = typeof node.endTagStart === 'number' && getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EndTag, document, node.endTagStart);
57055 if (startTagRange && covers(startTagRange, position) || endTagRange && covers(endTagRange, position)) {
57056 if (startTagRange) {
57057 result.push({ kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DocumentHighlightKind"].Read, range: startTagRange });
57060 result.push({ kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DocumentHighlightKind"].Read, range: endTagRange });
57065 function isBeforeOrEqual(pos1, pos2) {
57066 return pos1.line < pos2.line || (pos1.line === pos2.line && pos1.character <= pos2.character);
57068 function covers(range, position) {
57069 return isBeforeOrEqual(range.start, position) && isBeforeOrEqual(position, range.end);
57071 function getTagNameRange(tokenType, document, startOffset) {
57072 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(document.getText(), startOffset);
57073 var token = scanner.scan();
57074 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS && token !== tokenType) {
57075 token = scanner.scan();
57077 if (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["TokenType"].EOS) {
57078 return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
57086 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57089 __webpack_require__.r(__webpack_exports__);
57090 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDocumentSymbols", function() { return findDocumentSymbols; });
57091 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
57092 /*---------------------------------------------------------------------------------------------
57093 * Copyright (c) Microsoft Corporation. All rights reserved.
57094 * Licensed under the MIT License. See License.txt in the project root for license information.
57095 *--------------------------------------------------------------------------------------------*/
57097 function findDocumentSymbols(document, htmlDocument) {
57099 htmlDocument.roots.forEach(function (node) {
57100 provideFileSymbolsInternal(document, node, '', symbols);
57104 function provideFileSymbolsInternal(document, node, container, symbols) {
57105 var name = nodeToName(node);
57106 var location = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Location"].create(document.uri, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(node.start), document.positionAt(node.end)));
57109 location: location,
57110 containerName: container,
57111 kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"].Field
57113 symbols.push(symbol);
57114 node.children.forEach(function (child) {
57115 provideFileSymbolsInternal(document, child, name, symbols);
57118 function nodeToName(node) {
57119 var name = node.tag;
57120 if (node.attributes) {
57121 var id = node.attributes['id'];
57122 var classes = node.attributes['class'];
57124 name += "#" + id.replace(/[\"\']/g, '');
57127 name += classes.replace(/[\"\']/g, '').split(/\s+/).map(function (className) { return "." + className; }).join('');
57130 return name || '?';
57136 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57139 __webpack_require__.r(__webpack_exports__);
57140 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doRename", function() { return doRename; });
57141 /*---------------------------------------------------------------------------------------------
57142 * Copyright (c) Microsoft Corporation. All rights reserved.
57143 * Licensed under the MIT License. See License.txt in the project root for license information.
57144 *--------------------------------------------------------------------------------------------*/
57145 function doRename(document, position, newName, htmlDocument) {
57147 var offset = document.offsetAt(position);
57148 var node = htmlDocument.findNodeAt(offset);
57152 if (!isWithinTagRange(node, offset, node.tag)) {
57156 var startTagRange = {
57157 start: document.positionAt(node.start + '<'.length),
57158 end: document.positionAt(node.start + '<'.length + node.tag.length)
57161 range: startTagRange,
57164 if (node.endTagStart) {
57165 var endTagRange = {
57166 start: document.positionAt(node.endTagStart + '</'.length),
57167 end: document.positionAt(node.endTagStart + '</'.length + node.tag.length)
57170 range: endTagRange,
57174 var changes = (_a = {},
57175 _a[document.uri.toString()] = edits,
57181 function toLocString(p) {
57182 return "(" + p.line + ", " + p.character + ")";
57184 function isWithinTagRange(node, offset, nodeTag) {
57185 // Self-closing tag
57186 if (node.endTagStart) {
57187 if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + nodeTag.length) {
57191 return node.start + '<'.length <= offset && offset <= node.start + '<'.length + nodeTag.length;
57197 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57200 __webpack_require__.r(__webpack_exports__);
57201 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findMatchingTagPosition", function() { return findMatchingTagPosition; });
57202 /*---------------------------------------------------------------------------------------------
57203 * Copyright (c) Microsoft Corporation. All rights reserved.
57204 * Licensed under the MIT License. See License.txt in the project root for license information.
57205 *--------------------------------------------------------------------------------------------*/
57206 function findMatchingTagPosition(document, position, htmlDocument) {
57207 var offset = document.offsetAt(position);
57208 var node = htmlDocument.findNodeAt(offset);
57212 if (!node.endTagStart) {
57215 // Within open tag, compute close tag
57216 if (node.start + '<'.length <= offset && offset <= node.start + '<'.length + node.tag.length) {
57217 var mirrorOffset = (offset - '<'.length - node.start) + node.endTagStart + '</'.length;
57218 return document.positionAt(mirrorOffset);
57220 // Within closing tag, compute open tag
57221 if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + node.tag.length) {
57222 var mirrorOffset = (offset - '</'.length - node.endTagStart) + node.start + '<'.length;
57223 return document.positionAt(mirrorOffset);
57231 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57234 __webpack_require__.r(__webpack_exports__);
57235 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFoldingRanges", function() { return getFoldingRanges; });
57236 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
57237 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113);
57238 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
57239 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116);
57240 /*---------------------------------------------------------------------------------------------
57241 * Copyright (c) Microsoft Corporation. All rights reserved.
57242 * Licensed under the MIT License. See License.txt in the project root for license information.
57243 *--------------------------------------------------------------------------------------------*/
57248 function limitRanges(ranges, rangeLimit) {
57249 ranges = ranges.sort(function (r1, r2) {
57250 var diff = r1.startLine - r2.startLine;
57252 diff = r1.endLine - r2.endLine;
57256 // compute each range's nesting level in 'nestingLevels'.
57257 // count the number of ranges for each level in 'nestingLevelCounts'
57260 var nestingLevels = [];
57261 var nestingLevelCounts = [];
57262 var setNestingLevel = function (index, level) {
57263 nestingLevels[index] = level;
57265 nestingLevelCounts[level] = (nestingLevelCounts[level] || 0) + 1;
57268 // compute nesting levels and sanitize
57269 for (var i = 0; i < ranges.length; i++) {
57270 var entry = ranges[i];
57273 setNestingLevel(i, 0);
57276 if (entry.startLine > top.startLine) {
57277 if (entry.endLine <= top.endLine) {
57278 previous.push(top);
57280 setNestingLevel(i, previous.length);
57282 else if (entry.startLine > top.endLine) {
57284 top = previous.pop();
57285 } while (top && entry.startLine > top.endLine);
57287 previous.push(top);
57290 setNestingLevel(i, previous.length);
57297 for (var i = 0; i < nestingLevelCounts.length; i++) {
57298 var n = nestingLevelCounts[i];
57300 if (n + entries > rangeLimit) {
57308 for (var i = 0; i < ranges.length; i++) {
57309 var level = nestingLevels[i];
57310 if (typeof level === 'number') {
57311 if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) {
57312 result.push(ranges[i]);
57318 function getFoldingRanges(document, context) {
57319 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_2__["createScanner"])(document.getText());
57320 var token = scanner.scan();
57323 var lastTagName = null;
57324 var prevStart = -1;
57325 function addRange(range) {
57326 ranges.push(range);
57327 prevStart = range.startLine;
57329 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EOS) {
57331 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTag: {
57332 var tagName = scanner.getTokenText();
57333 var startLine = document.positionAt(scanner.getTokenOffset()).line;
57334 stack.push({ startLine: startLine, tagName: tagName });
57335 lastTagName = tagName;
57338 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndTag: {
57339 lastTagName = scanner.getTokenText();
57342 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTagClose:
57343 if (!lastTagName || !Object(_languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__["isVoidElement"])(lastTagName)) {
57347 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].EndTagClose:
57348 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].StartTagSelfClose: {
57349 var i = stack.length - 1;
57350 while (i >= 0 && stack[i].tagName !== lastTagName) {
57354 var stackElement = stack[i];
57356 var line = document.positionAt(scanner.getTokenOffset()).line;
57357 var startLine = stackElement.startLine;
57358 var endLine = line - 1;
57359 if (endLine > startLine && prevStart !== startLine) {
57360 addRange({ startLine: startLine, endLine: endLine });
57365 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["TokenType"].Comment: {
57366 var startLine = document.positionAt(scanner.getTokenOffset()).line;
57367 var text = scanner.getTokenText();
57368 var m = text.match(/^\s*#(region\b)|(endregion\b)/);
57370 if (m[1]) { // start pattern match
57371 stack.push({ startLine: startLine, tagName: '' }); // empty tagName marks region
57374 var i = stack.length - 1;
57375 while (i >= 0 && stack[i].tagName.length) {
57379 var stackElement = stack[i];
57381 var endLine = startLine;
57382 startLine = stackElement.startLine;
57383 if (endLine > startLine && prevStart !== startLine) {
57384 addRange({ startLine: startLine, endLine: endLine, kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"].Region });
57390 var endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line;
57391 if (startLine < endLine) {
57392 addRange({ startLine: startLine, endLine: endLine, kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"].Comment });
57398 token = scanner.scan();
57400 var rangeLimit = context && context.rangeLimit || Number.MAX_VALUE;
57401 if (ranges.length > rangeLimit) {
57402 return limitRanges(ranges, rangeLimit);
57410 /***/ (function(module, __webpack_exports__, __webpack_require__) {
57413 __webpack_require__.r(__webpack_exports__);
57414 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionRanges", function() { return getSelectionRanges; });
57415 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
57416 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(112);
57417 /* harmony import */ var _parser_htmlParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(114);
57418 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(113);
57420 * Until SelectionRange lands in LSP, we'll return Range from server and convert it to
57421 * SelectionRange on client side
57427 function getSelectionRanges(document, positions) {
57428 function getSelectionRange(position) {
57429 var applicableRanges = getApplicableRanges(document, position);
57430 var prev = undefined;
57431 var current = undefined;
57432 for (var index = applicableRanges.length - 1; index >= 0; index--) {
57433 var range = applicableRanges[index];
57434 if (!prev || range[0] !== prev[0] || range[1] !== prev[1]) {
57435 current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
57440 current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(position, position));
57444 return positions.map(getSelectionRange);
57446 function getApplicableRanges(document, position) {
57447 var htmlDoc = Object(_parser_htmlParser__WEBPACK_IMPORTED_MODULE_2__["parse"])(document.getText());
57448 var currOffset = document.offsetAt(position);
57449 var currNode = htmlDoc.findNodeAt(currOffset);
57450 var result = getAllParentTagRanges(currNode);
57451 // Self-closing or void elements
57452 if (currNode.startTagEnd && !currNode.endTagStart) {
57453 // THe rare case of unmatching tag pairs like <div></div1>
57454 if (currNode.startTagEnd !== currNode.end) {
57455 return [[currNode.start, currNode.end]];
57457 var closeRange = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(currNode.startTagEnd - 2), document.positionAt(currNode.startTagEnd));
57458 var closeText = document.getText(closeRange);
57459 // Self-closing element
57460 if (closeText === '/>') {
57461 result.unshift([currNode.start + 1, currNode.startTagEnd - 2]);
57465 result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
57467 var attributeLevelRanges = getAttributeLevelRanges(document, currNode, currOffset);
57468 result = attributeLevelRanges.concat(result);
57471 if (!currNode.startTagEnd || !currNode.endTagStart) {
57476 * `<div class="foo">bar</div>`
57478 result.unshift([currNode.start, currNode.end]);
57480 * Cursor inside `<div class="foo">`
57482 if (currNode.start < currOffset && currOffset < currNode.startTagEnd) {
57483 result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
57484 var attributeLevelRanges = getAttributeLevelRanges(document, currNode, currOffset);
57485 result = attributeLevelRanges.concat(result);
57489 * Cursor inside `bar`
57491 else if (currNode.startTagEnd <= currOffset && currOffset <= currNode.endTagStart) {
57492 result.unshift([currNode.startTagEnd, currNode.endTagStart]);
57496 * Cursor inside `</div>`
57499 // `div` inside `</div>`
57500 if (currOffset >= currNode.endTagStart + 2) {
57501 result.unshift([currNode.endTagStart + 2, currNode.end - 1]);
57506 function getAllParentTagRanges(initialNode) {
57507 var currNode = initialNode;
57508 var getNodeRanges = function (n) {
57509 if (n.startTagEnd && n.endTagStart && n.startTagEnd < n.endTagStart) {
57511 [n.startTagEnd, n.endTagStart],
57520 while (currNode.parent) {
57521 currNode = currNode.parent;
57522 getNodeRanges(currNode).forEach(function (r) { return result.push(r); });
57526 function getAttributeLevelRanges(document, currNode, currOffset) {
57527 var currNodeRange = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(currNode.start), document.positionAt(currNode.end));
57528 var currNodeText = document.getText(currNodeRange);
57529 var relativeOffset = currOffset - currNode.start;
57531 * Tag level semantic selection
57533 var scanner = Object(_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(currNodeText);
57534 var token = scanner.scan();
57537 * <div class="foo">bar</div>
57539 var positionOffset = currNode.start;
57541 var isInsideAttribute = false;
57542 var attrStart = -1;
57543 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TokenType"].EOS) {
57545 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TokenType"].AttributeName: {
57546 if (relativeOffset < scanner.getTokenOffset()) {
57547 isInsideAttribute = false;
57550 if (relativeOffset <= scanner.getTokenEnd()) {
57552 result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
57554 isInsideAttribute = true;
57555 attrStart = scanner.getTokenOffset();
57558 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TokenType"].AttributeValue: {
57559 if (!isInsideAttribute) {
57562 var valueText = scanner.getTokenText();
57563 if (relativeOffset < scanner.getTokenOffset()) {
57565 result.push([attrStart, scanner.getTokenEnd()]);
57568 if (relativeOffset >= scanner.getTokenOffset() && relativeOffset <= scanner.getTokenEnd()) {
57570 result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
57572 if ((valueText[0] === "\"" && valueText[valueText.length - 1] === "\"") || (valueText[0] === "'" && valueText[valueText.length - 1] === "'")) {
57573 if (relativeOffset >= scanner.getTokenOffset() + 1 && relativeOffset <= scanner.getTokenEnd() - 1) {
57574 result.unshift([scanner.getTokenOffset() + 1, scanner.getTokenEnd() - 1]);
57578 result.push([attrStart, scanner.getTokenEnd()]);
57583 token = scanner.scan();
57585 return result.map(function (pair) {
57586 return [pair[0] + positionOffset, pair[1] + positionOffset];
57593 /***/ (function(module, exports, __webpack_require__) {
57597 /*---------------------------------------------------------------------------------------------
57598 * Copyright (c) Microsoft Corporation. All rights reserved.
57599 * Licensed under the MIT License. See License.txt in the project root for license information.
57600 *--------------------------------------------------------------------------------------------*/
57601 Object.defineProperty(exports, "__esModule", { value: true });
57602 function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
57603 let languageModels = {};
57605 let cleanupInterval = undefined;
57606 if (cleanupIntervalTimeInSec > 0) {
57607 cleanupInterval = setInterval(() => {
57608 const cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
57609 const uris = Object.keys(languageModels);
57610 for (const uri of uris) {
57611 const languageModelInfo = languageModels[uri];
57612 if (languageModelInfo.cTime < cutoffTime) {
57613 delete languageModels[uri];
57617 }, cleanupIntervalTimeInSec * 1000);
57621 const version = document.version;
57622 const languageId = document.languageId;
57623 const languageModelInfo = languageModels[document.uri];
57624 if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
57625 languageModelInfo.cTime = Date.now();
57626 return languageModelInfo.languageModel;
57628 const languageModel = parse(document);
57629 languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
57630 if (!languageModelInfo) {
57633 if (nModels === maxEntries) {
57634 let oldestTime = Number.MAX_VALUE;
57635 let oldestUri = null;
57636 for (const uri in languageModels) {
57637 const languageModelInfo = languageModels[uri];
57638 if (languageModelInfo.cTime < oldestTime) {
57640 oldestTime = languageModelInfo.cTime;
57644 delete languageModels[oldestUri];
57648 return languageModel;
57650 onDocumentRemoved(document) {
57651 const uri = document.uri;
57652 if (languageModels[uri]) {
57653 delete languageModels[uri];
57658 if (typeof cleanupInterval !== 'undefined') {
57659 clearInterval(cleanupInterval);
57660 cleanupInterval = undefined;
57661 languageModels = {};
57667 exports.getLanguageModelCache = getLanguageModelCache;
57672 /***/ (function(module, exports, __webpack_require__) {
57676 /*---------------------------------------------------------------------------------------------
57677 * Copyright (c) Microsoft Corporation. All rights reserved.
57678 * Licensed under the MIT License. See License.txt in the project root for license information.
57679 *--------------------------------------------------------------------------------------------*/
57680 Object.defineProperty(exports, "__esModule", { value: true });
57681 const languageModelCache_1 = __webpack_require__(137);
57682 const languageModes_1 = __webpack_require__(71);
57683 const embeddedSupport_1 = __webpack_require__(139);
57684 function getCSSMode(cssLanguageService, documentRegions, workspace) {
57685 let embeddedCSSDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument('css'));
57686 let cssStylesheets = languageModelCache_1.getLanguageModelCache(10, 60, document => cssLanguageService.parseStylesheet(document));
57691 doValidation(document, settings = workspace.settings) {
57692 let embedded = embeddedCSSDocuments.get(document);
57693 return cssLanguageService.doValidation(embedded, cssStylesheets.get(embedded), settings && settings.css);
57695 doComplete(document, position, _settings = workspace.settings) {
57696 let embedded = embeddedCSSDocuments.get(document);
57697 const stylesheet = cssStylesheets.get(embedded);
57698 return cssLanguageService.doComplete(embedded, position, stylesheet) || languageModes_1.CompletionList.create();
57700 doHover(document, position) {
57701 let embedded = embeddedCSSDocuments.get(document);
57702 return cssLanguageService.doHover(embedded, position, cssStylesheets.get(embedded));
57704 findDocumentHighlight(document, position) {
57705 let embedded = embeddedCSSDocuments.get(document);
57706 return cssLanguageService.findDocumentHighlights(embedded, position, cssStylesheets.get(embedded));
57708 findDocumentSymbols(document) {
57709 let embedded = embeddedCSSDocuments.get(document);
57710 return cssLanguageService.findDocumentSymbols(embedded, cssStylesheets.get(embedded)).filter(s => s.name !== embeddedSupport_1.CSS_STYLE_RULE);
57712 findDefinition(document, position) {
57713 let embedded = embeddedCSSDocuments.get(document);
57714 return cssLanguageService.findDefinition(embedded, position, cssStylesheets.get(embedded));
57716 findReferences(document, position) {
57717 let embedded = embeddedCSSDocuments.get(document);
57718 return cssLanguageService.findReferences(embedded, position, cssStylesheets.get(embedded));
57720 findDocumentColors(document) {
57721 let embedded = embeddedCSSDocuments.get(document);
57722 return cssLanguageService.findDocumentColors(embedded, cssStylesheets.get(embedded));
57724 getColorPresentations(document, color, range) {
57725 let embedded = embeddedCSSDocuments.get(document);
57726 return cssLanguageService.getColorPresentations(embedded, cssStylesheets.get(embedded), color, range);
57728 getFoldingRanges(document) {
57729 let embedded = embeddedCSSDocuments.get(document);
57730 return cssLanguageService.getFoldingRanges(embedded, {});
57732 getSelectionRange(document, position) {
57733 let embedded = embeddedCSSDocuments.get(document);
57734 return cssLanguageService.getSelectionRanges(embedded, [position], cssStylesheets.get(embedded))[0];
57736 onDocumentRemoved(document) {
57737 embeddedCSSDocuments.onDocumentRemoved(document);
57738 cssStylesheets.onDocumentRemoved(document);
57741 embeddedCSSDocuments.dispose();
57742 cssStylesheets.dispose();
57746 exports.getCSSMode = getCSSMode;
57751 /***/ (function(module, exports, __webpack_require__) {
57755 /*---------------------------------------------------------------------------------------------
57756 * Copyright (c) Microsoft Corporation. All rights reserved.
57757 * Licensed under the MIT License. See License.txt in the project root for license information.
57758 *--------------------------------------------------------------------------------------------*/
57759 Object.defineProperty(exports, "__esModule", { value: true });
57760 const languageModes_1 = __webpack_require__(71);
57761 exports.CSS_STYLE_RULE = '__';
57762 function getDocumentRegions(languageService, document) {
57764 let scanner = languageService.createScanner(document.getText());
57765 let lastTagName = '';
57766 let lastAttributeName = null;
57767 let languageIdFromType = undefined;
57768 let importedScripts = [];
57769 let token = scanner.scan();
57770 while (token !== languageModes_1.TokenType.EOS) {
57772 case languageModes_1.TokenType.StartTag:
57773 lastTagName = scanner.getTokenText();
57774 lastAttributeName = null;
57775 languageIdFromType = 'javascript';
57777 case languageModes_1.TokenType.Styles:
57778 regions.push({ languageId: 'css', start: scanner.getTokenOffset(), end: scanner.getTokenEnd() });
57780 case languageModes_1.TokenType.Script:
57781 regions.push({ languageId: languageIdFromType, start: scanner.getTokenOffset(), end: scanner.getTokenEnd() });
57783 case languageModes_1.TokenType.AttributeName:
57784 lastAttributeName = scanner.getTokenText();
57786 case languageModes_1.TokenType.AttributeValue:
57787 if (lastAttributeName === 'src' && lastTagName.toLowerCase() === 'script') {
57788 let value = scanner.getTokenText();
57789 if (value[0] === '\'' || value[0] === '"') {
57790 value = value.substr(1, value.length - 1);
57792 importedScripts.push(value);
57794 else if (lastAttributeName === 'type' && lastTagName.toLowerCase() === 'script') {
57795 if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(scanner.getTokenText())) {
57796 languageIdFromType = 'javascript';
57798 else if (/["']text\/typescript["']/.test(scanner.getTokenText())) {
57799 languageIdFromType = 'typescript';
57802 languageIdFromType = undefined;
57806 let attributeLanguageId = getAttributeLanguage(lastAttributeName);
57807 if (attributeLanguageId) {
57808 let start = scanner.getTokenOffset();
57809 let end = scanner.getTokenEnd();
57810 let firstChar = document.getText()[start];
57811 if (firstChar === '\'' || firstChar === '"') {
57815 regions.push({ languageId: attributeLanguageId, start, end, attributeValue: true });
57818 lastAttributeName = null;
57821 token = scanner.scan();
57824 getLanguageRanges: (range) => getLanguageRanges(document, regions, range),
57825 getEmbeddedDocument: (languageId, ignoreAttributeValues) => getEmbeddedDocument(document, regions, languageId, ignoreAttributeValues),
57826 getLanguageAtPosition: (position) => getLanguageAtPosition(document, regions, position),
57827 getLanguagesInDocument: () => getLanguagesInDocument(document, regions),
57828 getImportedScripts: () => importedScripts
57831 exports.getDocumentRegions = getDocumentRegions;
57832 function getLanguageRanges(document, regions, range) {
57834 let currentPos = range ? range.start : languageModes_1.Position.create(0, 0);
57835 let currentOffset = range ? document.offsetAt(range.start) : 0;
57836 let endOffset = range ? document.offsetAt(range.end) : document.getText().length;
57837 for (let region of regions) {
57838 if (region.end > currentOffset && region.start < endOffset) {
57839 let start = Math.max(region.start, currentOffset);
57840 let startPos = document.positionAt(start);
57841 if (currentOffset < region.start) {
57848 let end = Math.min(region.end, endOffset);
57849 let endPos = document.positionAt(end);
57850 if (end > region.start) {
57854 languageId: region.languageId,
57855 attributeValue: region.attributeValue
57858 currentOffset = end;
57859 currentPos = endPos;
57862 if (currentOffset < endOffset) {
57863 let endPos = range ? range.end : document.positionAt(endOffset);
57872 function getLanguagesInDocument(_document, regions) {
57874 for (let region of regions) {
57875 if (region.languageId && result.indexOf(region.languageId) === -1) {
57876 result.push(region.languageId);
57877 if (result.length === 3) {
57882 result.push('html');
57885 function getLanguageAtPosition(document, regions, position) {
57886 let offset = document.offsetAt(position);
57887 for (let region of regions) {
57888 if (region.start <= offset) {
57889 if (offset <= region.end) {
57890 return region.languageId;
57899 function getEmbeddedDocument(document, contents, languageId, ignoreAttributeValues) {
57900 let currentPos = 0;
57901 let oldContent = document.getText();
57903 let lastSuffix = '';
57904 for (let c of contents) {
57905 if (c.languageId === languageId && (!ignoreAttributeValues || !c.attributeValue)) {
57906 result = substituteWithWhitespace(result, currentPos, c.start, oldContent, lastSuffix, getPrefix(c));
57907 result += oldContent.substring(c.start, c.end);
57908 currentPos = c.end;
57909 lastSuffix = getSuffix(c);
57912 result = substituteWithWhitespace(result, currentPos, oldContent.length, oldContent, lastSuffix, '');
57913 return languageModes_1.TextDocument.create(document.uri, languageId, document.version, result);
57915 function getPrefix(c) {
57916 if (c.attributeValue) {
57917 switch (c.languageId) {
57918 case 'css': return exports.CSS_STYLE_RULE + '{';
57923 function getSuffix(c) {
57924 if (c.attributeValue) {
57925 switch (c.languageId) {
57926 case 'css': return '}';
57927 case 'javascript': return ';';
57932 function substituteWithWhitespace(result, start, end, oldContent, before, after) {
57933 let accumulatedWS = 0;
57935 for (let i = start + before.length; i < end; i++) {
57936 let ch = oldContent[i];
57937 if (ch === '\n' || ch === '\r') {
57938 // only write new lines, skip the whitespace
57946 result = append(result, ' ', accumulatedWS - after.length);
57950 function append(result, str, n) {
57960 function getAttributeLanguage(attributeName) {
57961 let match = attributeName.match(/^(style)$|^(on\w+)$/i);
57965 return match[1] ? 'css' : 'javascript';
57971 /***/ (function(module, exports, __webpack_require__) {
57975 /*---------------------------------------------------------------------------------------------
57976 * Copyright (c) Microsoft Corporation. All rights reserved.
57977 * Licensed under the MIT License. See License.txt in the project root for license information.
57978 *--------------------------------------------------------------------------------------------*/
57979 Object.defineProperty(exports, "__esModule", { value: true });
57980 const languageModelCache_1 = __webpack_require__(137);
57981 const pathCompletion_1 = __webpack_require__(141);
57982 function getHTMLMode(htmlLanguageService, workspace) {
57983 let htmlDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => htmlLanguageService.parseHTMLDocument(document));
57988 getSelectionRange(document, position) {
57989 return htmlLanguageService.getSelectionRanges(document, [position])[0];
57991 doComplete(document, position, settings = workspace.settings) {
57992 let options = settings && settings.html && settings.html.suggest;
57993 let doAutoComplete = settings && settings.html && settings.html.autoClosingTags;
57994 if (doAutoComplete) {
57995 options.hideAutoCompleteProposals = true;
57997 let pathCompletionProposals = [];
57998 let participants = [pathCompletion_1.getPathCompletionParticipant(document, workspace.folders, pathCompletionProposals)];
57999 htmlLanguageService.setCompletionParticipants(participants);
58000 const htmlDocument = htmlDocuments.get(document);
58001 let completionList = htmlLanguageService.doComplete(document, position, htmlDocument, options);
58002 completionList.items.push(...pathCompletionProposals);
58003 return completionList;
58005 doHover(document, position) {
58006 return htmlLanguageService.doHover(document, position, htmlDocuments.get(document));
58008 findDocumentHighlight(document, position) {
58009 return htmlLanguageService.findDocumentHighlights(document, position, htmlDocuments.get(document));
58011 findDocumentLinks(document, documentContext) {
58012 return htmlLanguageService.findDocumentLinks(document, documentContext);
58014 findDocumentSymbols(document) {
58015 return htmlLanguageService.findDocumentSymbols(document, htmlDocuments.get(document));
58017 format(document, range, formatParams, settings = workspace.settings) {
58018 let formatSettings = settings && settings.html && settings.html.format;
58019 if (formatSettings) {
58020 formatSettings = merge(formatSettings, {});
58023 formatSettings = {};
58025 if (formatSettings.contentUnformatted) {
58026 formatSettings.contentUnformatted = formatSettings.contentUnformatted + ',script';
58029 formatSettings.contentUnformatted = 'script';
58031 formatSettings = merge(formatParams, formatSettings);
58032 return htmlLanguageService.format(document, range, formatSettings);
58034 getFoldingRanges(document) {
58035 return htmlLanguageService.getFoldingRanges(document);
58037 doAutoClose(document, position) {
58038 let offset = document.offsetAt(position);
58039 let text = document.getText();
58040 if (offset > 0 && text.charAt(offset - 1).match(/[>\/]/g)) {
58041 return htmlLanguageService.doTagComplete(document, position, htmlDocuments.get(document));
58045 doRename(document, position, newName) {
58046 const htmlDocument = htmlDocuments.get(document);
58047 return htmlLanguageService.doRename(document, position, newName, htmlDocument);
58049 onDocumentRemoved(document) {
58050 htmlDocuments.onDocumentRemoved(document);
58052 findMatchingTagPosition(document, position) {
58053 const htmlDocument = htmlDocuments.get(document);
58054 return htmlLanguageService.findMatchingTagPosition(document, position, htmlDocument);
58057 htmlDocuments.dispose();
58061 exports.getHTMLMode = getHTMLMode;
58062 function merge(src, dst) {
58063 for (const key in src) {
58064 if (src.hasOwnProperty(key)) {
58065 dst[key] = src[key];
58074 /***/ (function(module, exports, __webpack_require__) {
58078 /*---------------------------------------------------------------------------------------------
58079 * Copyright (c) Microsoft Corporation. All rights reserved.
58080 * Licensed under the MIT License. See License.txt in the project root for license information.
58081 *--------------------------------------------------------------------------------------------*/
58082 var __importStar = (this && this.__importStar) || function (mod) {
58083 if (mod && mod.__esModule) return mod;
58085 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
58086 result["default"] = mod;
58089 Object.defineProperty(exports, "__esModule", { value: true });
58090 const path = __importStar(__webpack_require__(3));
58091 const fs = __importStar(__webpack_require__(67));
58092 const vscode_uri_1 = __webpack_require__(110);
58093 const languageModes_1 = __webpack_require__(71);
58094 const strings_1 = __webpack_require__(142);
58095 const arrays_1 = __webpack_require__(143);
58096 function getPathCompletionParticipant(document, workspaceFolders, result) {
58098 onHtmlAttributeValue: ({ tag, attribute, value: valueBeforeCursor, range }) => {
58099 const fullValue = stripQuotes(document.getText(range));
58100 if (shouldDoPathCompletion(tag, attribute, fullValue)) {
58101 if (workspaceFolders.length === 0) {
58104 const workspaceRoot = resolveWorkspaceRoot(document, workspaceFolders);
58105 const paths = providePaths(valueBeforeCursor, vscode_uri_1.URI.parse(document.uri).fsPath, workspaceRoot);
58106 result.push(...paths.map(p => pathToSuggestion(p, valueBeforeCursor, fullValue, range)));
58111 exports.getPathCompletionParticipant = getPathCompletionParticipant;
58112 function stripQuotes(fullValue) {
58113 if (strings_1.startsWith(fullValue, `'`) || strings_1.startsWith(fullValue, `"`)) {
58114 return fullValue.slice(1, -1);
58120 function shouldDoPathCompletion(tag, attr, value) {
58121 if (strings_1.startsWith(value, 'http') || strings_1.startsWith(value, 'https') || strings_1.startsWith(value, '//')) {
58124 if (PATH_TAG_AND_ATTR[tag]) {
58125 if (typeof PATH_TAG_AND_ATTR[tag] === 'string') {
58126 return PATH_TAG_AND_ATTR[tag] === attr;
58129 return arrays_1.contains(PATH_TAG_AND_ATTR[tag], attr);
58135 * Get a list of path suggestions. Folder suggestions are suffixed with a slash.
58137 function providePaths(valueBeforeCursor, activeDocFsPath, root) {
58138 const lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
58139 const valueBeforeLastSlash = valueBeforeCursor.slice(0, lastIndexOfSlash + 1);
58140 const startsWithSlash = strings_1.startsWith(valueBeforeCursor, '/');
58142 if (startsWithSlash) {
58146 parentDir = path.resolve(root, '.' + valueBeforeLastSlash);
58149 parentDir = path.resolve(activeDocFsPath, '..', valueBeforeLastSlash);
58152 const paths = fs.readdirSync(parentDir).map(f => {
58153 return isDir(path.resolve(parentDir, f))
58157 return paths.filter(p => p[0] !== '.');
58163 function isDir(p) {
58165 return fs.statSync(p).isDirectory();
58171 function pathToSuggestion(p, valueBeforeCursor, fullValue, range) {
58172 const isDir = p[p.length - 1] === '/';
58174 const lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
58175 if (lastIndexOfSlash === -1) {
58176 replaceRange = shiftRange(range, 1, -1);
58179 // For cases where cursor is in the middle of attribute value, like <script src="./s|rc/test.js">
58180 // Find the last slash before cursor, and calculate the start of replace range from there
58181 const valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
58182 const startPos = shiftPosition(range.end, -1 - valueAfterLastSlash.length);
58183 // If whitespace exists, replace until there is no more
58184 const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
58186 if (whitespaceIndex !== -1) {
58187 endPos = shiftPosition(startPos, whitespaceIndex);
58190 endPos = shiftPosition(range.end, -1);
58192 replaceRange = languageModes_1.Range.create(startPos, endPos);
58197 kind: languageModes_1.CompletionItemKind.Folder,
58198 textEdit: languageModes_1.TextEdit.replace(replaceRange, p),
58201 command: 'editor.action.triggerSuggest'
58208 kind: languageModes_1.CompletionItemKind.File,
58209 textEdit: languageModes_1.TextEdit.replace(replaceRange, p)
58213 function resolveWorkspaceRoot(activeDoc, workspaceFolders) {
58214 for (const folder of workspaceFolders) {
58215 if (strings_1.startsWith(activeDoc.uri, folder.uri)) {
58216 return path.resolve(vscode_uri_1.URI.parse(folder.uri).fsPath);
58221 function shiftPosition(pos, offset) {
58222 return languageModes_1.Position.create(pos.line, pos.character + offset);
58224 function shiftRange(range, startOffset, endOffset) {
58225 const start = shiftPosition(range.start, startOffset);
58226 const end = shiftPosition(range.end, endOffset);
58227 return languageModes_1.Range.create(start, end);
58229 // Selected from https://stackoverflow.com/a/2725168/1780148
58230 const PATH_TAG_AND_ATTR = {
58234 body: 'background',
58237 frame: ['src', 'longdesc'],
58238 img: ['src', 'longdesc'],
58246 button: 'formaction',
58250 input: ['src', 'formaction'],
58253 video: ['src', 'poster']
58259 /***/ (function(module, exports, __webpack_require__) {
58263 /*---------------------------------------------------------------------------------------------
58264 * Copyright (c) Microsoft Corporation. All rights reserved.
58265 * Licensed under the MIT License. See License.txt in the project root for license information.
58266 *--------------------------------------------------------------------------------------------*/
58267 Object.defineProperty(exports, "__esModule", { value: true });
58268 function getWordAtText(text, offset, wordDefinition) {
58269 let lineStart = offset;
58270 while (lineStart > 0 && !isNewlineCharacter(text.charCodeAt(lineStart - 1))) {
58273 let offsetInLine = offset - lineStart;
58274 let lineText = text.substr(lineStart);
58275 // make a copy of the regex as to not keep the state
58276 let flags = wordDefinition.ignoreCase ? 'gi' : 'g';
58277 wordDefinition = new RegExp(wordDefinition.source, flags);
58278 let match = wordDefinition.exec(lineText);
58279 while (match && match.index + match[0].length < offsetInLine) {
58280 match = wordDefinition.exec(lineText);
58282 if (match && match.index <= offsetInLine) {
58283 return { start: match.index + lineStart, length: match[0].length };
58285 return { start: offset, length: 0 };
58287 exports.getWordAtText = getWordAtText;
58288 function startsWith(haystack, needle) {
58289 if (haystack.length < needle.length) {
58292 for (let i = 0; i < needle.length; i++) {
58293 if (haystack[i] !== needle[i]) {
58299 exports.startsWith = startsWith;
58300 function endsWith(haystack, needle) {
58301 let diff = haystack.length - needle.length;
58303 return haystack.indexOf(needle, diff) === diff;
58305 else if (diff === 0) {
58306 return haystack === needle;
58312 exports.endsWith = endsWith;
58313 function repeat(value, count) {
58315 while (count > 0) {
58316 if ((count & 1) === 1) {
58320 count = count >>> 1;
58324 exports.repeat = repeat;
58325 function isWhitespaceOnly(str) {
58326 return /^\s*$/.test(str);
58328 exports.isWhitespaceOnly = isWhitespaceOnly;
58329 function isEOL(content, offset) {
58330 return isNewlineCharacter(content.charCodeAt(offset));
58332 exports.isEOL = isEOL;
58333 const CR = '\r'.charCodeAt(0);
58334 const NL = '\n'.charCodeAt(0);
58335 function isNewlineCharacter(charCode) {
58336 return charCode === CR || charCode === NL;
58338 exports.isNewlineCharacter = isNewlineCharacter;
58343 /***/ (function(module, exports, __webpack_require__) {
58347 /*---------------------------------------------------------------------------------------------
58348 * Copyright (c) Microsoft Corporation. All rights reserved.
58349 * Licensed under the MIT License. See License.txt in the project root for license information.
58350 *--------------------------------------------------------------------------------------------*/
58351 Object.defineProperty(exports, "__esModule", { value: true });
58352 function pushAll(to, from) {
58354 for (const e of from) {
58359 exports.pushAll = pushAll;
58360 function contains(arr, val) {
58361 return arr.indexOf(val) !== -1;
58363 exports.contains = contains;
58365 * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort`
58366 * so only use this when actually needing stable sort.
58368 function mergeSort(data, compare) {
58369 _divideAndMerge(data, compare);
58372 exports.mergeSort = mergeSort;
58373 function _divideAndMerge(data, compare) {
58374 if (data.length <= 1) {
58378 const p = (data.length / 2) | 0;
58379 const left = data.slice(0, p);
58380 const right = data.slice(p);
58381 _divideAndMerge(left, compare);
58382 _divideAndMerge(right, compare);
58386 while (leftIdx < left.length && rightIdx < right.length) {
58387 let ret = compare(left[leftIdx], right[rightIdx]);
58389 // smaller_equal -> take left to preserve order
58390 data[i++] = left[leftIdx++];
58393 // greater -> take right
58394 data[i++] = right[rightIdx++];
58397 while (leftIdx < left.length) {
58398 data[i++] = left[leftIdx++];
58400 while (rightIdx < right.length) {
58401 data[i++] = right[rightIdx++];
58404 function binarySearch(array, key, comparator) {
58405 let low = 0, high = array.length - 1;
58406 while (low <= high) {
58407 let mid = ((low + high) / 2) | 0;
58408 let comp = comparator(array[mid], key);
58412 else if (comp > 0) {
58421 exports.binarySearch = binarySearch;
58426 /***/ (function(module, exports, __webpack_require__) {
58430 /*---------------------------------------------------------------------------------------------
58431 * Copyright (c) Microsoft Corporation. All rights reserved.
58432 * Licensed under the MIT License. See License.txt in the project root for license information.
58433 *--------------------------------------------------------------------------------------------*/
58434 var __importStar = (this && this.__importStar) || function (mod) {
58435 if (mod && mod.__esModule) return mod;
58437 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
58438 result["default"] = mod;
58441 Object.defineProperty(exports, "__esModule", { value: true });
58442 const languageModelCache_1 = __webpack_require__(137);
58443 const languageModes_1 = __webpack_require__(71);
58444 const strings_1 = __webpack_require__(142);
58445 const ts = __importStar(__webpack_require__(145));
58446 const path_1 = __webpack_require__(3);
58447 const javascriptSemanticTokens_1 = __webpack_require__(146);
58448 const JS_WORD_REGEX = /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g;
58449 let jquery_d_ts = path_1.join(__dirname, '../lib/jquery.d.ts'); // when packaged
58450 if (!ts.sys.fileExists(jquery_d_ts)) {
58451 jquery_d_ts = path_1.join(__dirname, '../../lib/jquery.d.ts'); // from source
58453 function getJavaScriptMode(documentRegions, languageId) {
58454 let jsDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument(languageId));
58455 const workingFile = languageId === 'javascript' ? 'vscode://javascript/1.js' : 'vscode://javascript/2.ts'; // the same 'file' is used for all contents
58456 let compilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic };
58457 let currentTextDocument;
58458 let scriptFileVersion = 0;
58459 function updateCurrentTextDocument(doc) {
58460 if (!currentTextDocument || doc.uri !== currentTextDocument.uri || doc.version !== currentTextDocument.version) {
58461 currentTextDocument = jsDocuments.get(doc);
58462 scriptFileVersion++;
58466 getCompilationSettings: () => compilerOptions,
58467 getScriptFileNames: () => [workingFile, jquery_d_ts],
58468 getScriptKind: (fileName) => fileName.substr(fileName.length - 2) === 'ts' ? ts.ScriptKind.TS : ts.ScriptKind.JS,
58469 getScriptVersion: (fileName) => {
58470 if (fileName === workingFile) {
58471 return String(scriptFileVersion);
58473 return '1'; // default lib an jquery.d.ts are static
58475 getScriptSnapshot: (fileName) => {
58477 if (strings_1.startsWith(fileName, 'vscode:')) {
58478 if (fileName === workingFile) {
58479 text = currentTextDocument.getText();
58483 text = ts.sys.readFile(fileName) || '';
58486 getText: (start, end) => text.substring(start, end),
58487 getLength: () => text.length,
58488 getChangeRange: () => undefined
58491 getCurrentDirectory: () => '',
58492 getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options)
58494 let jsLanguageService = ts.createLanguageService(host);
58495 let globalSettings = {};
58500 doValidation(document) {
58501 updateCurrentTextDocument(document);
58502 const syntaxDiagnostics = jsLanguageService.getSyntacticDiagnostics(workingFile);
58503 const semanticDiagnostics = jsLanguageService.getSemanticDiagnostics(workingFile);
58504 return syntaxDiagnostics.concat(semanticDiagnostics).map((diag) => {
58506 range: convertRange(currentTextDocument, diag),
58507 severity: languageModes_1.DiagnosticSeverity.Error,
58508 source: languageId,
58509 message: ts.flattenDiagnosticMessageText(diag.messageText, '\n')
58513 doComplete(document, position) {
58514 updateCurrentTextDocument(document);
58515 let offset = currentTextDocument.offsetAt(position);
58516 let completions = jsLanguageService.getCompletionsAtPosition(workingFile, offset, { includeExternalModuleExports: false, includeInsertTextCompletions: false });
58517 if (!completions) {
58518 return { isIncomplete: false, items: [] };
58520 let replaceRange = convertRange(currentTextDocument, strings_1.getWordAtText(currentTextDocument.getText(), offset, JS_WORD_REGEX));
58522 isIncomplete: false,
58523 items: completions.entries.map(entry => {
58526 position: position,
58528 sortText: entry.sortText,
58529 kind: convertKind(entry.kind),
58530 textEdit: languageModes_1.TextEdit.replace(replaceRange, entry.name),
58540 doResolve(document, item) {
58541 updateCurrentTextDocument(document);
58542 let details = jsLanguageService.getCompletionEntryDetails(workingFile, item.data.offset, item.label, undefined, undefined, undefined);
58544 item.detail = ts.displayPartsToString(details.displayParts);
58545 item.documentation = ts.displayPartsToString(details.documentation);
58550 doHover(document, position) {
58551 updateCurrentTextDocument(document);
58552 let info = jsLanguageService.getQuickInfoAtPosition(workingFile, currentTextDocument.offsetAt(position));
58554 let contents = ts.displayPartsToString(info.displayParts);
58556 range: convertRange(currentTextDocument, info.textSpan),
58557 contents: languageModes_1.MarkedString.fromPlainText(contents)
58562 doSignatureHelp(document, position) {
58563 updateCurrentTextDocument(document);
58564 let signHelp = jsLanguageService.getSignatureHelpItems(workingFile, currentTextDocument.offsetAt(position), undefined);
58567 activeSignature: signHelp.selectedItemIndex,
58568 activeParameter: signHelp.argumentIndex,
58571 signHelp.items.forEach(item => {
58574 documentation: undefined,
58577 signature.label += ts.displayPartsToString(item.prefixDisplayParts);
58578 item.parameters.forEach((p, i, a) => {
58579 let label = ts.displayPartsToString(p.displayParts);
58582 documentation: ts.displayPartsToString(p.documentation)
58584 signature.label += label;
58585 signature.parameters.push(parameter);
58586 if (i < a.length - 1) {
58587 signature.label += ts.displayPartsToString(item.separatorDisplayParts);
58590 signature.label += ts.displayPartsToString(item.suffixDisplayParts);
58591 ret.signatures.push(signature);
58597 findDocumentHighlight(document, position) {
58598 updateCurrentTextDocument(document);
58599 const highlights = jsLanguageService.getDocumentHighlights(workingFile, currentTextDocument.offsetAt(position), [workingFile]);
58601 for (const entry of highlights || []) {
58602 for (const highlight of entry.highlightSpans) {
58604 range: convertRange(currentTextDocument, highlight.textSpan),
58605 kind: highlight.kind === 'writtenReference' ? languageModes_1.DocumentHighlightKind.Write : languageModes_1.DocumentHighlightKind.Text
58611 findDocumentSymbols(document) {
58612 updateCurrentTextDocument(document);
58613 let items = jsLanguageService.getNavigationBarItems(workingFile);
58616 let existing = Object.create(null);
58617 let collectSymbols = (item, containerLabel) => {
58618 let sig = item.text + item.kind + item.spans[0].start;
58619 if (item.kind !== 'script' && !existing[sig]) {
58622 kind: convertSymbolKind(item.kind),
58625 range: convertRange(currentTextDocument, item.spans[0])
58627 containerName: containerLabel
58629 existing[sig] = true;
58630 result.push(symbol);
58631 containerLabel = item.text;
58633 if (item.childItems && item.childItems.length > 0) {
58634 for (let child of item.childItems) {
58635 collectSymbols(child, containerLabel);
58639 items.forEach(item => collectSymbols(item));
58644 findDefinition(document, position) {
58645 updateCurrentTextDocument(document);
58646 let definition = jsLanguageService.getDefinitionAtPosition(workingFile, currentTextDocument.offsetAt(position));
58648 return definition.filter(d => d.fileName === workingFile).map(d => {
58651 range: convertRange(currentTextDocument, d.textSpan)
58657 findReferences(document, position) {
58658 updateCurrentTextDocument(document);
58659 let references = jsLanguageService.getReferencesAtPosition(workingFile, currentTextDocument.offsetAt(position));
58661 return references.filter(d => d.fileName === workingFile).map(d => {
58664 range: convertRange(currentTextDocument, d.textSpan)
58670 getSelectionRange(document, position) {
58671 updateCurrentTextDocument(document);
58672 function convertSelectionRange(selectionRange) {
58673 const parent = selectionRange.parent ? convertSelectionRange(selectionRange.parent) : undefined;
58674 return languageModes_1.SelectionRange.create(convertRange(currentTextDocument, selectionRange.textSpan), parent);
58676 const range = jsLanguageService.getSmartSelectionRange(workingFile, currentTextDocument.offsetAt(position));
58677 return convertSelectionRange(range);
58679 format(document, range, formatParams, settings = globalSettings) {
58680 currentTextDocument = documentRegions.get(document).getEmbeddedDocument('javascript', true);
58681 scriptFileVersion++;
58682 let formatterSettings = settings && settings.javascript && settings.javascript.format;
58683 let initialIndentLevel = computeInitialIndent(document, range, formatParams);
58684 let formatSettings = convertOptions(formatParams, formatterSettings, initialIndentLevel + 1);
58685 let start = currentTextDocument.offsetAt(range.start);
58686 let end = currentTextDocument.offsetAt(range.end);
58687 let lastLineRange = null;
58688 if (range.end.line > range.start.line && (range.end.character === 0 || strings_1.isWhitespaceOnly(currentTextDocument.getText().substr(end - range.end.character, range.end.character)))) {
58689 end -= range.end.character;
58690 lastLineRange = languageModes_1.Range.create(languageModes_1.Position.create(range.end.line, 0), range.end);
58692 let edits = jsLanguageService.getFormattingEditsForRange(workingFile, start, end, formatSettings);
58695 for (let edit of edits) {
58696 if (edit.span.start >= start && edit.span.start + edit.span.length <= end) {
58698 range: convertRange(currentTextDocument, edit.span),
58699 newText: edit.newText
58703 if (lastLineRange) {
58705 range: lastLineRange,
58706 newText: generateIndent(initialIndentLevel, formatParams)
58713 getFoldingRanges(document) {
58714 updateCurrentTextDocument(document);
58715 let spans = jsLanguageService.getOutliningSpans(workingFile);
58717 for (let span of spans) {
58718 let curr = convertRange(currentTextDocument, span.textSpan);
58719 let startLine = curr.start.line;
58720 let endLine = curr.end.line;
58721 if (startLine < endLine) {
58722 let foldingRange = { startLine, endLine };
58723 let match = document.getText(curr).match(/^\s*\/(?:(\/\s*#(?:end)?region\b)|(\*|\/))/);
58725 foldingRange.kind = match[1] ? languageModes_1.FoldingRangeKind.Region : languageModes_1.FoldingRangeKind.Comment;
58727 ranges.push(foldingRange);
58732 onDocumentRemoved(document) {
58733 jsDocuments.onDocumentRemoved(document);
58735 getSemanticTokens(document) {
58736 updateCurrentTextDocument(document);
58737 return javascriptSemanticTokens_1.getSemanticTokens(jsLanguageService, currentTextDocument, workingFile);
58739 getSemanticTokenLegend() {
58740 return javascriptSemanticTokens_1.getSemanticTokenLegend();
58743 jsLanguageService.dispose();
58744 jsDocuments.dispose();
58748 exports.getJavaScriptMode = getJavaScriptMode;
58749 function convertRange(document, span) {
58750 if (typeof span.start === 'undefined') {
58751 const pos = document.positionAt(0);
58752 return languageModes_1.Range.create(pos, pos);
58754 const startPosition = document.positionAt(span.start);
58755 const endPosition = document.positionAt(span.start + (span.length || 0));
58756 return languageModes_1.Range.create(startPosition, endPosition);
58758 function convertKind(kind) {
58760 case 'primitive type':
58762 return languageModes_1.CompletionItemKind.Keyword;
58765 return languageModes_1.CompletionItemKind.Variable;
58769 return languageModes_1.CompletionItemKind.Field;
58775 return languageModes_1.CompletionItemKind.Function;
58777 return languageModes_1.CompletionItemKind.Enum;
58779 return languageModes_1.CompletionItemKind.Module;
58781 return languageModes_1.CompletionItemKind.Class;
58783 return languageModes_1.CompletionItemKind.Interface;
58785 return languageModes_1.CompletionItemKind.File;
58787 return languageModes_1.CompletionItemKind.Property;
58789 function convertSymbolKind(kind) {
58794 return languageModes_1.SymbolKind.Variable;
58796 case 'local function':
58797 return languageModes_1.SymbolKind.Function;
58799 return languageModes_1.SymbolKind.Enum;
58801 return languageModes_1.SymbolKind.Module;
58803 return languageModes_1.SymbolKind.Class;
58805 return languageModes_1.SymbolKind.Interface;
58807 return languageModes_1.SymbolKind.Method;
58811 return languageModes_1.SymbolKind.Property;
58813 return languageModes_1.SymbolKind.Variable;
58815 function convertOptions(options, formatSettings, initialIndentLevel) {
58817 ConvertTabsToSpaces: options.insertSpaces,
58818 TabSize: options.tabSize,
58819 IndentSize: options.tabSize,
58820 IndentStyle: ts.IndentStyle.Smart,
58821 NewLineCharacter: '\n',
58822 BaseIndentSize: options.tabSize * initialIndentLevel,
58823 InsertSpaceAfterCommaDelimiter: Boolean(!formatSettings || formatSettings.insertSpaceAfterCommaDelimiter),
58824 InsertSpaceAfterSemicolonInForStatements: Boolean(!formatSettings || formatSettings.insertSpaceAfterSemicolonInForStatements),
58825 InsertSpaceBeforeAndAfterBinaryOperators: Boolean(!formatSettings || formatSettings.insertSpaceBeforeAndAfterBinaryOperators),
58826 InsertSpaceAfterKeywordsInControlFlowStatements: Boolean(!formatSettings || formatSettings.insertSpaceAfterKeywordsInControlFlowStatements),
58827 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: Boolean(!formatSettings || formatSettings.insertSpaceAfterFunctionKeywordForAnonymousFunctions),
58828 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis),
58829 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets),
58830 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces),
58831 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces),
58832 PlaceOpenBraceOnNewLineForControlBlocks: Boolean(formatSettings && formatSettings.placeOpenBraceOnNewLineForFunctions),
58833 PlaceOpenBraceOnNewLineForFunctions: Boolean(formatSettings && formatSettings.placeOpenBraceOnNewLineForControlBlocks)
58836 function computeInitialIndent(document, range, options) {
58837 let lineStart = document.offsetAt(languageModes_1.Position.create(range.start.line, 0));
58838 let content = document.getText();
58841 let tabSize = options.tabSize || 4;
58842 while (i < content.length) {
58843 let ch = content.charAt(i);
58847 else if (ch === '\t') {
58855 return Math.floor(nChars / tabSize);
58857 function generateIndent(level, options) {
58858 if (options.insertSpaces) {
58859 return strings_1.repeat(' ', level * options.tabSize);
58862 return strings_1.repeat('\t', level);
58869 /***/ (function(module, exports) {
58871 module.exports = require("typescript");
58875 /***/ (function(module, exports, __webpack_require__) {
58879 /*---------------------------------------------------------------------------------------------
58880 * Copyright (c) Microsoft Corporation. All rights reserved.
58881 * Licensed under the MIT License. See License.txt in the project root for license information.
58882 *--------------------------------------------------------------------------------------------*/
58883 var __importStar = (this && this.__importStar) || function (mod) {
58884 if (mod && mod.__esModule) return mod;
58886 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
58887 result["default"] = mod;
58890 Object.defineProperty(exports, "__esModule", { value: true });
58891 const ts = __importStar(__webpack_require__(145));
58892 function getSemanticTokenLegend() {
58893 if (tokenTypes.length !== 11 /* _ */) {
58894 console.warn('TokenType has added new entries.');
58896 if (tokenModifiers.length !== 4 /* _ */) {
58897 console.warn('TokenModifier has added new entries.');
58899 return { types: tokenTypes, modifiers: tokenModifiers };
58901 exports.getSemanticTokenLegend = getSemanticTokenLegend;
58902 function getSemanticTokens(jsLanguageService, currentTextDocument, fileName) {
58903 //https://ts-ast-viewer.com/#code/AQ0g2CmAuwGbALzAJwG4BQZQGNwEMBnQ4AQQEYBmYAb2C22zgEtJwATJVTRxgcwD27AQAp8AGmAAjAJS0A9POB8+7NQ168oscAJz5wANXwAnLug2bsJmAFcTAO2XAA1MHyvgu-UdOeWbOw8ViAAvpagocBAA
58904 let resultTokens = [];
58905 const collector = (node, typeIdx, modifierSet) => {
58906 resultTokens.push({ start: currentTextDocument.positionAt(node.getStart()), length: node.getWidth(), typeIdx, modifierSet });
58908 collectTokens(jsLanguageService, fileName, { start: 0, length: currentTextDocument.getText().length }, collector);
58909 return resultTokens;
58911 exports.getSemanticTokens = getSemanticTokens;
58912 function collectTokens(jsLanguageService, fileName, span, collector) {
58913 const program = jsLanguageService.getProgram();
58915 const typeChecker = program.getTypeChecker();
58916 function visit(node) {
58917 if (!node || !ts.textSpanIntersectsWith(span, node.pos, node.getFullWidth())) {
58920 if (ts.isIdentifier(node)) {
58921 let symbol = typeChecker.getSymbolAtLocation(node);
58923 if (symbol.flags & ts.SymbolFlags.Alias) {
58924 symbol = typeChecker.getAliasedSymbol(symbol);
58926 let typeIdx = classifySymbol(symbol);
58927 if (typeIdx !== undefined) {
58928 let modifierSet = 0;
58930 const parentTypeIdx = tokenFromDeclarationMapping[node.parent.kind];
58931 if (parentTypeIdx === typeIdx && node.parent.name === node) {
58932 modifierSet = 1 << 0 /* declaration */;
58935 const decl = symbol.valueDeclaration;
58936 const modifiers = decl ? ts.getCombinedModifierFlags(decl) : 0;
58937 const nodeFlags = decl ? ts.getCombinedNodeFlags(decl) : 0;
58938 if (modifiers & ts.ModifierFlags.Static) {
58939 modifierSet |= 1 << 1 /* static */;
58941 if (modifiers & ts.ModifierFlags.Async) {
58942 modifierSet |= 1 << 2 /* async */;
58944 if ((modifiers & ts.ModifierFlags.Readonly) || (nodeFlags & ts.NodeFlags.Const) || (symbol.getFlags() & ts.SymbolFlags.EnumMember)) {
58945 modifierSet |= 1 << 3 /* readonly */;
58947 collector(node, typeIdx, modifierSet);
58951 ts.forEachChild(node, visit);
58953 const sourceFile = program.getSourceFile(fileName);
58959 function classifySymbol(symbol) {
58960 const flags = symbol.getFlags();
58961 if (flags & ts.SymbolFlags.Class) {
58962 return 0 /* class */;
58964 else if (flags & ts.SymbolFlags.Enum) {
58965 return 1 /* enum */;
58967 else if (flags & ts.SymbolFlags.TypeAlias) {
58968 return 5 /* type */;
58970 else if (flags & ts.SymbolFlags.Type) {
58971 if (flags & ts.SymbolFlags.Interface) {
58972 return 2 /* interface */;
58974 if (flags & ts.SymbolFlags.TypeParameter) {
58975 return 4 /* typeParameter */;
58978 const decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0];
58979 return decl && tokenFromDeclarationMapping[decl.kind];
58981 const tokenTypes = [];
58982 tokenTypes[0 /* class */] = 'class';
58983 tokenTypes[1 /* enum */] = 'enum';
58984 tokenTypes[2 /* interface */] = 'interface';
58985 tokenTypes[3 /* namespace */] = 'namespace';
58986 tokenTypes[4 /* typeParameter */] = 'typeParameter';
58987 tokenTypes[5 /* type */] = 'type';
58988 tokenTypes[6 /* parameter */] = 'parameter';
58989 tokenTypes[7 /* variable */] = 'variable';
58990 tokenTypes[8 /* property */] = 'property';
58991 tokenTypes[9 /* function */] = 'function';
58992 tokenTypes[10 /* member */] = 'member';
58993 const tokenModifiers = [];
58994 tokenModifiers[2 /* async */] = 'async';
58995 tokenModifiers[0 /* declaration */] = 'declaration';
58996 tokenModifiers[3 /* readonly */] = 'readonly';
58997 tokenModifiers[1 /* static */] = 'static';
58998 const tokenFromDeclarationMapping = {
58999 [ts.SyntaxKind.VariableDeclaration]: 7 /* variable */,
59000 [ts.SyntaxKind.Parameter]: 6 /* parameter */,
59001 [ts.SyntaxKind.PropertyDeclaration]: 8 /* property */,
59002 [ts.SyntaxKind.ModuleDeclaration]: 3 /* namespace */,
59003 [ts.SyntaxKind.EnumDeclaration]: 1 /* enum */,
59004 [ts.SyntaxKind.EnumMember]: 8 /* property */,
59005 [ts.SyntaxKind.ClassDeclaration]: 0 /* class */,
59006 [ts.SyntaxKind.MethodDeclaration]: 10 /* member */,
59007 [ts.SyntaxKind.FunctionDeclaration]: 9 /* function */,
59008 [ts.SyntaxKind.MethodSignature]: 10 /* member */,
59009 [ts.SyntaxKind.GetAccessor]: 8 /* property */,
59010 [ts.SyntaxKind.PropertySignature]: 8 /* property */,
59011 [ts.SyntaxKind.InterfaceDeclaration]: 2 /* interface */,
59012 [ts.SyntaxKind.TypeAliasDeclaration]: 5 /* type */,
59013 [ts.SyntaxKind.TypeParameter]: 4 /* typeParameter */
59019 /***/ (function(module, exports, __webpack_require__) {
59023 /*---------------------------------------------------------------------------------------------
59024 * Copyright (c) Microsoft Corporation. All rights reserved.
59025 * Licensed under the MIT License. See License.txt in the project root for license information.
59026 *--------------------------------------------------------------------------------------------*/
59027 Object.defineProperty(exports, "__esModule", { value: true });
59028 const languageModes_1 = __webpack_require__(71);
59029 const arrays_1 = __webpack_require__(143);
59030 const strings_1 = __webpack_require__(142);
59031 function format(languageModes, document, formatRange, formattingOptions, settings, enabledModes) {
59033 let endPos = formatRange.end;
59034 let endOffset = document.offsetAt(endPos);
59035 let content = document.getText();
59036 if (endPos.character === 0 && endPos.line > 0 && endOffset !== content.length) {
59037 // if selection ends after a new line, exclude that new line
59038 let prevLineStart = document.offsetAt(languageModes_1.Position.create(endPos.line - 1, 0));
59039 while (strings_1.isEOL(content, endOffset - 1) && endOffset > prevLineStart) {
59042 formatRange = languageModes_1.Range.create(formatRange.start, document.positionAt(endOffset));
59044 // run the html formatter on the full range and pass the result content to the embedded formatters.
59045 // from the final content create a single edit
59046 // advantages of this approach are
59047 // - correct indents in the html document
59048 // - correct initial indent for embedded formatters
59049 // - no worrying of overlapping edits
59050 // make sure we start in html
59051 let allRanges = languageModes.getModesInRange(document, formatRange);
59053 let startPos = formatRange.start;
59054 let isHTML = (range) => range.mode && range.mode.getId() === 'html';
59055 while (i < allRanges.length && !isHTML(allRanges[i])) {
59056 let range = allRanges[i];
59057 if (!range.attributeValue && range.mode && range.mode.format) {
59058 let edits = range.mode.format(document, languageModes_1.Range.create(startPos, range.end), formattingOptions, settings);
59059 arrays_1.pushAll(result, edits);
59061 startPos = range.end;
59064 if (i === allRanges.length) {
59067 // modify the range
59068 formatRange = languageModes_1.Range.create(startPos, formatRange.end);
59069 // perform a html format and apply changes to a new document
59070 let htmlMode = languageModes.getMode('html');
59071 let htmlEdits = htmlMode.format(document, formatRange, formattingOptions, settings);
59072 let htmlFormattedContent = languageModes_1.TextDocument.applyEdits(document, htmlEdits);
59073 let newDocument = languageModes_1.TextDocument.create(document.uri + '.tmp', document.languageId, document.version, htmlFormattedContent);
59075 // run embedded formatters on html formatted content: - formatters see correct initial indent
59076 let afterFormatRangeLength = document.getText().length - document.offsetAt(formatRange.end); // length of unchanged content after replace range
59077 let newFormatRange = languageModes_1.Range.create(formatRange.start, newDocument.positionAt(htmlFormattedContent.length - afterFormatRangeLength));
59078 let embeddedRanges = languageModes.getModesInRange(newDocument, newFormatRange);
59079 let embeddedEdits = [];
59080 for (let r of embeddedRanges) {
59082 if (mode && mode.format && enabledModes[mode.getId()] && !r.attributeValue) {
59083 let edits = mode.format(newDocument, r, formattingOptions, settings);
59084 for (let edit of edits) {
59085 embeddedEdits.push(edit);
59089 if (embeddedEdits.length === 0) {
59090 arrays_1.pushAll(result, htmlEdits);
59093 // apply all embedded format edits and create a single edit for all changes
59094 let resultContent = languageModes_1.TextDocument.applyEdits(newDocument, embeddedEdits);
59095 let resultReplaceText = resultContent.substring(document.offsetAt(formatRange.start), resultContent.length - afterFormatRangeLength);
59096 result.push(languageModes_1.TextEdit.replace(formatRange, resultReplaceText));
59100 languageModes.onDocumentRemoved(newDocument);
59103 exports.format = format;
59108 /***/ (function(module, exports, __webpack_require__) {
59112 /*---------------------------------------------------------------------------------------------
59113 * Copyright (c) Microsoft Corporation. All rights reserved.
59114 * Licensed under the MIT License. See License.txt in the project root for license information.
59115 *--------------------------------------------------------------------------------------------*/
59116 var __importStar = (this && this.__importStar) || function (mod) {
59117 if (mod && mod.__esModule) return mod;
59119 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
59120 result["default"] = mod;
59123 Object.defineProperty(exports, "__esModule", { value: true });
59124 const strings_1 = __webpack_require__(142);
59125 const url = __importStar(__webpack_require__(66));
59126 function getDocumentContext(documentUri, workspaceFolders) {
59127 function getRootFolder() {
59128 for (let folder of workspaceFolders) {
59129 let folderURI = folder.uri;
59130 if (!strings_1.endsWith(folderURI, '/')) {
59131 folderURI = folderURI + '/';
59133 if (strings_1.startsWith(documentUri, folderURI)) {
59140 resolveReference: (ref, base = documentUri) => {
59141 if (ref[0] === '/') { // resolve absolute path against the current workspace folder
59142 if (strings_1.startsWith(base, 'file://')) {
59143 let folderUri = getRootFolder();
59145 return folderUri + ref.substr(1);
59150 return url.resolve(base, ref);
59158 exports.getDocumentContext = getDocumentContext;
59163 /***/ (function(module, exports, __webpack_require__) {
59167 /*---------------------------------------------------------------------------------------------
59168 * Copyright (c) Microsoft Corporation. All rights reserved.
59169 * Licensed under the MIT License. See License.txt in the project root for license information.
59170 *--------------------------------------------------------------------------------------------*/
59171 Object.defineProperty(exports, "__esModule", { value: true });
59172 const vscode_languageserver_1 = __webpack_require__(33);
59173 function formatError(message, err) {
59174 if (err instanceof Error) {
59176 return `${message}: ${error.message}\n${error.stack}`;
59178 else if (typeof err === 'string') {
59179 return `${message}: ${err}`;
59182 return `${message}: ${err.toString()}`;
59186 exports.formatError = formatError;
59187 function runSafeAsync(func, errorVal, errorMessage, token) {
59188 return new Promise((resolve) => {
59189 setImmediate(() => {
59190 if (token.isCancellationRequested) {
59191 resolve(cancelValue());
59193 return func().then(result => {
59194 if (token.isCancellationRequested) {
59195 resolve(cancelValue());
59202 console.error(formatError(errorMessage, e));
59208 exports.runSafeAsync = runSafeAsync;
59209 function runSafe(func, errorVal, errorMessage, token) {
59210 return new Promise((resolve) => {
59211 setImmediate(() => {
59212 if (token.isCancellationRequested) {
59213 resolve(cancelValue());
59217 let result = func();
59218 if (token.isCancellationRequested) {
59219 resolve(cancelValue());
59227 console.error(formatError(errorMessage, e));
59234 exports.runSafe = runSafe;
59235 function cancelValue() {
59236 return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.RequestCancelled, 'Request cancelled');
59242 /***/ (function(module, exports, __webpack_require__) {
59246 /*---------------------------------------------------------------------------------------------
59247 * Copyright (c) Microsoft Corporation. All rights reserved.
59248 * Licensed under the MIT License. See License.txt in the project root for license information.
59249 *--------------------------------------------------------------------------------------------*/
59250 Object.defineProperty(exports, "__esModule", { value: true });
59251 const languageModes_1 = __webpack_require__(71);
59252 function getFoldingRanges(languageModes, document, maxRanges, _cancellationToken) {
59253 let htmlMode = languageModes.getMode('html');
59254 let range = languageModes_1.Range.create(languageModes_1.Position.create(0, 0), languageModes_1.Position.create(document.lineCount, 0));
59256 if (htmlMode && htmlMode.getFoldingRanges) {
59257 result.push(...htmlMode.getFoldingRanges(document));
59259 // cache folding ranges per mode
59260 let rangesPerMode = Object.create(null);
59261 let getRangesForMode = (mode) => {
59262 if (mode.getFoldingRanges) {
59263 let ranges = rangesPerMode[mode.getId()];
59264 if (!Array.isArray(ranges)) {
59265 ranges = mode.getFoldingRanges(document) || [];
59266 rangesPerMode[mode.getId()] = ranges;
59272 let modeRanges = languageModes.getModesInRange(document, range);
59273 for (let modeRange of modeRanges) {
59274 let mode = modeRange.mode;
59275 if (mode && mode !== htmlMode && !modeRange.attributeValue) {
59276 const ranges = getRangesForMode(mode);
59277 result.push(...ranges.filter(r => r.startLine >= modeRange.start.line && r.endLine < modeRange.end.line));
59280 if (maxRanges && result.length > maxRanges) {
59281 result = limitRanges(result, maxRanges);
59285 exports.getFoldingRanges = getFoldingRanges;
59286 function limitRanges(ranges, maxRanges) {
59287 ranges = ranges.sort((r1, r2) => {
59288 let diff = r1.startLine - r2.startLine;
59290 diff = r1.endLine - r2.endLine;
59294 // compute each range's nesting level in 'nestingLevels'.
59295 // count the number of ranges for each level in 'nestingLevelCounts'
59296 let top = undefined;
59298 let nestingLevels = [];
59299 let nestingLevelCounts = [];
59300 let setNestingLevel = (index, level) => {
59301 nestingLevels[index] = level;
59303 nestingLevelCounts[level] = (nestingLevelCounts[level] || 0) + 1;
59306 // compute nesting levels and sanitize
59307 for (let i = 0; i < ranges.length; i++) {
59308 let entry = ranges[i];
59311 setNestingLevel(i, 0);
59314 if (entry.startLine > top.startLine) {
59315 if (entry.endLine <= top.endLine) {
59316 previous.push(top);
59318 setNestingLevel(i, previous.length);
59320 else if (entry.startLine > top.endLine) {
59322 top = previous.pop();
59323 } while (top && entry.startLine > top.endLine);
59325 previous.push(top);
59328 setNestingLevel(i, previous.length);
59335 for (let i = 0; i < nestingLevelCounts.length; i++) {
59336 let n = nestingLevelCounts[i];
59338 if (n + entries > maxRanges) {
59346 for (let i = 0; i < ranges.length; i++) {
59347 let level = nestingLevels[i];
59348 if (typeof level === 'number') {
59349 if (level < maxLevel || (level === maxLevel && entries++ < maxRanges)) {
59350 result.push(ranges[i]);
59360 /***/ (function(module, exports, __webpack_require__) {
59364 /*---------------------------------------------------------------------------------------------
59365 * Copyright (c) Microsoft Corporation. All rights reserved.
59366 * Licensed under the MIT License. See License.txt in the project root for license information.
59367 *--------------------------------------------------------------------------------------------*/
59368 var __importStar = (this && this.__importStar) || function (mod) {
59369 if (mod && mod.__esModule) return mod;
59371 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
59372 result["default"] = mod;
59375 Object.defineProperty(exports, "__esModule", { value: true });
59376 const vscode_html_languageservice_1 = __webpack_require__(111);
59377 const fs = __importStar(__webpack_require__(67));
59378 function getDataProviders(dataPaths) {
59382 const providers = [];
59383 dataPaths.forEach((path, i) => {
59385 if (fs.existsSync(path)) {
59386 const htmlData = JSON.parse(fs.readFileSync(path, 'utf-8'));
59387 providers.push(vscode_html_languageservice_1.newHTMLDataProvider(`customProvider${i}`, htmlData));
59391 console.log(`Failed to load tag from ${path}`);
59396 exports.getDataProviders = getDataProviders;
59401 /***/ (function(module, exports, __webpack_require__) {
59405 /*---------------------------------------------------------------------------------------------
59406 * Copyright (c) Microsoft Corporation. All rights reserved.
59407 * Licensed under the MIT License. See License.txt in the project root for license information.
59408 *--------------------------------------------------------------------------------------------*/
59409 Object.defineProperty(exports, "__esModule", { value: true });
59410 const languageModes_1 = __webpack_require__(71);
59411 const positions_1 = __webpack_require__(153);
59412 function getSelectionRanges(languageModes, document, positions) {
59413 const htmlMode = languageModes.getMode('html');
59414 return positions.map(position => {
59415 const htmlRange = htmlMode.getSelectionRange(document, position);
59416 const mode = languageModes.getModeAtPosition(document, position);
59417 if (mode && mode.getSelectionRange) {
59418 let range = mode.getSelectionRange(document, position);
59420 while (top.parent && positions_1.insideRangeButNotSame(htmlRange.range, top.parent.range)) {
59423 top.parent = htmlRange;
59426 return htmlRange || languageModes_1.SelectionRange.create(languageModes_1.Range.create(position, position));
59429 exports.getSelectionRanges = getSelectionRanges;
59434 /***/ (function(module, exports, __webpack_require__) {
59438 /*---------------------------------------------------------------------------------------------
59439 * Copyright (c) Microsoft Corporation. All rights reserved.
59440 * Licensed under the MIT License. See License.txt in the project root for license information.
59441 *--------------------------------------------------------------------------------------------*/
59442 Object.defineProperty(exports, "__esModule", { value: true });
59443 function beforeOrSame(p1, p2) {
59444 return p1.line < p2.line || p1.line === p2.line && p1.character <= p2.character;
59446 exports.beforeOrSame = beforeOrSame;
59447 function insideRangeButNotSame(r1, r2) {
59448 return beforeOrSame(r1.start, r2.start) && beforeOrSame(r2.end, r1.end) && !equalRange(r1, r2);
59450 exports.insideRangeButNotSame = insideRangeButNotSame;
59451 function equalRange(r1, r2) {
59452 return r1.start.line === r2.start.line && r1.start.character === r2.start.character && r1.end.line === r2.end.line && r1.end.character === r2.end.character;
59454 exports.equalRange = equalRange;
59459 /***/ (function(module, exports, __webpack_require__) {
59463 /*---------------------------------------------------------------------------------------------
59464 * Copyright (c) Microsoft Corporation. All rights reserved.
59465 * Licensed under the MIT License. See License.txt in the project root for license information.
59466 *--------------------------------------------------------------------------------------------*/
59467 Object.defineProperty(exports, "__esModule", { value: true });
59468 const languageModes_1 = __webpack_require__(71);
59469 const positions_1 = __webpack_require__(153);
59470 function newSemanticTokenProvider(languageModes) {
59471 // combined legend across modes
59472 const legend = { types: [], modifiers: [] };
59473 const legendMappings = {};
59474 for (let mode of languageModes.getAllModes()) {
59475 if (mode.getSemanticTokenLegend && mode.getSemanticTokens) {
59476 const modeLegend = mode.getSemanticTokenLegend();
59477 legendMappings[mode.getId()] = { types: createMapping(modeLegend.types, legend.types), modifiers: createMapping(modeLegend.modifiers, legend.modifiers) };
59482 getSemanticTokens(document, ranges) {
59483 const allTokens = [];
59484 for (let mode of languageModes.getAllModesInDocument(document)) {
59485 if (mode.getSemanticTokens) {
59486 const mapping = legendMappings[mode.getId()];
59487 const tokens = mode.getSemanticTokens(document);
59488 applyTypesMapping(tokens, mapping.types);
59489 applyModifiersMapping(tokens, mapping.modifiers);
59490 for (let token of tokens) {
59491 allTokens.push(token);
59495 return encodeTokens(allTokens, ranges);
59499 exports.newSemanticTokenProvider = newSemanticTokenProvider;
59500 function createMapping(origLegend, newLegend) {
59501 const mapping = [];
59502 let needsMapping = false;
59503 for (let origIndex = 0; origIndex < origLegend.length; origIndex++) {
59504 const entry = origLegend[origIndex];
59505 let newIndex = newLegend.indexOf(entry);
59506 if (newIndex === -1) {
59507 newIndex = newLegend.length;
59508 newLegend.push(entry);
59510 mapping.push(newIndex);
59511 needsMapping = needsMapping || (newIndex !== origIndex);
59513 return needsMapping ? mapping : undefined;
59515 function applyTypesMapping(tokens, typesMapping) {
59516 if (typesMapping) {
59517 for (let token of tokens) {
59518 token.typeIdx = typesMapping[token.typeIdx];
59522 function applyModifiersMapping(tokens, modifiersMapping) {
59523 if (modifiersMapping) {
59524 for (let token of tokens) {
59525 let modifierSet = token.modifierSet;
59529 while (modifierSet > 0) {
59530 if ((modifierSet & 1) !== 0) {
59531 result = result + (1 << modifiersMapping[index]);
59534 modifierSet = modifierSet >> 1;
59536 token.modifierSet = result;
59541 const fullRange = [languageModes_1.Range.create(languageModes_1.Position.create(0, 0), languageModes_1.Position.create(Number.MAX_VALUE, 0))];
59542 function encodeTokens(tokens, ranges) {
59543 const resultTokens = tokens.sort((d1, d2) => d1.start.line - d2.start.line || d1.start.character - d2.start.character);
59545 ranges = ranges.sort((d1, d2) => d1.start.line - d2.start.line || d1.start.character - d2.start.character);
59548 ranges = fullRange;
59550 let rangeIndex = 0;
59551 let currRange = ranges[rangeIndex++];
59554 let encodedResult = [];
59555 for (let k = 0; k < resultTokens.length && currRange; k++) {
59556 const curr = resultTokens[k];
59557 const start = curr.start;
59558 while (currRange && positions_1.beforeOrSame(currRange.end, start)) {
59559 currRange = ranges[rangeIndex++];
59561 if (currRange && positions_1.beforeOrSame(currRange.start, start) && positions_1.beforeOrSame({ line: start.line, character: start.character + curr.length }, currRange.end)) {
59562 // token inside a range
59563 if (prefLine !== start.line) {
59566 encodedResult.push(start.line - prefLine); // line delta
59567 encodedResult.push(start.character - prevChar); // line delta
59568 encodedResult.push(curr.length); // length
59569 encodedResult.push(curr.typeIdx); // tokenType
59570 encodedResult.push(curr.modifierSet); // tokenModifier
59571 prefLine = start.line;
59572 prevChar = start.character;
59575 return encodedResult;