vendor: 1,373 bytes, lines 1-30
1var __create = Object.create; 2var __defProp = Object.defineProperty; 3var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 4var __getOwnPropNames = Object.getOwnPropertyNames; 5var __getProtoOf = Object.getPrototypeOf; 6var __hasOwnProp = Object.prototype.hasOwnProperty; 7var __commonJS = (cb, mod) => function __require() { 8 try { 9 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 10 } catch (e) { 11 throw mod = 0, e; 12 } 13}; 14var __copyProps = (to, from, except, desc) => { 15 if (from && typeof from === "object" || typeof from === "function") { 16 for (let key of __getOwnPropNames(from)) 17 if (!__hasOwnProp.call(to, key) && key !== except) 18 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 19 } 20 return to; 21}; 22var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 23 // If the importer is in node compatibility mode or this is not an ESM 24 // file that has been converted to a CommonJS file using a Babel- 25 // compatible transform (i.e. "__esModule" has not been set), then set 26 // "default" to the CommonJS "module.exports" for node compatibility. 27 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 28 mod 29)); 30
vendor: 51,655 bytes, lines 31-1584
31// node_modules/highlight.js/lib/core.js 32var require_core = __commonJS({ 33 "node_modules/highlight.js/lib/core.js"(exports, module) { 34 function deepFreeze(obj) { 35 if (obj instanceof Map) { 36 obj.clear = obj.delete = obj.set = function() { 37 throw new Error("map is read-only"); 38 }; 39 } else if (obj instanceof Set) { 40 obj.add = obj.clear = obj.delete = function() { 41 throw new Error("set is read-only"); 42 }; 43 } 44 Object.freeze(obj); 45 Object.getOwnPropertyNames(obj).forEach((name) => { 46 const prop = obj[name]; 47 const type = typeof prop; 48 if ((type === "object" || type === "function") && !Object.isFrozen(prop)) { 49 deepFreeze(prop); 50 } 51 }); 52 return obj; 53 } 54 var Response = class { 55 /** 56 * @param {CompiledMode} mode 57 */ 58 constructor(mode) { 59 if (mode.data === void 0) mode.data = {}; 60 this.data = mode.data; 61 this.isMatchIgnored = false; 62 } 63 ignoreMatch() { 64 this.isMatchIgnored = true; 65 } 66 }; 67 function escapeHTML(value) { 68 return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"); 69 } 70 function inherit$1(original, ...objects) { 71 const result = /* @__PURE__ */ Object.create(null); 72 for (const key in original) { 73 result[key] = original[key]; 74 } 75 objects.forEach(function(obj) { 76 for (const key in obj) { 77 result[key] = obj[key]; 78 } 79 }); 80 return ( 81 /** @type {T} */ 82 result 83 ); 84 } 85 var SPAN_CLOSE = "</span>"; 86 var emitsWrappingTags = (node) => { 87 return !!node.scope; 88 }; 89 var scopeToCSSClass = (name, { prefix }) => { 90 if (name.startsWith("language:")) { 91 return name.replace("language:", "language-"); 92 } 93 if (name.includes(".")) { 94 const pieces = name.split("."); 95 return [ 96 `${prefix}${pieces.shift()}`, 97 ...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`) 98 ].join(" "); 99 } 100 return `${prefix}${name}`; 101 }; 102 var HTMLRenderer = class { 103 /** 104 * Creates a new HTMLRenderer 105 * 106 * @param {Tree} parseTree - the parse tree (must support `walk` API) 107 * @param {{classPrefix: string}} options 108 */ 109 constructor(parseTree, options) { 110 this.buffer = ""; 111 this.classPrefix = options.classPrefix; 112 parseTree.walk(this); 113 } 114 /** 115 * Adds texts to the output stream 116 * 117 * @param {string} text */ 118 addText(text) { 119 this.buffer += escapeHTML(text); 120 } 121 /** 122 * Adds a node open to the output stream (if needed) 123 * 124 * @param {Node} node */ 125 openNode(node) { 126 if (!emitsWrappingTags(node)) return; 127 const className = scopeToCSSClass( 128 node.scope, 129 { prefix: this.classPrefix } 130 ); 131 this.span(className); 132 } 133 /** 134 * Adds a node close to the output stream (if needed) 135 * 136 * @param {Node} node */ 137 closeNode(node) { 138 if (!emitsWrappingTags(node)) return; 139 this.buffer += SPAN_CLOSE; 140 } 141 /** 142 * returns the accumulated buffer 143 */ 144 value() { 145 return this.buffer; 146 } 147 // helpers 148 /** 149 * Builds a span element 150 * 151 * @param {string} className */ 152 span(className) { 153 this.buffer += `<span class="${className}">`; 154 } 155 }; 156 var newNode = (opts = {}) => { 157 const result = { children: [] }; 158 Object.assign(result, opts); 159 return result; 160 }; 161 var TokenTree = class _TokenTree { 162 constructor() { 163 this.rootNode = newNode(); 164 this.stack = [this.rootNode]; 165 } 166 get top() { 167 return this.stack[this.stack.length - 1]; 168 } 169 get root() { 170 return this.rootNode; 171 } 172 /** @param {Node} node */ 173 add(node) { 174 this.top.children.push(node); 175 } 176 /** @param {string} scope */ 177 openNode(scope) { 178 const node = newNode({ scope }); 179 this.add(node); 180 this.stack.push(node); 181 } 182 closeNode() { 183 if (this.stack.length > 1) { 184 return this.stack.pop(); 185 } 186 return void 0; 187 } 188 closeAllNodes() { 189 while (this.closeNode()) ; 190 } 191 toJSON() { 192 return JSON.stringify(this.rootNode, null, 4); 193 } 194 /** 195 * @typedef { import("./html_renderer").Renderer } Renderer 196 * @param {Renderer} builder 197 */ 198 walk(builder) { 199 return this.constructor._walk(builder, this.rootNode); 200 } 201 /** 202 * @param {Renderer} builder 203 * @param {Node} node 204 */ 205 static _walk(builder, node) { 206 if (typeof node === "string") { 207 builder.addText(node); 208 } else if (node.children) { 209 builder.openNode(node); 210 node.children.forEach((child) => this._walk(builder, child)); 211 builder.closeNode(node); 212 } 213 return builder; 214 } 215 /** 216 * @param {Node} node 217 */ 218 static _collapse(node) { 219 if (typeof node === "string") return; 220 if (!node.children) return; 221 if (node.children.every((el) => typeof el === "string")) { 222 node.children = [node.children.join("")]; 223 } else { 224 node.children.forEach((child) => { 225 _TokenTree._collapse(child); 226 }); 227 } 228 } 229 }; 230 var TokenTreeEmitter = class extends TokenTree { 231 /** 232 * @param {*} options 233 */ 234 constructor(options) { 235 super(); 236 this.options = options; 237 } 238 /** 239 * @param {string} text 240 */ 241 addText(text) { 242 if (text === "") { 243 return; 244 } 245 this.add(text); 246 } 247 /** @param {string} scope */ 248 startScope(scope) { 249 this.openNode(scope); 250 } 251 endScope() { 252 this.closeNode(); 253 } 254 /** 255 * @param {Emitter & {root: DataNode}} emitter 256 * @param {string} name 257 */ 258 __addSublanguage(emitter, name) { 259 const node = emitter.root; 260 if (name) node.scope = `language:${name}`; 261 this.add(node); 262 } 263 toHTML() { 264 const renderer = new HTMLRenderer(this, this.options); 265 return renderer.value(); 266 } 267 finalize() { 268 this.closeAllNodes(); 269 return true; 270 } 271 }; 272 function source(re) { 273 if (!re) return null; 274 if (typeof re === "string") return re; 275 return re.source; 276 } 277 function lookahead(re) { 278 return concat("(?=", re, ")"); 279 } 280 function anyNumberOfTimes(re) { 281 return concat("(?:", re, ")*"); 282 } 283 function optional(re) { 284 return concat("(?:", re, ")?"); 285 } 286 function concat(...args) { 287 const joined = args.map((x) => source(x)).join(""); 288 return joined; 289 } 290 function stripOptionsFromArgs(args) { 291 const opts = args[args.length - 1]; 292 if (typeof opts === "object" && opts.constructor === Object) { 293 args.splice(args.length - 1, 1); 294 return opts; 295 } else { 296 return {}; 297 } 298 } 299 function either(...args) { 300 const opts = stripOptionsFromArgs(args); 301 const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")"; 302 return joined; 303 } 304 function countMatchGroups(re) { 305 return new RegExp(re.toString() + "|").exec("").length - 1; 306 } 307 function startsWith(re, lexeme) { 308 const match = re && re.exec(lexeme); 309 return match && match.index === 0; 310 } 311 var BACKREF_RE = new RegExp(either( 312 /\[(?:[^\\\]]|\\.)*\]/, 313 // a character class, inside which ( and \ lose their meaning 314 /\(\?<(?![=!])[^>]+>/, 315 // a named capture group `(?<name>` (not a lookbehind `(?<=` / `(?<!`) 316 /\(\?'[^']+'/, 317 // a named capture group `(?'name'` 318 /\(\??/, 319 // an opening parenthesis, capturing or non-capturing / lookahead 320 /\\([1-9][0-9]*)/, 321 // a backreference like `\1` 322 /\\./ 323 // any other escape sequence 324 )); 325 function _rewriteBackreferences(regexps, { joinWith }) { 326 let numCaptures = 0; 327 return regexps.map((regex) => { 328 numCaptures += 1; 329 const offset = numCaptures; 330 let re = source(regex); 331 let out = ""; 332 while (re.length > 0) { 333 const match = BACKREF_RE.exec(re); 334 if (!match) { 335 out += re; 336 break; 337 } 338 out += re.substring(0, match.index); 339 re = re.substring(match.index + match[0].length); 340 if (match[0][0] === "\\" && match[1]) { 341 out += "\\" + String(Number(match[1]) + offset); 342 } else { 343 out += match[0]; 344 if (match[0] === "(" || /^\(\?[<']/.test(match[0])) { 345 numCaptures++; 346 } 347 } 348 } 349 return out; 350 }).map((re) => `(${re})`).join(joinWith); 351 } 352 var MATCH_NOTHING_RE = /\b\B/; 353 var IDENT_RE = "[a-zA-Z]\\w*"; 354 var UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*"; 355 var NUMBER_RE = "\\b\\d+(\\.\\d+)?"; 356 var C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"; 357 var BINARY_NUMBER_RE = "\\b(0b[01]+)"; 358 var RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~"; 359 var SHEBANG = (opts = {}) => { 360 const beginShebang = /^#![ ]*\//; 361 if (opts.binary) { 362 opts.begin = concat( 363 beginShebang, 364 /.*\b/, 365 opts.binary, 366 /\b.*/ 367 ); 368 } 369 return inherit$1({ 370 scope: "meta", 371 begin: beginShebang, 372 end: /$/, 373 relevance: 0, 374 /** @type {ModeCallback} */ 375 "on:begin": (m, resp) => { 376 if (m.index !== 0) resp.ignoreMatch(); 377 } 378 }, opts); 379 }; 380 var BACKSLASH_ESCAPE = { 381 begin: "\\\\[\\s\\S]", 382 relevance: 0 383 }; 384 var APOS_STRING_MODE = { 385 scope: "string", 386 begin: "'", 387 end: "'", 388 illegal: "\\n", 389 contains: [BACKSLASH_ESCAPE] 390 }; 391 var QUOTE_STRING_MODE = { 392 scope: "string", 393 begin: '"', 394 end: '"', 395 illegal: "\\n", 396 contains: [BACKSLASH_ESCAPE] 397 }; 398 var PHRASAL_WORDS_MODE = { 399 begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ 400 }; 401 var COMMENT = function(begin, end, modeOptions = {}) { 402 const mode = inherit$1( 403 { 404 scope: "comment", 405 begin, 406 end, 407 contains: [] 408 }, 409 modeOptions 410 ); 411 mode.contains.push({ 412 scope: "doctag", 413 // hack to avoid the space from being included. the space is necessary to 414 // match here to prevent the plain text rule below from gobbling up doctags 415 begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", 416 end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/, 417 excludeBegin: true, 418 relevance: 0 419 }); 420 const ENGLISH_WORD = either( 421 // list of common 1 and 2 letter words in English 422 "I", 423 "a", 424 "is", 425 "so", 426 "us", 427 "to", 428 "at", 429 "if", 430 "in", 431 "it", 432 "on", 433 // note: this is not an exhaustive list of contractions, just popular ones 434 /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, 435 // contractions - can't we'd they're let's, etc 436 /[A-Za-z]+[-][a-z]+/, 437 // `no-way`, etc. 438 /[A-Za-z][a-z]{2,}/ 439 // allow capitalized words at beginning of sentences 440 ); 441 mode.contains.push( 442 { 443 // TODO: how to include ", (, ) without breaking grammars that use these for 444 // comment delimiters? 445 // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/ 446 // --- 447 // this tries to find sequences of 3 english words in a row (without any 448 // "programming" type syntax) this gives us a strong signal that we've 449 // TRULY found a comment - vs perhaps scanning with the wrong language. 450 // It's possible to find something that LOOKS like the start of the 451 // comment - but then if there is no readable text - good chance it is a 452 // false match and not a comment. 453 // 454 // for a visual example please see: 455 // https://github.com/highlightjs/highlight.js/issues/2827 456 begin: concat( 457 /[ ]+/, 458 // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */ 459 "(", 460 ENGLISH_WORD, 461 /[.]?[:]?([.][ ]|[ ])/, 462 "){3}" 463 ) 464 // look for 3 words in a row 465 } 466 ); 467 return mode; 468 }; 469 var C_LINE_COMMENT_MODE = COMMENT("//", "$"); 470 var C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/"); 471 var HASH_COMMENT_MODE = COMMENT("#", "$"); 472 var NUMBER_MODE = { 473 scope: "number", 474 begin: NUMBER_RE, 475 relevance: 0 476 }; 477 var C_NUMBER_MODE = { 478 scope: "number", 479 begin: C_NUMBER_RE, 480 relevance: 0 481 }; 482 var BINARY_NUMBER_MODE = { 483 scope: "number", 484 begin: BINARY_NUMBER_RE, 485 relevance: 0 486 }; 487 var REGEXP_MODE = { 488 scope: "regexp", 489 begin: /\/(?=[^/\n]*\/)/, 490 end: /\/[gimuy]*/, 491 contains: [ 492 BACKSLASH_ESCAPE, 493 { 494 begin: /\[/, 495 end: /\]/, 496 relevance: 0, 497 contains: [BACKSLASH_ESCAPE] 498 } 499 ] 500 }; 501 var TITLE_MODE = { 502 scope: "title", 503 begin: IDENT_RE, 504 relevance: 0 505 }; 506 var UNDERSCORE_TITLE_MODE = { 507 scope: "title", 508 begin: UNDERSCORE_IDENT_RE, 509 relevance: 0 510 }; 511 var METHOD_GUARD = { 512 // excludes method names from keyword processing 513 begin: "\\.\\s*" + UNDERSCORE_IDENT_RE, 514 relevance: 0 515 }; 516 var END_SAME_AS_BEGIN = function(mode) { 517 return Object.assign( 518 mode, 519 { 520 /** @type {ModeCallback} */ 521 "on:begin": (m, resp) => { 522 resp.data._beginMatch = m[1]; 523 }, 524 /** @type {ModeCallback} */ 525 "on:end": (m, resp) => { 526 if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); 527 } 528 } 529 ); 530 }; 531 var MODES = /* @__PURE__ */ Object.freeze({ 532 __proto__: null, 533 APOS_STRING_MODE, 534 BACKSLASH_ESCAPE, 535 BINARY_NUMBER_MODE, 536 BINARY_NUMBER_RE, 537 COMMENT, 538 C_BLOCK_COMMENT_MODE, 539 C_LINE_COMMENT_MODE, 540 C_NUMBER_MODE, 541 C_NUMBER_RE, 542 END_SAME_AS_BEGIN, 543 HASH_COMMENT_MODE, 544 IDENT_RE, 545 MATCH_NOTHING_RE, 546 METHOD_GUARD, 547 NUMBER_MODE, 548 NUMBER_RE, 549 PHRASAL_WORDS_MODE, 550 QUOTE_STRING_MODE, 551 REGEXP_MODE, 552 RE_STARTERS_RE, 553 SHEBANG, 554 TITLE_MODE, 555 UNDERSCORE_IDENT_RE, 556 UNDERSCORE_TITLE_MODE 557 }); 558 function skipIfHasPrecedingDot(match, response) { 559 const before = match.input[match.index - 1]; 560 if (before === ".") { 561 response.ignoreMatch(); 562 } 563 } 564 function scopeClassName(mode, _parent) { 565 if (mode.className !== void 0) { 566 mode.scope = mode.className; 567 delete mode.className; 568 } 569 } 570 function beginKeywords(mode, parent) { 571 if (!parent) return; 572 if (!mode.beginKeywords) return; 573 mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)"; 574 mode.__beforeBegin = skipIfHasPrecedingDot; 575 mode.keywords = mode.keywords || mode.beginKeywords; 576 delete mode.beginKeywords; 577 if (mode.relevance === void 0) mode.relevance = 0; 578 } 579 function compileIllegal(mode, _parent) { 580 if (!Array.isArray(mode.illegal)) return; 581 mode.illegal = either(...mode.illegal); 582 } 583 function compileMatch(mode, _parent) { 584 if (!mode.match) return; 585 if (mode.begin || mode.end) throw new Error("begin & end are not supported with match"); 586 mode.begin = mode.match; 587 delete mode.match; 588 } 589 function compileRelevance(mode, _parent) { 590 if (mode.relevance === void 0) mode.relevance = 1; 591 } 592 var beforeMatchExt = (mode, parent) => { 593 if (!mode.beforeMatch) return; 594 if (mode.starts) throw new Error("beforeMatch cannot be used with starts"); 595 const originalMode = Object.assign({}, mode); 596 Object.keys(mode).forEach((key) => { 597 delete mode[key]; 598 }); 599 mode.keywords = originalMode.keywords; 600 mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin)); 601 mode.starts = { 602 relevance: 0, 603 contains: [ 604 Object.assign(originalMode, { endsParent: true }) 605 ] 606 }; 607 mode.relevance = 0; 608 delete originalMode.beforeMatch; 609 }; 610 var COMMON_KEYWORDS = [ 611 "of", 612 "and", 613 "for", 614 "in", 615 "not", 616 "or", 617 "if", 618 "then", 619 "parent", 620 // common variable name 621 "list", 622 // common variable name 623 "value" 624 // common variable name 625 ]; 626 var DEFAULT_KEYWORD_SCOPE = "keyword"; 627 function compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) { 628 const compiledKeywords = /* @__PURE__ */ Object.create(null); 629 if (typeof rawKeywords === "string") { 630 compileList(scopeName, rawKeywords.split(" ")); 631 } else if (Array.isArray(rawKeywords)) { 632 compileList(scopeName, rawKeywords); 633 } else { 634 Object.keys(rawKeywords).forEach(function(scopeName2) { 635 Object.assign( 636 compiledKeywords, 637 compileKeywords(rawKeywords[scopeName2], caseInsensitive, scopeName2) 638 ); 639 }); 640 } 641 return compiledKeywords; 642 function compileList(scopeName2, keywordList) { 643 if (caseInsensitive) { 644 keywordList = keywordList.map((x) => x.toLowerCase()); 645 } 646 keywordList.forEach(function(keyword) { 647 const pair = keyword.split("|"); 648 compiledKeywords[pair[0]] = [scopeName2, scoreForKeyword(pair[0], pair[1])]; 649 }); 650 } 651 } 652 function scoreForKeyword(keyword, providedScore) { 653 if (providedScore) { 654 return Number(providedScore); 655 } 656 return commonKeyword(keyword) ? 0 : 1; 657 } 658 function commonKeyword(keyword) { 659 return COMMON_KEYWORDS.includes(keyword.toLowerCase()); 660 } 661 var seenDeprecations = {}; 662 var error = (message) => { 663 console.error(message); 664 }; 665 var warn = (message, ...args) => { 666 console.log(`WARN: ${message}`, ...args); 667 }; 668 var deprecated = (version2, message) => { 669 if (seenDeprecations[`${version2}/${message}`]) return; 670 console.log(`Deprecated as of ${version2}. ${message}`); 671 seenDeprecations[`${version2}/${message}`] = true; 672 }; 673 var MultiClassError = new Error(); 674 function remapScopeNames(mode, regexes, { key }) { 675 let offset = 0; 676 const scopeNames = mode[key]; 677 const emit = {}; 678 const positions = {}; 679 for (let i = 1; i <= regexes.length; i++) { 680 positions[i + offset] = scopeNames[i]; 681 emit[i + offset] = true; 682 offset += countMatchGroups(regexes[i - 1]); 683 } 684 mode[key] = positions; 685 mode[key]._emit = emit; 686 mode[key]._multi = true; 687 } 688 function beginMultiClass(mode) { 689 if (!Array.isArray(mode.begin)) return; 690 if (mode.skip || mode.excludeBegin || mode.returnBegin) { 691 error("skip, excludeBegin, returnBegin not compatible with beginScope: {}"); 692 throw MultiClassError; 693 } 694 if (typeof mode.beginScope !== "object" || mode.beginScope === null) { 695 error("beginScope must be object"); 696 throw MultiClassError; 697 } 698 remapScopeNames(mode, mode.begin, { key: "beginScope" }); 699 mode.begin = _rewriteBackreferences(mode.begin, { joinWith: "" }); 700 } 701 function endMultiClass(mode) { 702 if (!Array.isArray(mode.end)) return; 703 if (mode.skip || mode.excludeEnd || mode.returnEnd) { 704 error("skip, excludeEnd, returnEnd not compatible with endScope: {}"); 705 throw MultiClassError; 706 } 707 if (typeof mode.endScope !== "object" || mode.endScope === null) { 708 error("endScope must be object"); 709 throw MultiClassError; 710 } 711 remapScopeNames(mode, mode.end, { key: "endScope" }); 712 mode.end = _rewriteBackreferences(mode.end, { joinWith: "" }); 713 } 714 function scopeSugar(mode) { 715 if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) { 716 mode.beginScope = mode.scope; 717 delete mode.scope; 718 } 719 } 720 function MultiClass(mode) { 721 scopeSugar(mode); 722 if (typeof mode.beginScope === "string") { 723 mode.beginScope = { _wrap: mode.beginScope }; 724 } 725 if (typeof mode.endScope === "string") { 726 mode.endScope = { _wrap: mode.endScope }; 727 } 728 beginMultiClass(mode); 729 endMultiClass(mode); 730 } 731 function compileLanguage(language) { 732 function langRe(value, global) { 733 return new RegExp( 734 source(value), 735 "m" + (language.case_insensitive ? "i" : "") + (language.unicodeRegex ? "u" : "") + (global ? "g" : "") 736 ); 737 } 738 class MultiRegex { 739 constructor() { 740 this.matchIndexes = {}; 741 this.regexes = []; 742 this.matchAt = 1; 743 this.position = 0; 744 } 745 // @ts-ignore 746 addRule(re, opts) { 747 opts.position = this.position++; 748 this.matchIndexes[this.matchAt] = opts; 749 this.regexes.push([opts, re]); 750 this.matchAt += countMatchGroups(re) + 1; 751 } 752 compile() { 753 if (this.regexes.length === 0) { 754 this.exec = () => null; 755 } 756 const terminators = this.regexes.map((el) => el[1]); 757 this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: "|" }), true); 758 this.lastIndex = 0; 759 } 760 /** @param {string} s */ 761 exec(s) { 762 this.matcherRe.lastIndex = this.lastIndex; 763 const match = this.matcherRe.exec(s); 764 if (!match) { 765 return null; 766 } 767 const i = match.findIndex((el, i2) => i2 > 0 && el !== void 0); 768 const matchData = this.matchIndexes[i]; 769 match.splice(0, i); 770 return Object.assign(match, matchData); 771 } 772 } 773 class ResumableMultiRegex { 774 constructor() { 775 this.rules = []; 776 this.multiRegexes = []; 777 this.count = 0; 778 this.lastIndex = 0; 779 this.regexIndex = 0; 780 } 781 // @ts-ignore 782 getMatcher(index) { 783 if (this.multiRegexes[index]) return this.multiRegexes[index]; 784 const matcher = new MultiRegex(); 785 this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts)); 786 matcher.compile(); 787 this.multiRegexes[index] = matcher; 788 return matcher; 789 } 790 resumingScanAtSamePosition() { 791 return this.regexIndex !== 0; 792 } 793 considerAll() { 794 this.regexIndex = 0; 795 } 796 // @ts-ignore 797 addRule(re, opts) { 798 this.rules.push([re, opts]); 799 if (opts.type === "begin") this.count++; 800 } 801 /** @param {string} s */ 802 exec(s) { 803 const m = this.getMatcher(this.regexIndex); 804 m.lastIndex = this.lastIndex; 805 let result = m.exec(s); 806 if (this.resumingScanAtSamePosition()) { 807 if (result && result.index === this.lastIndex) ; 808 else { 809 const m2 = this.getMatcher(0); 810 m2.lastIndex = this.lastIndex + 1; 811 result = m2.exec(s); 812 } 813 } 814 if (result) { 815 this.regexIndex += result.position + 1; 816 if (this.regexIndex === this.count) { 817 this.considerAll(); 818 } 819 } 820 return result; 821 } 822 } 823 function buildModeRegex(mode) { 824 const mm = new ResumableMultiRegex(); 825 mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" })); 826 if (mode.terminatorEnd) { 827 mm.addRule(mode.terminatorEnd, { type: "end" }); 828 } 829 if (mode.illegal) { 830 mm.addRule(mode.illegal, { type: "illegal" }); 831 } 832 return mm; 833 } 834 function compileMode(mode, parent) { 835 const cmode = ( 836 /** @type CompiledMode */ 837 mode 838 ); 839 if (mode.isCompiled) return cmode; 840 [ 841 scopeClassName, 842 // do this early so compiler extensions generally don't have to worry about 843 // the distinction between match/begin 844 compileMatch, 845 MultiClass, 846 beforeMatchExt 847 ].forEach((ext) => ext(mode, parent)); 848 language.compilerExtensions.forEach((ext) => ext(mode, parent)); 849 mode.__beforeBegin = null; 850 [ 851 beginKeywords, 852 // do this later so compiler extensions that come earlier have access to the 853 // raw array if they wanted to perhaps manipulate it, etc. 854 compileIllegal, 855 // default to 1 relevance if not specified 856 compileRelevance 857 ].forEach((ext) => ext(mode, parent)); 858 mode.isCompiled = true; 859 let keywordPattern = null; 860 if (typeof mode.keywords === "object" && mode.keywords.$pattern) { 861 mode.keywords = Object.assign({}, mode.keywords); 862 keywordPattern = mode.keywords.$pattern; 863 delete mode.keywords.$pattern; 864 } 865 keywordPattern = keywordPattern || /\w+/; 866 if (mode.keywords) { 867 mode.keywords = compileKeywords(mode.keywords, language.case_insensitive); 868 } 869 cmode.keywordPatternRe = langRe(keywordPattern, true); 870 if (parent) { 871 if (!mode.begin) mode.begin = /\B|\b/; 872 cmode.beginRe = langRe(cmode.begin); 873 if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/; 874 if (mode.end) cmode.endRe = langRe(cmode.end); 875 cmode.terminatorEnd = source(cmode.end) || ""; 876 if (mode.endsWithParent && parent.terminatorEnd) { 877 cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd; 878 } 879 } 880 if (mode.illegal) cmode.illegalRe = langRe( 881 /** @type {RegExp | string} */ 882 mode.illegal 883 ); 884 if (!mode.contains) mode.contains = []; 885 mode.contains = [].concat(...mode.contains.map(function(c) { 886 return expandOrCloneMode(c === "self" ? mode : c); 887 })); 888 mode.contains.forEach(function(c) { 889 compileMode( 890 /** @type Mode */ 891 c, 892 cmode 893 ); 894 }); 895 if (mode.starts) { 896 compileMode(mode.starts, parent); 897 } 898 cmode.matcher = buildModeRegex(cmode); 899 return cmode; 900 } 901 if (!language.compilerExtensions) language.compilerExtensions = []; 902 if (language.contains && language.contains.includes("self")) { 903 throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation."); 904 } 905 language.classNameAliases = inherit$1(language.classNameAliases || {}); 906 return compileMode( 907 /** @type Mode */ 908 language 909 ); 910 } 911 function dependencyOnParent(mode) { 912 if (!mode) return false; 913 return mode.endsWithParent || dependencyOnParent(mode.starts); 914 } 915 function expandOrCloneMode(mode) { 916 if (mode.variants && !mode.cachedVariants) { 917 mode.cachedVariants = mode.variants.map(function(variant) { 918 return inherit$1(mode, { variants: null }, variant); 919 }); 920 } 921 if (mode.cachedVariants) { 922 return mode.cachedVariants; 923 } 924 if (dependencyOnParent(mode)) { 925 return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null }); 926 } 927 if (Object.isFrozen(mode)) { 928 return inherit$1(mode); 929 } 930 return mode; 931 } 932 var version = "11.12.0"; 933 var HTMLInjectionError = class extends Error { 934 constructor(reason, html) { 935 super(reason); 936 this.name = "HTMLInjectionError"; 937 this.html = html; 938 } 939 }; 940 var escape = escapeHTML; 941 var inherit = inherit$1; 942 var NO_MATCH = /* @__PURE__ */ Symbol("nomatch"); 943 var MAX_KEYWORD_HITS = 7; 944 var HLJS = function(hljs) { 945 const languages = /* @__PURE__ */ Object.create(null); 946 const aliases = /* @__PURE__ */ Object.create(null); 947 const plugins = []; 948 let SAFE_MODE = true; 949 const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?"; 950 const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] }; 951 let options = { 952 ignoreUnescapedHTML: false, 953 throwUnescapedHTML: false, 954 noHighlightRe: /^(no-?highlight)$/i, 955 languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, 956 classPrefix: "hljs-", 957 cssSelector: "pre code", 958 languages: null, 959 // beta configuration options, subject to change, welcome to discuss 960 // https://github.com/highlightjs/highlight.js/issues/1086 961 __emitter: TokenTreeEmitter 962 }; 963 function shouldNotHighlight(languageName) { 964 return options.noHighlightRe.test(languageName); 965 } 966 function blockLanguage(block) { 967 let classes = block.className + " "; 968 classes += block.parentNode ? block.parentNode.className : ""; 969 const match = options.languageDetectRe.exec(classes); 970 if (match) { 971 const language = getLanguage(match[1]); 972 if (!language) { 973 warn(LANGUAGE_NOT_FOUND.replace("{}", match[1])); 974 warn("Falling back to no-highlight mode for this block.", block); 975 } 976 return language ? match[1] : "no-highlight"; 977 } 978 return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class)); 979 } 980 function highlight2(codeOrLanguageName, optionsOrCode, ignoreIllegals) { 981 let code = ""; 982 let languageName = ""; 983 if (typeof optionsOrCode === "object") { 984 code = codeOrLanguageName; 985 ignoreIllegals = optionsOrCode.ignoreIllegals; 986 languageName = optionsOrCode.language; 987 } else { 988 deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated."); 989 deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"); 990 languageName = codeOrLanguageName; 991 code = optionsOrCode; 992 } 993 if (ignoreIllegals === void 0) { 994 ignoreIllegals = true; 995 } 996 const context = { 997 code, 998 language: languageName 999 }; 1000 fire("before:highlight", context); 1001 const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals); 1002 result.code = context.code; 1003 fire("after:highlight", result); 1004 return result; 1005 } 1006 function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) { 1007 const keywordHits = /* @__PURE__ */ Object.create(null); 1008 function keywordData(mode, matchText) { 1009 return mode.keywords[matchText]; 1010 } 1011 function processKeywords() { 1012 if (!top.keywords) { 1013 emitter.addText(modeBuffer); 1014 return; 1015 } 1016 let lastIndex = 0; 1017 top.keywordPatternRe.lastIndex = 0; 1018 let match = top.keywordPatternRe.exec(modeBuffer); 1019 let buf = ""; 1020 while (match) { 1021 buf += modeBuffer.substring(lastIndex, match.index); 1022 const word = language.case_insensitive ? match[0].toLowerCase() : match[0]; 1023 const data = keywordData(top, word); 1024 if (data) { 1025 const [kind, keywordRelevance] = data; 1026 emitter.addText(buf); 1027 buf = ""; 1028 keywordHits[word] = (keywordHits[word] || 0) + 1; 1029 if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance; 1030 if (kind.startsWith("_")) { 1031 buf += match[0]; 1032 } else { 1033 const cssClass = language.classNameAliases[kind] || kind; 1034 emitKeyword(match[0], cssClass); 1035 } 1036 } else { 1037 buf += match[0]; 1038 } 1039 lastIndex = top.keywordPatternRe.lastIndex; 1040 match = top.keywordPatternRe.exec(modeBuffer); 1041 } 1042 buf += modeBuffer.substring(lastIndex); 1043 emitter.addText(buf); 1044 } 1045 function processSubLanguage() { 1046 if (modeBuffer === "") return; 1047 let result2 = null; 1048 if (typeof top.subLanguage === "string") { 1049 if (!languages[top.subLanguage]) { 1050 emitter.addText(modeBuffer); 1051 return; 1052 } 1053 result2 = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]); 1054 continuations[top.subLanguage] = /** @type {CompiledMode} */ 1055 result2._top; 1056 } else { 1057 result2 = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null); 1058 } 1059 if (top.relevance > 0) { 1060 relevance += result2.relevance; 1061 } 1062 emitter.__addSublanguage(result2._emitter, result2.language); 1063 } 1064 function processBuffer() { 1065 if (top.subLanguage != null) { 1066 processSubLanguage(); 1067 } else { 1068 processKeywords(); 1069 } 1070 modeBuffer = ""; 1071 } 1072 function emitKeyword(keyword, scope) { 1073 if (keyword === "") return; 1074 emitter.startScope(scope); 1075 emitter.addText(keyword); 1076 emitter.endScope(); 1077 } 1078 function emitMultiClass(scope, match) { 1079 let i = 1; 1080 const max = match.length - 1; 1081 while (i <= max) { 1082 if (!scope._emit[i]) { 1083 i++; 1084 continue; 1085 } 1086 const klass = language.classNameAliases[scope[i]] || scope[i]; 1087 const text = match[i]; 1088 if (klass) { 1089 emitKeyword(text, klass); 1090 } else { 1091 modeBuffer = text; 1092 processKeywords(); 1093 modeBuffer = ""; 1094 } 1095 i++; 1096 } 1097 } 1098 function startNewMode(mode, match) { 1099 if (mode.scope && typeof mode.scope === "string") { 1100 emitter.openNode(language.classNameAliases[mode.scope] || mode.scope); 1101 } 1102 if (mode.beginScope) { 1103 if (mode.beginScope._wrap) { 1104 emitKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap); 1105 modeBuffer = ""; 1106 } else if (mode.beginScope._multi) { 1107 emitMultiClass(mode.beginScope, match); 1108 modeBuffer = ""; 1109 } 1110 } 1111 top = Object.create(mode, { parent: { value: top } }); 1112 return top; 1113 } 1114 function endOfMode(mode, match, matchPlusRemainder) { 1115 let matched = startsWith(mode.endRe, matchPlusRemainder); 1116 if (matched) { 1117 if (mode["on:end"]) { 1118 const resp = new Response(mode); 1119 mode["on:end"](match, resp); 1120 if (resp.isMatchIgnored) matched = false; 1121 } 1122 if (matched) { 1123 while (mode.endsParent && mode.parent) { 1124 mode = mode.parent; 1125 } 1126 return mode; 1127 } 1128 } 1129 if (mode.endsWithParent) { 1130 return endOfMode(mode.parent, match, matchPlusRemainder); 1131 } 1132 } 1133 function doIgnore(lexeme) { 1134 if (top.matcher.regexIndex === 0) { 1135 modeBuffer += lexeme[0]; 1136 return 1; 1137 } else { 1138 resumeScanAtSamePosition = true; 1139 return 0; 1140 } 1141 } 1142 function doBeginMatch(match) { 1143 const lexeme = match[0]; 1144 const newMode = match.rule; 1145 const resp = new Response(newMode); 1146 const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]]; 1147 for (const cb of beforeCallbacks) { 1148 if (!cb) continue; 1149 cb(match, resp); 1150 if (resp.isMatchIgnored) return doIgnore(lexeme); 1151 } 1152 if (newMode.skip) { 1153 modeBuffer += lexeme; 1154 } else { 1155 if (newMode.excludeBegin) { 1156 modeBuffer += lexeme; 1157 } 1158 processBuffer(); 1159 if (!newMode.returnBegin && !newMode.excludeBegin) { 1160 modeBuffer = lexeme; 1161 } 1162 } 1163 startNewMode(newMode, match); 1164 return newMode.returnBegin ? 0 : lexeme.length; 1165 } 1166 function doEndMatch(match) { 1167 const lexeme = match[0]; 1168 const matchPlusRemainder = codeToHighlight.substring(match.index); 1169 const endMode = endOfMode(top, match, matchPlusRemainder); 1170 if (!endMode) { 1171 return NO_MATCH; 1172 } 1173 const origin = top; 1174 if (top.endScope && top.endScope._wrap) { 1175 processBuffer(); 1176 emitKeyword(lexeme, top.endScope._wrap); 1177 } else if (top.endScope && top.endScope._multi) { 1178 processBuffer(); 1179 emitMultiClass(top.endScope, match); 1180 } else if (origin.skip) { 1181 modeBuffer += lexeme; 1182 } else { 1183 if (!(origin.returnEnd || origin.excludeEnd)) { 1184 modeBuffer += lexeme; 1185 } 1186 processBuffer(); 1187 if (origin.excludeEnd) { 1188 modeBuffer = lexeme; 1189 } 1190 } 1191 do { 1192 if (top.scope) { 1193 emitter.closeNode(); 1194 } 1195 if (!top.skip && !top.subLanguage) { 1196 relevance += top.relevance; 1197 } 1198 top = top.parent; 1199 } while (top !== endMode.parent); 1200 if (endMode.starts) { 1201 startNewMode(endMode.starts, match); 1202 } 1203 return origin.returnEnd ? 0 : lexeme.length; 1204 } 1205 function processContinuations() { 1206 const list = []; 1207 for (let current = top; current !== language; current = current.parent) { 1208 if (current.scope) { 1209 list.unshift(current.scope); 1210 } 1211 } 1212 list.forEach((item) => emitter.openNode(item)); 1213 } 1214 let lastMatch = {}; 1215 function processLexeme(textBeforeMatch, match) { 1216 const lexeme = match && match[0]; 1217 modeBuffer += textBeforeMatch; 1218 if (lexeme == null) { 1219 processBuffer(); 1220 return 0; 1221 } 1222 if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") { 1223 modeBuffer += codeToHighlight.slice(match.index, match.index + 1); 1224 if (!SAFE_MODE) { 1225 const err = new Error(`0 width match regex (${languageName})`); 1226 err.languageName = languageName; 1227 err.badRule = lastMatch.rule; 1228 throw err; 1229 } 1230 return 1; 1231 } 1232 lastMatch = match; 1233 if (match.type === "begin") { 1234 return doBeginMatch(match); 1235 } else if (match.type === "illegal" && !ignoreIllegals) { 1236 const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.scope || "<unnamed>") + '"'); 1237 err.mode = top; 1238 throw err; 1239 } else if (match.type === "end") { 1240 const processed = doEndMatch(match); 1241 if (processed !== NO_MATCH) { 1242 return processed; 1243 } 1244 } 1245 if (match.type === "illegal" && lexeme === "") { 1246 if (match.index === codeToHighlight.length) ; 1247 else { 1248 modeBuffer += "\n"; 1249 } 1250 return 1; 1251 } 1252 if (iterations > 1e5 && iterations > match.index * 3) { 1253 const err = new Error("potential infinite loop, way more iterations than matches"); 1254 throw err; 1255 } 1256 modeBuffer += lexeme; 1257 return lexeme.length; 1258 } 1259 const language = getLanguage(languageName); 1260 if (!language) { 1261 error(LANGUAGE_NOT_FOUND.replace("{}", languageName)); 1262 throw new Error('Unknown language: "' + languageName + '"'); 1263 } 1264 const md = compileLanguage(language); 1265 let result = ""; 1266 let top = continuation || md; 1267 const continuations = {}; 1268 const emitter = new options.__emitter(options); 1269 processContinuations(); 1270 let modeBuffer = ""; 1271 let relevance = 0; 1272 let index = 0; 1273 let iterations = 0; 1274 let resumeScanAtSamePosition = false; 1275 try { 1276 if (!language.__emitTokens) { 1277 top.matcher.considerAll(); 1278 for (; ; ) { 1279 iterations++; 1280 if (resumeScanAtSamePosition) { 1281 resumeScanAtSamePosition = false; 1282 } else { 1283 top.matcher.considerAll(); 1284 } 1285 top.matcher.lastIndex = index; 1286 const match = top.matcher.exec(codeToHighlight); 1287 if (!match) break; 1288 const beforeMatch = codeToHighlight.substring(index, match.index); 1289 const processedCount = processLexeme(beforeMatch, match); 1290 index = match.index + processedCount; 1291 } 1292 processLexeme(codeToHighlight.substring(index)); 1293 } else { 1294 language.__emitTokens(codeToHighlight, emitter); 1295 } 1296 emitter.finalize(); 1297 result = emitter.toHTML(); 1298 return { 1299 language: languageName, 1300 value: result, 1301 relevance, 1302 illegal: false, 1303 _emitter: emitter, 1304 _top: top 1305 }; 1306 } catch (err) { 1307 if (err.message && err.message.includes("Illegal")) { 1308 return { 1309 language: languageName, 1310 value: escape(codeToHighlight), 1311 illegal: true, 1312 relevance: 0, 1313 _illegalBy: { 1314 message: err.message, 1315 index, 1316 context: codeToHighlight.slice(index - 100, index + 100), 1317 mode: err.mode, 1318 resultSoFar: result 1319 }, 1320 _emitter: emitter 1321 }; 1322 } else if (SAFE_MODE) { 1323 return { 1324 language: languageName, 1325 value: escape(codeToHighlight), 1326 illegal: false, 1327 relevance: 0, 1328 errorRaised: err, 1329 _emitter: emitter, 1330 _top: top 1331 }; 1332 } else { 1333 throw err; 1334 } 1335 } 1336 } 1337 function justTextHighlightResult(code) { 1338 const result = { 1339 value: escape(code), 1340 illegal: false, 1341 relevance: 0, 1342 _top: PLAINTEXT_LANGUAGE, 1343 _emitter: new options.__emitter(options) 1344 }; 1345 result._emitter.addText(code); 1346 return result; 1347 } 1348 function highlightAuto(code, languageSubset) { 1349 languageSubset = languageSubset || options.languages || Object.keys(languages); 1350 const plaintext = justTextHighlightResult(code); 1351 const results = languageSubset.filter(getLanguage).filter(autoDetection).map( 1352 (name) => _highlight(name, code, false) 1353 ); 1354 results.unshift(plaintext); 1355 const sorted = results.sort((a, b) => { 1356 if (a.relevance !== b.relevance) return b.relevance - a.relevance; 1357 if (a.language && b.language) { 1358 if (getLanguage(a.language).supersetOf === b.language) { 1359 return 1; 1360 } else if (getLanguage(b.language).supersetOf === a.language) { 1361 return -1; 1362 } 1363 } 1364 return 0; 1365 }); 1366 const [best, secondBest] = sorted; 1367 const result = best; 1368 result.secondBest = secondBest; 1369 return result; 1370 } 1371 function updateClassName(element, currentLang, resultLang) { 1372 const language = currentLang && aliases[currentLang] || resultLang; 1373 element.classList.add("hljs"); 1374 element.classList.add(`language-${language}`); 1375 } 1376 function highlightElement(element) { 1377 let node = null; 1378 const language = blockLanguage(element); 1379 if (shouldNotHighlight(language)) return; 1380 fire( 1381 "before:highlightElement", 1382 { el: element, language } 1383 ); 1384 if (element.dataset.highlighted) { 1385 console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", element); 1386 return; 1387 } 1388 if (element.children.length > 0) { 1389 if (!options.ignoreUnescapedHTML) { 1390 console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."); 1391 console.warn("https://github.com/highlightjs/highlight.js/wiki/security"); 1392 console.warn("The element with unescaped HTML:"); 1393 console.warn(element); 1394 } 1395 if (options.throwUnescapedHTML) { 1396 const err = new HTMLInjectionError( 1397 "One of your code blocks includes unescaped HTML.", 1398 element.innerHTML 1399 ); 1400 throw err; 1401 } 1402 } 1403 node = element; 1404 const text = node.textContent; 1405 const result = language ? highlight2(text, { language, ignoreIllegals: true }) : highlightAuto(text); 1406 element.innerHTML = result.value; 1407 element.dataset.highlighted = "yes"; 1408 updateClassName(element, language, result.language); 1409 element.result = { 1410 language: result.language, 1411 // TODO: remove with version 11.0 1412 re: result.relevance, 1413 relevance: result.relevance 1414 }; 1415 if (result.secondBest) { 1416 element.secondBest = { 1417 language: result.secondBest.language, 1418 relevance: result.secondBest.relevance 1419 }; 1420 } 1421 fire("after:highlightElement", { el: element, result, text }); 1422 } 1423 function configure(userOptions) { 1424 options = inherit(options, userOptions); 1425 } 1426 const initHighlighting = () => { 1427 highlightAll(); 1428 deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now."); 1429 }; 1430 function initHighlightingOnLoad() { 1431 highlightAll(); 1432 deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now."); 1433 } 1434 let wantsHighlight = false; 1435 function highlightAll() { 1436 function boot() { 1437 highlightAll(); 1438 } 1439 if (document.readyState === "loading") { 1440 if (!wantsHighlight) { 1441 window.addEventListener("DOMContentLoaded", boot, false); 1442 } 1443 wantsHighlight = true; 1444 return; 1445 } 1446 const blocks = document.querySelectorAll(options.cssSelector); 1447 blocks.forEach(highlightElement); 1448 } 1449 function registerLanguage(languageName, languageDefinition) { 1450 let lang = null; 1451 try { 1452 lang = languageDefinition(hljs); 1453 } catch (error$1) { 1454 error("Language definition for '{}' could not be registered.".replace("{}", languageName)); 1455 if (!SAFE_MODE) { 1456 throw error$1; 1457 } else { 1458 error(error$1); 1459 } 1460 lang = PLAINTEXT_LANGUAGE; 1461 } 1462 if (!lang.name) lang.name = languageName; 1463 languages[languageName] = lang; 1464 lang.rawDefinition = languageDefinition.bind(null, hljs); 1465 if (lang.aliases) { 1466 registerAliases(lang.aliases, { languageName }); 1467 } 1468 } 1469 function unregisterLanguage(languageName) { 1470 delete languages[languageName]; 1471 for (const alias of Object.keys(aliases)) { 1472 if (aliases[alias] === languageName) { 1473 delete aliases[alias]; 1474 } 1475 } 1476 } 1477 function listLanguages() { 1478 return Object.keys(languages); 1479 } 1480 function getLanguage(name) { 1481 name = (name || "").toLowerCase(); 1482 return languages[name] || languages[aliases[name]]; 1483 } 1484 function registerAliases(aliasList, { languageName }) { 1485 if (typeof aliasList === "string") { 1486 aliasList = [aliasList]; 1487 } 1488 aliasList.forEach((alias) => { 1489 aliases[alias.toLowerCase()] = languageName; 1490 }); 1491 } 1492 function autoDetection(name) { 1493 const lang = getLanguage(name); 1494 return lang && !lang.disableAutodetect; 1495 } 1496 function upgradePluginAPI(plugin) { 1497 if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) { 1498 plugin["before:highlightElement"] = (data) => { 1499 plugin["before:highlightBlock"]( 1500 Object.assign({ block: data.el }, data) 1501 ); 1502 }; 1503 } 1504 if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) { 1505 plugin["after:highlightElement"] = (data) => { 1506 plugin["after:highlightBlock"]( 1507 Object.assign({ block: data.el }, data) 1508 ); 1509 }; 1510 } 1511 } 1512 function addPlugin(plugin) { 1513 upgradePluginAPI(plugin); 1514 plugins.push(plugin); 1515 } 1516 function removePlugin(plugin) { 1517 const index = plugins.indexOf(plugin); 1518 if (index !== -1) { 1519 plugins.splice(index, 1); 1520 } 1521 } 1522 function fire(event, args) { 1523 const cb = event; 1524 plugins.forEach(function(plugin) { 1525 if (plugin[cb]) { 1526 plugin[cb](args); 1527 } 1528 }); 1529 } 1530 function deprecateHighlightBlock(el) { 1531 deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0"); 1532 deprecated("10.7.0", "Please use highlightElement now."); 1533 return highlightElement(el); 1534 } 1535 Object.assign(hljs, { 1536 highlight: highlight2, 1537 highlightAuto, 1538 highlightAll, 1539 highlightElement, 1540 // TODO: Remove with v12 API 1541 highlightBlock: deprecateHighlightBlock, 1542 configure, 1543 initHighlighting, 1544 initHighlightingOnLoad, 1545 registerLanguage, 1546 unregisterLanguage, 1547 listLanguages, 1548 getLanguage, 1549 registerAliases, 1550 autoDetection, 1551 inherit, 1552 addPlugin, 1553 removePlugin 1554 }); 1555 hljs.debugMode = function() { 1556 SAFE_MODE = false; 1557 }; 1558 hljs.safeMode = function() { 1559 SAFE_MODE = true; 1560 }; 1561 hljs.versionString = version; 1562 hljs.regex = { 1563 concat, 1564 lookahead, 1565 either, 1566 optional, 1567 anyNumberOfTimes 1568 }; 1569 for (const key in MODES) { 1570 if (typeof MODES[key] === "object") { 1571 deepFreeze(MODES[key]); 1572 } 1573 } 1574 Object.assign(hljs, MODES); 1575 return hljs; 1576 }; 1577 var highlight = HLJS({}); 1578 highlight.newInstance = () => HLJS({}); 1579 module.exports = highlight; 1580 highlight.HighlightJS = highlight; 1581 highlight.default = highlight; 1582 } 1583}); 1584
vendor: 5,966 bytes, lines 1585-1808
1585// node_modules/highlight.js/lib/languages/xml.js 1586var require_xml = __commonJS({ 1587 "node_modules/highlight.js/lib/languages/xml.js"(exports, module) { 1588 function xml(hljs) { 1589 const regex = hljs.regex; 1590 const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u); 1591 const XML_IDENT_RE = /[\p{L}0-9._:-]+/u; 1592 const XML_ENTITIES = { 1593 className: "symbol", 1594 begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/ 1595 }; 1596 const XML_META_KEYWORDS = { 1597 begin: /\s/, 1598 contains: [ 1599 { 1600 className: "keyword", 1601 begin: /#?[a-z_][a-z1-9_-]+/, 1602 illegal: /\n/ 1603 } 1604 ] 1605 }; 1606 const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, { 1607 begin: /\(/, 1608 end: /\)/ 1609 }); 1610 const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, { className: "string" }); 1611 const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, { className: "string" }); 1612 const TAG_INTERNALS = { 1613 endsWithParent: true, 1614 illegal: /</, 1615 relevance: 0, 1616 contains: [ 1617 { 1618 className: "attr", 1619 begin: XML_IDENT_RE, 1620 relevance: 0 1621 }, 1622 { 1623 begin: /=\s*/, 1624 relevance: 0, 1625 contains: [ 1626 { 1627 className: "string", 1628 endsParent: true, 1629 variants: [ 1630 { 1631 begin: /"/, 1632 end: /"/, 1633 contains: [XML_ENTITIES] 1634 }, 1635 { 1636 begin: /'/, 1637 end: /'/, 1638 contains: [XML_ENTITIES] 1639 }, 1640 { begin: /[^\s"'=<>`]+/ } 1641 ] 1642 } 1643 ] 1644 } 1645 ] 1646 }; 1647 return { 1648 name: "HTML, XML", 1649 aliases: [ 1650 "html", 1651 "xhtml", 1652 "rss", 1653 "atom", 1654 "xjb", 1655 "xsd", 1656 "xsl", 1657 "plist", 1658 "wsf", 1659 "svg" 1660 ], 1661 case_insensitive: true, 1662 unicodeRegex: true, 1663 contains: [ 1664 { 1665 className: "meta", 1666 begin: /<![a-z]/, 1667 end: />/, 1668 relevance: 10, 1669 contains: [ 1670 XML_META_KEYWORDS, 1671 QUOTE_META_STRING_MODE, 1672 APOS_META_STRING_MODE, 1673 XML_META_PAR_KEYWORDS, 1674 { 1675 begin: /\[/, 1676 end: /\]/, 1677 contains: [ 1678 { 1679 className: "meta", 1680 begin: /<![a-z]/, 1681 end: />/, 1682 contains: [ 1683 XML_META_KEYWORDS, 1684 XML_META_PAR_KEYWORDS, 1685 QUOTE_META_STRING_MODE, 1686 APOS_META_STRING_MODE 1687 ] 1688 } 1689 ] 1690 } 1691 ] 1692 }, 1693 hljs.COMMENT( 1694 /<!--/, 1695 /-->/, 1696 { relevance: 10 } 1697 ), 1698 { 1699 begin: /<!\[CDATA\[/, 1700 end: /\]\]>/, 1701 relevance: 10 1702 }, 1703 XML_ENTITIES, 1704 // xml processing instructions 1705 { 1706 className: "meta", 1707 end: /\?>/, 1708 variants: [ 1709 { 1710 begin: /<\?xml/, 1711 relevance: 10, 1712 contains: [ 1713 QUOTE_META_STRING_MODE 1714 ] 1715 }, 1716 { 1717 begin: /<\?[a-z][a-z0-9]+/ 1718 } 1719 ] 1720 }, 1721 { 1722 className: "tag", 1723 /* 1724 The lookahead pattern (?=...) ensures that 'begin' only matches 1725 '<style' as a single word, followed by a whitespace or an 1726 ending bracket. 1727 */ 1728 begin: /<style(?=\s|>)/, 1729 end: />/, 1730 keywords: { name: "style" }, 1731 contains: [TAG_INTERNALS], 1732 starts: { 1733 end: /<\/style>/, 1734 returnEnd: true, 1735 subLanguage: "css" 1736 } 1737 }, 1738 { 1739 className: "tag", 1740 // See the comment in the <style tag about the lookahead pattern 1741 begin: /<script(?=\s|>)/, 1742 end: />/, 1743 keywords: { name: "script" }, 1744 contains: [TAG_INTERNALS], 1745 starts: { 1746 end: /<\/script>/, 1747 returnEnd: true, 1748 subLanguage: "javascript" 1749 } 1750 }, 1751 // we need this for now for jSX 1752 { 1753 className: "tag", 1754 begin: /<>|<\/>/ 1755 }, 1756 // open tag 1757 { 1758 className: "tag", 1759 begin: regex.concat( 1760 /</, 1761 regex.lookahead(regex.concat( 1762 TAG_NAME_RE, 1763 // <tag/> 1764 // <tag> 1765 // <tag ... 1766 regex.either(/\/>/, />/, /\s/) 1767 )) 1768 ), 1769 end: /\/?>/, 1770 contains: [ 1771 { 1772 className: "name", 1773 begin: TAG_NAME_RE, 1774 relevance: 0, 1775 starts: TAG_INTERNALS 1776 } 1777 ] 1778 }, 1779 // close tag 1780 { 1781 className: "tag", 1782 begin: regex.concat( 1783 /<\//, 1784 regex.lookahead(regex.concat( 1785 TAG_NAME_RE, 1786 />/ 1787 )) 1788 ), 1789 contains: [ 1790 { 1791 className: "name", 1792 begin: TAG_NAME_RE, 1793 relevance: 0 1794 }, 1795 { 1796 begin: />/, 1797 relevance: 0, 1798 endsParent: true 1799 } 1800 ] 1801 } 1802 ] 1803 }; 1804 } 1805 module.exports = xml; 1806 } 1807}); 1808
vendor: 7,911 bytes, lines 1809-2207
1809// node_modules/highlight.js/lib/languages/bash.js 1810var require_bash = __commonJS({ 1811 "node_modules/highlight.js/lib/languages/bash.js"(exports, module) { 1812 function bash(hljs) { 1813 const regex = hljs.regex; 1814 const VAR = {}; 1815 const BRACED_VAR = { 1816 begin: /\$\{/, 1817 end: /\}/, 1818 contains: [ 1819 "self", 1820 { 1821 begin: /:-/, 1822 contains: [VAR] 1823 } 1824 // default values 1825 ] 1826 }; 1827 Object.assign(VAR, { 1828 className: "variable", 1829 variants: [ 1830 { begin: regex.concat( 1831 /\$[\w\d#@][\w\d_]*/, 1832 // negative look-ahead tries to avoid matching patterns that are not 1833 // Perl at all like $ident$, @ident@, etc. 1834 `(?![\\w\\d])(?![$])` 1835 ) }, 1836 BRACED_VAR 1837 ] 1838 }); 1839 const SUBST = { 1840 className: "subst", 1841 begin: /\$\(/, 1842 end: /\)/, 1843 contains: [hljs.BACKSLASH_ESCAPE] 1844 }; 1845 const COMMENT = hljs.inherit( 1846 hljs.COMMENT(), 1847 { 1848 match: [ 1849 /(^|\s)/, 1850 /#.*$/ 1851 ], 1852 scope: { 1853 2: "comment" 1854 } 1855 } 1856 ); 1857 const HERE_DOC = { 1858 begin: /<<-?\s*(?=\w+)/, 1859 starts: { contains: [ 1860 hljs.END_SAME_AS_BEGIN({ 1861 begin: /(\w+)/, 1862 end: /(\w+)/, 1863 className: "string" 1864 }) 1865 ] } 1866 }; 1867 const QUOTE_STRING = { 1868 className: "string", 1869 begin: /"/, 1870 end: /"/, 1871 contains: [ 1872 hljs.BACKSLASH_ESCAPE, 1873 VAR, 1874 SUBST 1875 ] 1876 }; 1877 SUBST.contains.push(QUOTE_STRING); 1878 const ESCAPED_QUOTE = { 1879 match: /\\"/ 1880 }; 1881 const APOS_STRING = { 1882 className: "string", 1883 begin: /'/, 1884 end: /'/ 1885 }; 1886 const ESCAPED_APOS = { 1887 match: /\\'/ 1888 }; 1889 const ARITHMETIC = { 1890 begin: /\$?\(\(/, 1891 end: /\)\)/, 1892 contains: [ 1893 { 1894 begin: /\d+#[0-9a-f]+/, 1895 className: "number" 1896 }, 1897 hljs.NUMBER_MODE, 1898 VAR 1899 ] 1900 }; 1901 const SH_LIKE_SHELLS = [ 1902 "fish", 1903 "bash", 1904 "zsh", 1905 "sh", 1906 "csh", 1907 "ksh", 1908 "tcsh", 1909 "dash", 1910 "scsh" 1911 ]; 1912 const KNOWN_SHEBANG = hljs.SHEBANG({ 1913 binary: `(${SH_LIKE_SHELLS.join("|")})`, 1914 relevance: 10 1915 }); 1916 const FUNCTION = { 1917 className: "function", 1918 begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, 1919 returnBegin: true, 1920 contains: [hljs.inherit(hljs.TITLE_MODE, { begin: /\w[\w\d_]*/ })], 1921 relevance: 0 1922 }; 1923 const KEYWORDS = [ 1924 "if", 1925 "then", 1926 "else", 1927 "elif", 1928 "fi", 1929 "time", 1930 "for", 1931 "while", 1932 "until", 1933 "in", 1934 "do", 1935 "done", 1936 "case", 1937 "esac", 1938 "coproc", 1939 "function", 1940 "select" 1941 ]; 1942 const LITERALS = [ 1943 "true", 1944 "false" 1945 ]; 1946 const PATH_MODE = { match: /(\/[a-z._-]+)+/ }; 1947 const SHELL_BUILT_INS = [ 1948 "break", 1949 "cd", 1950 "continue", 1951 "eval", 1952 "exec", 1953 "exit", 1954 "export", 1955 "getopts", 1956 "hash", 1957 "pwd", 1958 "readonly", 1959 "return", 1960 "shift", 1961 "test", 1962 "times", 1963 "trap", 1964 "umask", 1965 "unset" 1966 ]; 1967 const BASH_BUILT_INS = [ 1968 "alias", 1969 "bind", 1970 "builtin", 1971 "caller", 1972 "command", 1973 "declare", 1974 "echo", 1975 "enable", 1976 "help", 1977 "let", 1978 "local", 1979 "logout", 1980 "mapfile", 1981 "printf", 1982 "read", 1983 "readarray", 1984 "source", 1985 "sudo", 1986 "type", 1987 "typeset", 1988 "ulimit", 1989 "unalias" 1990 ]; 1991 const ZSH_BUILT_INS = [ 1992 "autoload", 1993 "bg", 1994 "bindkey", 1995 "bye", 1996 "cap", 1997 "chdir", 1998 "clone", 1999 "comparguments", 2000 "compcall", 2001 "compctl", 2002 "compdescribe", 2003 "compfiles", 2004 "compgroups", 2005 "compquote", 2006 "comptags", 2007 "comptry", 2008 "compvalues", 2009 "dirs", 2010 "disable", 2011 "disown", 2012 "echotc", 2013 "echoti", 2014 "emulate", 2015 "fc", 2016 "fg", 2017 "float", 2018 "functions", 2019 "getcap", 2020 "getln", 2021 "history", 2022 "integer", 2023 "jobs", 2024 "kill", 2025 "limit", 2026 "log", 2027 "noglob", 2028 "popd", 2029 "print", 2030 "pushd", 2031 "pushln", 2032 "rehash", 2033 "sched", 2034 "setcap", 2035 "setopt", 2036 "stat", 2037 "suspend", 2038 "ttyctl", 2039 "unfunction", 2040 "unhash", 2041 "unlimit", 2042 "unsetopt", 2043 "vared", 2044 "wait", 2045 "whence", 2046 "where", 2047 "which", 2048 "zcompile", 2049 "zformat", 2050 "zftp", 2051 "zle", 2052 "zmodload", 2053 "zparseopts", 2054 "zprof", 2055 "zpty", 2056 "zregexparse", 2057 "zsocket", 2058 "zstyle", 2059 "ztcp" 2060 ]; 2061 const GNU_CORE_UTILS = [ 2062 "chcon", 2063 "chgrp", 2064 "chown", 2065 "chmod", 2066 "cp", 2067 "dd", 2068 "df", 2069 "dir", 2070 "dircolors", 2071 "ln", 2072 "ls", 2073 "mkdir", 2074 "mkfifo", 2075 "mknod", 2076 "mktemp", 2077 "mv", 2078 "realpath", 2079 "rm", 2080 "rmdir", 2081 "shred", 2082 "sync", 2083 "touch", 2084 "truncate", 2085 "vdir", 2086 "b2sum", 2087 "base32", 2088 "base64", 2089 "cat", 2090 "cksum", 2091 "comm", 2092 "csplit", 2093 "cut", 2094 "expand", 2095 "fmt", 2096 "fold", 2097 "head", 2098 "join", 2099 "md5sum", 2100 "nl", 2101 "numfmt", 2102 "od", 2103 "paste", 2104 "ptx", 2105 "pr", 2106 "sha1sum", 2107 "sha224sum", 2108 "sha256sum", 2109 "sha384sum", 2110 "sha512sum", 2111 "shuf", 2112 "sort", 2113 "split", 2114 "sum", 2115 "tac", 2116 "tail", 2117 "tr", 2118 "tsort", 2119 "unexpand", 2120 "uniq", 2121 "wc", 2122 "arch", 2123 "basename", 2124 "chroot", 2125 "date", 2126 "dirname", 2127 "du", 2128 "echo", 2129 "env", 2130 "expr", 2131 "factor", 2132 // "false", // keyword literal already 2133 "groups", 2134 "hostid", 2135 "id", 2136 "link", 2137 "logname", 2138 "nice", 2139 "nohup", 2140 "nproc", 2141 "pathchk", 2142 "pinky", 2143 "printenv", 2144 "printf", 2145 "pwd", 2146 "readlink", 2147 "runcon", 2148 "seq", 2149 "sleep", 2150 "stat", 2151 "stdbuf", 2152 "stty", 2153 "tee", 2154 "test", 2155 "timeout", 2156 // "true", // keyword literal already 2157 "tty", 2158 "uname", 2159 "unlink", 2160 "uptime", 2161 "users", 2162 "who", 2163 "whoami", 2164 "yes" 2165 ]; 2166 return { 2167 name: "Bash", 2168 aliases: [ 2169 "sh", 2170 "zsh" 2171 ], 2172 keywords: { 2173 $pattern: /\b[a-z][a-z0-9._-]+\b/, 2174 keyword: KEYWORDS, 2175 literal: LITERALS, 2176 built_in: [ 2177 ...SHELL_BUILT_INS, 2178 ...BASH_BUILT_INS, 2179 // Shell modifiers 2180 "set", 2181 "shopt", 2182 ...ZSH_BUILT_INS, 2183 ...GNU_CORE_UTILS 2184 ] 2185 }, 2186 contains: [ 2187 KNOWN_SHEBANG, 2188 // to catch known shells and boost relevancy 2189 hljs.SHEBANG(), 2190 // to catch unknown shells but still highlight the shebang 2191 FUNCTION, 2192 ARITHMETIC, 2193 COMMENT, 2194 HERE_DOC, 2195 PATH_MODE, 2196 QUOTE_STRING, 2197 ESCAPED_QUOTE, 2198 APOS_STRING, 2199 ESCAPED_APOS, 2200 VAR 2201 ] 2202 }; 2203 } 2204 module.exports = bash; 2205 } 2206}); 2207
vendor: 10,772 bytes, lines 2208-2569
2208// node_modules/highlight.js/lib/languages/c.js 2209var require_c = __commonJS({ 2210 "node_modules/highlight.js/lib/languages/c.js"(exports, module) { 2211 function c(hljs) { 2212 const regex = hljs.regex; 2213 const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }); 2214 const DECLTYPE_AUTO_RE = "decltype\\(auto\\)"; 2215 const NAMESPACE_RE = "[a-zA-Z_]\\w*::"; 2216 const TEMPLATE_ARGUMENT_RE = "<[^<>]+>"; 2217 const FUNCTION_TYPE_RE = "(" + DECLTYPE_AUTO_RE + "|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional(TEMPLATE_ARGUMENT_RE) + ")"; 2218 const ATOMIC_TYPES = regex.concat(/\batomic_/, regex.either( 2219 "bool", 2220 "char", 2221 "schar", 2222 "uchar", 2223 "short", 2224 "ushort", 2225 "int", 2226 "uint", 2227 "long", 2228 "ulong", 2229 "llong", 2230 "ullong", 2231 "char16_t", 2232 "char32_t", 2233 "wchar_t", 2234 "int_least8_t", 2235 "uint_least8_t", 2236 "int_least16_t", 2237 "uint_least16_t", 2238 "int_least32_t", 2239 "uint_least32_t", 2240 "int_least64_t", 2241 "uint_least64_t", 2242 "int_fast8_t", 2243 "uint_fast8_t", 2244 "int_fast16_t", 2245 "uint_fast16_t", 2246 "int_fast32_t", 2247 "uint_fast32_t", 2248 "int_fast64_t", 2249 "uint_fast64_t", 2250 "intptr_t", 2251 "uintptr_t", 2252 "size_t", 2253 "ptrdiff_t", 2254 "intmax_t", 2255 "uintmax_t" 2256 ), /\b/); 2257 const TYPES = { 2258 className: "type", 2259 variants: [ 2260 { begin: "\\b[a-z\\d_]*_t\\b" }, 2261 { match: ATOMIC_TYPES } 2262 ] 2263 }; 2264 const CHARACTER_ESCAPES = "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"; 2265 const STRINGS = { 2266 className: "string", 2267 variants: [ 2268 { 2269 begin: '(u8?|U|L)?"', 2270 end: '"', 2271 illegal: "\\n", 2272 contains: [hljs.BACKSLASH_ESCAPE] 2273 }, 2274 { 2275 begin: "(u8?|U|L)?'(" + CHARACTER_ESCAPES + "|.)", 2276 end: "'", 2277 illegal: "." 2278 }, 2279 // https://en.cppreference.com/w/cpp/language/string_literal 2280 // a d-char-sequence never contains parentheses, backslashes or whitespace; 2281 // quotes are excluded as well so the closing delimiter cannot swallow the 2282 // quote that actually terminates the literal 2283 hljs.END_SAME_AS_BEGIN({ 2284 begin: /(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/, 2285 end: /\)([^()\\\s"]{0,16})"/ 2286 }) 2287 ] 2288 }; 2289 const NUMBERS = { 2290 className: "number", 2291 variants: [ 2292 { match: /\b(0b[01']+)/ }, 2293 { match: /(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/ }, 2294 { match: /(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/ }, 2295 { match: /(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/ } 2296 ], 2297 relevance: 0 2298 }; 2299 const PREPROCESSOR_INCLUDE = { 2300 scope: "meta", 2301 begin: /#\s*include\b/, 2302 end: /$/, 2303 keywords: { keyword: "include" }, 2304 contains: [ 2305 { 2306 // the `\` at the end of a line signaling continuation 2307 begin: /\\\n/ 2308 }, 2309 STRINGS, 2310 { 2311 scope: "string", 2312 begin: /<.*?>/ 2313 }, 2314 C_LINE_COMMENT_MODE, 2315 hljs.C_BLOCK_COMMENT_MODE 2316 ] 2317 }; 2318 const PREPROCESSOR = { 2319 className: "meta", 2320 begin: /#\s*[a-z]+\b/, 2321 end: /$/, 2322 keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include" }, 2323 contains: [ 2324 { 2325 begin: /\\\n/, 2326 relevance: 0 2327 }, 2328 hljs.inherit(STRINGS, { className: "string" }), 2329 C_LINE_COMMENT_MODE, 2330 hljs.C_BLOCK_COMMENT_MODE 2331 ] 2332 }; 2333 const PREPROCESSORS = [ 2334 PREPROCESSOR_INCLUDE, 2335 PREPROCESSOR 2336 ]; 2337 const TITLE_MODE = { 2338 className: "title", 2339 begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE, 2340 relevance: 0 2341 }; 2342 const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + "\\s*\\("; 2343 const MAX_FUNCTION_TYPE_TOKENS = 12; 2344 const C_KEYWORDS = [ 2345 "asm", 2346 "auto", 2347 "break", 2348 "case", 2349 "continue", 2350 "default", 2351 "do", 2352 "else", 2353 "enum", 2354 "extern", 2355 "for", 2356 "fortran", 2357 "goto", 2358 "if", 2359 "inline", 2360 "register", 2361 "restrict", 2362 "return", 2363 "sizeof", 2364 "typeof", 2365 "typeof_unqual", 2366 "struct", 2367 "switch", 2368 "typedef", 2369 "union", 2370 "volatile", 2371 "while", 2372 "_Alignas", 2373 "_Alignof", 2374 "_Atomic", 2375 "_Generic", 2376 "_Noreturn", 2377 "_Static_assert", 2378 "_Thread_local", 2379 // aliases 2380 "alignas", 2381 "alignof", 2382 "noreturn", 2383 "static_assert", 2384 "thread_local", 2385 // not a C keyword but is, for all intents and purposes, treated exactly like one. 2386 "_Pragma" 2387 ]; 2388 const C_TYPES = [ 2389 "float", 2390 "double", 2391 "signed", 2392 "unsigned", 2393 "int", 2394 "short", 2395 "long", 2396 "char", 2397 "void", 2398 "_Bool", 2399 "_BitInt", 2400 "_Complex", 2401 "_Imaginary", 2402 "_Decimal32", 2403 "_Decimal64", 2404 "_Decimal96", 2405 "_Decimal128", 2406 "_Decimal64x", 2407 "_Decimal128x", 2408 "_Float16", 2409 "_Float32", 2410 "_Float64", 2411 "_Float128", 2412 "_Float32x", 2413 "_Float64x", 2414 "_Float128x", 2415 // modifiers 2416 "const", 2417 "static", 2418 "constexpr", 2419 // aliases 2420 "complex", 2421 "bool", 2422 "imaginary" 2423 ]; 2424 const KEYWORDS = { 2425 keyword: C_KEYWORDS, 2426 type: C_TYPES, 2427 literal: "true false NULL", 2428 // TODO: apply hinting work similar to what was done in cpp.js 2429 built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" 2430 }; 2431 const EXPRESSION_CONTAINS = [ 2432 ...PREPROCESSORS, 2433 TYPES, 2434 C_LINE_COMMENT_MODE, 2435 hljs.C_BLOCK_COMMENT_MODE, 2436 NUMBERS, 2437 STRINGS 2438 ]; 2439 const EXPRESSION_CONTEXT = { 2440 // This mode covers expression context where we can't expect a function 2441 // definition and shouldn't highlight anything that looks like one: 2442 // `return some()`, `else if()`, `(x*sum(1, 2))` 2443 variants: [ 2444 { 2445 begin: /=/, 2446 end: /;/ 2447 }, 2448 { 2449 begin: /\(/, 2450 end: /\)/ 2451 }, 2452 { 2453 beginKeywords: "new throw return else", 2454 end: /;/ 2455 } 2456 ], 2457 keywords: KEYWORDS, 2458 contains: EXPRESSION_CONTAINS.concat([ 2459 { 2460 begin: /\(/, 2461 end: /\)/, 2462 keywords: KEYWORDS, 2463 contains: EXPRESSION_CONTAINS.concat(["self"]), 2464 relevance: 0 2465 } 2466 ]), 2467 relevance: 0 2468 }; 2469 const FUNCTION_DECLARATION = { 2470 begin: "(" + FUNCTION_TYPE_RE + "[\\*&\\s]+){1," + MAX_FUNCTION_TYPE_TOKENS + "}" + FUNCTION_TITLE, 2471 returnBegin: true, 2472 end: /[{;=]/, 2473 excludeEnd: true, 2474 keywords: KEYWORDS, 2475 illegal: /[^\w\s\*&:<>.]/, 2476 contains: [ 2477 { 2478 // to prevent it from being confused as the function title 2479 begin: DECLTYPE_AUTO_RE, 2480 keywords: KEYWORDS, 2481 relevance: 0 2482 }, 2483 { 2484 begin: FUNCTION_TITLE, 2485 returnBegin: true, 2486 contains: [hljs.inherit(TITLE_MODE, { className: "title.function" })], 2487 relevance: 0 2488 }, 2489 // allow for multiple declarations, e.g.: 2490 // extern void f(int), g(char); 2491 { 2492 relevance: 0, 2493 match: /,/ 2494 }, 2495 { 2496 className: "params", 2497 begin: /\(/, 2498 end: /\)/, 2499 keywords: KEYWORDS, 2500 relevance: 0, 2501 contains: [ 2502 C_LINE_COMMENT_MODE, 2503 hljs.C_BLOCK_COMMENT_MODE, 2504 STRINGS, 2505 NUMBERS, 2506 TYPES, 2507 // Count matching parentheses. 2508 { 2509 begin: /\(/, 2510 end: /\)/, 2511 keywords: KEYWORDS, 2512 relevance: 0, 2513 contains: [ 2514 "self", 2515 C_LINE_COMMENT_MODE, 2516 hljs.C_BLOCK_COMMENT_MODE, 2517 STRINGS, 2518 NUMBERS, 2519 TYPES 2520 ] 2521 } 2522 ] 2523 }, 2524 TYPES, 2525 C_LINE_COMMENT_MODE, 2526 hljs.C_BLOCK_COMMENT_MODE, 2527 ...PREPROCESSORS 2528 ] 2529 }; 2530 return { 2531 name: "C", 2532 aliases: ["h"], 2533 keywords: KEYWORDS, 2534 // Until differentiations are added between `c` and `cpp`, `c` will 2535 // not be auto-detected to avoid auto-detect conflicts between C and C++ 2536 disableAutodetect: true, 2537 illegal: "</", 2538 contains: [].concat( 2539 EXPRESSION_CONTEXT, 2540 FUNCTION_DECLARATION, 2541 EXPRESSION_CONTAINS, 2542 [ 2543 ...PREPROCESSORS, 2544 { 2545 begin: hljs.IDENT_RE + "::", 2546 keywords: KEYWORDS 2547 }, 2548 { 2549 className: "class", 2550 beginKeywords: "enum class struct union", 2551 end: /[{;:<>=]/, 2552 contains: [ 2553 { beginKeywords: "final class struct" }, 2554 hljs.TITLE_MODE 2555 ] 2556 } 2557 ] 2558 ), 2559 exports: { 2560 preprocessor: PREPROCESSOR, 2561 strings: STRINGS, 2562 keywords: KEYWORDS 2563 } 2564 }; 2565 } 2566 module.exports = c; 2567 } 2568}); 2569
vendor: 14,632 bytes, lines 2570-3137
2570// node_modules/highlight.js/lib/languages/cpp.js 2571var require_cpp = __commonJS({ 2572 "node_modules/highlight.js/lib/languages/cpp.js"(exports, module) { 2573 function cpp(hljs) { 2574 const regex = hljs.regex; 2575 const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }); 2576 const DECLTYPE_AUTO_RE = "decltype\\(auto\\)"; 2577 const NAMESPACE_RE = "[a-zA-Z_]\\w*::"; 2578 const TEMPLATE_ARGUMENT_RE = "<[^<>]+>"; 2579 const FUNCTION_TYPE_RE = "(?!struct)(" + DECLTYPE_AUTO_RE + "|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional(TEMPLATE_ARGUMENT_RE) + ")"; 2580 const CPP_PRIMITIVE_TYPES = { 2581 className: "type", 2582 begin: "\\b[a-z\\d_]*_t\\b" 2583 }; 2584 const CHARACTER_ESCAPES = "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"; 2585 const STRINGS = { 2586 className: "string", 2587 variants: [ 2588 { 2589 begin: '(u8?|U|L)?"', 2590 end: '"', 2591 illegal: "\\n", 2592 contains: [hljs.BACKSLASH_ESCAPE] 2593 }, 2594 { 2595 begin: "(u8?|U|L)?'(" + CHARACTER_ESCAPES + "|.)", 2596 end: "'", 2597 illegal: "." 2598 }, 2599 // https://en.cppreference.com/w/cpp/language/string_literal 2600 // a d-char-sequence never contains parentheses, backslashes or whitespace; 2601 // quotes are excluded as well so the closing delimiter cannot swallow the 2602 // quote that actually terminates the literal 2603 hljs.END_SAME_AS_BEGIN({ 2604 begin: /(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/, 2605 end: /\)([^()\\\s"]{0,16})"/ 2606 }) 2607 ] 2608 }; 2609 const NUMBERS = { 2610 className: "number", 2611 variants: [ 2612 // Floating-point literal. 2613 { 2614 begin: "[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)" 2615 }, 2616 // Integer literal. 2617 { 2618 begin: "[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)" 2619 // Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the 2620 // literal highlight actually makes it stand out more. 2621 } 2622 ], 2623 relevance: 0 2624 }; 2625 const PREPROCESSOR_INCLUDE = { 2626 scope: "meta", 2627 begin: /#\s*include\b/, 2628 end: /$/, 2629 keywords: { keyword: "include" }, 2630 contains: [ 2631 { 2632 // the `\` at the end of a line signaling continuation 2633 begin: /\\\n/ 2634 }, 2635 STRINGS, 2636 { 2637 scope: "string", 2638 begin: /<.*?>/ 2639 }, 2640 C_LINE_COMMENT_MODE, 2641 hljs.C_BLOCK_COMMENT_MODE 2642 ] 2643 }; 2644 const PREPROCESSOR = { 2645 className: "meta", 2646 begin: /#\s*[a-z]+\b/, 2647 end: /$/, 2648 keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" }, 2649 contains: [ 2650 { 2651 begin: /\\\n/, 2652 relevance: 0 2653 }, 2654 hljs.inherit(STRINGS, { className: "string" }), 2655 C_LINE_COMMENT_MODE, 2656 hljs.C_BLOCK_COMMENT_MODE 2657 ] 2658 }; 2659 const PREPROCESSORS = [ 2660 PREPROCESSOR_INCLUDE, 2661 PREPROCESSOR 2662 ]; 2663 const TITLE_MODE = { 2664 className: "title", 2665 begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE, 2666 relevance: 0 2667 }; 2668 const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + "\\s*\\("; 2669 const MAX_FUNCTION_TYPE_TOKENS = 12; 2670 const RESERVED_KEYWORDS = [ 2671 "alignas", 2672 "alignof", 2673 "and", 2674 "and_eq", 2675 "asm", 2676 "atomic_cancel", 2677 "atomic_commit", 2678 "atomic_noexcept", 2679 "auto", 2680 "bitand", 2681 "bitor", 2682 "break", 2683 "case", 2684 "catch", 2685 "class", 2686 "co_await", 2687 "co_return", 2688 "co_yield", 2689 "compl", 2690 "concept", 2691 "const_cast|10", 2692 "consteval", 2693 "constexpr", 2694 "constinit", 2695 "continue", 2696 "decltype", 2697 "default", 2698 "delete", 2699 "do", 2700 "dynamic_cast|10", 2701 "else", 2702 "enum", 2703 "explicit", 2704 "export", 2705 "extern", 2706 "false", 2707 "final", 2708 "for", 2709 "friend", 2710 "goto", 2711 "if", 2712 "import", 2713 "inline", 2714 "module", 2715 "mutable", 2716 "namespace", 2717 "new", 2718 "noexcept", 2719 "not", 2720 "not_eq", 2721 "nullptr", 2722 "operator", 2723 "or", 2724 "or_eq", 2725 "override", 2726 "private", 2727 "protected", 2728 "public", 2729 "reflexpr", 2730 "register", 2731 "reinterpret_cast|10", 2732 "requires", 2733 "return", 2734 "sizeof", 2735 "static_assert", 2736 "static_cast|10", 2737 "struct", 2738 "switch", 2739 "synchronized", 2740 "template", 2741 "this", 2742 "thread_local", 2743 "throw", 2744 "transaction_safe", 2745 "transaction_safe_dynamic", 2746 "true", 2747 "try", 2748 "typedef", 2749 "typeid", 2750 "typename", 2751 "union", 2752 "using", 2753 "virtual", 2754 "volatile", 2755 "while", 2756 "xor", 2757 "xor_eq" 2758 ]; 2759 const RESERVED_TYPES = [ 2760 "bool", 2761 "char", 2762 "char16_t", 2763 "char32_t", 2764 "char8_t", 2765 "double", 2766 "float", 2767 "int", 2768 "long", 2769 "short", 2770 "void", 2771 "wchar_t", 2772 "unsigned", 2773 "signed", 2774 "const", 2775 "static" 2776 ]; 2777 const TYPE_HINTS = [ 2778 "any", 2779 "auto_ptr", 2780 "barrier", 2781 "binary_semaphore", 2782 "bitset", 2783 "complex", 2784 "condition_variable", 2785 "condition_variable_any", 2786 "counting_semaphore", 2787 "deque", 2788 "false_type", 2789 "flat_map", 2790 "flat_set", 2791 "future", 2792 "imaginary", 2793 "initializer_list", 2794 "istringstream", 2795 "jthread", 2796 "latch", 2797 "lock_guard", 2798 "multimap", 2799 "multiset", 2800 "mutex", 2801 "optional", 2802 "ostringstream", 2803 "packaged_task", 2804 "pair", 2805 "promise", 2806 "priority_queue", 2807 "queue", 2808 "recursive_mutex", 2809 "recursive_timed_mutex", 2810 "scoped_lock", 2811 "set", 2812 "shared_future", 2813 "shared_lock", 2814 "shared_mutex", 2815 "shared_timed_mutex", 2816 "shared_ptr", 2817 "stack", 2818 "string_view", 2819 "stringstream", 2820 "timed_mutex", 2821 "thread", 2822 "true_type", 2823 "tuple", 2824 "unique_lock", 2825 "unique_ptr", 2826 "unordered_map", 2827 "unordered_multimap", 2828 "unordered_multiset", 2829 "unordered_set", 2830 "variant", 2831 "vector", 2832 "weak_ptr", 2833 "wstring", 2834 "wstring_view" 2835 ]; 2836 const FUNCTION_HINTS = [ 2837 "abort", 2838 "abs", 2839 "acos", 2840 "apply", 2841 "as_const", 2842 "asin", 2843 "atan", 2844 "atan2", 2845 "calloc", 2846 "ceil", 2847 "cerr", 2848 "cin", 2849 "clog", 2850 "cos", 2851 "cosh", 2852 "cout", 2853 "declval", 2854 "endl", 2855 "exchange", 2856 "exit", 2857 "exp", 2858 "fabs", 2859 "floor", 2860 "fmod", 2861 "forward", 2862 "fprintf", 2863 "fputs", 2864 "free", 2865 "frexp", 2866 "fscanf", 2867 "future", 2868 "invoke", 2869 "isalnum", 2870 "isalpha", 2871 "iscntrl", 2872 "isdigit", 2873 "isgraph", 2874 "islower", 2875 "isprint", 2876 "ispunct", 2877 "isspace", 2878 "isupper", 2879 "isxdigit", 2880 "labs", 2881 "launder", 2882 "ldexp", 2883 "log", 2884 "log10", 2885 "make_pair", 2886 "make_shared", 2887 "make_shared_for_overwrite", 2888 "make_tuple", 2889 "make_unique", 2890 "malloc", 2891 "memchr", 2892 "memcmp", 2893 "memcpy", 2894 "memset", 2895 "modf", 2896 "move", 2897 "pow", 2898 "printf", 2899 "putchar", 2900 "puts", 2901 "realloc", 2902 "scanf", 2903 "sin", 2904 "sinh", 2905 "snprintf", 2906 "sprintf", 2907 "sqrt", 2908 "sscanf", 2909 "std", 2910 "stderr", 2911 "stdin", 2912 "stdout", 2913 "strcat", 2914 "strchr", 2915 "strcmp", 2916 "strcpy", 2917 "strcspn", 2918 "strlen", 2919 "strncat", 2920 "strncmp", 2921 "strncpy", 2922 "strpbrk", 2923 "strrchr", 2924 "strspn", 2925 "strstr", 2926 "swap", 2927 "tan", 2928 "tanh", 2929 "terminate", 2930 "to_underlying", 2931 "tolower", 2932 "toupper", 2933 "vfprintf", 2934 "visit", 2935 "vprintf", 2936 "vsprintf" 2937 ]; 2938 const LITERALS = [ 2939 "NULL", 2940 "false", 2941 "nullopt", 2942 "nullptr", 2943 "true" 2944 ]; 2945 const BUILT_IN = ["_Pragma"]; 2946 const CPP_KEYWORDS = { 2947 type: RESERVED_TYPES, 2948 keyword: RESERVED_KEYWORDS, 2949 literal: LITERALS, 2950 built_in: BUILT_IN, 2951 _type_hints: TYPE_HINTS 2952 }; 2953 const FUNCTION_DISPATCH = { 2954 className: "function.dispatch", 2955 relevance: 0, 2956 keywords: { 2957 // Only for relevance, not highlighting. 2958 _hint: FUNCTION_HINTS 2959 }, 2960 begin: regex.concat( 2961 /\b/, 2962 `(?!${RESERVED_KEYWORDS.join("|")})`, 2963 hljs.IDENT_RE, 2964 regex.lookahead(/(<[^<>]+>|)\s*\(/) 2965 ) 2966 }; 2967 const EXPRESSION_CONTAINS = [ 2968 FUNCTION_DISPATCH, 2969 ...PREPROCESSORS, 2970 CPP_PRIMITIVE_TYPES, 2971 C_LINE_COMMENT_MODE, 2972 hljs.C_BLOCK_COMMENT_MODE, 2973 NUMBERS, 2974 STRINGS 2975 ]; 2976 const EXPRESSION_CONTEXT = { 2977 // This mode covers expression context where we can't expect a function 2978 // definition and shouldn't highlight anything that looks like one: 2979 // `return some()`, `else if()`, `(x*sum(1, 2))` 2980 variants: [ 2981 { 2982 begin: /=/, 2983 end: /;/ 2984 }, 2985 { 2986 begin: /\(/, 2987 end: /\)/ 2988 }, 2989 { 2990 beginKeywords: "new throw return else", 2991 end: /;/ 2992 } 2993 ], 2994 keywords: CPP_KEYWORDS, 2995 contains: EXPRESSION_CONTAINS.concat([ 2996 { 2997 begin: /\(/, 2998 end: /\)/, 2999 keywords: CPP_KEYWORDS, 3000 contains: EXPRESSION_CONTAINS.concat(["self"]), 3001 relevance: 0 3002 } 3003 ]), 3004 relevance: 0 3005 }; 3006 const FUNCTION_DECLARATION = { 3007 className: "function", 3008 begin: "(" + FUNCTION_TYPE_RE + "[\\*&\\s]+){1," + MAX_FUNCTION_TYPE_TOKENS + "}" + FUNCTION_TITLE, 3009 returnBegin: true, 3010 end: /[{;=]/, 3011 excludeEnd: true, 3012 keywords: CPP_KEYWORDS, 3013 illegal: /[^\w\s\*&:<>.]/, 3014 contains: [ 3015 { 3016 // to prevent it from being confused as the function title 3017 begin: DECLTYPE_AUTO_RE, 3018 keywords: CPP_KEYWORDS, 3019 relevance: 0 3020 }, 3021 { 3022 begin: FUNCTION_TITLE, 3023 returnBegin: true, 3024 contains: [TITLE_MODE], 3025 relevance: 0 3026 }, 3027 // needed because we do not have look-behind on the below rule 3028 // to prevent it from grabbing the final : in a :: pair 3029 { 3030 begin: /::/, 3031 relevance: 0 3032 }, 3033 // initializers 3034 { 3035 begin: /:/, 3036 endsWithParent: true, 3037 contains: [ 3038 STRINGS, 3039 NUMBERS 3040 ] 3041 }, 3042 // allow for multiple declarations, e.g.: 3043 // extern void f(int), g(char); 3044 { 3045 relevance: 0, 3046 match: /,/ 3047 }, 3048 { 3049 className: "params", 3050 begin: /\(/, 3051 end: /\)/, 3052 keywords: CPP_KEYWORDS, 3053 relevance: 0, 3054 contains: [ 3055 C_LINE_COMMENT_MODE, 3056 hljs.C_BLOCK_COMMENT_MODE, 3057 STRINGS, 3058 NUMBERS, 3059 CPP_PRIMITIVE_TYPES, 3060 // Count matching parentheses. 3061 { 3062 begin: /\(/, 3063 end: /\)/, 3064 keywords: CPP_KEYWORDS, 3065 relevance: 0, 3066 contains: [ 3067 "self", 3068 C_LINE_COMMENT_MODE, 3069 hljs.C_BLOCK_COMMENT_MODE, 3070 STRINGS, 3071 NUMBERS, 3072 CPP_PRIMITIVE_TYPES 3073 ] 3074 } 3075 ] 3076 }, 3077 CPP_PRIMITIVE_TYPES, 3078 C_LINE_COMMENT_MODE, 3079 hljs.C_BLOCK_COMMENT_MODE, 3080 ...PREPROCESSORS 3081 ] 3082 }; 3083 return { 3084 name: "C++", 3085 aliases: [ 3086 "cc", 3087 "c++", 3088 "h++", 3089 "hpp", 3090 "hh", 3091 "hxx", 3092 "cxx" 3093 ], 3094 keywords: CPP_KEYWORDS, 3095 illegal: "</", 3096 classNameAliases: { "function.dispatch": "built_in" }, 3097 contains: [].concat( 3098 EXPRESSION_CONTEXT, 3099 FUNCTION_DECLARATION, 3100 FUNCTION_DISPATCH, 3101 EXPRESSION_CONTAINS, 3102 [ 3103 ...PREPROCESSORS, 3104 { 3105 // containers: ie, `vector <int> rooms (9);` 3106 begin: "\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)", 3107 end: ">", 3108 keywords: CPP_KEYWORDS, 3109 contains: [ 3110 "self", 3111 CPP_PRIMITIVE_TYPES 3112 ] 3113 }, 3114 { 3115 begin: hljs.IDENT_RE + "::", 3116 keywords: CPP_KEYWORDS 3117 }, 3118 { 3119 match: [ 3120 // extra complexity to deal with `enum class` and `enum struct` 3121 /\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/, 3122 /\s+/, 3123 /\w+/ 3124 ], 3125 className: { 3126 1: "keyword", 3127 3: "title.class" 3128 } 3129 } 3130 ] 3131 ) 3132 }; 3133 } 3134 module.exports = cpp; 3135 } 3136}); 3137
vendor: 10,214 bytes, lines 3138-3545
3138// node_modules/highlight.js/lib/languages/csharp.js 3139var require_csharp = __commonJS({ 3140 "node_modules/highlight.js/lib/languages/csharp.js"(exports, module) { 3141 function csharp(hljs) { 3142 const BUILT_IN_KEYWORDS = [ 3143 "bool", 3144 "byte", 3145 "char", 3146 "decimal", 3147 "delegate", 3148 "double", 3149 "dynamic", 3150 "enum", 3151 "float", 3152 "int", 3153 "long", 3154 "nint", 3155 "nuint", 3156 "object", 3157 "sbyte", 3158 "short", 3159 "string", 3160 "ulong", 3161 "uint", 3162 "ushort" 3163 ]; 3164 const FUNCTION_MODIFIERS = [ 3165 "public", 3166 "private", 3167 "protected", 3168 "static", 3169 "internal", 3170 "protected", 3171 "abstract", 3172 "async", 3173 "extern", 3174 "override", 3175 "unsafe", 3176 "virtual", 3177 "new", 3178 "sealed", 3179 "partial" 3180 ]; 3181 const LITERAL_KEYWORDS = [ 3182 "default", 3183 "false", 3184 "null", 3185 "true" 3186 ]; 3187 const NORMAL_KEYWORDS = [ 3188 "abstract", 3189 "as", 3190 "base", 3191 "break", 3192 "case", 3193 "catch", 3194 "class", 3195 "const", 3196 "continue", 3197 "do", 3198 "else", 3199 "event", 3200 "explicit", 3201 "extern", 3202 "finally", 3203 "fixed", 3204 "for", 3205 "foreach", 3206 "goto", 3207 "if", 3208 "implicit", 3209 "in", 3210 "interface", 3211 "internal", 3212 "is", 3213 "lock", 3214 "namespace", 3215 "new", 3216 "operator", 3217 "out", 3218 "override", 3219 "params", 3220 "private", 3221 "protected", 3222 "public", 3223 "readonly", 3224 "record", 3225 "ref", 3226 "return", 3227 "scoped", 3228 "sealed", 3229 "sizeof", 3230 "stackalloc", 3231 "static", 3232 "struct", 3233 "switch", 3234 "this", 3235 "throw", 3236 "try", 3237 "typeof", 3238 "unchecked", 3239 "unsafe", 3240 "using", 3241 "virtual", 3242 "void", 3243 "volatile", 3244 "while" 3245 ]; 3246 const CONTEXTUAL_KEYWORDS = [ 3247 "add", 3248 "alias", 3249 "and", 3250 "ascending", 3251 "args", 3252 "async", 3253 "await", 3254 "by", 3255 "descending", 3256 "dynamic", 3257 "equals", 3258 "file", 3259 "from", 3260 "get", 3261 "global", 3262 "group", 3263 "init", 3264 "into", 3265 "join", 3266 "let", 3267 "nameof", 3268 "not", 3269 "notnull", 3270 "on", 3271 "or", 3272 "orderby", 3273 "partial", 3274 "record", 3275 "remove", 3276 "required", 3277 "scoped", 3278 "select", 3279 "set", 3280 "unmanaged", 3281 "value|0", 3282 "var", 3283 "when", 3284 "where", 3285 "with", 3286 "yield" 3287 ]; 3288 const KEYWORDS = { 3289 keyword: NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS), 3290 built_in: BUILT_IN_KEYWORDS, 3291 literal: LITERAL_KEYWORDS 3292 }; 3293 const TITLE_MODE = hljs.inherit(hljs.TITLE_MODE, { begin: "[a-zA-Z](\\.?\\w)*" }); 3294 const DIGITS = "\\d(_*\\d)*"; 3295 const INTEGER_SUFFIX = "([uU][lL]?|[lL][uU]?)?"; 3296 const REAL_SUFFIX = "([fFdDmM]|[uU][lL]?|[lL][uU]?)?"; 3297 const NUMBERS = { 3298 className: "number", 3299 variants: [ 3300 { begin: "\\b0[bB]_*[01](_*[01])*" + INTEGER_SUFFIX }, 3301 { begin: "(-?)\\b0[xX]_*[a-fA-F0-9](_*[a-fA-F0-9])*" + INTEGER_SUFFIX }, 3302 { begin: "(-?)(\\b" + DIGITS + "(\\.(" + DIGITS + ")?)?|\\." + DIGITS + ")([eE][-+]?" + DIGITS + ")?" + REAL_SUFFIX } 3303 ], 3304 relevance: 0 3305 }; 3306 const RAW_STRING = { 3307 className: "string", 3308 begin: /"""("*)(?!")(.|\n)*?"""\1/, 3309 relevance: 1 3310 }; 3311 const VERBATIM_STRING = { 3312 className: "string", 3313 begin: '@"', 3314 end: '"', 3315 contains: [{ begin: '""' }] 3316 }; 3317 const VERBATIM_STRING_NO_LF = hljs.inherit(VERBATIM_STRING, { illegal: /\n/ }); 3318 const SUBST = { 3319 className: "subst", 3320 begin: /\{/, 3321 end: /\}/, 3322 keywords: KEYWORDS 3323 }; 3324 const SUBST_NO_LF = hljs.inherit(SUBST, { illegal: /\n/ }); 3325 const INTERPOLATED_STRING = { 3326 className: "string", 3327 begin: /\$"/, 3328 end: '"', 3329 illegal: /\n/, 3330 contains: [ 3331 { begin: /\{\{/ }, 3332 { begin: /\}\}/ }, 3333 hljs.BACKSLASH_ESCAPE, 3334 SUBST_NO_LF 3335 ] 3336 }; 3337 const INTERPOLATED_VERBATIM_STRING = { 3338 className: "string", 3339 begin: /\$@"/, 3340 end: '"', 3341 contains: [ 3342 { begin: /\{\{/ }, 3343 { begin: /\}\}/ }, 3344 { begin: '""' }, 3345 SUBST 3346 ] 3347 }; 3348 const INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, { 3349 illegal: /\n/, 3350 contains: [ 3351 { begin: /\{\{/ }, 3352 { begin: /\}\}/ }, 3353 { begin: '""' }, 3354 SUBST_NO_LF 3355 ] 3356 }); 3357 SUBST.contains = [ 3358 INTERPOLATED_VERBATIM_STRING, 3359 INTERPOLATED_STRING, 3360 VERBATIM_STRING, 3361 hljs.APOS_STRING_MODE, 3362 hljs.QUOTE_STRING_MODE, 3363 NUMBERS, 3364 hljs.C_BLOCK_COMMENT_MODE 3365 ]; 3366 SUBST_NO_LF.contains = [ 3367 INTERPOLATED_VERBATIM_STRING_NO_LF, 3368 INTERPOLATED_STRING, 3369 VERBATIM_STRING_NO_LF, 3370 hljs.APOS_STRING_MODE, 3371 hljs.QUOTE_STRING_MODE, 3372 NUMBERS, 3373 hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, { illegal: /\n/ }) 3374 ]; 3375 const STRING = { variants: [ 3376 RAW_STRING, 3377 INTERPOLATED_VERBATIM_STRING, 3378 INTERPOLATED_STRING, 3379 VERBATIM_STRING, 3380 hljs.APOS_STRING_MODE, 3381 hljs.QUOTE_STRING_MODE 3382 ] }; 3383 const GENERIC_MODIFIER = { 3384 begin: "<", 3385 end: ">", 3386 contains: [ 3387 { beginKeywords: "in out" }, 3388 TITLE_MODE 3389 ] 3390 }; 3391 const TYPE_IDENT_RE = hljs.IDENT_RE + "(<" + hljs.IDENT_RE + "(\\s*,\\s*" + hljs.IDENT_RE + ")*>)?(\\[\\])?"; 3392 const AT_IDENTIFIER = { 3393 // prevents expressions like `@class` from incorrect flagging 3394 // `class` as a keyword 3395 begin: "@" + hljs.IDENT_RE, 3396 relevance: 0 3397 }; 3398 return { 3399 name: "C#", 3400 aliases: [ 3401 "cs", 3402 "c#" 3403 ], 3404 keywords: KEYWORDS, 3405 illegal: /::/, 3406 contains: [ 3407 hljs.COMMENT( 3408 "///", 3409 "$", 3410 { 3411 returnBegin: true, 3412 contains: [ 3413 { 3414 className: "doctag", 3415 variants: [ 3416 { 3417 begin: "///", 3418 relevance: 0 3419 }, 3420 { begin: "<!--|-->" }, 3421 { 3422 begin: "</?", 3423 end: ">" 3424 } 3425 ] 3426 } 3427 ] 3428 } 3429 ), 3430 hljs.C_LINE_COMMENT_MODE, 3431 hljs.C_BLOCK_COMMENT_MODE, 3432 { 3433 className: "meta", 3434 begin: "#", 3435 end: "$", 3436 keywords: { keyword: "if else elif endif define undef warning error line region endregion pragma checksum" } 3437 }, 3438 STRING, 3439 NUMBERS, 3440 { 3441 beginKeywords: "class interface", 3442 relevance: 0, 3443 end: /[{;=]/, 3444 illegal: /[^\s:,]/, 3445 contains: [ 3446 { beginKeywords: "where class" }, 3447 TITLE_MODE, 3448 GENERIC_MODIFIER, 3449 hljs.C_LINE_COMMENT_MODE, 3450 hljs.C_BLOCK_COMMENT_MODE 3451 ] 3452 }, 3453 { 3454 beginKeywords: "namespace", 3455 relevance: 0, 3456 end: /[{;=]/, 3457 illegal: /[^\s:]/, 3458 contains: [ 3459 TITLE_MODE, 3460 hljs.C_LINE_COMMENT_MODE, 3461 hljs.C_BLOCK_COMMENT_MODE 3462 ] 3463 }, 3464 { 3465 beginKeywords: "record", 3466 relevance: 0, 3467 end: /[{;=]/, 3468 illegal: /[^\s:]/, 3469 contains: [ 3470 TITLE_MODE, 3471 GENERIC_MODIFIER, 3472 hljs.C_LINE_COMMENT_MODE, 3473 hljs.C_BLOCK_COMMENT_MODE 3474 ] 3475 }, 3476 { 3477 // [Attributes("")] 3478 className: "meta", 3479 begin: "^\\s*\\[(?=[\\w])", 3480 excludeBegin: true, 3481 end: "\\]", 3482 excludeEnd: true, 3483 contains: [ 3484 { 3485 className: "string", 3486 begin: /"/, 3487 end: /"/ 3488 } 3489 ] 3490 }, 3491 { 3492 // Expression keywords prevent 'keyword Name(...)' from being 3493 // recognized as a function definition 3494 beginKeywords: "new return throw await else", 3495 relevance: 0 3496 }, 3497 { 3498 className: "function", 3499 begin: "(" + TYPE_IDENT_RE + "\\s+)+" + hljs.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(", 3500 returnBegin: true, 3501 end: /\s*[{;=]/, 3502 excludeEnd: true, 3503 keywords: KEYWORDS, 3504 contains: [ 3505 // prevents these from being highlighted `title` 3506 { 3507 beginKeywords: FUNCTION_MODIFIERS.join(" "), 3508 relevance: 0 3509 }, 3510 { 3511 begin: hljs.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(", 3512 returnBegin: true, 3513 contains: [ 3514 hljs.TITLE_MODE, 3515 GENERIC_MODIFIER 3516 ], 3517 relevance: 0 3518 }, 3519 { match: /\(\)/ }, 3520 { 3521 className: "params", 3522 begin: /\(/, 3523 end: /\)/, 3524 excludeBegin: true, 3525 excludeEnd: true, 3526 keywords: KEYWORDS, 3527 relevance: 0, 3528 contains: [ 3529 STRING, 3530 NUMBERS, 3531 hljs.C_BLOCK_COMMENT_MODE 3532 ] 3533 }, 3534 hljs.C_LINE_COMMENT_MODE, 3535 hljs.C_BLOCK_COMMENT_MODE 3536 ] 3537 }, 3538 AT_IDENTIFIER 3539 ] 3540 }; 3541 } 3542 module.exports = csharp; 3543 } 3544}); 3545
vendor: 22,626 bytes, lines 3546-4498
3546// node_modules/highlight.js/lib/languages/css.js 3547var require_css = __commonJS({ 3548 "node_modules/highlight.js/lib/languages/css.js"(exports, module) { 3549 var MODES = (hljs) => { 3550 return { 3551 IMPORTANT: { 3552 scope: "meta", 3553 begin: "!important" 3554 }, 3555 BLOCK_COMMENT: hljs.C_BLOCK_COMMENT_MODE, 3556 HEXCOLOR: { 3557 scope: "number", 3558 begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/ 3559 }, 3560 UNICODE_RANGE: { 3561 scope: "number", 3562 begin: /\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/ 3563 }, 3564 FUNCTION_DISPATCH: { 3565 className: "built_in", 3566 begin: /[\w-]+(?=\()/ 3567 }, 3568 ATTRIBUTE_SELECTOR_MODE: { 3569 scope: "selector-attr", 3570 begin: /\[/, 3571 end: /\]/, 3572 illegal: "$", 3573 contains: [ 3574 hljs.APOS_STRING_MODE, 3575 hljs.QUOTE_STRING_MODE 3576 ] 3577 }, 3578 CSS_NUMBER_MODE: { 3579 scope: "number", 3580 begin: hljs.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", 3581 relevance: 0 3582 }, 3583 CSS_VARIABLE: { 3584 className: "attr", 3585 begin: /--[A-Za-z_][A-Za-z0-9_-]*/ 3586 } 3587 }; 3588 }; 3589 var HTML_TAGS = [ 3590 "a", 3591 "abbr", 3592 "address", 3593 "article", 3594 "aside", 3595 "audio", 3596 "b", 3597 "blockquote", 3598 "body", 3599 "button", 3600 "canvas", 3601 "caption", 3602 "cite", 3603 "code", 3604 "dd", 3605 "del", 3606 "details", 3607 "dfn", 3608 "div", 3609 "dl", 3610 "dt", 3611 "em", 3612 "fieldset", 3613 "figcaption", 3614 "figure", 3615 "footer", 3616 "form", 3617 "h1", 3618 "h2", 3619 "h3", 3620 "h4", 3621 "h5", 3622 "h6", 3623 "header", 3624 "hgroup", 3625 "html", 3626 "i", 3627 "iframe", 3628 "img", 3629 "input", 3630 "ins", 3631 "kbd", 3632 "label", 3633 "legend", 3634 "li", 3635 "main", 3636 "mark", 3637 "menu", 3638 "nav", 3639 "object", 3640 "ol", 3641 "optgroup", 3642 "option", 3643 "p", 3644 "picture", 3645 "q", 3646 "quote", 3647 "samp", 3648 "section", 3649 "select", 3650 "source", 3651 "span", 3652 "strong", 3653 "summary", 3654 "sup", 3655 "table", 3656 "tbody", 3657 "td", 3658 "textarea", 3659 "tfoot", 3660 "th", 3661 "thead", 3662 "time", 3663 "tr", 3664 "ul", 3665 "var", 3666 "video" 3667 ]; 3668 var SVG_TAGS = [ 3669 "defs", 3670 "g", 3671 "marker", 3672 "mask", 3673 "pattern", 3674 "svg", 3675 "switch", 3676 "symbol", 3677 "feBlend", 3678 "feColorMatrix", 3679 "feComponentTransfer", 3680 "feComposite", 3681 "feConvolveMatrix", 3682 "feDiffuseLighting", 3683 "feDisplacementMap", 3684 "feFlood", 3685 "feGaussianBlur", 3686 "feImage", 3687 "feMerge", 3688 "feMorphology", 3689 "feOffset", 3690 "feSpecularLighting", 3691 "feTile", 3692 "feTurbulence", 3693 "linearGradient", 3694 "radialGradient", 3695 "stop", 3696 "circle", 3697 "ellipse", 3698 "image", 3699 "line", 3700 "path", 3701 "polygon", 3702 "polyline", 3703 "rect", 3704 "text", 3705 "use", 3706 "textPath", 3707 "tspan", 3708 "foreignObject", 3709 "clipPath" 3710 ]; 3711 var TAGS = [ 3712 ...HTML_TAGS, 3713 ...SVG_TAGS 3714 ]; 3715 var MEDIA_FEATURES = [ 3716 "any-hover", 3717 "any-pointer", 3718 "aspect-ratio", 3719 "color", 3720 "color-gamut", 3721 "color-index", 3722 "device-aspect-ratio", 3723 "device-height", 3724 "device-width", 3725 "display-mode", 3726 "forced-colors", 3727 "grid", 3728 "height", 3729 "hover", 3730 "inverted-colors", 3731 "monochrome", 3732 "orientation", 3733 "overflow-block", 3734 "overflow-inline", 3735 "pointer", 3736 "prefers-color-scheme", 3737 "prefers-contrast", 3738 "prefers-reduced-motion", 3739 "prefers-reduced-transparency", 3740 "resolution", 3741 "scan", 3742 "scripting", 3743 "update", 3744 "width", 3745 // TODO: find a better solution? 3746 "min-width", 3747 "max-width", 3748 "min-height", 3749 "max-height" 3750 ].sort().reverse(); 3751 var PSEUDO_CLASSES = [ 3752 "active", 3753 "any-link", 3754 "blank", 3755 "checked", 3756 "current", 3757 "default", 3758 "defined", 3759 "dir", 3760 // dir() 3761 "disabled", 3762 "drop", 3763 "empty", 3764 "enabled", 3765 "first", 3766 "first-child", 3767 "first-of-type", 3768 "fullscreen", 3769 "future", 3770 "focus", 3771 "focus-visible", 3772 "focus-within", 3773 "has", 3774 // has() 3775 "host", 3776 // host or host() 3777 "host-context", 3778 // host-context() 3779 "hover", 3780 "indeterminate", 3781 "in-range", 3782 "invalid", 3783 "is", 3784 // is() 3785 "lang", 3786 // lang() 3787 "last-child", 3788 "last-of-type", 3789 "left", 3790 "link", 3791 "local-link", 3792 "not", 3793 // not() 3794 "nth-child", 3795 // nth-child() 3796 "nth-col", 3797 // nth-col() 3798 "nth-last-child", 3799 // nth-last-child() 3800 "nth-last-col", 3801 // nth-last-col() 3802 "nth-last-of-type", 3803 //nth-last-of-type() 3804 "nth-of-type", 3805 //nth-of-type() 3806 "only-child", 3807 "only-of-type", 3808 "optional", 3809 "out-of-range", 3810 "past", 3811 "placeholder-shown", 3812 "read-only", 3813 "read-write", 3814 "required", 3815 "right", 3816 "root", 3817 "scope", 3818 "target", 3819 "target-within", 3820 "user-invalid", 3821 "valid", 3822 "visited", 3823 "where" 3824 // where() 3825 ].sort().reverse(); 3826 var PSEUDO_ELEMENTS = [ 3827 "after", 3828 "backdrop", 3829 "before", 3830 "cue", 3831 "cue-region", 3832 "first-letter", 3833 "first-line", 3834 "grammar-error", 3835 "marker", 3836 "part", 3837 "placeholder", 3838 "selection", 3839 "slotted", 3840 "spelling-error" 3841 ].sort().reverse(); 3842 var ATTRIBUTES = [ 3843 "accent-color", 3844 "align-content", 3845 "align-items", 3846 "align-self", 3847 "alignment-baseline", 3848 "all", 3849 "anchor-name", 3850 "animation", 3851 "animation-composition", 3852 "animation-delay", 3853 "animation-direction", 3854 "animation-duration", 3855 "animation-fill-mode", 3856 "animation-iteration-count", 3857 "animation-name", 3858 "animation-play-state", 3859 "animation-range", 3860 "animation-range-end", 3861 "animation-range-start", 3862 "animation-timeline", 3863 "animation-timing-function", 3864 "appearance", 3865 "aspect-ratio", 3866 "backdrop-filter", 3867 "backface-visibility", 3868 "background", 3869 "background-attachment", 3870 "background-blend-mode", 3871 "background-clip", 3872 "background-color", 3873 "background-image", 3874 "background-origin", 3875 "background-position", 3876 "background-position-x", 3877 "background-position-y", 3878 "background-repeat", 3879 "background-size", 3880 "baseline-shift", 3881 "block-size", 3882 "border", 3883 "border-block", 3884 "border-block-color", 3885 "border-block-end", 3886 "border-block-end-color", 3887 "border-block-end-style", 3888 "border-block-end-width", 3889 "border-block-start", 3890 "border-block-start-color", 3891 "border-block-start-style", 3892 "border-block-start-width", 3893 "border-block-style", 3894 "border-block-width", 3895 "border-bottom", 3896 "border-bottom-color", 3897 "border-bottom-left-radius", 3898 "border-bottom-right-radius", 3899 "border-bottom-style", 3900 "border-bottom-width", 3901 "border-collapse", 3902 "border-color", 3903 "border-end-end-radius", 3904 "border-end-start-radius", 3905 "border-image", 3906 "border-image-outset", 3907 "border-image-repeat", 3908 "border-image-slice", 3909 "border-image-source", 3910 "border-image-width", 3911 "border-inline", 3912 "border-inline-color", 3913 "border-inline-end", 3914 "border-inline-end-color", 3915 "border-inline-end-style", 3916 "border-inline-end-width", 3917 "border-inline-start", 3918 "border-inline-start-color", 3919 "border-inline-start-style", 3920 "border-inline-start-width", 3921 "border-inline-style", 3922 "border-inline-width", 3923 "border-left", 3924 "border-left-color", 3925 "border-left-style", 3926 "border-left-width", 3927 "border-radius", 3928 "border-right", 3929 "border-right-color", 3930 "border-right-style", 3931 "border-right-width", 3932 "border-spacing", 3933 "border-start-end-radius", 3934 "border-start-start-radius", 3935 "border-style", 3936 "border-top", 3937 "border-top-color", 3938 "border-top-left-radius", 3939 "border-top-right-radius", 3940 "border-top-style", 3941 "border-top-width", 3942 "border-width", 3943 "bottom", 3944 "box-align", 3945 "box-decoration-break", 3946 "box-direction", 3947 "box-flex", 3948 "box-flex-group", 3949 "box-lines", 3950 "box-ordinal-group", 3951 "box-orient", 3952 "box-pack", 3953 "box-shadow", 3954 "box-sizing", 3955 "break-after", 3956 "break-before", 3957 "break-inside", 3958 "caption-side", 3959 "caret-color", 3960 "clear", 3961 "clip", 3962 "clip-path", 3963 "clip-rule", 3964 "color", 3965 "color-interpolation", 3966 "color-interpolation-filters", 3967 "color-profile", 3968 "color-rendering", 3969 "color-scheme", 3970 "column-count", 3971 "column-fill", 3972 "column-gap", 3973 "column-rule", 3974 "column-rule-color", 3975 "column-rule-style", 3976 "column-rule-width", 3977 "column-span", 3978 "column-width", 3979 "columns", 3980 "contain", 3981 "contain-intrinsic-block-size", 3982 "contain-intrinsic-height", 3983 "contain-intrinsic-inline-size", 3984 "contain-intrinsic-size", 3985 "contain-intrinsic-width", 3986 "container", 3987 "container-name", 3988 "container-type", 3989 "content", 3990 "content-visibility", 3991 "corner-bottom-left-shape", 3992 "corner-bottom-right-shape", 3993 "corner-shape", 3994 "corner-top-left-shape", 3995 "corner-top-right-shape", 3996 "counter-increment", 3997 "counter-reset", 3998 "counter-set", 3999 "cue", 4000 "cue-after", 4001 "cue-before", 4002 "cursor", 4003 "cx", 4004 "cy", 4005 "direction", 4006 "display", 4007 "dominant-baseline", 4008 "empty-cells", 4009 "enable-background", 4010 "field-sizing", 4011 "fill", 4012 "fill-opacity", 4013 "fill-rule", 4014 "filter", 4015 "flex", 4016 "flex-basis", 4017 "flex-direction", 4018 "flex-flow", 4019 "flex-grow", 4020 "flex-shrink", 4021 "flex-wrap", 4022 "float", 4023 "flood-color", 4024 "flood-opacity", 4025 "flow", 4026 "font", 4027 "font-display", 4028 "font-family", 4029 "font-feature-settings", 4030 "font-kerning", 4031 "font-language-override", 4032 "font-optical-sizing", 4033 "font-palette", 4034 "font-size", 4035 "font-size-adjust", 4036 "font-smooth", 4037 "font-smoothing", 4038 "font-stretch", 4039 "font-style", 4040 "font-synthesis", 4041 "font-synthesis-position", 4042 "font-synthesis-small-caps", 4043 "font-synthesis-style", 4044 "font-synthesis-weight", 4045 "font-variant", 4046 "font-variant-alternates", 4047 "font-variant-caps", 4048 "font-variant-east-asian", 4049 "font-variant-emoji", 4050 "font-variant-ligatures", 4051 "font-variant-numeric", 4052 "font-variant-position", 4053 "font-variation-settings", 4054 "font-weight", 4055 "forced-color-adjust", 4056 "gap", 4057 "glyph-orientation-horizontal", 4058 "glyph-orientation-vertical", 4059 "grid", 4060 "grid-area", 4061 "grid-auto-columns", 4062 "grid-auto-flow", 4063 "grid-auto-rows", 4064 "grid-column", 4065 "grid-column-end", 4066 "grid-column-start", 4067 "grid-gap", 4068 "grid-row", 4069 "grid-row-end", 4070 "grid-row-start", 4071 "grid-template", 4072 "grid-template-areas", 4073 "grid-template-columns", 4074 "grid-template-rows", 4075 "hanging-punctuation", 4076 "height", 4077 "hyphenate-character", 4078 "hyphenate-limit-chars", 4079 "hyphens", 4080 "icon", 4081 "image-orientation", 4082 "image-rendering", 4083 "image-resolution", 4084 "ime-mode", 4085 "initial-letter", 4086 "initial-letter-align", 4087 "inline-size", 4088 "inset", 4089 "inset-area", 4090 "inset-block", 4091 "inset-block-end", 4092 "inset-block-start", 4093 "inset-inline", 4094 "inset-inline-end", 4095 "inset-inline-start", 4096 "isolation", 4097 "justify-content", 4098 "justify-items", 4099 "justify-self", 4100 "kerning", 4101 "left", 4102 "letter-spacing", 4103 "lighting-color", 4104 "line-break", 4105 "line-height", 4106 "line-height-step", 4107 "list-style", 4108 "list-style-image", 4109 "list-style-position", 4110 "list-style-type", 4111 "margin", 4112 "margin-block", 4113 "margin-block-end", 4114 "margin-block-start", 4115 "margin-bottom", 4116 "margin-inline", 4117 "margin-inline-end", 4118 "margin-inline-start", 4119 "margin-left", 4120 "margin-right", 4121 "margin-top", 4122 "margin-trim", 4123 "marker", 4124 "marker-end", 4125 "marker-mid", 4126 "marker-start", 4127 "marks", 4128 "mask", 4129 "mask-border", 4130 "mask-border-mode", 4131 "mask-border-outset", 4132 "mask-border-repeat", 4133 "mask-border-slice", 4134 "mask-border-source", 4135 "mask-border-width", 4136 "mask-clip", 4137 "mask-composite", 4138 "mask-image", 4139 "mask-mode", 4140 "mask-origin", 4141 "mask-position", 4142 "mask-repeat", 4143 "mask-size", 4144 "mask-type", 4145 "masonry-auto-flow", 4146 "math-depth", 4147 "math-shift", 4148 "math-style", 4149 "max-block-size", 4150 "max-height", 4151 "max-inline-size", 4152 "max-width", 4153 "min-block-size", 4154 "min-height", 4155 "min-inline-size", 4156 "min-width", 4157 "mix-blend-mode", 4158 "nav-down", 4159 "nav-index", 4160 "nav-left", 4161 "nav-right", 4162 "nav-up", 4163 "none", 4164 "normal", 4165 "object-fit", 4166 "object-position", 4167 "offset", 4168 "offset-anchor", 4169 "offset-distance", 4170 "offset-path", 4171 "offset-position", 4172 "offset-rotate", 4173 "opacity", 4174 "order", 4175 "orphans", 4176 "outline", 4177 "outline-color", 4178 "outline-offset", 4179 "outline-style", 4180 "outline-width", 4181 "overflow", 4182 "overflow-anchor", 4183 "overflow-block", 4184 "overflow-clip-margin", 4185 "overflow-inline", 4186 "overflow-wrap", 4187 "overflow-x", 4188 "overflow-y", 4189 "overlay", 4190 "overscroll-behavior", 4191 "overscroll-behavior-block", 4192 "overscroll-behavior-inline", 4193 "overscroll-behavior-x", 4194 "overscroll-behavior-y", 4195 "padding", 4196 "padding-block", 4197 "padding-block-end", 4198 "padding-block-start", 4199 "padding-bottom", 4200 "padding-inline", 4201 "padding-inline-end", 4202 "padding-inline-start", 4203 "padding-left", 4204 "padding-right", 4205 "padding-top", 4206 "page", 4207 "page-break-after", 4208 "page-break-before", 4209 "page-break-inside", 4210 "paint-order", 4211 "pause", 4212 "pause-after", 4213 "pause-before", 4214 "perspective", 4215 "perspective-origin", 4216 "place-content", 4217 "place-items", 4218 "place-self", 4219 "pointer-events", 4220 "position", 4221 "position-anchor", 4222 "position-visibility", 4223 "print-color-adjust", 4224 "quotes", 4225 "r", 4226 "resize", 4227 "rest", 4228 "rest-after", 4229 "rest-before", 4230 "right", 4231 "rotate", 4232 "row-gap", 4233 "ruby-align", 4234 "ruby-position", 4235 "scale", 4236 "scroll-behavior", 4237 "scroll-margin", 4238 "scroll-margin-block", 4239 "scroll-margin-block-end", 4240 "scroll-margin-block-start", 4241 "scroll-margin-bottom", 4242 "scroll-margin-inline", 4243 "scroll-margin-inline-end", 4244 "scroll-margin-inline-start", 4245 "scroll-margin-left", 4246 "scroll-margin-right", 4247 "scroll-margin-top", 4248 "scroll-padding", 4249 "scroll-padding-block", 4250 "scroll-padding-block-end", 4251 "scroll-padding-block-start", 4252 "scroll-padding-bottom", 4253 "scroll-padding-inline", 4254 "scroll-padding-inline-end", 4255 "scroll-padding-inline-start", 4256 "scroll-padding-left", 4257 "scroll-padding-right", 4258 "scroll-padding-top", 4259 "scroll-snap-align", 4260 "scroll-snap-stop", 4261 "scroll-snap-type", 4262 "scroll-timeline", 4263 "scroll-timeline-axis", 4264 "scroll-timeline-name", 4265 "scrollbar-color", 4266 "scrollbar-gutter", 4267 "scrollbar-width", 4268 "shape-image-threshold", 4269 "shape-margin", 4270 "shape-outside", 4271 "shape-rendering", 4272 "speak", 4273 "speak-as", 4274 "src", 4275 // @font-face 4276 "stop-color", 4277 "stop-opacity", 4278 "stroke", 4279 "stroke-dasharray", 4280 "stroke-dashoffset", 4281 "stroke-linecap", 4282 "stroke-linejoin", 4283 "stroke-miterlimit", 4284 "stroke-opacity", 4285 "stroke-width", 4286 "tab-size", 4287 "table-layout", 4288 "text-align", 4289 "text-align-all", 4290 "text-align-last", 4291 "text-anchor", 4292 "text-combine-upright", 4293 "text-decoration", 4294 "text-decoration-color", 4295 "text-decoration-line", 4296 "text-decoration-skip", 4297 "text-decoration-skip-ink", 4298 "text-decoration-style", 4299 "text-decoration-thickness", 4300 "text-emphasis", 4301 "text-emphasis-color", 4302 "text-emphasis-position", 4303 "text-emphasis-style", 4304 "text-indent", 4305 "text-justify", 4306 "text-orientation", 4307 "text-overflow", 4308 "text-rendering", 4309 "text-shadow", 4310 "text-size-adjust", 4311 "text-transform", 4312 "text-underline-offset", 4313 "text-underline-position", 4314 "text-wrap", 4315 "text-wrap-mode", 4316 "text-wrap-style", 4317 "timeline-scope", 4318 "top", 4319 "touch-action", 4320 "transform", 4321 "transform-box", 4322 "transform-origin", 4323 "transform-style", 4324 "transition", 4325 "transition-behavior", 4326 "transition-delay", 4327 "transition-duration", 4328 "transition-property", 4329 "transition-timing-function", 4330 "translate", 4331 "unicode-bidi", 4332 "unicode-range", 4333 "user-modify", 4334 "user-select", 4335 "vector-effect", 4336 "vertical-align", 4337 "view-timeline", 4338 "view-timeline-axis", 4339 "view-timeline-inset", 4340 "view-timeline-name", 4341 "view-transition-name", 4342 "visibility", 4343 "voice-balance", 4344 "voice-duration", 4345 "voice-family", 4346 "voice-pitch", 4347 "voice-range", 4348 "voice-rate", 4349 "voice-stress", 4350 "voice-volume", 4351 "white-space", 4352 "white-space-collapse", 4353 "widows", 4354 "width", 4355 "will-change", 4356 "word-break", 4357 "word-spacing", 4358 "word-wrap", 4359 "writing-mode", 4360 "x", 4361 "y", 4362 "z-index", 4363 "zoom" 4364 ].sort().reverse(); 4365 function css(hljs) { 4366 const regex = hljs.regex; 4367 const modes = MODES(hljs); 4368 const VENDOR_PREFIX = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }; 4369 const AT_MODIFIERS = "and or not only"; 4370 const AT_PROPERTY_RE = /@-?\w[\w]*(-\w+)*/; 4371 const IDENT_RE = "[a-zA-Z-][a-zA-Z0-9_-]*"; 4372 const STRINGS = [ 4373 hljs.APOS_STRING_MODE, 4374 hljs.QUOTE_STRING_MODE 4375 ]; 4376 return { 4377 name: "CSS", 4378 case_insensitive: true, 4379 illegal: /[=|'\$]/, 4380 keywords: { keyframePosition: "from to" }, 4381 classNameAliases: { 4382 // for visual continuity with `tag {}` and because we 4383 // don't have a great class for this? 4384 keyframePosition: "selector-tag" 4385 }, 4386 contains: [ 4387 modes.BLOCK_COMMENT, 4388 VENDOR_PREFIX, 4389 // to recognize keyframe 40% etc which are outside the scope of our 4390 // attribute value mode 4391 modes.CSS_NUMBER_MODE, 4392 { 4393 className: "selector-id", 4394 begin: /#[A-Za-z0-9_-]+/, 4395 relevance: 0 4396 }, 4397 { 4398 className: "selector-class", 4399 begin: "\\." + IDENT_RE, 4400 relevance: 0 4401 }, 4402 modes.ATTRIBUTE_SELECTOR_MODE, 4403 { 4404 className: "selector-pseudo", 4405 variants: [ 4406 { begin: ":(" + PSEUDO_CLASSES.join("|") + ")" }, 4407 { begin: ":(:)?(" + PSEUDO_ELEMENTS.join("|") + ")" } 4408 ] 4409 }, 4410 // we may actually need this (12/2020) 4411 // { // pseudo-selector params 4412 // begin: /\(/, 4413 // end: /\)/, 4414 // contains: [ hljs.CSS_NUMBER_MODE ] 4415 // }, 4416 modes.CSS_VARIABLE, 4417 { 4418 className: "attribute", 4419 begin: "\\b(" + ATTRIBUTES.join("|") + ")\\b" 4420 }, 4421 // attribute values 4422 { 4423 begin: /:/, 4424 end: /[;}{]/, 4425 contains: [ 4426 modes.BLOCK_COMMENT, 4427 modes.HEXCOLOR, 4428 modes.IMPORTANT, 4429 modes.CSS_NUMBER_MODE, 4430 modes.UNICODE_RANGE, 4431 ...STRINGS, 4432 // needed to highlight these as strings and to avoid issues with 4433 // illegal characters that might be inside urls that would trigger the 4434 // languages illegal stack 4435 { 4436 begin: /(url|data-uri)\(/, 4437 end: /\)/, 4438 relevance: 0, 4439 // from keywords 4440 keywords: { built_in: "url data-uri" }, 4441 contains: [ 4442 ...STRINGS, 4443 { 4444 className: "string", 4445 // any character other than `)` as in `url()` will be the start 4446 // of a string, which ends with `)` (from the parent mode) 4447 begin: /[^)]/, 4448 endsWithParent: true, 4449 excludeEnd: true 4450 } 4451 ] 4452 }, 4453 modes.FUNCTION_DISPATCH 4454 ] 4455 }, 4456 { 4457 begin: regex.lookahead(/@/), 4458 end: "[{;]", 4459 relevance: 0, 4460 illegal: /:/, 4461 // break on Less variables @var: ... 4462 contains: [ 4463 { 4464 className: "keyword", 4465 begin: AT_PROPERTY_RE 4466 }, 4467 { 4468 begin: /\s/, 4469 endsWithParent: true, 4470 excludeEnd: true, 4471 relevance: 0, 4472 keywords: { 4473 $pattern: /[a-z-]+/, 4474 keyword: AT_MODIFIERS, 4475 attribute: MEDIA_FEATURES.join(" ") 4476 }, 4477 contains: [ 4478 { 4479 begin: /[a-z-]+(?=:)/, 4480 className: "attribute" 4481 }, 4482 ...STRINGS, 4483 modes.CSS_NUMBER_MODE 4484 ] 4485 } 4486 ] 4487 }, 4488 { 4489 className: "selector-tag", 4490 begin: "\\b(" + TAGS.join("|") + ")\\b" 4491 } 4492 ] 4493 }; 4494 } 4495 module.exports = css; 4496 } 4497}); 4498
vendor: 6,096 bytes, lines 4499-4734
4499// node_modules/highlight.js/lib/languages/markdown.js 4500var require_markdown = __commonJS({ 4501 "node_modules/highlight.js/lib/languages/markdown.js"(exports, module) { 4502 function markdown(hljs) { 4503 const regex = hljs.regex; 4504 const INLINE_HTML = { 4505 begin: /<\/?[A-Za-z_]/, 4506 end: ">", 4507 subLanguage: "xml", 4508 relevance: 0 4509 }; 4510 const HORIZONTAL_RULE = { match: /^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/ }; 4511 const CODE = { 4512 className: "code", 4513 variants: [ 4514 // TODO: fix to allow these to work with sublanguage also 4515 { begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" }, 4516 { begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" }, 4517 // needed to allow markdown as a sublanguage to work 4518 { 4519 begin: "```", 4520 end: "```+[ ]*$" 4521 }, 4522 { 4523 begin: "~~~", 4524 end: "~~~+[ ]*$" 4525 }, 4526 { begin: "`.+?`" }, 4527 { 4528 begin: "(?=^( {4}|\\t))", 4529 // use contains to gobble up multiple lines to allow the block to be whatever size 4530 // but only have a single open/close tag vs one per line 4531 contains: [ 4532 { 4533 begin: "^( {4}|\\t)", 4534 end: "(\\n)$" 4535 } 4536 ], 4537 relevance: 0 4538 } 4539 ] 4540 }; 4541 const LIST = { 4542 className: "bullet", 4543 begin: "^[ ]*([*+-]|(\\d+\\.))(?=\\s+)", 4544 end: "\\s+", 4545 excludeEnd: true 4546 }; 4547 const LINK_REFERENCE = { 4548 begin: /^\[[^\n]+\]:/, 4549 returnBegin: true, 4550 contains: [ 4551 { 4552 className: "symbol", 4553 begin: /\[/, 4554 end: /\]/, 4555 excludeBegin: true, 4556 excludeEnd: true 4557 }, 4558 { 4559 className: "link", 4560 begin: /:\s*/, 4561 end: /$/, 4562 excludeBegin: true 4563 } 4564 ] 4565 }; 4566 const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/; 4567 const LINK = { 4568 variants: [ 4569 // too much like nested array access in so many languages 4570 // to have any real relevance 4571 { 4572 begin: /\[.+?\]\[.*?\]/, 4573 relevance: 0 4574 }, 4575 // popular internet URLs 4576 { 4577 begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, 4578 relevance: 2 4579 }, 4580 { 4581 begin: regex.concat(/\[.+?\]\(/, URL_SCHEME, /:\/\/.*?\)/), 4582 relevance: 2 4583 }, 4584 // relative urls 4585 { 4586 begin: /\[.+?\]\([./?&#].*?\)/, 4587 relevance: 1 4588 }, 4589 // whatever else, lower relevance (might not be a link at all) 4590 { 4591 begin: /\[.*?\]\(.*?\)/, 4592 relevance: 0 4593 } 4594 ], 4595 returnBegin: true, 4596 contains: [ 4597 { 4598 // empty strings for alt or link text 4599 match: /\[(?=\])/ 4600 }, 4601 { 4602 className: "string", 4603 relevance: 0, 4604 begin: "\\[", 4605 end: "\\]", 4606 excludeBegin: true, 4607 returnEnd: true 4608 }, 4609 { 4610 className: "link", 4611 relevance: 0, 4612 begin: "\\]\\(", 4613 end: "\\)", 4614 excludeBegin: true, 4615 excludeEnd: true 4616 }, 4617 { 4618 className: "symbol", 4619 relevance: 0, 4620 begin: "\\]\\[", 4621 end: "\\]", 4622 excludeBegin: true, 4623 excludeEnd: true 4624 } 4625 ] 4626 }; 4627 const BOLD = { 4628 className: "strong", 4629 contains: [], 4630 // defined later 4631 variants: [ 4632 { 4633 begin: /_{2}(?!\s)/, 4634 end: /_{2}/ 4635 }, 4636 { 4637 begin: /\*{2}(?!\s)/, 4638 end: /\*{2}/ 4639 } 4640 ] 4641 }; 4642 const ITALIC = { 4643 className: "emphasis", 4644 contains: [], 4645 // defined later 4646 variants: [ 4647 { 4648 begin: /\*(?![*\s])/, 4649 end: /\*/ 4650 }, 4651 { 4652 begin: /_(?![_\s])/, 4653 end: /_/, 4654 relevance: 0 4655 } 4656 ] 4657 }; 4658 const BOLD_WITHOUT_ITALIC = hljs.inherit(BOLD, { contains: [] }); 4659 const ITALIC_WITHOUT_BOLD = hljs.inherit(ITALIC, { contains: [] }); 4660 BOLD.contains.push(ITALIC_WITHOUT_BOLD); 4661 ITALIC.contains.push(BOLD_WITHOUT_ITALIC); 4662 let CONTAINABLE = [ 4663 INLINE_HTML, 4664 LINK 4665 ]; 4666 [ 4667 BOLD, 4668 ITALIC, 4669 BOLD_WITHOUT_ITALIC, 4670 ITALIC_WITHOUT_BOLD 4671 ].forEach((m) => { 4672 m.contains = m.contains.concat(CONTAINABLE); 4673 }); 4674 CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC); 4675 const HEADER = { 4676 className: "section", 4677 variants: [ 4678 { 4679 begin: "^#{1,6}", 4680 end: "$", 4681 contains: CONTAINABLE 4682 }, 4683 { 4684 begin: "(?=^.+?\\n[=-]{2,}$)", 4685 contains: [ 4686 { begin: "^[=-]*$" }, 4687 { 4688 begin: "^", 4689 end: "\\n", 4690 contains: CONTAINABLE 4691 } 4692 ] 4693 } 4694 ] 4695 }; 4696 const BLOCKQUOTE = { 4697 className: "quote", 4698 begin: "^>\\s+", 4699 contains: CONTAINABLE, 4700 end: "$" 4701 }; 4702 const ENTITY = { 4703 //https://spec.commonmark.org/0.31.2/#entity-references 4704 scope: "literal", 4705 match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/ 4706 }; 4707 return { 4708 name: "Markdown", 4709 aliases: [ 4710 "md", 4711 "mkdown", 4712 "mkd" 4713 ], 4714 contains: [ 4715 HEADER, 4716 INLINE_HTML, 4717 LIST, 4718 // must come before BOLD/ITALIC so that a `***` or `___` thematic break 4719 // isn't mistaken for the start of bold text 4720 HORIZONTAL_RULE, 4721 BOLD, 4722 ITALIC, 4723 BLOCKQUOTE, 4724 CODE, 4725 LINK, 4726 LINK_REFERENCE, 4727 ENTITY 4728 ] 4729 }; 4730 } 4731 module.exports = markdown; 4732 } 4733}); 4734
vendor: 1,627 bytes, lines 4735-4799
4735// node_modules/highlight.js/lib/languages/diff.js 4736var require_diff = __commonJS({ 4737 "node_modules/highlight.js/lib/languages/diff.js"(exports, module) { 4738 function diff(hljs) { 4739 const regex = hljs.regex; 4740 return { 4741 name: "Diff", 4742 aliases: ["patch"], 4743 contains: [ 4744 { 4745 className: "meta", 4746 relevance: 10, 4747 match: regex.either( 4748 /^@@ +-\d+,\d+ +\+\d+,\d+ +@@/, 4749 // @@ -1,2 +1,2 @@ 4750 /^@@ +-\d+ +\+\d+,\d+ +@@/, 4751 // @@ -1 +1,2 @@ 4752 /^@@ +-\d+,\d+ +\+\d+ +@@/, 4753 // @@ -1,2 +1 @@ 4754 /^@@ +-\d+ +\+\d+ +@@/, 4755 // @@ -1 +1 @@ 4756 /^\*\*\* +\d+,\d+ +\*\*\*\*$/, 4757 /^--- +\d+,\d+ +----$/ 4758 ) 4759 }, 4760 { 4761 className: "comment", 4762 variants: [ 4763 { 4764 begin: regex.either( 4765 /Index: /, 4766 /^index/, 4767 /={3,}/, 4768 /^-{3}/, 4769 /^\*{3} /, 4770 /^\+{3}/, 4771 /^diff --git/ 4772 ), 4773 end: /$/ 4774 }, 4775 { match: /^\*{15}$/ } 4776 ] 4777 }, 4778 { 4779 className: "addition", 4780 begin: /^\+/, 4781 end: /$/ 4782 }, 4783 { 4784 className: "deletion", 4785 begin: /^-/, 4786 end: /$/ 4787 }, 4788 { 4789 className: "addition", 4790 begin: /^!/, 4791 end: /$/ 4792 } 4793 ] 4794 }; 4795 } 4796 module.exports = diff; 4797 } 4798}); 4799
vendor: 10,831 bytes, lines 4800-5217
4800// node_modules/highlight.js/lib/languages/ruby.js 4801var require_ruby = __commonJS({ 4802 "node_modules/highlight.js/lib/languages/ruby.js"(exports, module) { 4803 function ruby(hljs) { 4804 const regex = hljs.regex; 4805 const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)"; 4806 const CLASS_NAME_RE = regex.either( 4807 /\b([A-Z]+[a-z0-9]+)+/, 4808 // ends in caps 4809 /\b([A-Z]+[a-z0-9]+)+[A-Z]+/ 4810 ); 4811 const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/); 4812 const PSEUDO_KWS = [ 4813 "include", 4814 "extend", 4815 "prepend", 4816 "public", 4817 "private", 4818 "protected", 4819 "raise", 4820 "throw" 4821 ]; 4822 const RUBY_KEYWORDS = { 4823 "variable.constant": [ 4824 "__FILE__", 4825 "__LINE__", 4826 "__ENCODING__" 4827 ], 4828 "variable.language": [ 4829 "self", 4830 "super" 4831 ], 4832 keyword: [ 4833 "alias", 4834 "and", 4835 "begin", 4836 "BEGIN", 4837 "break", 4838 "case", 4839 "class", 4840 "defined", 4841 "do", 4842 "else", 4843 "elsif", 4844 "end", 4845 "END", 4846 "ensure", 4847 "for", 4848 "if", 4849 "in", 4850 "module", 4851 "next", 4852 "not", 4853 "or", 4854 "redo", 4855 "require", 4856 "rescue", 4857 "retry", 4858 "return", 4859 "then", 4860 "undef", 4861 "unless", 4862 "until", 4863 "when", 4864 "while", 4865 "yield", 4866 ...PSEUDO_KWS 4867 ], 4868 built_in: [ 4869 "proc", 4870 "lambda", 4871 "attr_accessor", 4872 "attr_reader", 4873 "attr_writer", 4874 "define_method", 4875 "private_constant", 4876 "module_function" 4877 ], 4878 literal: [ 4879 "true", 4880 "false", 4881 "nil" 4882 ] 4883 }; 4884 const YARDOCTAG = { 4885 className: "doctag", 4886 begin: "@[A-Za-z]+" 4887 }; 4888 const IRB_OBJECT = { 4889 begin: "#<", 4890 end: ">" 4891 }; 4892 const COMMENT_MODES = [ 4893 hljs.COMMENT( 4894 "#", 4895 "$", 4896 { contains: [YARDOCTAG] } 4897 ), 4898 hljs.COMMENT( 4899 "^=begin", 4900 "^=end", 4901 { 4902 contains: [YARDOCTAG], 4903 relevance: 10 4904 } 4905 ), 4906 hljs.COMMENT("^__END__", hljs.MATCH_NOTHING_RE) 4907 ]; 4908 const SUBST = { 4909 className: "subst", 4910 begin: /#\{/, 4911 end: /\}/, 4912 keywords: RUBY_KEYWORDS 4913 }; 4914 const STRING = { 4915 className: "string", 4916 contains: [ 4917 hljs.BACKSLASH_ESCAPE, 4918 SUBST 4919 ], 4920 variants: [ 4921 { 4922 begin: /'/, 4923 end: /'/ 4924 }, 4925 { 4926 begin: /"/, 4927 end: /"/ 4928 }, 4929 { 4930 begin: /`/, 4931 end: /`/ 4932 }, 4933 { 4934 begin: /%[qQwWx]?\(/, 4935 end: /\)/ 4936 }, 4937 { 4938 begin: /%[qQwWx]?\[/, 4939 end: /\]/ 4940 }, 4941 { 4942 begin: /%[qQwWx]?\{/, 4943 end: /\}/ 4944 }, 4945 { 4946 begin: /%[qQwWx]?</, 4947 end: />/ 4948 }, 4949 { 4950 begin: /%[qQwWx]?\//, 4951 end: /\// 4952 }, 4953 { 4954 begin: /%[qQwWx]?%/, 4955 end: /%/ 4956 }, 4957 { 4958 begin: /%[qQwWx]?-/, 4959 end: /-/ 4960 }, 4961 { 4962 begin: /%[qQwWx]?\|/, 4963 end: /\|/ 4964 }, 4965 // in the following expressions, \B in the beginning suppresses recognition of ?-sequences 4966 // where ? is the last character of a preceding identifier, as in: `func?4` 4967 { begin: /\B\?(\\\d{1,3})/ }, 4968 { begin: /\B\?(\\x[A-Fa-f0-9]{1,2})/ }, 4969 { begin: /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ }, 4970 { begin: /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ }, 4971 { begin: /\B\?\\(c|C-)[\x20-\x7e]/ }, 4972 { begin: /\B\?\\?\S/ }, 4973 // heredocs 4974 { 4975 // this guard makes sure that we have an entire heredoc and not a false 4976 // positive (auto-detect, etc.) 4977 begin: regex.concat( 4978 /<<[-~]?'?/, 4979 regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/) 4980 ), 4981 contains: [ 4982 hljs.END_SAME_AS_BEGIN({ 4983 begin: /(\w+)/, 4984 end: /(\w+)/, 4985 contains: [ 4986 hljs.BACKSLASH_ESCAPE, 4987 SUBST 4988 ] 4989 }) 4990 ] 4991 } 4992 ] 4993 }; 4994 const decimal = "[1-9](_?[0-9])*|0"; 4995 const digits = "[0-9](_?[0-9])*"; 4996 const NUMBER = { 4997 className: "number", 4998 relevance: 0, 4999 variants: [ 5000 // decimal integer/float, optionally exponential or rational, optionally imaginary 5001 { begin: `\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b` }, 5002 // explicit decimal/binary/octal/hexadecimal integer, 5003 // optionally rational and/or imaginary 5004 { begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" }, 5005 { begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" }, 5006 { begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" }, 5007 { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" }, 5008 // 0-prefixed implicit octal integer, optionally rational and/or imaginary 5009 { begin: "\\b0(_?[0-7])+r?i?\\b" } 5010 ] 5011 }; 5012 const PARAMS = { 5013 variants: [ 5014 { 5015 match: /\(\)/ 5016 }, 5017 { 5018 className: "params", 5019 begin: /\(/, 5020 end: /(?=\))/, 5021 excludeBegin: true, 5022 endsParent: true, 5023 keywords: RUBY_KEYWORDS 5024 } 5025 ] 5026 }; 5027 const INCLUDE_EXTEND = { 5028 match: [ 5029 /(include|extend)\s+/, 5030 CLASS_NAME_WITH_NAMESPACE_RE 5031 ], 5032 scope: { 5033 2: "title.class" 5034 }, 5035 keywords: RUBY_KEYWORDS 5036 }; 5037 const CLASS_DEFINITION = { 5038 variants: [ 5039 { 5040 match: [ 5041 /class\s+/, 5042 CLASS_NAME_WITH_NAMESPACE_RE, 5043 /\s+<\s+/, 5044 CLASS_NAME_WITH_NAMESPACE_RE 5045 ] 5046 }, 5047 { 5048 match: [ 5049 /\b(class|module)\s+/, 5050 CLASS_NAME_WITH_NAMESPACE_RE 5051 ] 5052 } 5053 ], 5054 scope: { 5055 2: "title.class", 5056 4: "title.class.inherited" 5057 }, 5058 keywords: RUBY_KEYWORDS 5059 }; 5060 const UPPER_CASE_CONSTANT = { 5061 relevance: 0, 5062 match: /\b[A-Z][A-Z_0-9]+\b/, 5063 className: "variable.constant" 5064 }; 5065 const METHOD_DEFINITION = { 5066 match: [ 5067 /def/, 5068 /\s+/, 5069 RUBY_METHOD_RE 5070 ], 5071 scope: { 5072 1: "keyword", 5073 3: "title.function" 5074 }, 5075 contains: [ 5076 PARAMS 5077 ] 5078 }; 5079 const OBJECT_CREATION = { 5080 relevance: 0, 5081 match: [ 5082 CLASS_NAME_WITH_NAMESPACE_RE, 5083 /\.new[. (]/ 5084 ], 5085 scope: { 5086 1: "title.class" 5087 } 5088 }; 5089 const CLASS_REFERENCE = { 5090 relevance: 0, 5091 match: CLASS_NAME_RE, 5092 scope: "title.class" 5093 }; 5094 const RUBY_DEFAULT_CONTAINS = [ 5095 STRING, 5096 CLASS_DEFINITION, 5097 INCLUDE_EXTEND, 5098 OBJECT_CREATION, 5099 UPPER_CASE_CONSTANT, 5100 CLASS_REFERENCE, 5101 METHOD_DEFINITION, 5102 { 5103 // swallow the scope resolution operator so `::` is not read as a symbol 5104 begin: "::" 5105 }, 5106 { 5107 className: "symbol", 5108 begin: hljs.UNDERSCORE_IDENT_RE + "(!|\\?)?:", 5109 relevance: 0 5110 }, 5111 { 5112 className: "symbol", 5113 begin: ":(?!\\s)", 5114 contains: [ 5115 STRING, 5116 { begin: RUBY_METHOD_RE } 5117 ], 5118 relevance: 0 5119 }, 5120 NUMBER, 5121 { 5122 // negative-look forward attempts to prevent false matches like: 5123 // @ident@ or $ident$ that might indicate this is not ruby at all 5124 className: "variable", 5125 begin: `(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])` 5126 }, 5127 { 5128 className: "params", 5129 begin: /\|(?!=)/, 5130 end: /\|/, 5131 excludeBegin: true, 5132 excludeEnd: true, 5133 relevance: 0, 5134 // this could be a lot of things (in other languages) other than params 5135 keywords: RUBY_KEYWORDS 5136 }, 5137 { 5138 // regexp container 5139 begin: "(" + hljs.RE_STARTERS_RE + "|unless)\\s*", 5140 keywords: "unless", 5141 contains: [ 5142 { 5143 className: "regexp", 5144 contains: [ 5145 hljs.BACKSLASH_ESCAPE, 5146 SUBST 5147 ], 5148 illegal: /\n/, 5149 variants: [ 5150 { 5151 begin: "/", 5152 end: "/[a-z]*" 5153 }, 5154 { 5155 begin: /%r\{/, 5156 end: /\}[a-z]*/ 5157 }, 5158 { 5159 begin: "%r\\(", 5160 end: "\\)[a-z]*" 5161 }, 5162 { 5163 begin: "%r!", 5164 end: "![a-z]*" 5165 }, 5166 { 5167 begin: "%r\\[", 5168 end: "\\][a-z]*" 5169 } 5170 ] 5171 } 5172 ].concat(IRB_OBJECT, COMMENT_MODES), 5173 relevance: 0 5174 } 5175 ].concat(IRB_OBJECT, COMMENT_MODES); 5176 SUBST.contains = RUBY_DEFAULT_CONTAINS; 5177 PARAMS.contains = RUBY_DEFAULT_CONTAINS; 5178 const SIMPLE_PROMPT = "[>?]>"; 5179 const DEFAULT_PROMPT = "[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"; 5180 const RVM_PROMPT = "(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"; 5181 const IRB_DEFAULT = [ 5182 { 5183 begin: /^\s*=>/, 5184 starts: { 5185 end: "$", 5186 contains: RUBY_DEFAULT_CONTAINS 5187 } 5188 }, 5189 { 5190 className: "meta.prompt", 5191 begin: "^(" + SIMPLE_PROMPT + "|" + DEFAULT_PROMPT + "|" + RVM_PROMPT + ")(?=[ ])", 5192 starts: { 5193 end: "$", 5194 keywords: RUBY_KEYWORDS, 5195 contains: RUBY_DEFAULT_CONTAINS 5196 } 5197 } 5198 ]; 5199 COMMENT_MODES.unshift(IRB_OBJECT); 5200 return { 5201 name: "Ruby", 5202 aliases: [ 5203 "rb", 5204 "gemspec", 5205 "podspec", 5206 "thor", 5207 "irb" 5208 ], 5209 keywords: RUBY_KEYWORDS, 5210 illegal: /\/\*/, 5211 contains: [hljs.SHEBANG({ binary: "ruby" })].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS) 5212 }; 5213 } 5214 module.exports = ruby; 5215 } 5216}); 5217
vendor: 3,931 bytes, lines 5218-5381
5218// node_modules/highlight.js/lib/languages/go.js 5219var require_go = __commonJS({ 5220 "node_modules/highlight.js/lib/languages/go.js"(exports, module) { 5221 function go(hljs) { 5222 const LITERALS = [ 5223 "true", 5224 "false", 5225 "iota", 5226 "nil" 5227 ]; 5228 const BUILT_INS = [ 5229 "append", 5230 "cap", 5231 "close", 5232 "complex", 5233 "copy", 5234 "imag", 5235 "len", 5236 "make", 5237 "new", 5238 "panic", 5239 "print", 5240 "println", 5241 "real", 5242 "recover", 5243 "delete" 5244 ]; 5245 const TYPES = [ 5246 "bool", 5247 "byte", 5248 "complex64", 5249 "complex128", 5250 "error", 5251 "float32", 5252 "float64", 5253 "int8", 5254 "int16", 5255 "int32", 5256 "int64", 5257 "string", 5258 "uint8", 5259 "uint16", 5260 "uint32", 5261 "uint64", 5262 "int", 5263 "uint", 5264 "uintptr", 5265 "rune" 5266 ]; 5267 const KWS = [ 5268 "break", 5269 "case", 5270 "chan", 5271 "const", 5272 "continue", 5273 "default", 5274 "defer", 5275 "else", 5276 "fallthrough", 5277 "for", 5278 "func", 5279 "go", 5280 "goto", 5281 "if", 5282 "import", 5283 "interface", 5284 "map", 5285 "package", 5286 "range", 5287 "return", 5288 "select", 5289 "struct", 5290 "switch", 5291 "type", 5292 "var" 5293 ]; 5294 const KEYWORDS = { 5295 keyword: KWS, 5296 type: TYPES, 5297 literal: LITERALS, 5298 built_in: BUILT_INS 5299 }; 5300 return { 5301 name: "Go", 5302 aliases: ["golang"], 5303 keywords: KEYWORDS, 5304 illegal: "</", 5305 contains: [ 5306 hljs.C_LINE_COMMENT_MODE, 5307 hljs.C_BLOCK_COMMENT_MODE, 5308 { 5309 className: "string", 5310 variants: [ 5311 hljs.QUOTE_STRING_MODE, 5312 hljs.APOS_STRING_MODE, 5313 { 5314 begin: "`", 5315 end: "`" 5316 } 5317 ] 5318 }, 5319 { 5320 className: "number", 5321 variants: [ 5322 { 5323 match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/, 5324 // hex without a present digit before . (making a digit afterwards required) 5325 relevance: 0 5326 }, 5327 { 5328 match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/, 5329 // hex with a present digit before . (making a digit afterwards optional) 5330 relevance: 0 5331 }, 5332 { 5333 match: /-?\b0[oO](_?[0-7])*i?/, 5334 // leading 0o octal 5335 relevance: 0 5336 }, 5337 { 5338 match: /-?\b0[bB](_?[01])*i?/, 5339 // leading 0b binary 5340 relevance: 0 5341 }, 5342 { 5343 match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/, 5344 // decimal without a present digit before . (making a digit afterwards required) 5345 relevance: 0 5346 }, 5347 { 5348 match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/, 5349 // decimal with a present digit before . (making a digit afterwards optional) 5350 relevance: 0 5351 } 5352 ] 5353 }, 5354 { 5355 begin: /:=/ 5356 // relevance booster 5357 }, 5358 { 5359 className: "function", 5360 beginKeywords: "func", 5361 end: "\\s*(\\{|$)", 5362 excludeEnd: true, 5363 contains: [ 5364 hljs.TITLE_MODE, 5365 { 5366 className: "params", 5367 begin: /\(/, 5368 end: /\)/, 5369 endsParent: true, 5370 keywords: KEYWORDS, 5371 illegal: /["']/ 5372 } 5373 ] 5374 } 5375 ] 5376 }; 5377 } 5378 module.exports = go; 5379 } 5380}); 5381
vendor: 1,758 bytes, lines 5382-5456
5382// node_modules/highlight.js/lib/languages/graphql.js 5383var require_graphql = __commonJS({ 5384 "node_modules/highlight.js/lib/languages/graphql.js"(exports, module) { 5385 function graphql(hljs) { 5386 const regex = hljs.regex; 5387 const GQL_NAME = /[_A-Za-z][_0-9A-Za-z]*/; 5388 return { 5389 name: "GraphQL", 5390 aliases: ["gql"], 5391 case_insensitive: true, 5392 disableAutodetect: false, 5393 keywords: { 5394 keyword: [ 5395 "query", 5396 "mutation", 5397 "subscription", 5398 "type", 5399 "input", 5400 "schema", 5401 "directive", 5402 "interface", 5403 "union", 5404 "scalar", 5405 "fragment", 5406 "enum", 5407 "on" 5408 ], 5409 literal: [ 5410 "true", 5411 "false", 5412 "null" 5413 ] 5414 }, 5415 contains: [ 5416 hljs.HASH_COMMENT_MODE, 5417 hljs.QUOTE_STRING_MODE, 5418 hljs.NUMBER_MODE, 5419 { 5420 scope: "punctuation", 5421 match: /[.]{3}/, 5422 relevance: 0 5423 }, 5424 { 5425 scope: "punctuation", 5426 begin: /[\!\(\)\:\=\[\]\{\|\}]{1}/, 5427 relevance: 0 5428 }, 5429 { 5430 scope: "variable", 5431 begin: /\$/, 5432 end: /\W/, 5433 excludeEnd: true, 5434 relevance: 0 5435 }, 5436 { 5437 scope: "meta", 5438 match: /@\w+/, 5439 excludeEnd: true 5440 }, 5441 { 5442 scope: "symbol", 5443 begin: regex.concat(GQL_NAME, regex.lookahead(/\s*:/)), 5444 relevance: 0 5445 } 5446 ], 5447 illegal: [ 5448 /[;<']/, 5449 /BEGIN/ 5450 ] 5451 }; 5452 } 5453 module.exports = graphql; 5454 } 5455}); 5456
vendor: 2,710 bytes, lines 5457-5577
5457// node_modules/highlight.js/lib/languages/ini.js 5458var require_ini = __commonJS({ 5459 "node_modules/highlight.js/lib/languages/ini.js"(exports, module) { 5460 function ini(hljs) { 5461 const regex = hljs.regex; 5462 const NUMBERS = { 5463 className: "number", 5464 relevance: 0, 5465 variants: [ 5466 { begin: /([+-]+)?[\d]+_[\d_]+/ }, 5467 { begin: hljs.NUMBER_RE } 5468 ] 5469 }; 5470 const COMMENTS = hljs.COMMENT(); 5471 COMMENTS.variants = [ 5472 { 5473 begin: /;/, 5474 end: /$/ 5475 }, 5476 { 5477 begin: /#/, 5478 end: /$/ 5479 } 5480 ]; 5481 const VARIABLES = { 5482 className: "variable", 5483 variants: [ 5484 { begin: /\$[\w\d"][\w\d_]*/ }, 5485 { begin: /\$\{(.*?)\}/ } 5486 ] 5487 }; 5488 const LITERALS = { 5489 className: "literal", 5490 begin: /\bon|off|true|false|yes|no\b/ 5491 }; 5492 const STRINGS = { 5493 className: "string", 5494 contains: [hljs.BACKSLASH_ESCAPE], 5495 variants: [ 5496 { 5497 begin: "'''", 5498 end: "'''", 5499 relevance: 10 5500 }, 5501 { 5502 begin: '"""', 5503 end: '"""', 5504 relevance: 10 5505 }, 5506 { 5507 begin: '"', 5508 end: '"' 5509 }, 5510 { 5511 begin: "'", 5512 end: "'" 5513 } 5514 ] 5515 }; 5516 const ARRAY = { 5517 begin: /\[/, 5518 end: /\]/, 5519 contains: [ 5520 COMMENTS, 5521 LITERALS, 5522 VARIABLES, 5523 STRINGS, 5524 NUMBERS, 5525 "self" 5526 ], 5527 relevance: 0 5528 }; 5529 const BARE_KEY = /[A-Za-z0-9_-]+/; 5530 const QUOTED_KEY_DOUBLE_QUOTE = /"(\\"|[^"])*"/; 5531 const QUOTED_KEY_SINGLE_QUOTE = /'[^']*'/; 5532 const ANY_KEY = regex.either( 5533 BARE_KEY, 5534 QUOTED_KEY_DOUBLE_QUOTE, 5535 QUOTED_KEY_SINGLE_QUOTE 5536 ); 5537 const DOTTED_KEY = regex.concat( 5538 ANY_KEY, 5539 "(\\s*\\.\\s*", 5540 ANY_KEY, 5541 ")*", 5542 regex.lookahead(/\s*=\s*[^#\s]/) 5543 ); 5544 return { 5545 name: "TOML, also INI", 5546 aliases: ["toml"], 5547 case_insensitive: true, 5548 illegal: /\S/, 5549 contains: [ 5550 COMMENTS, 5551 { 5552 className: "section", 5553 begin: /\[+/, 5554 end: /\]+/ 5555 }, 5556 { 5557 begin: DOTTED_KEY, 5558 className: "attr", 5559 starts: { 5560 end: /$/, 5561 contains: [ 5562 COMMENTS, 5563 ARRAY, 5564 LITERALS, 5565 VARIABLES, 5566 STRINGS, 5567 NUMBERS 5568 ] 5569 } 5570 } 5571 ] 5572 }; 5573 } 5574 module.exports = ini; 5575 } 5576}); 5577
vendor: 7,415 bytes, lines 5578-5849
5578// node_modules/highlight.js/lib/languages/java.js 5579var require_java = __commonJS({ 5580 "node_modules/highlight.js/lib/languages/java.js"(exports, module) { 5581 var decimalDigits = "[0-9](_*[0-9])*"; 5582 var frac = `\\.(${decimalDigits})`; 5583 var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*"; 5584 var NUMERIC = { 5585 className: "number", 5586 variants: [ 5587 // DecimalFloatingPointLiteral 5588 // including ExponentPart 5589 { begin: `(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})[fFdD]?\\b` }, 5590 // excluding ExponentPart 5591 { begin: `\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)` }, 5592 { begin: `(${frac})[fFdD]?\\b` }, 5593 { begin: `\\b(${decimalDigits})[fFdD]\\b` }, 5594 // HexadecimalFloatingPointLiteral 5595 { begin: `\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))[pP][+-]?(${decimalDigits})[fFdD]?\\b` }, 5596 // DecimalIntegerLiteral 5597 { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" }, 5598 // HexIntegerLiteral 5599 { begin: `\\b0[xX](${hexDigits})[lL]?\\b` }, 5600 // OctalIntegerLiteral 5601 { begin: "\\b0(_*[0-7])*[lL]?\\b" }, 5602 // BinaryIntegerLiteral 5603 { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" } 5604 ], 5605 relevance: 0 5606 }; 5607 function recurRegex(re, substitution, depth) { 5608 if (depth === -1) return ""; 5609 return re.replace(substitution, (_) => { 5610 return recurRegex(re, substitution, depth - 1); 5611 }); 5612 } 5613 function java(hljs) { 5614 const regex = hljs.regex; 5615 const JAVA_IDENT_RE = "[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*"; 5616 const ARRAY_BRACKETS_OPTIONAL_RE = "(?:(?:\\s*\\[\\s*])+)?"; 5617 const SIMPLE_TYPE_RE = JAVA_IDENT_RE + "<@@@>" + ARRAY_BRACKETS_OPTIONAL_RE; 5618 const WILDCARD_TYPE_RE = "\\?(?:\\s+(?:extends|super)\\s+" + SIMPLE_TYPE_RE + ")?"; 5619 const TYPE_ARG_RE = "(?:" + WILDCARD_TYPE_RE + "|" + SIMPLE_TYPE_RE + ")"; 5620 const TYPE_ARGS_OPTIONAL_RE = recurRegex( 5621 "(?:\\s*<\\s*" + TYPE_ARG_RE + "(?:\\s*,\\s*" + TYPE_ARG_RE + ")*\\s*>)?", 5622 /<@@@>/g, 5623 2 5624 ); 5625 const MAIN_KEYWORDS = [ 5626 "synchronized", 5627 "abstract", 5628 "private", 5629 "var", 5630 "static", 5631 "if", 5632 "const ", 5633 "for", 5634 "while", 5635 "strictfp", 5636 "finally", 5637 "protected", 5638 "import", 5639 "native", 5640 "final", 5641 "void", 5642 "enum", 5643 "else", 5644 "break", 5645 "transient", 5646 "catch", 5647 "instanceof", 5648 "volatile", 5649 "case", 5650 "assert", 5651 "package", 5652 "default", 5653 "public", 5654 "try", 5655 "switch", 5656 "continue", 5657 "throws", 5658 "protected", 5659 "public", 5660 "private", 5661 "module", 5662 "requires", 5663 "exports", 5664 "do", 5665 "sealed", 5666 "yield", 5667 "permits", 5668 "goto", 5669 "when" 5670 ]; 5671 const BUILT_INS = [ 5672 "super", 5673 "this" 5674 ]; 5675 const LITERALS = [ 5676 "false", 5677 "true", 5678 "null" 5679 ]; 5680 const TYPES = [ 5681 "char", 5682 "boolean", 5683 "long", 5684 "float", 5685 "int", 5686 "byte", 5687 "short", 5688 "double" 5689 ]; 5690 const KEYWORDS = { 5691 keyword: MAIN_KEYWORDS, 5692 literal: LITERALS, 5693 type: TYPES, 5694 built_in: BUILT_INS 5695 }; 5696 const ANNOTATION = { 5697 className: "meta", 5698 begin: "@" + JAVA_IDENT_RE, 5699 contains: [ 5700 { 5701 begin: /\(/, 5702 end: /\)/, 5703 contains: ["self"] 5704 // allow nested () inside our annotation 5705 } 5706 ] 5707 }; 5708 const PARAMS = { 5709 className: "params", 5710 begin: /\(/, 5711 end: /\)/, 5712 keywords: KEYWORDS, 5713 relevance: 0, 5714 contains: [hljs.C_BLOCK_COMMENT_MODE], 5715 endsParent: true 5716 }; 5717 return { 5718 name: "Java", 5719 aliases: ["jsp"], 5720 keywords: KEYWORDS, 5721 illegal: /<\/|#/, 5722 contains: [ 5723 hljs.COMMENT( 5724 "/\\*\\*", 5725 "\\*/", 5726 { 5727 relevance: 0, 5728 contains: [ 5729 { 5730 // eat up @'s in emails to prevent them to be recognized as doctags 5731 begin: /\w+@/, 5732 relevance: 0 5733 }, 5734 { 5735 className: "doctag", 5736 begin: "@[A-Za-z]+" 5737 } 5738 ] 5739 } 5740 ), 5741 // relevance boost 5742 { 5743 begin: /import java\.[a-z]+\./, 5744 keywords: "import", 5745 relevance: 2 5746 }, 5747 hljs.C_LINE_COMMENT_MODE, 5748 hljs.C_BLOCK_COMMENT_MODE, 5749 { 5750 begin: /"""/, 5751 end: /"""/, 5752 className: "string", 5753 contains: [hljs.BACKSLASH_ESCAPE] 5754 }, 5755 hljs.APOS_STRING_MODE, 5756 hljs.QUOTE_STRING_MODE, 5757 { 5758 match: [ 5759 /\b(?:class|interface|enum|extends|implements|new)/, 5760 /\s+/, 5761 JAVA_IDENT_RE 5762 ], 5763 className: { 5764 1: "keyword", 5765 3: "title.class" 5766 } 5767 }, 5768 { 5769 // Exceptions for hyphenated keywords 5770 match: /non-sealed/, 5771 scope: "keyword" 5772 }, 5773 { 5774 // Expression keywords prevent keyword-led expressions from being 5775 // recognized as variable or method declarations. 5776 beginKeywords: "new throw return else yield assert", 5777 relevance: 0 5778 }, 5779 { 5780 begin: [ 5781 JAVA_IDENT_RE, 5782 regex.concat(TYPE_ARGS_OPTIONAL_RE, ARRAY_BRACKETS_OPTIONAL_RE, /\s+/), 5783 JAVA_IDENT_RE, 5784 ARRAY_BRACKETS_OPTIONAL_RE, 5785 /\s*/, 5786 /=(?!=)/ 5787 ], 5788 className: { 5789 1: "type", 5790 3: "variable", 5791 6: "operator" 5792 } 5793 }, 5794 { 5795 begin: [ 5796 /record/, 5797 /\s+/, 5798 JAVA_IDENT_RE 5799 ], 5800 className: { 5801 1: "keyword", 5802 3: "title.class" 5803 }, 5804 contains: [ 5805 PARAMS, 5806 hljs.C_LINE_COMMENT_MODE, 5807 hljs.C_BLOCK_COMMENT_MODE 5808 ] 5809 }, 5810 { 5811 begin: [ 5812 JAVA_IDENT_RE, 5813 regex.concat(TYPE_ARGS_OPTIONAL_RE, ARRAY_BRACKETS_OPTIONAL_RE, /\s+/), 5814 JAVA_IDENT_RE, 5815 /\s*(?=\()/ 5816 ], 5817 className: { 5818 1: "type", 5819 3: "title.function" 5820 }, 5821 keywords: KEYWORDS, 5822 contains: [ 5823 { 5824 className: "params", 5825 begin: /\(/, 5826 end: /\)/, 5827 keywords: KEYWORDS, 5828 relevance: 0, 5829 contains: [ 5830 ANNOTATION, 5831 hljs.APOS_STRING_MODE, 5832 hljs.QUOTE_STRING_MODE, 5833 NUMERIC, 5834 hljs.C_BLOCK_COMMENT_MODE 5835 ] 5836 }, 5837 hljs.C_LINE_COMMENT_MODE, 5838 hljs.C_BLOCK_COMMENT_MODE 5839 ] 5840 }, 5841 NUMERIC, 5842 ANNOTATION 5843 ] 5844 }; 5845 } 5846 module.exports = java; 5847 } 5848}); 5849
vendor: 19,107 bytes, lines 5850-6557
5850// node_modules/highlight.js/lib/languages/javascript.js 5851var require_javascript = __commonJS({ 5852 "node_modules/highlight.js/lib/languages/javascript.js"(exports, module) { 5853 var IDENT_RE = "[A-Za-z$_][0-9A-Za-z$_]*"; 5854 var KEYWORDS = [ 5855 "as", 5856 // for exports 5857 "in", 5858 "of", 5859 "if", 5860 "for", 5861 "while", 5862 "finally", 5863 "var", 5864 "new", 5865 "function", 5866 "do", 5867 "return", 5868 "void", 5869 "else", 5870 "break", 5871 "catch", 5872 "instanceof", 5873 "with", 5874 "throw", 5875 "case", 5876 "default", 5877 "try", 5878 "switch", 5879 "continue", 5880 "typeof", 5881 "delete", 5882 "let", 5883 "yield", 5884 "const", 5885 "class", 5886 // JS handles these with a special rule 5887 // "get", 5888 // "set", 5889 "debugger", 5890 "async", 5891 "await", 5892 "static", 5893 "import", 5894 "from", 5895 "export", 5896 "extends", 5897 // It's reached stage 3, which is "recommended for implementation": 5898 "using" 5899 ]; 5900 var LITERALS = [ 5901 "true", 5902 "false", 5903 "null", 5904 "undefined", 5905 "NaN", 5906 "Infinity" 5907 ]; 5908 var TYPES = [ 5909 // Fundamental objects 5910 "Object", 5911 "Function", 5912 "Boolean", 5913 "Symbol", 5914 // numbers and dates 5915 "Math", 5916 "Date", 5917 "Number", 5918 "BigInt", 5919 // text 5920 "String", 5921 "RegExp", 5922 // Indexed collections 5923 "Array", 5924 "Float32Array", 5925 "Float64Array", 5926 "Int8Array", 5927 "Uint8Array", 5928 "Uint8ClampedArray", 5929 "Int16Array", 5930 "Int32Array", 5931 "Uint16Array", 5932 "Uint32Array", 5933 "BigInt64Array", 5934 "BigUint64Array", 5935 // Keyed collections 5936 "Set", 5937 "Map", 5938 "WeakSet", 5939 "WeakMap", 5940 // Structured data 5941 "ArrayBuffer", 5942 "SharedArrayBuffer", 5943 "Atomics", 5944 "DataView", 5945 "JSON", 5946 // Control abstraction objects 5947 "Promise", 5948 "Generator", 5949 "GeneratorFunction", 5950 "AsyncFunction", 5951 // Reflection 5952 "Reflect", 5953 "Proxy", 5954 // Internationalization 5955 "Intl", 5956 // WebAssembly 5957 "WebAssembly" 5958 ]; 5959 var ERROR_TYPES = [ 5960 "Error", 5961 "EvalError", 5962 "InternalError", 5963 "RangeError", 5964 "ReferenceError", 5965 "SyntaxError", 5966 "TypeError", 5967 "URIError" 5968 ]; 5969 var BUILT_IN_GLOBALS = [ 5970 "setInterval", 5971 "setTimeout", 5972 "clearInterval", 5973 "clearTimeout", 5974 "require", 5975 "exports", 5976 "eval", 5977 "isFinite", 5978 "isNaN", 5979 "parseFloat", 5980 "parseInt", 5981 "decodeURI", 5982 "decodeURIComponent", 5983 "encodeURI", 5984 "encodeURIComponent", 5985 "escape", 5986 "unescape" 5987 ]; 5988 var BUILT_IN_VARIABLES = [ 5989 "arguments", 5990 "this", 5991 "super", 5992 "console", 5993 "window", 5994 "document", 5995 "localStorage", 5996 "sessionStorage", 5997 "module", 5998 "self", 5999 "global" 6000 // Node.js 6001 ]; 6002 var BUILT_INS = [].concat( 6003 BUILT_IN_GLOBALS, 6004 TYPES, 6005 ERROR_TYPES 6006 ); 6007 function javascript(hljs) { 6008 const regex = hljs.regex; 6009 const hasClosingTag = (match, { after }) => { 6010 const tag = "</" + match[0].slice(1); 6011 const pos = match.input.indexOf(tag, after); 6012 return pos !== -1; 6013 }; 6014 const IDENT_RE$1 = IDENT_RE; 6015 const FRAGMENT = { 6016 begin: "<>", 6017 end: "</>" 6018 }; 6019 const XML_SELF_CLOSING = /<[A-Za-z0-9\\._:-]+\s*\/>/; 6020 const XML_TAG = { 6021 begin: /<[A-Za-z0-9\\._:-]+/, 6022 end: /\/[A-Za-z0-9\\._:-]+>|\/>/, 6023 /** 6024 * @param {RegExpMatchArray} match 6025 * @param {CallbackResponse} response 6026 */ 6027 isTrulyOpeningTag: (match, response) => { 6028 const afterMatchIndex = match[0].length + match.index; 6029 const nextChar = match.input[afterMatchIndex]; 6030 if ( 6031 // HTML should not include another raw `<` inside a tag 6032 // nested type? 6033 // `<Array<Array<number>>`, etc. 6034 nextChar === "<" || // the , gives away that this is not HTML 6035 // `<T, A extends keyof T, V>` 6036 nextChar === "," 6037 ) { 6038 response.ignoreMatch(); 6039 return; 6040 } 6041 if (nextChar === ">") { 6042 if (!hasClosingTag(match, { after: afterMatchIndex })) { 6043 response.ignoreMatch(); 6044 } 6045 } 6046 let m; 6047 const afterMatch = match.input.substring(afterMatchIndex); 6048 if (m = afterMatch.match(/^\s*=/)) { 6049 response.ignoreMatch(); 6050 return; 6051 } 6052 if (m = afterMatch.match(/^\s+extends\s+/)) { 6053 if (m.index === 0) { 6054 response.ignoreMatch(); 6055 return; 6056 } 6057 } 6058 } 6059 }; 6060 const KEYWORDS$1 = { 6061 $pattern: IDENT_RE, 6062 keyword: KEYWORDS, 6063 literal: LITERALS, 6064 built_in: BUILT_INS, 6065 "variable.language": BUILT_IN_VARIABLES 6066 }; 6067 const decimalDigits = "[0-9](_?[0-9])*"; 6068 const frac = `\\.(${decimalDigits})`; 6069 const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`; 6070 const NUMBER = { 6071 className: "number", 6072 variants: [ 6073 // DecimalLiteral 6074 { begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})\\b` }, 6075 { begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` }, 6076 // DecimalBigIntegerLiteral 6077 { begin: `\\b(0|[1-9](_?[0-9])*)n\\b` }, 6078 // NonDecimalIntegerLiteral 6079 { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" }, 6080 { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" }, 6081 { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" }, 6082 // LegacyOctalIntegerLiteral (does not include underscore separators) 6083 // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals 6084 { begin: "\\b0[0-7]+n?\\b" } 6085 ], 6086 relevance: 0 6087 }; 6088 const SUBST = { 6089 className: "subst", 6090 begin: "\\$\\{", 6091 end: "\\}", 6092 keywords: KEYWORDS$1, 6093 contains: [] 6094 // defined later 6095 }; 6096 const HTML_TEMPLATE = { 6097 begin: ".?html`", 6098 end: "", 6099 starts: { 6100 end: "`", 6101 returnEnd: false, 6102 contains: [ 6103 hljs.BACKSLASH_ESCAPE, 6104 SUBST 6105 ], 6106 subLanguage: "xml" 6107 } 6108 }; 6109 const CSS_TEMPLATE = { 6110 begin: ".?css`", 6111 end: "", 6112 starts: { 6113 end: "`", 6114 returnEnd: false, 6115 contains: [ 6116 hljs.BACKSLASH_ESCAPE, 6117 SUBST 6118 ], 6119 subLanguage: "css" 6120 } 6121 }; 6122 const GRAPHQL_TEMPLATE = { 6123 begin: ".?gql`", 6124 end: "", 6125 starts: { 6126 end: "`", 6127 returnEnd: false, 6128 contains: [ 6129 hljs.BACKSLASH_ESCAPE, 6130 SUBST 6131 ], 6132 subLanguage: "graphql" 6133 } 6134 }; 6135 const TEMPLATE_STRING = { 6136 className: "string", 6137 begin: "`", 6138 end: "`", 6139 contains: [ 6140 hljs.BACKSLASH_ESCAPE, 6141 SUBST 6142 ] 6143 }; 6144 const JSDOC_COMMENT = hljs.COMMENT( 6145 /\/\*\*(?!\/)/, 6146 "\\*/", 6147 { 6148 relevance: 0, 6149 contains: [ 6150 { 6151 begin: "(?=@[A-Za-z]+)", 6152 relevance: 0, 6153 contains: [ 6154 { 6155 className: "doctag", 6156 begin: "@[A-Za-z]+" 6157 }, 6158 { 6159 className: "type", 6160 begin: "\\{", 6161 end: "\\}", 6162 excludeEnd: true, 6163 excludeBegin: true, 6164 relevance: 0 6165 }, 6166 { 6167 className: "variable", 6168 begin: IDENT_RE$1 + "(?=\\s*(-)|$)", 6169 endsParent: true, 6170 relevance: 0 6171 }, 6172 // eat spaces (not newlines) so we can find 6173 // types or variables 6174 { 6175 begin: /(?=[^\n])\s/, 6176 relevance: 0 6177 } 6178 ] 6179 } 6180 ] 6181 } 6182 ); 6183 const COMMENT = { 6184 className: "comment", 6185 variants: [ 6186 JSDOC_COMMENT, 6187 hljs.C_BLOCK_COMMENT_MODE, 6188 hljs.C_LINE_COMMENT_MODE 6189 ] 6190 }; 6191 const SUBST_INTERNALS = [ 6192 hljs.APOS_STRING_MODE, 6193 hljs.QUOTE_STRING_MODE, 6194 HTML_TEMPLATE, 6195 CSS_TEMPLATE, 6196 GRAPHQL_TEMPLATE, 6197 TEMPLATE_STRING, 6198 // Skip numbers when they are part of a variable name 6199 { match: /\$\d+/ }, 6200 NUMBER 6201 // This is intentional: 6202 // See https://github.com/highlightjs/highlight.js/issues/3288 6203 // hljs.REGEXP_MODE 6204 ]; 6205 SUBST.contains = SUBST_INTERNALS.concat({ 6206 // we need to pair up {} inside our subst to prevent 6207 // it from ending too early by matching another } 6208 begin: /\{/, 6209 end: /\}/, 6210 keywords: KEYWORDS$1, 6211 contains: [ 6212 "self" 6213 ].concat(SUBST_INTERNALS) 6214 }); 6215 const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains); 6216 const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([ 6217 // eat recursive parens in sub expressions 6218 { 6219 begin: /(\s*)\(/, 6220 end: /\)/, 6221 keywords: KEYWORDS$1, 6222 contains: ["self"].concat(SUBST_AND_COMMENTS) 6223 } 6224 ]); 6225 const PARAMS = { 6226 className: "params", 6227 // convert this to negative lookbehind in v12 6228 begin: /(\s*)\(/, 6229 // to match the parms with 6230 end: /\)/, 6231 excludeBegin: true, 6232 excludeEnd: true, 6233 keywords: KEYWORDS$1, 6234 contains: PARAMS_CONTAINS 6235 }; 6236 const CLASS_OR_EXTENDS = { 6237 variants: [ 6238 // class Car extends vehicle 6239 { 6240 match: [ 6241 /class/, 6242 /\s+/, 6243 IDENT_RE$1, 6244 /\s+/, 6245 /extends/, 6246 /\s+/, 6247 regex.concat(IDENT_RE$1, "(", regex.concat(/\./, IDENT_RE$1), ")*") 6248 ], 6249 scope: { 6250 1: "keyword", 6251 3: "title.class", 6252 5: "keyword", 6253 7: "title.class.inherited" 6254 } 6255 }, 6256 // class Car 6257 { 6258 match: [ 6259 /class/, 6260 /\s+/, 6261 IDENT_RE$1 6262 ], 6263 scope: { 6264 1: "keyword", 6265 3: "title.class" 6266 } 6267 } 6268 ] 6269 }; 6270 const CLASS_REFERENCE = { 6271 relevance: 0, 6272 match: regex.either( 6273 // Hard coded exceptions 6274 /\bJSON/, 6275 // Float32Array, OutT 6276 /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, 6277 // CSSFactory, CSSFactoryT 6278 /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, 6279 // FPs, FPsT 6280 /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/ 6281 // P 6282 // single letters are not highlighted 6283 // BLAH 6284 // this will be flagged as a UPPER_CASE_CONSTANT instead 6285 ), 6286 className: "title.class", 6287 keywords: { 6288 _: [ 6289 // se we still get relevance credit for JS library classes 6290 ...TYPES, 6291 ...ERROR_TYPES 6292 ] 6293 } 6294 }; 6295 const USE_STRICT = { 6296 label: "use_strict", 6297 className: "meta", 6298 relevance: 10, 6299 begin: /^\s*['"]use (strict|asm)['"]/ 6300 }; 6301 const FUNCTION_DEFINITION = { 6302 variants: [ 6303 { 6304 match: [ 6305 /function/, 6306 /\s+/, 6307 IDENT_RE$1, 6308 /(?=\s*\()/ 6309 ] 6310 }, 6311 // anonymous function 6312 { 6313 match: [ 6314 /function/, 6315 /\s*(?=\()/ 6316 ] 6317 } 6318 ], 6319 className: { 6320 1: "keyword", 6321 3: "title.function" 6322 }, 6323 label: "func.def", 6324 contains: [PARAMS], 6325 illegal: /%/ 6326 }; 6327 const UPPER_CASE_CONSTANT = { 6328 relevance: 0, 6329 match: /\b[A-Z][A-Z_0-9]+\b/, 6330 className: "variable.constant" 6331 }; 6332 function noneOf(list) { 6333 return regex.concat("(?!", list.join("|"), ")"); 6334 } 6335 const FUNCTION_CALL = { 6336 match: regex.concat( 6337 /\b/, 6338 noneOf([ 6339 ...BUILT_IN_GLOBALS, 6340 "super", 6341 "import", 6342 "await" 6343 ].map((x) => `${x}\\s*\\(`)), 6344 IDENT_RE$1, 6345 regex.lookahead(/\s*\(/) 6346 ), 6347 className: "title.function", 6348 relevance: 0 6349 }; 6350 const PROPERTY_ACCESS = { 6351 begin: regex.concat(/\./, regex.lookahead( 6352 regex.concat(IDENT_RE$1, /(?![0-9A-Za-z$_(])/) 6353 )), 6354 end: IDENT_RE$1, 6355 excludeBegin: true, 6356 keywords: "prototype", 6357 className: "property", 6358 relevance: 0 6359 }; 6360 const GETTER_OR_SETTER = { 6361 match: [ 6362 /get|set/, 6363 /\s+/, 6364 IDENT_RE$1, 6365 /(?=\()/ 6366 ], 6367 className: { 6368 1: "keyword", 6369 3: "title.function" 6370 }, 6371 contains: [ 6372 { 6373 // eat to avoid empty params 6374 begin: /\(\)/ 6375 }, 6376 PARAMS 6377 ] 6378 }; 6379 const FUNC_LEAD_IN_RE = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + hljs.UNDERSCORE_IDENT_RE + ")\\s*=>"; 6380 const FUNCTION_VARIABLE = { 6381 match: [ 6382 /const|var|let/, 6383 /\s+/, 6384 IDENT_RE$1, 6385 /\s*/, 6386 /=\s*/, 6387 /(async\s*)?/, 6388 // async is optional 6389 regex.lookahead(FUNC_LEAD_IN_RE) 6390 ], 6391 keywords: "async", 6392 className: { 6393 1: "keyword", 6394 3: "title.function" 6395 }, 6396 contains: [ 6397 PARAMS 6398 ] 6399 }; 6400 return { 6401 name: "JavaScript", 6402 aliases: ["js", "jsx", "mjs", "cjs"], 6403 keywords: KEYWORDS$1, 6404 // this will be extended by TypeScript 6405 exports: { PARAMS_CONTAINS, CLASS_REFERENCE }, 6406 illegal: /#(?![$_A-Za-z])/, 6407 contains: [ 6408 hljs.SHEBANG({ 6409 label: "shebang", 6410 binary: "node", 6411 relevance: 5 6412 }), 6413 USE_STRICT, 6414 hljs.APOS_STRING_MODE, 6415 hljs.QUOTE_STRING_MODE, 6416 HTML_TEMPLATE, 6417 CSS_TEMPLATE, 6418 GRAPHQL_TEMPLATE, 6419 TEMPLATE_STRING, 6420 COMMENT, 6421 // Skip numbers when they are part of a variable name 6422 { match: /\$\d+/ }, 6423 NUMBER, 6424 CLASS_REFERENCE, 6425 { 6426 scope: "attr", 6427 match: IDENT_RE$1 + regex.lookahead(":"), 6428 relevance: 0 6429 }, 6430 FUNCTION_VARIABLE, 6431 { 6432 // "value" container 6433 begin: "(" + hljs.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", 6434 keywords: "return throw case", 6435 relevance: 0, 6436 contains: [ 6437 COMMENT, 6438 hljs.REGEXP_MODE, 6439 { 6440 className: "function", 6441 // we have to count the parens to make sure we actually have the 6442 // correct bounding ( ) before the =>. There could be any number of 6443 // sub-expressions inside also surrounded by parens. 6444 begin: FUNC_LEAD_IN_RE, 6445 returnBegin: true, 6446 end: "\\s*=>", 6447 contains: [ 6448 { 6449 className: "params", 6450 variants: [ 6451 { 6452 begin: hljs.UNDERSCORE_IDENT_RE, 6453 relevance: 0 6454 }, 6455 { 6456 className: null, 6457 begin: /\(\s*\)/, 6458 skip: true 6459 }, 6460 { 6461 begin: /(\s*)\(/, 6462 end: /\)/, 6463 excludeBegin: true, 6464 excludeEnd: true, 6465 keywords: KEYWORDS$1, 6466 contains: PARAMS_CONTAINS 6467 } 6468 ] 6469 } 6470 ] 6471 }, 6472 { 6473 // could be a comma delimited list of params to a function call 6474 begin: /,/, 6475 relevance: 0 6476 }, 6477 { 6478 match: /\s+/, 6479 relevance: 0 6480 }, 6481 { 6482 // JSX 6483 variants: [ 6484 { begin: FRAGMENT.begin, end: FRAGMENT.end }, 6485 { match: XML_SELF_CLOSING }, 6486 { 6487 begin: XML_TAG.begin, 6488 // we carefully check the opening tag to see if it truly 6489 // is a tag and not a false positive 6490 "on:begin": XML_TAG.isTrulyOpeningTag, 6491 end: XML_TAG.end 6492 } 6493 ], 6494 subLanguage: "xml", 6495 contains: [ 6496 { 6497 begin: XML_TAG.begin, 6498 end: XML_TAG.end, 6499 skip: true, 6500 contains: ["self"] 6501 } 6502 ] 6503 } 6504 ] 6505 }, 6506 FUNCTION_DEFINITION, 6507 { 6508 // prevent this from getting swallowed up by function 6509 // since they appear "function like" 6510 beginKeywords: "while if switch catch for" 6511 }, 6512 { 6513 // we have to count the parens to make sure we actually have the correct 6514 // bounding ( ). There could be any number of sub-expressions inside 6515 // also surrounded by parens. 6516 begin: "\\b(?!function)" + hljs.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", 6517 // end parens 6518 returnBegin: true, 6519 label: "func.def", 6520 contains: [ 6521 PARAMS, 6522 hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1, className: "title.function" }) 6523 ] 6524 }, 6525 // catch ... so it won't trigger the property rule below 6526 { 6527 match: /\.\.\./, 6528 relevance: 0 6529 }, 6530 PROPERTY_ACCESS, 6531 // hack: prevents detection of keywords in some circumstances 6532 // .keyword() 6533 // $keyword = x 6534 { 6535 match: "\\$" + IDENT_RE$1, 6536 relevance: 0 6537 }, 6538 { 6539 match: [/\bconstructor(?=\s*\()/], 6540 className: { 1: "title.function" }, 6541 contains: [PARAMS] 6542 }, 6543 FUNCTION_CALL, 6544 UPPER_CASE_CONSTANT, 6545 CLASS_OR_EXTENDS, 6546 GETTER_OR_SETTER, 6547 { 6548 match: /\$[(.]/ 6549 // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` 6550 } 6551 ] 6552 }; 6553 } 6554 module.exports = javascript; 6555 } 6556}); 6557
vendor: 1,364 bytes, lines 6558-6609
6558// node_modules/highlight.js/lib/languages/json.js 6559var require_json = __commonJS({ 6560 "node_modules/highlight.js/lib/languages/json.js"(exports, module) { 6561 var EXTENDED_NUMBER_RE = "([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity"; 6562 var EXTENDED_NUMBER_MODE = { 6563 scope: "number", 6564 match: EXTENDED_NUMBER_RE, 6565 relevance: 0 6566 }; 6567 function json(hljs) { 6568 const ATTRIBUTE = { 6569 className: "attr", 6570 begin: /(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/, 6571 relevance: 1.01 6572 }; 6573 const PUNCTUATION = { 6574 match: /[{}[\],:]/, 6575 className: "punctuation", 6576 relevance: 0 6577 }; 6578 const LITERALS = [ 6579 "true", 6580 "false", 6581 "null" 6582 ]; 6583 const LITERALS_MODE = { 6584 scope: "literal", 6585 beginKeywords: LITERALS.join(" ") 6586 }; 6587 return { 6588 name: "JSON", 6589 aliases: ["jsonc", "json5"], 6590 keywords: { 6591 literal: LITERALS 6592 }, 6593 contains: [ 6594 ATTRIBUTE, 6595 PUNCTUATION, 6596 hljs.APOS_STRING_MODE, 6597 hljs.QUOTE_STRING_MODE, 6598 LITERALS_MODE, 6599 EXTENDED_NUMBER_MODE, 6600 hljs.C_LINE_COMMENT_MODE, 6601 hljs.C_BLOCK_COMMENT_MODE 6602 ], 6603 illegal: "\\S" 6604 }; 6605 } 6606 module.exports = json; 6607 } 6608}); 6609
vendor: 8,012 bytes, lines 6610-6871
6610// node_modules/highlight.js/lib/languages/kotlin.js 6611var require_kotlin = __commonJS({ 6612 "node_modules/highlight.js/lib/languages/kotlin.js"(exports, module) { 6613 var decimalDigits = "[0-9](_*[0-9])*"; 6614 var frac = `\\.(${decimalDigits})`; 6615 var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*"; 6616 var NUMERIC = { 6617 className: "number", 6618 variants: [ 6619 // DecimalFloatingPointLiteral 6620 // including ExponentPart 6621 { begin: `(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})[fFdD]?\\b` }, 6622 // excluding ExponentPart 6623 { begin: `\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)` }, 6624 { begin: `(${frac})[fFdD]?\\b` }, 6625 { begin: `\\b(${decimalDigits})[fFdD]\\b` }, 6626 // HexadecimalFloatingPointLiteral 6627 { begin: `\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))[pP][+-]?(${decimalDigits})[fFdD]?\\b` }, 6628 // DecimalIntegerLiteral 6629 { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" }, 6630 // HexIntegerLiteral 6631 { begin: `\\b0[xX](${hexDigits})[lL]?\\b` }, 6632 // OctalIntegerLiteral 6633 { begin: "\\b0(_*[0-7])*[lL]?\\b" }, 6634 // BinaryIntegerLiteral 6635 { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" } 6636 ], 6637 relevance: 0 6638 }; 6639 function kotlin(hljs) { 6640 const KEYWORDS = { 6641 keyword: "abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", 6642 built_in: "Byte Short Char Int Long Boolean Float Double Void Unit Nothing", 6643 literal: "true false null" 6644 }; 6645 const KEYWORDS_WITH_LABEL = { 6646 className: "keyword", 6647 begin: /\b(break|continue|return|this)\b/, 6648 starts: { contains: [ 6649 { 6650 className: "symbol", 6651 begin: /@\w+/ 6652 } 6653 ] } 6654 }; 6655 const LABEL = { 6656 className: "symbol", 6657 begin: hljs.UNDERSCORE_IDENT_RE + "@" 6658 }; 6659 const SUBST = { 6660 className: "subst", 6661 begin: /\$\{/, 6662 end: /\}/, 6663 contains: [hljs.C_NUMBER_MODE] 6664 }; 6665 const VARIABLE = { 6666 className: "variable", 6667 begin: "\\$" + hljs.UNDERSCORE_IDENT_RE 6668 }; 6669 const STRING = { 6670 className: "string", 6671 variants: [ 6672 { 6673 begin: '"""', 6674 end: '"""(?=[^"])', 6675 contains: [ 6676 VARIABLE, 6677 SUBST 6678 ] 6679 }, 6680 // Can't use built-in modes easily, as we want to use STRING in the meta 6681 // context as 'meta-string' and there's no syntax to remove explicitly set 6682 // classNames in built-in modes. 6683 { 6684 begin: "'", 6685 end: "'", 6686 illegal: /\n/, 6687 contains: [hljs.BACKSLASH_ESCAPE] 6688 }, 6689 { 6690 begin: '"', 6691 end: '"', 6692 illegal: /\n/, 6693 contains: [ 6694 hljs.BACKSLASH_ESCAPE, 6695 VARIABLE, 6696 SUBST 6697 ] 6698 } 6699 ] 6700 }; 6701 SUBST.contains.push(STRING); 6702 const ANNOTATION_USE_SITE = { 6703 className: "meta", 6704 begin: "@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*" + hljs.UNDERSCORE_IDENT_RE + ")?" 6705 }; 6706 const ANNOTATION = { 6707 className: "meta", 6708 begin: "@" + hljs.UNDERSCORE_IDENT_RE, 6709 contains: [ 6710 { 6711 begin: /\(/, 6712 end: /\)/, 6713 contains: [ 6714 hljs.inherit(STRING, { className: "string" }), 6715 "self" 6716 ] 6717 } 6718 ] 6719 }; 6720 const KOTLIN_NUMBER_MODE = NUMERIC; 6721 const KOTLIN_NESTED_COMMENT = hljs.COMMENT( 6722 "/\\*", 6723 "\\*/", 6724 { contains: [hljs.C_BLOCK_COMMENT_MODE] } 6725 ); 6726 const KOTLIN_PAREN_TYPE = { variants: [ 6727 { 6728 className: "type", 6729 begin: hljs.UNDERSCORE_IDENT_RE 6730 }, 6731 { 6732 begin: /\(/, 6733 end: /\)/, 6734 contains: [] 6735 // defined later 6736 } 6737 ] }; 6738 const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE; 6739 KOTLIN_PAREN_TYPE2.variants[1].contains = [KOTLIN_PAREN_TYPE]; 6740 KOTLIN_PAREN_TYPE.variants[1].contains = [KOTLIN_PAREN_TYPE2]; 6741 return { 6742 name: "Kotlin", 6743 aliases: [ 6744 "kt", 6745 "kts", 6746 "ktm", 6747 "ktx" 6748 ], 6749 keywords: KEYWORDS, 6750 contains: [ 6751 hljs.COMMENT( 6752 "/\\*\\*", 6753 "\\*/", 6754 { 6755 relevance: 0, 6756 contains: [ 6757 { 6758 className: "doctag", 6759 begin: "@[A-Za-z]+" 6760 } 6761 ] 6762 } 6763 ), 6764 hljs.C_LINE_COMMENT_MODE, 6765 KOTLIN_NESTED_COMMENT, 6766 KEYWORDS_WITH_LABEL, 6767 LABEL, 6768 ANNOTATION_USE_SITE, 6769 ANNOTATION, 6770 { 6771 className: "function", 6772 beginKeywords: "fun", 6773 end: "[(]|$", 6774 returnBegin: true, 6775 excludeEnd: true, 6776 keywords: KEYWORDS, 6777 relevance: 5, 6778 contains: [ 6779 { 6780 begin: hljs.UNDERSCORE_IDENT_RE + "\\s*\\(", 6781 returnBegin: true, 6782 relevance: 0, 6783 contains: [hljs.UNDERSCORE_TITLE_MODE] 6784 }, 6785 { 6786 className: "type", 6787 begin: /</, 6788 end: />/, 6789 keywords: "reified", 6790 relevance: 0 6791 }, 6792 { 6793 className: "params", 6794 begin: /\(/, 6795 end: /\)/, 6796 endsParent: true, 6797 keywords: KEYWORDS, 6798 relevance: 0, 6799 contains: [ 6800 { 6801 begin: /:/, 6802 end: /[=,\/]/, 6803 endsWithParent: true, 6804 contains: [ 6805 KOTLIN_PAREN_TYPE, 6806 hljs.C_LINE_COMMENT_MODE, 6807 KOTLIN_NESTED_COMMENT 6808 ], 6809 relevance: 0 6810 }, 6811 hljs.C_LINE_COMMENT_MODE, 6812 KOTLIN_NESTED_COMMENT, 6813 ANNOTATION_USE_SITE, 6814 ANNOTATION, 6815 STRING, 6816 hljs.C_NUMBER_MODE 6817 ] 6818 }, 6819 KOTLIN_NESTED_COMMENT 6820 ] 6821 }, 6822 { 6823 begin: [ 6824 /class|interface|trait/, 6825 /\s+/, 6826 hljs.UNDERSCORE_IDENT_RE 6827 ], 6828 beginScope: { 6829 3: "title.class" 6830 }, 6831 keywords: "class interface trait", 6832 end: /[:\{(]|$/, 6833 excludeEnd: true, 6834 illegal: "extends implements", 6835 contains: [ 6836 { beginKeywords: "public protected internal private constructor" }, 6837 hljs.UNDERSCORE_TITLE_MODE, 6838 { 6839 className: "type", 6840 begin: /</, 6841 end: />/, 6842 excludeBegin: true, 6843 excludeEnd: true, 6844 relevance: 0 6845 }, 6846 { 6847 className: "type", 6848 begin: /[,:]\s*/, 6849 end: /[<\(,){\s]|$/, 6850 excludeBegin: true, 6851 returnEnd: true 6852 }, 6853 ANNOTATION_USE_SITE, 6854 ANNOTATION 6855 ] 6856 }, 6857 STRING, 6858 { 6859 className: "meta", 6860 begin: "^#!/usr/bin/env", 6861 end: "$", 6862 illegal: "\n" 6863 }, 6864 KOTLIN_NUMBER_MODE 6865 ] 6866 }; 6867 } 6868 module.exports = kotlin; 6869 } 6870}); 6871
vendor: 25,267 bytes, lines 6872-7905
6872// node_modules/highlight.js/lib/languages/less.js 6873var require_less = __commonJS({ 6874 "node_modules/highlight.js/lib/languages/less.js"(exports, module) { 6875 var MODES = (hljs) => { 6876 return { 6877 IMPORTANT: { 6878 scope: "meta", 6879 begin: "!important" 6880 }, 6881 BLOCK_COMMENT: hljs.C_BLOCK_COMMENT_MODE, 6882 HEXCOLOR: { 6883 scope: "number", 6884 begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/ 6885 }, 6886 UNICODE_RANGE: { 6887 scope: "number", 6888 begin: /\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/ 6889 }, 6890 FUNCTION_DISPATCH: { 6891 className: "built_in", 6892 begin: /[\w-]+(?=\()/ 6893 }, 6894 ATTRIBUTE_SELECTOR_MODE: { 6895 scope: "selector-attr", 6896 begin: /\[/, 6897 end: /\]/, 6898 illegal: "$", 6899 contains: [ 6900 hljs.APOS_STRING_MODE, 6901 hljs.QUOTE_STRING_MODE 6902 ] 6903 }, 6904 CSS_NUMBER_MODE: { 6905 scope: "number", 6906 begin: hljs.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", 6907 relevance: 0 6908 }, 6909 CSS_VARIABLE: { 6910 className: "attr", 6911 begin: /--[A-Za-z_][A-Za-z0-9_-]*/ 6912 } 6913 }; 6914 }; 6915 var HTML_TAGS = [ 6916 "a", 6917 "abbr", 6918 "address", 6919 "article", 6920 "aside", 6921 "audio", 6922 "b", 6923 "blockquote", 6924 "body", 6925 "button", 6926 "canvas", 6927 "caption", 6928 "cite", 6929 "code", 6930 "dd", 6931 "del", 6932 "details", 6933 "dfn", 6934 "div", 6935 "dl", 6936 "dt", 6937 "em", 6938 "fieldset", 6939 "figcaption", 6940 "figure", 6941 "footer", 6942 "form", 6943 "h1", 6944 "h2", 6945 "h3", 6946 "h4", 6947 "h5", 6948 "h6", 6949 "header", 6950 "hgroup", 6951 "html", 6952 "i", 6953 "iframe", 6954 "img", 6955 "input", 6956 "ins", 6957 "kbd", 6958 "label", 6959 "legend", 6960 "li", 6961 "main", 6962 "mark", 6963 "menu", 6964 "nav", 6965 "object", 6966 "ol", 6967 "optgroup", 6968 "option", 6969 "p", 6970 "picture", 6971 "q", 6972 "quote", 6973 "samp", 6974 "section", 6975 "select", 6976 "source", 6977 "span", 6978 "strong", 6979 "summary", 6980 "sup", 6981 "table", 6982 "tbody", 6983 "td", 6984 "textarea", 6985 "tfoot", 6986 "th", 6987 "thead", 6988 "time", 6989 "tr", 6990 "ul", 6991 "var", 6992 "video" 6993 ]; 6994 var SVG_TAGS = [ 6995 "defs", 6996 "g", 6997 "marker", 6998 "mask", 6999 "pattern", 7000 "svg", 7001 "switch", 7002 "symbol", 7003 "feBlend", 7004 "feColorMatrix", 7005 "feComponentTransfer", 7006 "feComposite", 7007 "feConvolveMatrix", 7008 "feDiffuseLighting", 7009 "feDisplacementMap", 7010 "feFlood", 7011 "feGaussianBlur", 7012 "feImage", 7013 "feMerge", 7014 "feMorphology", 7015 "feOffset", 7016 "feSpecularLighting", 7017 "feTile", 7018 "feTurbulence", 7019 "linearGradient", 7020 "radialGradient", 7021 "stop", 7022 "circle", 7023 "ellipse", 7024 "image", 7025 "line", 7026 "path", 7027 "polygon", 7028 "polyline", 7029 "rect", 7030 "text", 7031 "use", 7032 "textPath", 7033 "tspan", 7034 "foreignObject", 7035 "clipPath" 7036 ]; 7037 var TAGS = [ 7038 ...HTML_TAGS, 7039 ...SVG_TAGS 7040 ]; 7041 var MEDIA_FEATURES = [ 7042 "any-hover", 7043 "any-pointer", 7044 "aspect-ratio", 7045 "color", 7046 "color-gamut", 7047 "color-index", 7048 "device-aspect-ratio", 7049 "device-height", 7050 "device-width", 7051 "display-mode", 7052 "forced-colors", 7053 "grid", 7054 "height", 7055 "hover", 7056 "inverted-colors", 7057 "monochrome", 7058 "orientation", 7059 "overflow-block", 7060 "overflow-inline", 7061 "pointer", 7062 "prefers-color-scheme", 7063 "prefers-contrast", 7064 "prefers-reduced-motion", 7065 "prefers-reduced-transparency", 7066 "resolution", 7067 "scan", 7068 "scripting", 7069 "update", 7070 "width", 7071 // TODO: find a better solution? 7072 "min-width", 7073 "max-width", 7074 "min-height", 7075 "max-height" 7076 ].sort().reverse(); 7077 var PSEUDO_CLASSES = [ 7078 "active", 7079 "any-link", 7080 "blank", 7081 "checked", 7082 "current", 7083 "default", 7084 "defined", 7085 "dir", 7086 // dir() 7087 "disabled", 7088 "drop", 7089 "empty", 7090 "enabled", 7091 "first", 7092 "first-child", 7093 "first-of-type", 7094 "fullscreen", 7095 "future", 7096 "focus", 7097 "focus-visible", 7098 "focus-within", 7099 "has", 7100 // has() 7101 "host", 7102 // host or host() 7103 "host-context", 7104 // host-context() 7105 "hover", 7106 "indeterminate", 7107 "in-range", 7108 "invalid", 7109 "is", 7110 // is() 7111 "lang", 7112 // lang() 7113 "last-child", 7114 "last-of-type", 7115 "left", 7116 "link", 7117 "local-link", 7118 "not", 7119 // not() 7120 "nth-child", 7121 // nth-child() 7122 "nth-col", 7123 // nth-col() 7124 "nth-last-child", 7125 // nth-last-child() 7126 "nth-last-col", 7127 // nth-last-col() 7128 "nth-last-of-type", 7129 //nth-last-of-type() 7130 "nth-of-type", 7131 //nth-of-type() 7132 "only-child", 7133 "only-of-type", 7134 "optional", 7135 "out-of-range", 7136 "past", 7137 "placeholder-shown", 7138 "read-only", 7139 "read-write", 7140 "required", 7141 "right", 7142 "root", 7143 "scope", 7144 "target", 7145 "target-within", 7146 "user-invalid", 7147 "valid", 7148 "visited", 7149 "where" 7150 // where() 7151 ].sort().reverse(); 7152 var PSEUDO_ELEMENTS = [ 7153 "after", 7154 "backdrop", 7155 "before", 7156 "cue", 7157 "cue-region", 7158 "first-letter", 7159 "first-line", 7160 "grammar-error", 7161 "marker", 7162 "part", 7163 "placeholder", 7164 "selection", 7165 "slotted", 7166 "spelling-error" 7167 ].sort().reverse(); 7168 var ATTRIBUTES = [ 7169 "accent-color", 7170 "align-content", 7171 "align-items", 7172 "align-self", 7173 "alignment-baseline", 7174 "all", 7175 "anchor-name", 7176 "animation", 7177 "animation-composition", 7178 "animation-delay", 7179 "animation-direction", 7180 "animation-duration", 7181 "animation-fill-mode", 7182 "animation-iteration-count", 7183 "animation-name", 7184 "animation-play-state", 7185 "animation-range", 7186 "animation-range-end", 7187 "animation-range-start", 7188 "animation-timeline", 7189 "animation-timing-function", 7190 "appearance", 7191 "aspect-ratio", 7192 "backdrop-filter", 7193 "backface-visibility", 7194 "background", 7195 "background-attachment", 7196 "background-blend-mode", 7197 "background-clip", 7198 "background-color", 7199 "background-image", 7200 "background-origin", 7201 "background-position", 7202 "background-position-x", 7203 "background-position-y", 7204 "background-repeat", 7205 "background-size", 7206 "baseline-shift", 7207 "block-size", 7208 "border", 7209 "border-block", 7210 "border-block-color", 7211 "border-block-end", 7212 "border-block-end-color", 7213 "border-block-end-style", 7214 "border-block-end-width", 7215 "border-block-start", 7216 "border-block-start-color", 7217 "border-block-start-style", 7218 "border-block-start-width", 7219 "border-block-style", 7220 "border-block-width", 7221 "border-bottom", 7222 "border-bottom-color", 7223 "border-bottom-left-radius", 7224 "border-bottom-right-radius", 7225 "border-bottom-style", 7226 "border-bottom-width", 7227 "border-collapse", 7228 "border-color", 7229 "border-end-end-radius", 7230 "border-end-start-radius", 7231 "border-image", 7232 "border-image-outset", 7233 "border-image-repeat", 7234 "border-image-slice", 7235 "border-image-source", 7236 "border-image-width", 7237 "border-inline", 7238 "border-inline-color", 7239 "border-inline-end", 7240 "border-inline-end-color", 7241 "border-inline-end-style", 7242 "border-inline-end-width", 7243 "border-inline-start", 7244 "border-inline-start-color", 7245 "border-inline-start-style", 7246 "border-inline-start-width", 7247 "border-inline-style", 7248 "border-inline-width", 7249 "border-left", 7250 "border-left-color", 7251 "border-left-style", 7252 "border-left-width", 7253 "border-radius", 7254 "border-right", 7255 "border-right-color", 7256 "border-right-style", 7257 "border-right-width", 7258 "border-spacing", 7259 "border-start-end-radius", 7260 "border-start-start-radius", 7261 "border-style", 7262 "border-top", 7263 "border-top-color", 7264 "border-top-left-radius", 7265 "border-top-right-radius", 7266 "border-top-style", 7267 "border-top-width", 7268 "border-width", 7269 "bottom", 7270 "box-align", 7271 "box-decoration-break", 7272 "box-direction", 7273 "box-flex", 7274 "box-flex-group", 7275 "box-lines", 7276 "box-ordinal-group", 7277 "box-orient", 7278 "box-pack", 7279 "box-shadow", 7280 "box-sizing", 7281 "break-after", 7282 "break-before", 7283 "break-inside", 7284 "caption-side", 7285 "caret-color", 7286 "clear", 7287 "clip", 7288 "clip-path", 7289 "clip-rule", 7290 "color", 7291 "color-interpolation", 7292 "color-interpolation-filters", 7293 "color-profile", 7294 "color-rendering", 7295 "color-scheme", 7296 "column-count", 7297 "column-fill", 7298 "column-gap", 7299 "column-rule", 7300 "column-rule-color", 7301 "column-rule-style", 7302 "column-rule-width", 7303 "column-span", 7304 "column-width", 7305 "columns", 7306 "contain", 7307 "contain-intrinsic-block-size", 7308 "contain-intrinsic-height", 7309 "contain-intrinsic-inline-size", 7310 "contain-intrinsic-size", 7311 "contain-intrinsic-width", 7312 "container", 7313 "container-name", 7314 "container-type", 7315 "content", 7316 "content-visibility", 7317 "corner-bottom-left-shape", 7318 "corner-bottom-right-shape", 7319 "corner-shape", 7320 "corner-top-left-shape", 7321 "corner-top-right-shape", 7322 "counter-increment", 7323 "counter-reset", 7324 "counter-set", 7325 "cue", 7326 "cue-after", 7327 "cue-before", 7328 "cursor", 7329 "cx", 7330 "cy", 7331 "direction", 7332 "display", 7333 "dominant-baseline", 7334 "empty-cells", 7335 "enable-background", 7336 "field-sizing", 7337 "fill", 7338 "fill-opacity", 7339 "fill-rule", 7340 "filter", 7341 "flex", 7342 "flex-basis", 7343 "flex-direction", 7344 "flex-flow", 7345 "flex-grow", 7346 "flex-shrink", 7347 "flex-wrap", 7348 "float", 7349 "flood-color", 7350 "flood-opacity", 7351 "flow", 7352 "font", 7353 "font-display", 7354 "font-family", 7355 "font-feature-settings", 7356 "font-kerning", 7357 "font-language-override", 7358 "font-optical-sizing", 7359 "font-palette", 7360 "font-size", 7361 "font-size-adjust", 7362 "font-smooth", 7363 "font-smoothing", 7364 "font-stretch", 7365 "font-style", 7366 "font-synthesis", 7367 "font-synthesis-position", 7368 "font-synthesis-small-caps", 7369 "font-synthesis-style", 7370 "font-synthesis-weight", 7371 "font-variant", 7372 "font-variant-alternates", 7373 "font-variant-caps", 7374 "font-variant-east-asian", 7375 "font-variant-emoji", 7376 "font-variant-ligatures", 7377 "font-variant-numeric", 7378 "font-variant-position", 7379 "font-variation-settings", 7380 "font-weight", 7381 "forced-color-adjust", 7382 "gap", 7383 "glyph-orientation-horizontal", 7384 "glyph-orientation-vertical", 7385 "grid", 7386 "grid-area", 7387 "grid-auto-columns", 7388 "grid-auto-flow", 7389 "grid-auto-rows", 7390 "grid-column", 7391 "grid-column-end", 7392 "grid-column-start", 7393 "grid-gap", 7394 "grid-row", 7395 "grid-row-end", 7396 "grid-row-start", 7397 "grid-template", 7398 "grid-template-areas", 7399 "grid-template-columns", 7400 "grid-template-rows", 7401 "hanging-punctuation", 7402 "height", 7403 "hyphenate-character", 7404 "hyphenate-limit-chars", 7405 "hyphens", 7406 "icon", 7407 "image-orientation", 7408 "image-rendering", 7409 "image-resolution", 7410 "ime-mode", 7411 "initial-letter", 7412 "initial-letter-align", 7413 "inline-size", 7414 "inset", 7415 "inset-area", 7416 "inset-block", 7417 "inset-block-end", 7418 "inset-block-start", 7419 "inset-inline", 7420 "inset-inline-end", 7421 "inset-inline-start", 7422 "isolation", 7423 "justify-content", 7424 "justify-items", 7425 "justify-self", 7426 "kerning", 7427 "left", 7428 "letter-spacing", 7429 "lighting-color", 7430 "line-break", 7431 "line-height", 7432 "line-height-step", 7433 "list-style", 7434 "list-style-image", 7435 "list-style-position", 7436 "list-style-type", 7437 "margin", 7438 "margin-block", 7439 "margin-block-end", 7440 "margin-block-start", 7441 "margin-bottom", 7442 "margin-inline", 7443 "margin-inline-end", 7444 "margin-inline-start", 7445 "margin-left", 7446 "margin-right", 7447 "margin-top", 7448 "margin-trim", 7449 "marker", 7450 "marker-end", 7451 "marker-mid", 7452 "marker-start", 7453 "marks", 7454 "mask", 7455 "mask-border", 7456 "mask-border-mode", 7457 "mask-border-outset", 7458 "mask-border-repeat", 7459 "mask-border-slice", 7460 "mask-border-source", 7461 "mask-border-width", 7462 "mask-clip", 7463 "mask-composite", 7464 "mask-image", 7465 "mask-mode", 7466 "mask-origin", 7467 "mask-position", 7468 "mask-repeat", 7469 "mask-size", 7470 "mask-type", 7471 "masonry-auto-flow", 7472 "math-depth", 7473 "math-shift", 7474 "math-style", 7475 "max-block-size", 7476 "max-height", 7477 "max-inline-size", 7478 "max-width", 7479 "min-block-size", 7480 "min-height", 7481 "min-inline-size", 7482 "min-width", 7483 "mix-blend-mode", 7484 "nav-down", 7485 "nav-index", 7486 "nav-left", 7487 "nav-right", 7488 "nav-up", 7489 "none", 7490 "normal", 7491 "object-fit", 7492 "object-position", 7493 "offset", 7494 "offset-anchor", 7495 "offset-distance", 7496 "offset-path", 7497 "offset-position", 7498 "offset-rotate", 7499 "opacity", 7500 "order", 7501 "orphans", 7502 "outline", 7503 "outline-color", 7504 "outline-offset", 7505 "outline-style", 7506 "outline-width", 7507 "overflow", 7508 "overflow-anchor", 7509 "overflow-block", 7510 "overflow-clip-margin", 7511 "overflow-inline", 7512 "overflow-wrap", 7513 "overflow-x", 7514 "overflow-y", 7515 "overlay", 7516 "overscroll-behavior", 7517 "overscroll-behavior-block", 7518 "overscroll-behavior-inline", 7519 "overscroll-behavior-x", 7520 "overscroll-behavior-y", 7521 "padding", 7522 "padding-block", 7523 "padding-block-end", 7524 "padding-block-start", 7525 "padding-bottom", 7526 "padding-inline", 7527 "padding-inline-end", 7528 "padding-inline-start", 7529 "padding-left", 7530 "padding-right", 7531 "padding-top", 7532 "page", 7533 "page-break-after", 7534 "page-break-before", 7535 "page-break-inside", 7536 "paint-order", 7537 "pause", 7538 "pause-after", 7539 "pause-before", 7540 "perspective", 7541 "perspective-origin", 7542 "place-content", 7543 "place-items", 7544 "place-self", 7545 "pointer-events", 7546 "position", 7547 "position-anchor", 7548 "position-visibility", 7549 "print-color-adjust", 7550 "quotes", 7551 "r", 7552 "resize", 7553 "rest", 7554 "rest-after", 7555 "rest-before", 7556 "right", 7557 "rotate", 7558 "row-gap", 7559 "ruby-align", 7560 "ruby-position", 7561 "scale", 7562 "scroll-behavior", 7563 "scroll-margin", 7564 "scroll-margin-block", 7565 "scroll-margin-block-end", 7566 "scroll-margin-block-start", 7567 "scroll-margin-bottom", 7568 "scroll-margin-inline", 7569 "scroll-margin-inline-end", 7570 "scroll-margin-inline-start", 7571 "scroll-margin-left", 7572 "scroll-margin-right", 7573 "scroll-margin-top", 7574 "scroll-padding", 7575 "scroll-padding-block", 7576 "scroll-padding-block-end", 7577 "scroll-padding-block-start", 7578 "scroll-padding-bottom", 7579 "scroll-padding-inline", 7580 "scroll-padding-inline-end", 7581 "scroll-padding-inline-start", 7582 "scroll-padding-left", 7583 "scroll-padding-right", 7584 "scroll-padding-top", 7585 "scroll-snap-align", 7586 "scroll-snap-stop", 7587 "scroll-snap-type", 7588 "scroll-timeline", 7589 "scroll-timeline-axis", 7590 "scroll-timeline-name", 7591 "scrollbar-color", 7592 "scrollbar-gutter", 7593 "scrollbar-width", 7594 "shape-image-threshold", 7595 "shape-margin", 7596 "shape-outside", 7597 "shape-rendering", 7598 "speak", 7599 "speak-as", 7600 "src", 7601 // @font-face 7602 "stop-color", 7603 "stop-opacity", 7604 "stroke", 7605 "stroke-dasharray", 7606 "stroke-dashoffset", 7607 "stroke-linecap", 7608 "stroke-linejoin", 7609 "stroke-miterlimit", 7610 "stroke-opacity", 7611 "stroke-width", 7612 "tab-size", 7613 "table-layout", 7614 "text-align", 7615 "text-align-all", 7616 "text-align-last", 7617 "text-anchor", 7618 "text-combine-upright", 7619 "text-decoration", 7620 "text-decoration-color", 7621 "text-decoration-line", 7622 "text-decoration-skip", 7623 "text-decoration-skip-ink", 7624 "text-decoration-style", 7625 "text-decoration-thickness", 7626 "text-emphasis", 7627 "text-emphasis-color", 7628 "text-emphasis-position", 7629 "text-emphasis-style", 7630 "text-indent", 7631 "text-justify", 7632 "text-orientation", 7633 "text-overflow", 7634 "text-rendering", 7635 "text-shadow", 7636 "text-size-adjust", 7637 "text-transform", 7638 "text-underline-offset", 7639 "text-underline-position", 7640 "text-wrap", 7641 "text-wrap-mode", 7642 "text-wrap-style", 7643 "timeline-scope", 7644 "top", 7645 "touch-action", 7646 "transform", 7647 "transform-box", 7648 "transform-origin", 7649 "transform-style", 7650 "transition", 7651 "transition-behavior", 7652 "transition-delay", 7653 "transition-duration", 7654 "transition-property", 7655 "transition-timing-function", 7656 "translate", 7657 "unicode-bidi", 7658 "unicode-range", 7659 "user-modify", 7660 "user-select", 7661 "vector-effect", 7662 "vertical-align", 7663 "view-timeline", 7664 "view-timeline-axis", 7665 "view-timeline-inset", 7666 "view-timeline-name", 7667 "view-transition-name", 7668 "visibility", 7669 "voice-balance", 7670 "voice-duration", 7671 "voice-family", 7672 "voice-pitch", 7673 "voice-range", 7674 "voice-rate", 7675 "voice-stress", 7676 "voice-volume", 7677 "white-space", 7678 "white-space-collapse", 7679 "widows", 7680 "width", 7681 "will-change", 7682 "word-break", 7683 "word-spacing", 7684 "word-wrap", 7685 "writing-mode", 7686 "x", 7687 "y", 7688 "z-index", 7689 "zoom" 7690 ].sort().reverse(); 7691 var PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS).sort().reverse(); 7692 function less(hljs) { 7693 const modes = MODES(hljs); 7694 const PSEUDO_SELECTORS$1 = PSEUDO_SELECTORS; 7695 const AT_MODIFIERS = "and or not only"; 7696 const IDENT_RE = "[\\w-]+"; 7697 const INTERP_IDENT_RE = "(" + IDENT_RE + "|@\\{" + IDENT_RE + "\\})"; 7698 const RULES = []; 7699 const VALUE_MODES = []; 7700 const STRING_MODE = function(c) { 7701 return { 7702 // Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings) 7703 className: "string", 7704 begin: "~?" + c + ".*?" + c 7705 }; 7706 }; 7707 const IDENT_MODE = function(name, begin, relevance) { 7708 return { 7709 className: name, 7710 begin, 7711 relevance 7712 }; 7713 }; 7714 const AT_KEYWORDS = { 7715 $pattern: /[a-z-]+/, 7716 keyword: AT_MODIFIERS, 7717 attribute: MEDIA_FEATURES.join(" ") 7718 }; 7719 const PARENS_MODE = { 7720 // used only to properly balance nested parens inside mixin call, def. arg list 7721 begin: "\\(", 7722 end: "\\)", 7723 contains: VALUE_MODES, 7724 keywords: AT_KEYWORDS, 7725 relevance: 0 7726 }; 7727 VALUE_MODES.push( 7728 hljs.C_LINE_COMMENT_MODE, 7729 hljs.C_BLOCK_COMMENT_MODE, 7730 STRING_MODE("'"), 7731 STRING_MODE('"'), 7732 modes.CSS_NUMBER_MODE, 7733 // fixme: it does not include dot for numbers like .5em :( 7734 { 7735 begin: "(url|data-uri)\\(", 7736 starts: { 7737 className: "string", 7738 end: "[\\)\\n]", 7739 excludeEnd: true 7740 } 7741 }, 7742 modes.UNICODE_RANGE, 7743 modes.HEXCOLOR, 7744 PARENS_MODE, 7745 IDENT_MODE("variable", "@@?" + IDENT_RE, 10), 7746 IDENT_MODE("variable", "@\\{" + IDENT_RE + "\\}"), 7747 IDENT_MODE("built_in", "~?`[^`]*?`"), 7748 // inline javascript (or whatever host language) *multiline* string 7749 { 7750 // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding): 7751 className: "attribute", 7752 begin: IDENT_RE + "\\s*:", 7753 end: ":", 7754 returnBegin: true, 7755 excludeEnd: true 7756 }, 7757 modes.IMPORTANT, 7758 { beginKeywords: "and not" }, 7759 modes.FUNCTION_DISPATCH 7760 ); 7761 const VALUE_WITH_RULESETS = VALUE_MODES.concat({ 7762 begin: /\{/, 7763 end: /\}/, 7764 contains: RULES 7765 }); 7766 const MIXIN_GUARD_MODE = { 7767 beginKeywords: "when", 7768 endsWithParent: true, 7769 contains: [{ beginKeywords: "and not" }].concat(VALUE_MODES) 7770 // using this form to override VALUE’s 'function' match 7771 }; 7772 const RULE_MODE = { 7773 begin: INTERP_IDENT_RE + "\\s*:", 7774 returnBegin: true, 7775 end: /[;}]/, 7776 relevance: 0, 7777 contains: [ 7778 { begin: /-(webkit|moz|ms|o)-/ }, 7779 modes.CSS_VARIABLE, 7780 { 7781 className: "attribute", 7782 begin: "\\b(" + ATTRIBUTES.join("|") + ")\\b", 7783 end: /(?=:)/, 7784 starts: { 7785 endsWithParent: true, 7786 illegal: "[<=$]", 7787 relevance: 0, 7788 contains: VALUE_MODES 7789 } 7790 } 7791 ] 7792 }; 7793 const AT_RULE_MODE = { 7794 className: "keyword", 7795 begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", 7796 starts: { 7797 end: "[;{}]", 7798 keywords: AT_KEYWORDS, 7799 returnEnd: true, 7800 contains: VALUE_MODES, 7801 relevance: 0 7802 } 7803 }; 7804 const VAR_RULE_MODE = { 7805 className: "variable", 7806 variants: [ 7807 // using more strict pattern for higher relevance to increase chances of Less detection. 7808 // this is *the only* Less specific statement used in most of the sources, so... 7809 // (we’ll still often loose to the css-parser unless there's '//' comment, 7810 // simply because 1 variable just can't beat 99 properties :) 7811 { 7812 begin: "@" + IDENT_RE + "\\s*:", 7813 relevance: 15 7814 }, 7815 { begin: "@" + IDENT_RE } 7816 ], 7817 starts: { 7818 end: "[;}]", 7819 returnEnd: true, 7820 contains: VALUE_WITH_RULESETS 7821 } 7822 }; 7823 const SELECTOR_MODE = { 7824 // first parse unambiguous selectors (i.e. those not starting with tag) 7825 // then fall into the scary lookahead-discriminator variant. 7826 // this mode also handles mixin definitions and calls 7827 variants: [ 7828 { 7829 begin: "[\\.#:&\\[>]", 7830 end: "[;{}]" 7831 // mixin calls end with ';' 7832 }, 7833 { 7834 begin: INTERP_IDENT_RE, 7835 end: /\{/ 7836 } 7837 ], 7838 returnBegin: true, 7839 returnEnd: true, 7840 illegal: `[<='$"]`, 7841 relevance: 0, 7842 contains: [ 7843 hljs.C_LINE_COMMENT_MODE, 7844 hljs.C_BLOCK_COMMENT_MODE, 7845 MIXIN_GUARD_MODE, 7846 IDENT_MODE("keyword", "all\\b"), 7847 IDENT_MODE("variable", "@\\{" + IDENT_RE + "\\}"), 7848 // otherwise it’s identified as tag 7849 { 7850 begin: "\\b(" + TAGS.join("|") + ")\\b", 7851 className: "selector-tag" 7852 }, 7853 modes.CSS_NUMBER_MODE, 7854 IDENT_MODE("selector-tag", INTERP_IDENT_RE, 0), 7855 IDENT_MODE("selector-id", "#" + INTERP_IDENT_RE), 7856 IDENT_MODE("selector-class", "\\." + INTERP_IDENT_RE, 0), 7857 IDENT_MODE("selector-tag", "&", 0), 7858 modes.ATTRIBUTE_SELECTOR_MODE, 7859 { 7860 className: "selector-pseudo", 7861 begin: ":(" + PSEUDO_CLASSES.join("|") + ")" 7862 }, 7863 { 7864 className: "selector-pseudo", 7865 begin: ":(:)?(" + PSEUDO_ELEMENTS.join("|") + ")" 7866 }, 7867 { 7868 begin: /\(/, 7869 end: /\)/, 7870 relevance: 0, 7871 contains: VALUE_WITH_RULESETS 7872 }, 7873 // argument list of parametric mixins 7874 { begin: "!important" }, 7875 // eat !important after mixin call or it will be colored as tag 7876 modes.FUNCTION_DISPATCH 7877 ] 7878 }; 7879 const PSEUDO_SELECTOR_MODE = { 7880 begin: IDENT_RE + `:(:)?(${PSEUDO_SELECTORS$1.join("|")})`, 7881 returnBegin: true, 7882 contains: [SELECTOR_MODE] 7883 }; 7884 RULES.push( 7885 hljs.C_LINE_COMMENT_MODE, 7886 hljs.C_BLOCK_COMMENT_MODE, 7887 AT_RULE_MODE, 7888 VAR_RULE_MODE, 7889 PSEUDO_SELECTOR_MODE, 7890 RULE_MODE, 7891 SELECTOR_MODE, 7892 MIXIN_GUARD_MODE, 7893 modes.FUNCTION_DISPATCH 7894 ); 7895 return { 7896 name: "Less", 7897 case_insensitive: true, 7898 illegal: `[=>'/<($"]`, 7899 contains: RULES 7900 }; 7901 } 7902 module.exports = less; 7903 } 7904}); 7905
vendor: 3,042 bytes, lines 7906-7971
7906// node_modules/highlight.js/lib/languages/lua.js 7907var require_lua = __commonJS({ 7908 "node_modules/highlight.js/lib/languages/lua.js"(exports, module) { 7909 function lua(hljs) { 7910 const OPENING_LONG_BRACKET = "\\[=*\\["; 7911 const CLOSING_LONG_BRACKET = "\\]=*\\]"; 7912 const LONG_BRACKETS = { 7913 begin: OPENING_LONG_BRACKET, 7914 end: CLOSING_LONG_BRACKET, 7915 contains: ["self"] 7916 }; 7917 const COMMENTS = [ 7918 hljs.COMMENT("--(?!" + OPENING_LONG_BRACKET + ")", "$"), 7919 hljs.COMMENT( 7920 "--" + OPENING_LONG_BRACKET, 7921 CLOSING_LONG_BRACKET, 7922 { 7923 contains: [LONG_BRACKETS], 7924 relevance: 10 7925 } 7926 ) 7927 ]; 7928 return { 7929 name: "Lua", 7930 aliases: ["pluto"], 7931 keywords: { 7932 $pattern: hljs.UNDERSCORE_IDENT_RE, 7933 literal: "true false nil", 7934 keyword: "and break do else elseif end for goto if in local global not or repeat return then until while", 7935 built_in: ( 7936 // Metatags and globals: 7937 "_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" 7938 ) 7939 }, 7940 contains: COMMENTS.concat([ 7941 { 7942 className: "function", 7943 beginKeywords: "function", 7944 end: "\\)", 7945 contains: [ 7946 hljs.inherit(hljs.TITLE_MODE, { begin: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*" }), 7947 { 7948 className: "params", 7949 begin: "\\(", 7950 endsWithParent: true, 7951 contains: COMMENTS 7952 } 7953 ].concat(COMMENTS) 7954 }, 7955 hljs.C_NUMBER_MODE, 7956 hljs.APOS_STRING_MODE, 7957 hljs.QUOTE_STRING_MODE, 7958 { 7959 className: "string", 7960 begin: OPENING_LONG_BRACKET, 7961 end: CLOSING_LONG_BRACKET, 7962 contains: [LONG_BRACKETS], 7963 relevance: 5 7964 } 7965 ]) 7966 }; 7967 } 7968 module.exports = lua; 7969 } 7970}); 7971
vendor: 2,151 bytes, lines 7972-8047
7972// node_modules/highlight.js/lib/languages/makefile.js 7973var require_makefile = __commonJS({ 7974 "node_modules/highlight.js/lib/languages/makefile.js"(exports, module) { 7975 function makefile(hljs) { 7976 const VARIABLE = { 7977 className: "variable", 7978 variants: [ 7979 { 7980 begin: "\\$\\(" + hljs.UNDERSCORE_IDENT_RE + "\\)", 7981 contains: [hljs.BACKSLASH_ESCAPE] 7982 }, 7983 { begin: /\$[@%<?\^\+\*]/ } 7984 ] 7985 }; 7986 const QUOTE_STRING = { 7987 className: "string", 7988 begin: /"/, 7989 end: /"/, 7990 contains: [ 7991 hljs.BACKSLASH_ESCAPE, 7992 VARIABLE 7993 ] 7994 }; 7995 const FUNC = { 7996 className: "variable", 7997 begin: /\$\([\w-]+\s/, 7998 end: /\)/, 7999 keywords: { built_in: "subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value" }, 8000 contains: [ 8001 VARIABLE, 8002 QUOTE_STRING 8003 // Added QUOTE_STRING as they can be a part of functions 8004 ] 8005 }; 8006 const ASSIGNMENT = { begin: "^" + hljs.UNDERSCORE_IDENT_RE + "\\s*(?=[:+?]?=)" }; 8007 const META = { 8008 className: "meta", 8009 begin: /^\.PHONY:/, 8010 end: /$/, 8011 keywords: { 8012 $pattern: /[\.\w]+/, 8013 keyword: ".PHONY" 8014 } 8015 }; 8016 const TARGET = { 8017 className: "section", 8018 begin: /^[^\s]+:/, 8019 end: /$/, 8020 contains: [VARIABLE] 8021 }; 8022 return { 8023 name: "Makefile", 8024 aliases: [ 8025 "mk", 8026 "mak", 8027 "make" 8028 ], 8029 keywords: { 8030 $pattern: /[\w-]+/, 8031 keyword: "define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath" 8032 }, 8033 contains: [ 8034 hljs.HASH_COMMENT_MODE, 8035 VARIABLE, 8036 QUOTE_STRING, 8037 FUNC, 8038 ASSIGNMENT, 8039 META, 8040 TARGET 8041 ] 8042 }; 8043 } 8044 module.exports = makefile; 8045 } 8046}); 8047
vendor: 11,428 bytes, lines 8048-8537
8048// node_modules/highlight.js/lib/languages/perl.js 8049var require_perl = __commonJS({ 8050 "node_modules/highlight.js/lib/languages/perl.js"(exports, module) { 8051 function perl(hljs) { 8052 const regex = hljs.regex; 8053 const KEYWORDS = [ 8054 "abs", 8055 "accept", 8056 "alarm", 8057 "and", 8058 "atan2", 8059 "bind", 8060 "binmode", 8061 "bless", 8062 "break", 8063 "caller", 8064 "chdir", 8065 "chmod", 8066 "chomp", 8067 "chop", 8068 "chown", 8069 "chr", 8070 "chroot", 8071 "class", 8072 "close", 8073 "closedir", 8074 "connect", 8075 "continue", 8076 "cos", 8077 "crypt", 8078 "dbmclose", 8079 "dbmopen", 8080 "defined", 8081 "delete", 8082 "die", 8083 "do", 8084 "dump", 8085 "each", 8086 "else", 8087 "elsif", 8088 "endgrent", 8089 "endhostent", 8090 "endnetent", 8091 "endprotoent", 8092 "endpwent", 8093 "endservent", 8094 "eof", 8095 "eval", 8096 "exec", 8097 "exists", 8098 "exit", 8099 "exp", 8100 "fcntl", 8101 "field", 8102 "fileno", 8103 "flock", 8104 "for", 8105 "foreach", 8106 "fork", 8107 "format", 8108 "formline", 8109 "getc", 8110 "getgrent", 8111 "getgrgid", 8112 "getgrnam", 8113 "gethostbyaddr", 8114 "gethostbyname", 8115 "gethostent", 8116 "getlogin", 8117 "getnetbyaddr", 8118 "getnetbyname", 8119 "getnetent", 8120 "getpeername", 8121 "getpgrp", 8122 "getpriority", 8123 "getprotobyname", 8124 "getprotobynumber", 8125 "getprotoent", 8126 "getpwent", 8127 "getpwnam", 8128 "getpwuid", 8129 "getservbyname", 8130 "getservbyport", 8131 "getservent", 8132 "getsockname", 8133 "getsockopt", 8134 "given", 8135 "glob", 8136 "gmtime", 8137 "goto", 8138 "grep", 8139 "gt", 8140 "hex", 8141 "if", 8142 "index", 8143 "int", 8144 "ioctl", 8145 "join", 8146 "keys", 8147 "kill", 8148 "last", 8149 "lc", 8150 "lcfirst", 8151 "length", 8152 "link", 8153 "listen", 8154 "local", 8155 "localtime", 8156 "log", 8157 "lstat", 8158 "lt", 8159 "ma", 8160 "map", 8161 "method", 8162 "mkdir", 8163 "msgctl", 8164 "msgget", 8165 "msgrcv", 8166 "msgsnd", 8167 "my", 8168 "ne", 8169 "next", 8170 "no", 8171 "not", 8172 "oct", 8173 "open", 8174 "opendir", 8175 "or", 8176 "ord", 8177 "our", 8178 "pack", 8179 "package", 8180 "pipe", 8181 "pop", 8182 "pos", 8183 "print", 8184 "printf", 8185 "prototype", 8186 "push", 8187 "q|0", 8188 "qq", 8189 "quotemeta", 8190 "qw", 8191 "qx", 8192 "rand", 8193 "read", 8194 "readdir", 8195 "readline", 8196 "readlink", 8197 "readpipe", 8198 "recv", 8199 "redo", 8200 "ref", 8201 "rename", 8202 "require", 8203 "reset", 8204 "return", 8205 "reverse", 8206 "rewinddir", 8207 "rindex", 8208 "rmdir", 8209 "say", 8210 "scalar", 8211 "seek", 8212 "seekdir", 8213 "select", 8214 "semctl", 8215 "semget", 8216 "semop", 8217 "send", 8218 "setgrent", 8219 "sethostent", 8220 "setnetent", 8221 "setpgrp", 8222 "setpriority", 8223 "setprotoent", 8224 "setpwent", 8225 "setservent", 8226 "setsockopt", 8227 "shift", 8228 "shmctl", 8229 "shmget", 8230 "shmread", 8231 "shmwrite", 8232 "shutdown", 8233 "sin", 8234 "sleep", 8235 "socket", 8236 "socketpair", 8237 "sort", 8238 "splice", 8239 "split", 8240 "sprintf", 8241 "sqrt", 8242 "srand", 8243 "stat", 8244 "state", 8245 "study", 8246 "sub", 8247 "substr", 8248 "symlink", 8249 "syscall", 8250 "sysopen", 8251 "sysread", 8252 "sysseek", 8253 "system", 8254 "syswrite", 8255 "tell", 8256 "telldir", 8257 "tie", 8258 "tied", 8259 "time", 8260 "times", 8261 "tr", 8262 "truncate", 8263 "uc", 8264 "ucfirst", 8265 "umask", 8266 "undef", 8267 "unless", 8268 "unlink", 8269 "unpack", 8270 "unshift", 8271 "untie", 8272 "until", 8273 "use", 8274 "utime", 8275 "values", 8276 "vec", 8277 "wait", 8278 "waitpid", 8279 "wantarray", 8280 "warn", 8281 "when", 8282 "while", 8283 "write", 8284 "x|0", 8285 "xor", 8286 "y|0" 8287 ]; 8288 const REGEX_MODIFIERS = /[dualxmsipngr]{0,12}/; 8289 const PERL_KEYWORDS = { 8290 $pattern: /[\w.]+/, 8291 keyword: KEYWORDS.join(" ") 8292 }; 8293 const SUBST = { 8294 className: "subst", 8295 begin: "[$@]\\{", 8296 end: "\\}", 8297 keywords: PERL_KEYWORDS 8298 }; 8299 const METHOD = { 8300 begin: /->\{/, 8301 end: /\}/ 8302 // contains defined later 8303 }; 8304 const ATTR = { 8305 scope: "attr", 8306 match: /\s+:\s*\w+(\s*\(.*?\))?/ 8307 }; 8308 const VAR = { 8309 scope: "variable", 8310 variants: [ 8311 { begin: /\$\d/ }, 8312 { 8313 begin: regex.concat( 8314 /[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, 8315 // negative look-ahead tries to avoid matching patterns that are not 8316 // Perl at all like $ident$, @ident@, etc. 8317 `(?![A-Za-z])(?![@$%])` 8318 ) 8319 }, 8320 { 8321 // Only $= is a special Perl variable and one can't declare @= or %=. 8322 begin: /[$%@](?!")[^\s\w{=]|\$=/, 8323 relevance: 0 8324 } 8325 ], 8326 contains: [ATTR] 8327 }; 8328 const NUMBER = { 8329 className: "number", 8330 variants: [ 8331 // decimal numbers: 8332 // include the case where a number starts with a dot (eg. .9), and 8333 // the leading 0? avoids mixing the first and second match on 0.x cases 8334 { match: /0?\.[0-9][0-9_]+\b/ }, 8335 // include the special versioned number (eg. v5.38) 8336 { match: /\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/ }, 8337 // non-decimal numbers: 8338 { match: /\b0[0-7][0-7_]*\b/ }, 8339 { match: /\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/ }, 8340 { match: /\b0b[0-1][0-1_]*\b/ } 8341 ], 8342 relevance: 0 8343 }; 8344 const STRING_CONTAINS = [ 8345 hljs.BACKSLASH_ESCAPE, 8346 SUBST, 8347 VAR 8348 ]; 8349 const REGEX_DELIMS = [ 8350 /!/, 8351 /\//, 8352 /\|/, 8353 /\?/, 8354 /'/, 8355 /"/, 8356 // valid but infrequent and weird 8357 /#/ 8358 // valid but infrequent and weird 8359 ]; 8360 const PAIRED_DOUBLE_RE = (prefix, open, close = "\\1") => { 8361 const middle = close === "\\1" ? close : regex.concat(close, open); 8362 return regex.concat( 8363 regex.concat("(?:", prefix, ")"), 8364 open, 8365 /(?:\\.|[^\\\/])*?/, 8366 middle, 8367 /(?:\\.|[^\\\/])*?/, 8368 close, 8369 REGEX_MODIFIERS 8370 ); 8371 }; 8372 const PAIRED_RE = (prefix, open, close) => { 8373 return regex.concat( 8374 regex.concat("(?:", prefix, ")"), 8375 open, 8376 /(?:\\.|[^\\\/])*?/, 8377 close, 8378 REGEX_MODIFIERS 8379 ); 8380 }; 8381 const PERL_DEFAULT_CONTAINS = [ 8382 VAR, 8383 hljs.HASH_COMMENT_MODE, 8384 hljs.COMMENT( 8385 /^=\w/, 8386 /=cut/, 8387 { endsWithParent: true } 8388 ), 8389 METHOD, 8390 { 8391 className: "string", 8392 contains: STRING_CONTAINS, 8393 variants: [ 8394 { 8395 begin: "q[qwxr]?\\s*\\(", 8396 end: "\\)", 8397 relevance: 5 8398 }, 8399 { 8400 begin: "q[qwxr]?\\s*\\[", 8401 end: "\\]", 8402 relevance: 5 8403 }, 8404 { 8405 begin: "q[qwxr]?\\s*\\{", 8406 end: "\\}", 8407 relevance: 5 8408 }, 8409 { 8410 begin: "q[qwxr]?\\s*\\|", 8411 end: "\\|", 8412 relevance: 5 8413 }, 8414 { 8415 begin: "q[qwxr]?\\s*<", 8416 end: ">", 8417 relevance: 5 8418 }, 8419 { 8420 begin: "qw\\s+q", 8421 end: "q", 8422 relevance: 5 8423 }, 8424 { 8425 begin: "'", 8426 end: "'", 8427 contains: [hljs.BACKSLASH_ESCAPE] 8428 }, 8429 { 8430 begin: '"', 8431 end: '"' 8432 }, 8433 { 8434 begin: "`", 8435 end: "`", 8436 contains: [hljs.BACKSLASH_ESCAPE] 8437 }, 8438 { 8439 begin: /\{\w+\}/, 8440 relevance: 0 8441 }, 8442 { 8443 begin: "-?\\w+\\s*=>", 8444 relevance: 0 8445 } 8446 ] 8447 }, 8448 NUMBER, 8449 { 8450 // regexp container 8451 begin: "(\\/\\/|" + hljs.RE_STARTERS_RE + "|\\b(split|return|print|reverse|grep)\\b)\\s*", 8452 keywords: "split return print reverse grep", 8453 relevance: 0, 8454 contains: [ 8455 hljs.HASH_COMMENT_MODE, 8456 { 8457 className: "regexp", 8458 variants: [ 8459 // allow matching common delimiters 8460 { begin: PAIRED_DOUBLE_RE("s|tr|y", regex.either(...REGEX_DELIMS, { capture: true })) }, 8461 // and then paired delmis 8462 { begin: PAIRED_DOUBLE_RE("s|tr|y", "\\(", "\\)") }, 8463 { begin: PAIRED_DOUBLE_RE("s|tr|y", "\\[", "\\]") }, 8464 { begin: PAIRED_DOUBLE_RE("s|tr|y", "\\{", "\\}") } 8465 ], 8466 relevance: 2 8467 }, 8468 { 8469 className: "regexp", 8470 variants: [ 8471 { 8472 // could be a comment in many languages so do not count 8473 // as relevant 8474 begin: /(m|qr)\/\//, 8475 relevance: 0 8476 }, 8477 // prefix is optional with /regex/ 8478 { begin: PAIRED_RE("(?:m|qr)?", /\//, /\//) }, 8479 // allow matching common delimiters 8480 { begin: PAIRED_RE("m|qr", regex.either(...REGEX_DELIMS, { capture: true }), /\1/) }, 8481 // allow common paired delmins 8482 { begin: PAIRED_RE("m|qr", /\(/, /\)/) }, 8483 { begin: PAIRED_RE("m|qr", /\[/, /\]/) }, 8484 { begin: PAIRED_RE("m|qr", /\{/, /\}/) } 8485 ] 8486 } 8487 ] 8488 }, 8489 { 8490 className: "function", 8491 beginKeywords: "sub method", 8492 end: "(\\s*\\(.*?\\))?[;{]", 8493 excludeEnd: true, 8494 relevance: 5, 8495 contains: [hljs.TITLE_MODE, ATTR] 8496 }, 8497 { 8498 className: "class", 8499 beginKeywords: "class", 8500 end: "[;{]", 8501 excludeEnd: true, 8502 relevance: 5, 8503 contains: [hljs.TITLE_MODE, ATTR, NUMBER] 8504 }, 8505 { 8506 begin: "-\\w\\b", 8507 relevance: 0 8508 }, 8509 { 8510 begin: "^__DATA__$", 8511 end: "^__END__$", 8512 subLanguage: "mojolicious", 8513 contains: [ 8514 { 8515 begin: "^@@.*", 8516 end: "$", 8517 className: "comment" 8518 } 8519 ] 8520 } 8521 ]; 8522 SUBST.contains = PERL_DEFAULT_CONTAINS; 8523 METHOD.contains = PERL_DEFAULT_CONTAINS; 8524 return { 8525 name: "Perl", 8526 aliases: [ 8527 "pl", 8528 "pm" 8529 ], 8530 keywords: PERL_KEYWORDS, 8531 contains: PERL_DEFAULT_CONTAINS 8532 }; 8533 } 8534 module.exports = perl; 8535 } 8536}); 8537
vendor: 5,720 bytes, lines 8538-8785
8538// node_modules/highlight.js/lib/languages/objectivec.js 8539var require_objectivec = __commonJS({ 8540 "node_modules/highlight.js/lib/languages/objectivec.js"(exports, module) { 8541 function objectivec(hljs) { 8542 const API_CLASS = { 8543 className: "built_in", 8544 begin: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+" 8545 }; 8546 const IDENTIFIER_RE = /[a-zA-Z@][a-zA-Z0-9_]*/; 8547 const TYPES = [ 8548 "int", 8549 "float", 8550 "char", 8551 "unsigned", 8552 "signed", 8553 "short", 8554 "long", 8555 "double", 8556 "wchar_t", 8557 "unichar", 8558 "void", 8559 "bool", 8560 "BOOL", 8561 "id|0", 8562 "_Bool" 8563 ]; 8564 const KWS = [ 8565 "while", 8566 "export", 8567 "sizeof", 8568 "typedef", 8569 "const", 8570 "struct", 8571 "for", 8572 "union", 8573 "volatile", 8574 "static", 8575 "mutable", 8576 "if", 8577 "do", 8578 "return", 8579 "goto", 8580 "enum", 8581 "else", 8582 "break", 8583 "extern", 8584 "asm", 8585 "case", 8586 "default", 8587 "register", 8588 "explicit", 8589 "typename", 8590 "switch", 8591 "continue", 8592 "inline", 8593 "readonly", 8594 "assign", 8595 "readwrite", 8596 "self", 8597 "@synchronized", 8598 "id", 8599 "typeof", 8600 "nonatomic", 8601 "IBOutlet", 8602 "IBAction", 8603 "strong", 8604 "weak", 8605 "copy", 8606 "in", 8607 "out", 8608 "inout", 8609 "bycopy", 8610 "byref", 8611 "oneway", 8612 "__strong", 8613 "__weak", 8614 "__block", 8615 "__autoreleasing", 8616 "@private", 8617 "@protected", 8618 "@public", 8619 "@try", 8620 "@property", 8621 "@end", 8622 "@throw", 8623 "@catch", 8624 "@finally", 8625 "@autoreleasepool", 8626 "@synthesize", 8627 "@dynamic", 8628 "@selector", 8629 "@optional", 8630 "@required", 8631 "@encode", 8632 "@package", 8633 "@import", 8634 "@defs", 8635 "@compatibility_alias", 8636 "__bridge", 8637 "__bridge_transfer", 8638 "__bridge_retained", 8639 "__bridge_retain", 8640 "__covariant", 8641 "__contravariant", 8642 "__kindof", 8643 "_Nonnull", 8644 "_Nullable", 8645 "_Null_unspecified", 8646 "__FUNCTION__", 8647 "__PRETTY_FUNCTION__", 8648 "__attribute__", 8649 "getter", 8650 "setter", 8651 "retain", 8652 "unsafe_unretained", 8653 "nonnull", 8654 "nullable", 8655 "null_unspecified", 8656 "null_resettable", 8657 "class", 8658 "instancetype", 8659 "NS_DESIGNATED_INITIALIZER", 8660 "NS_UNAVAILABLE", 8661 "NS_REQUIRES_SUPER", 8662 "NS_RETURNS_INNER_POINTER", 8663 "NS_INLINE", 8664 "NS_AVAILABLE", 8665 "NS_DEPRECATED", 8666 "NS_ENUM", 8667 "NS_OPTIONS", 8668 "NS_SWIFT_UNAVAILABLE", 8669 "NS_ASSUME_NONNULL_BEGIN", 8670 "NS_ASSUME_NONNULL_END", 8671 "NS_REFINED_FOR_SWIFT", 8672 "NS_SWIFT_NAME", 8673 "NS_SWIFT_NOTHROW", 8674 "NS_DURING", 8675 "NS_HANDLER", 8676 "NS_ENDHANDLER", 8677 "NS_VALUERETURN", 8678 "NS_VOIDRETURN" 8679 ]; 8680 const LITERALS = [ 8681 "false", 8682 "true", 8683 "FALSE", 8684 "TRUE", 8685 "nil", 8686 "YES", 8687 "NO", 8688 "NULL" 8689 ]; 8690 const BUILT_INS = [ 8691 "dispatch_once_t", 8692 "dispatch_queue_t", 8693 "dispatch_sync", 8694 "dispatch_async", 8695 "dispatch_once" 8696 ]; 8697 const KEYWORDS = { 8698 "variable.language": [ 8699 "this", 8700 "super" 8701 ], 8702 $pattern: IDENTIFIER_RE, 8703 keyword: KWS, 8704 literal: LITERALS, 8705 built_in: BUILT_INS, 8706 type: TYPES 8707 }; 8708 const CLASS_KEYWORDS = { 8709 $pattern: IDENTIFIER_RE, 8710 keyword: [ 8711 "@interface", 8712 "@class", 8713 "@protocol", 8714 "@implementation" 8715 ] 8716 }; 8717 return { 8718 name: "Objective-C", 8719 aliases: [ 8720 "mm", 8721 "objc", 8722 "obj-c", 8723 "obj-c++", 8724 "objective-c++" 8725 ], 8726 keywords: KEYWORDS, 8727 illegal: "</", 8728 contains: [ 8729 API_CLASS, 8730 hljs.C_LINE_COMMENT_MODE, 8731 hljs.C_BLOCK_COMMENT_MODE, 8732 hljs.C_NUMBER_MODE, 8733 hljs.QUOTE_STRING_MODE, 8734 hljs.APOS_STRING_MODE, 8735 { 8736 className: "string", 8737 variants: [ 8738 { 8739 begin: '@"', 8740 end: '"', 8741 illegal: "\\n", 8742 contains: [hljs.BACKSLASH_ESCAPE] 8743 } 8744 ] 8745 }, 8746 { 8747 className: "meta", 8748 begin: /#\s*[a-z]+\b/, 8749 end: /$/, 8750 keywords: { keyword: "if else elif endif define undef warning error line pragma ifdef ifndef include" }, 8751 contains: [ 8752 { 8753 begin: /\\\n/, 8754 relevance: 0 8755 }, 8756 hljs.inherit(hljs.QUOTE_STRING_MODE, { className: "string" }), 8757 { 8758 className: "string", 8759 begin: /<.*?>/, 8760 end: /$/, 8761 illegal: "\\n" 8762 }, 8763 hljs.C_LINE_COMMENT_MODE, 8764 hljs.C_BLOCK_COMMENT_MODE 8765 ] 8766 }, 8767 { 8768 className: "class", 8769 begin: "(" + CLASS_KEYWORDS.keyword.join("|") + ")\\b", 8770 end: /(\{|$)/, 8771 excludeEnd: true, 8772 keywords: CLASS_KEYWORDS, 8773 contains: [hljs.UNDERSCORE_TITLE_MODE] 8774 }, 8775 { 8776 begin: "\\." + hljs.UNDERSCORE_IDENT_RE, 8777 relevance: 0 8778 } 8779 ] 8780 }; 8781 } 8782 module.exports = objectivec; 8783 } 8784}); 8785
vendor: 16,503 bytes, lines 8786-9397
8786// node_modules/highlight.js/lib/languages/php.js 8787var require_php = __commonJS({ 8788 "node_modules/highlight.js/lib/languages/php.js"(exports, module) { 8789 function php(hljs) { 8790 const regex = hljs.regex; 8791 const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/; 8792 const IDENT_RE = regex.concat( 8793 /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, 8794 NOT_PERL_ETC 8795 ); 8796 const PASCAL_CASE_CLASS_NAME_RE = regex.concat( 8797 /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, 8798 NOT_PERL_ETC 8799 ); 8800 const UPCASE_NAME_RE = regex.concat( 8801 /[A-Z]+/, 8802 NOT_PERL_ETC 8803 ); 8804 const VARIABLE = { 8805 scope: "variable", 8806 match: "\\$+" + IDENT_RE 8807 }; 8808 const PREPROCESSOR = { 8809 scope: "meta", 8810 variants: [ 8811 { begin: /<\?php/, relevance: 10 }, 8812 // boost for obvious PHP 8813 { begin: /<\?=/ }, 8814 // less relevant per PSR-1 which says not to use short-tags 8815 { begin: /<\?/, relevance: 0.1 }, 8816 { begin: /\?>/ } 8817 // end php tag 8818 ] 8819 }; 8820 const SUBST = { 8821 scope: "subst", 8822 variants: [ 8823 { begin: /\$\w+/ }, 8824 { 8825 begin: /\{\$/, 8826 end: /\}/ 8827 } 8828 ] 8829 }; 8830 const SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null }); 8831 const DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, { 8832 illegal: null, 8833 contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST) 8834 }); 8835 const HEREDOC = { 8836 begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/, 8837 end: /[ \t]*(\w+)\b/, 8838 contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST), 8839 "on:begin": (m, resp) => { 8840 resp.data._beginMatch = m[1] || m[2]; 8841 }, 8842 "on:end": (m, resp) => { 8843 if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); 8844 } 8845 }; 8846 const NOWDOC = hljs.END_SAME_AS_BEGIN({ 8847 begin: /<<<[ \t]*'(\w+)'\n/, 8848 end: /[ \t]*(\w+)\b/ 8849 }); 8850 const WHITESPACE = "[ \n]"; 8851 const STRING = { 8852 scope: "string", 8853 variants: [ 8854 DOUBLE_QUOTED, 8855 SINGLE_QUOTED, 8856 HEREDOC, 8857 NOWDOC 8858 ] 8859 }; 8860 const NUMBER = { 8861 scope: "number", 8862 variants: [ 8863 { begin: `\\b0[bB][01]+(?:_[01]+)*\\b` }, 8864 // Binary w/ underscore support 8865 { begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` }, 8866 // Octals w/ underscore support 8867 { begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` }, 8868 // Hex w/ underscore support 8869 // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix. 8870 { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` } 8871 ], 8872 relevance: 0 8873 }; 8874 const LITERALS = [ 8875 "false", 8876 "null", 8877 "true" 8878 ]; 8879 const KWS = [ 8880 // Magic constants: 8881 // <https://www.php.net/manual/en/language.constants.predefined.php> 8882 "__CLASS__", 8883 "__DIR__", 8884 "__FILE__", 8885 "__FUNCTION__", 8886 "__COMPILER_HALT_OFFSET__", 8887 "__LINE__", 8888 "__METHOD__", 8889 "__NAMESPACE__", 8890 "__TRAIT__", 8891 // Function that look like language construct or language construct that look like function: 8892 // List of keywords that may not require parenthesis 8893 "die", 8894 "echo", 8895 "exit", 8896 "include", 8897 "include_once", 8898 "print", 8899 "require", 8900 "require_once", 8901 // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table 8902 // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' + 8903 // Other keywords: 8904 // <https://www.php.net/manual/en/reserved.php> 8905 // <https://www.php.net/manual/en/language.types.type-juggling.php> 8906 "array", 8907 "abstract", 8908 "and", 8909 "as", 8910 "binary", 8911 "bool", 8912 "boolean", 8913 "break", 8914 "callable", 8915 "case", 8916 "catch", 8917 "class", 8918 "clone", 8919 "const", 8920 "continue", 8921 "declare", 8922 "default", 8923 "do", 8924 "double", 8925 "else", 8926 "elseif", 8927 "empty", 8928 "enddeclare", 8929 "endfor", 8930 "endforeach", 8931 "endif", 8932 "endswitch", 8933 "endwhile", 8934 "enum", 8935 "eval", 8936 "extends", 8937 "final", 8938 "finally", 8939 "float", 8940 "for", 8941 "foreach", 8942 "from", 8943 "global", 8944 "goto", 8945 "if", 8946 "implements", 8947 "instanceof", 8948 "insteadof", 8949 "int", 8950 "integer", 8951 "interface", 8952 "isset", 8953 "iterable", 8954 "list", 8955 "match|0", 8956 "mixed", 8957 "new", 8958 "never", 8959 "object", 8960 "or", 8961 "private", 8962 "protected", 8963 "public", 8964 "readonly", 8965 "real", 8966 "return", 8967 "string", 8968 "switch", 8969 "throw", 8970 "trait", 8971 "try", 8972 "unset", 8973 "use", 8974 "var", 8975 "void", 8976 "while", 8977 "xor", 8978 "yield" 8979 ]; 8980 const BUILT_INS = [ 8981 // Standard PHP library: 8982 // <https://www.php.net/manual/en/book.spl.php> 8983 "Error|0", 8984 "AppendIterator", 8985 "ArgumentCountError", 8986 "ArithmeticError", 8987 "ArrayIterator", 8988 "ArrayObject", 8989 "AssertionError", 8990 "BadFunctionCallException", 8991 "BadMethodCallException", 8992 "CachingIterator", 8993 "CallbackFilterIterator", 8994 "CompileError", 8995 "Countable", 8996 "DirectoryIterator", 8997 "DivisionByZeroError", 8998 "DomainException", 8999 "EmptyIterator", 9000 "ErrorException", 9001 "Exception", 9002 "FilesystemIterator", 9003 "FilterIterator", 9004 "GlobIterator", 9005 "InfiniteIterator", 9006 "InvalidArgumentException", 9007 "IteratorIterator", 9008 "LengthException", 9009 "LimitIterator", 9010 "LogicException", 9011 "MultipleIterator", 9012 "NoRewindIterator", 9013 "OutOfBoundsException", 9014 "OutOfRangeException", 9015 "OuterIterator", 9016 "OverflowException", 9017 "ParentIterator", 9018 "ParseError", 9019 "RangeException", 9020 "RecursiveArrayIterator", 9021 "RecursiveCachingIterator", 9022 "RecursiveCallbackFilterIterator", 9023 "RecursiveDirectoryIterator", 9024 "RecursiveFilterIterator", 9025 "RecursiveIterator", 9026 "RecursiveIteratorIterator", 9027 "RecursiveRegexIterator", 9028 "RecursiveTreeIterator", 9029 "RegexIterator", 9030 "RuntimeException", 9031 "SeekableIterator", 9032 "SplDoublyLinkedList", 9033 "SplFileInfo", 9034 "SplFileObject", 9035 "SplFixedArray", 9036 "SplHeap", 9037 "SplMaxHeap", 9038 "SplMinHeap", 9039 "SplObjectStorage", 9040 "SplObserver", 9041 "SplPriorityQueue", 9042 "SplQueue", 9043 "SplStack", 9044 "SplSubject", 9045 "SplTempFileObject", 9046 "TypeError", 9047 "UnderflowException", 9048 "UnexpectedValueException", 9049 "UnhandledMatchError", 9050 // Reserved interfaces: 9051 // <https://www.php.net/manual/en/reserved.interfaces.php> 9052 "ArrayAccess", 9053 "BackedEnum", 9054 "Closure", 9055 "Fiber", 9056 "Generator", 9057 "Iterator", 9058 "IteratorAggregate", 9059 "Serializable", 9060 "Stringable", 9061 "Throwable", 9062 "Traversable", 9063 "UnitEnum", 9064 "WeakReference", 9065 "WeakMap", 9066 // Reserved classes: 9067 // <https://www.php.net/manual/en/reserved.classes.php> 9068 "Directory", 9069 "__PHP_Incomplete_Class", 9070 "parent", 9071 "php_user_filter", 9072 "self", 9073 "static", 9074 "stdClass" 9075 ]; 9076 const dualCase = (items) => { 9077 const result = []; 9078 items.forEach((item) => { 9079 result.push(item); 9080 if (item.toLowerCase() === item) { 9081 result.push(item.toUpperCase()); 9082 } else { 9083 result.push(item.toLowerCase()); 9084 } 9085 }); 9086 return result; 9087 }; 9088 const KEYWORDS = { 9089 keyword: KWS, 9090 literal: dualCase(LITERALS), 9091 built_in: BUILT_INS 9092 }; 9093 const normalizeKeywords = (items) => { 9094 return items.map((item) => { 9095 return item.replace(/\|\d+$/, ""); 9096 }); 9097 }; 9098 const CONSTRUCTOR_CALL = { variants: [ 9099 { 9100 match: [ 9101 /new/, 9102 regex.concat(WHITESPACE, "+"), 9103 // to prevent built ins from being confused as the class constructor call 9104 regex.concat("(?!", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"), 9105 PASCAL_CASE_CLASS_NAME_RE 9106 ], 9107 scope: { 9108 1: "keyword", 9109 4: "title.class" 9110 } 9111 } 9112 ] }; 9113 const CONSTANT_REFERENCE = regex.concat(IDENT_RE, "\\b(?!\\()"); 9114 const LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON = { variants: [ 9115 { 9116 match: [ 9117 regex.concat( 9118 /::/, 9119 regex.lookahead(/(?!class\b)/) 9120 ), 9121 CONSTANT_REFERENCE 9122 ], 9123 scope: { 2: "variable.constant" } 9124 }, 9125 { 9126 match: [ 9127 /::/, 9128 /class/ 9129 ], 9130 scope: { 2: "variable.language" } 9131 }, 9132 { 9133 match: [ 9134 PASCAL_CASE_CLASS_NAME_RE, 9135 regex.concat( 9136 /::/, 9137 regex.lookahead(/(?!class\b)/) 9138 ), 9139 CONSTANT_REFERENCE 9140 ], 9141 scope: { 9142 1: "title.class", 9143 3: "variable.constant" 9144 } 9145 }, 9146 { 9147 match: [ 9148 PASCAL_CASE_CLASS_NAME_RE, 9149 regex.concat( 9150 "::", 9151 regex.lookahead(/(?!class\b)/) 9152 ) 9153 ], 9154 scope: { 1: "title.class" } 9155 }, 9156 { 9157 match: [ 9158 PASCAL_CASE_CLASS_NAME_RE, 9159 /::/, 9160 /class/ 9161 ], 9162 scope: { 9163 1: "title.class", 9164 3: "variable.language" 9165 } 9166 } 9167 ] }; 9168 const NAMED_ARGUMENT = { 9169 scope: "attr", 9170 match: regex.concat(IDENT_RE, regex.lookahead(":"), regex.lookahead(/(?!::)/)) 9171 }; 9172 const PARAMS_MODE = { 9173 relevance: 0, 9174 begin: /\(/, 9175 end: /\)/, 9176 keywords: KEYWORDS, 9177 contains: [ 9178 NAMED_ARGUMENT, 9179 VARIABLE, 9180 LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON, 9181 hljs.C_BLOCK_COMMENT_MODE, 9182 hljs.C_LINE_COMMENT_MODE, 9183 hljs.HASH_COMMENT_MODE, 9184 STRING, 9185 NUMBER, 9186 CONSTRUCTOR_CALL 9187 ] 9188 }; 9189 const FUNCTION_INVOKE = { 9190 relevance: 0, 9191 match: [ 9192 /\b/, 9193 // to prevent keywords from being confused as the function title 9194 regex.concat("(?!fn\\b|function\\b|", normalizeKeywords(KWS).join("\\b|"), "|", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"), 9195 IDENT_RE, 9196 regex.concat(WHITESPACE, "*"), 9197 regex.lookahead(/(?=\()/) 9198 ], 9199 scope: { 3: "title.function.invoke" }, 9200 contains: [PARAMS_MODE] 9201 }; 9202 PARAMS_MODE.contains.push(FUNCTION_INVOKE); 9203 const ATTRIBUTE_CONTAINS = [ 9204 NAMED_ARGUMENT, 9205 LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON, 9206 hljs.C_BLOCK_COMMENT_MODE, 9207 hljs.C_LINE_COMMENT_MODE, 9208 hljs.HASH_COMMENT_MODE, 9209 STRING, 9210 NUMBER, 9211 CONSTRUCTOR_CALL 9212 ]; 9213 const ATTRIBUTES = { 9214 begin: regex.concat( 9215 /#\[\s*\\?/, 9216 regex.either( 9217 PASCAL_CASE_CLASS_NAME_RE, 9218 UPCASE_NAME_RE 9219 ) 9220 ), 9221 beginScope: "meta", 9222 end: /]/, 9223 endScope: "meta", 9224 keywords: { 9225 literal: LITERALS, 9226 keyword: [ 9227 "new", 9228 "array" 9229 ] 9230 }, 9231 contains: [ 9232 { 9233 begin: /\[/, 9234 end: /]/, 9235 keywords: { 9236 literal: LITERALS, 9237 keyword: [ 9238 "new", 9239 "array" 9240 ] 9241 }, 9242 contains: [ 9243 "self", 9244 ...ATTRIBUTE_CONTAINS 9245 ] 9246 }, 9247 ...ATTRIBUTE_CONTAINS, 9248 { 9249 scope: "meta", 9250 variants: [ 9251 { match: PASCAL_CASE_CLASS_NAME_RE }, 9252 { match: UPCASE_NAME_RE } 9253 ] 9254 } 9255 ] 9256 }; 9257 return { 9258 case_insensitive: false, 9259 keywords: KEYWORDS, 9260 contains: [ 9261 ATTRIBUTES, 9262 hljs.HASH_COMMENT_MODE, 9263 hljs.COMMENT("//", "$"), 9264 hljs.COMMENT( 9265 "/\\*", 9266 "\\*/", 9267 { contains: [ 9268 { 9269 scope: "doctag", 9270 match: "@[A-Za-z]+" 9271 } 9272 ] } 9273 ), 9274 { 9275 match: /__halt_compiler\(\);/, 9276 keywords: "__halt_compiler", 9277 starts: { 9278 scope: "comment", 9279 end: hljs.MATCH_NOTHING_RE, 9280 contains: [ 9281 { 9282 match: /\?>/, 9283 scope: "meta", 9284 endsParent: true 9285 } 9286 ] 9287 } 9288 }, 9289 PREPROCESSOR, 9290 { 9291 scope: "variable.language", 9292 match: /\$this\b/ 9293 }, 9294 VARIABLE, 9295 FUNCTION_INVOKE, 9296 LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON, 9297 { 9298 match: [ 9299 /const/, 9300 /\s/, 9301 IDENT_RE 9302 ], 9303 scope: { 9304 1: "keyword", 9305 3: "variable.constant" 9306 } 9307 }, 9308 CONSTRUCTOR_CALL, 9309 { 9310 scope: "function", 9311 relevance: 0, 9312 beginKeywords: "fn function", 9313 end: /[;{]/, 9314 excludeEnd: true, 9315 illegal: "[$%\\[]", 9316 contains: [ 9317 { beginKeywords: "use" }, 9318 hljs.UNDERSCORE_TITLE_MODE, 9319 { 9320 begin: "=>", 9321 // No markup, just a relevance booster 9322 endsParent: true 9323 }, 9324 { 9325 scope: "params", 9326 begin: "\\(", 9327 end: "\\)", 9328 excludeBegin: true, 9329 excludeEnd: true, 9330 keywords: KEYWORDS, 9331 contains: [ 9332 "self", 9333 ATTRIBUTES, 9334 VARIABLE, 9335 LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON, 9336 hljs.C_BLOCK_COMMENT_MODE, 9337 hljs.C_LINE_COMMENT_MODE, 9338 hljs.HASH_COMMENT_MODE, 9339 STRING, 9340 NUMBER 9341 ] 9342 } 9343 ] 9344 }, 9345 { 9346 scope: "class", 9347 variants: [ 9348 { 9349 beginKeywords: "enum", 9350 illegal: /[($"]/ 9351 }, 9352 { 9353 beginKeywords: "class interface trait", 9354 illegal: /[:($"]/ 9355 } 9356 ], 9357 relevance: 0, 9358 end: /\{/, 9359 excludeEnd: true, 9360 contains: [ 9361 { beginKeywords: "extends implements" }, 9362 hljs.UNDERSCORE_TITLE_MODE 9363 ] 9364 }, 9365 // both use and namespace still use "old style" rules (vs multi-match) 9366 // because the namespace name can include `\` and we still want each 9367 // element to be treated as its own *individual* title 9368 { 9369 beginKeywords: "namespace", 9370 relevance: 0, 9371 end: ";", 9372 illegal: /[.']/, 9373 contains: [hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, { scope: "title.class" })] 9374 }, 9375 { 9376 beginKeywords: "use", 9377 relevance: 0, 9378 end: ";", 9379 contains: [ 9380 // TODO: title.function vs title.class 9381 { 9382 match: /\b(as|const|function)\b/, 9383 scope: "keyword" 9384 }, 9385 // TODO: could be title.class or title.function 9386 hljs.UNDERSCORE_TITLE_MODE 9387 ] 9388 }, 9389 STRING, 9390 NUMBER 9391 ] 9392 }; 9393 } 9394 module.exports = php; 9395 } 9396}); 9397
vendor: 1,395 bytes, lines 9398-9448
9398// node_modules/highlight.js/lib/languages/php-template.js 9399var require_php_template = __commonJS({ 9400 "node_modules/highlight.js/lib/languages/php-template.js"(exports, module) { 9401 function phpTemplate(hljs) { 9402 return { 9403 name: "PHP template", 9404 subLanguage: "xml", 9405 contains: [ 9406 { 9407 begin: /<\?(php|=)?/, 9408 end: /\?>/, 9409 subLanguage: "php", 9410 contains: [ 9411 // We don't want the php closing tag ?> to close the PHP block when 9412 // inside any of the following blocks: 9413 { 9414 begin: "/\\*", 9415 end: "\\*/", 9416 skip: true 9417 }, 9418 { 9419 begin: 'b"', 9420 end: '"', 9421 skip: true 9422 }, 9423 { 9424 begin: "b'", 9425 end: "'", 9426 skip: true 9427 }, 9428 hljs.inherit(hljs.APOS_STRING_MODE, { 9429 illegal: null, 9430 className: null, 9431 contains: null, 9432 skip: true 9433 }), 9434 hljs.inherit(hljs.QUOTE_STRING_MODE, { 9435 illegal: null, 9436 className: null, 9437 contains: null, 9438 skip: true 9439 }) 9440 ] 9441 } 9442 ] 9443 }; 9444 } 9445 module.exports = phpTemplate; 9446 } 9447}); 9448
vendor: 395 bytes, lines 9449-9465
9449// node_modules/highlight.js/lib/languages/plaintext.js 9450var require_plaintext = __commonJS({ 9451 "node_modules/highlight.js/lib/languages/plaintext.js"(exports, module) { 9452 function plaintext(hljs) { 9453 return { 9454 name: "Plain text", 9455 aliases: [ 9456 "text", 9457 "txt" 9458 ], 9459 disableAutodetect: true 9460 }; 9461 } 9462 module.exports = plaintext; 9463 } 9464}); 9465
vendor: 10,371 bytes, lines 9466-9890
9466// node_modules/highlight.js/lib/languages/python.js 9467var require_python = __commonJS({ 9468 "node_modules/highlight.js/lib/languages/python.js"(exports, module) { 9469 function python(hljs) { 9470 const regex = hljs.regex; 9471 const IDENT_RE = /[\p{XID_Start}_]\p{XID_Continue}*/u; 9472 const RESERVED_WORDS = [ 9473 "and", 9474 "as", 9475 "assert", 9476 "async", 9477 "await", 9478 "break", 9479 "case", 9480 "class", 9481 "continue", 9482 "def", 9483 "del", 9484 "elif", 9485 "else", 9486 "except", 9487 "finally", 9488 "for", 9489 "from", 9490 "global", 9491 "if", 9492 "import", 9493 "in", 9494 "is", 9495 "lambda", 9496 "lazy", 9497 "match", 9498 "nonlocal|10", 9499 "not", 9500 "or", 9501 "pass", 9502 "raise", 9503 "return", 9504 "try", 9505 "while", 9506 "with", 9507 "yield" 9508 ]; 9509 const BUILT_INS = [ 9510 "__import__", 9511 "abs", 9512 "aiter", 9513 "all", 9514 "anext", 9515 "any", 9516 "ascii", 9517 "bin", 9518 "bool", 9519 "breakpoint", 9520 "bytearray", 9521 "bytes", 9522 "callable", 9523 "chr", 9524 "classmethod", 9525 "compile", 9526 "complex", 9527 "delattr", 9528 "dict", 9529 "dir", 9530 "divmod", 9531 "enumerate", 9532 "eval", 9533 "exec", 9534 "filter", 9535 "float", 9536 "format", 9537 "frozendict", 9538 "frozenset", 9539 "getattr", 9540 "globals", 9541 "hasattr", 9542 "hash", 9543 "help", 9544 "hex", 9545 "id", 9546 "input", 9547 "int", 9548 "isinstance", 9549 "issubclass", 9550 "iter", 9551 "len", 9552 "list", 9553 "locals", 9554 "map", 9555 "max", 9556 "memoryview", 9557 "min", 9558 "next", 9559 "object", 9560 "oct", 9561 "open", 9562 "ord", 9563 "pow", 9564 "print", 9565 "property", 9566 "range", 9567 "repr", 9568 "reversed", 9569 "round", 9570 "sentinel", 9571 "set", 9572 "setattr", 9573 "slice", 9574 "sorted", 9575 "staticmethod", 9576 "str", 9577 "sum", 9578 "super", 9579 "tuple", 9580 "type", 9581 "vars", 9582 "zip" 9583 ]; 9584 const LITERALS = [ 9585 "__debug__", 9586 "Ellipsis", 9587 "False", 9588 "None", 9589 "NotImplemented", 9590 "True" 9591 ]; 9592 const TYPES = [ 9593 "Any", 9594 "Callable", 9595 "Coroutine", 9596 "Dict", 9597 "List", 9598 "Literal", 9599 "Generic", 9600 "Optional", 9601 "Sequence", 9602 "Set", 9603 "Tuple", 9604 "Type", 9605 "Union" 9606 ]; 9607 const KEYWORDS = { 9608 $pattern: /[A-Za-z]\w+|__\w+__/, 9609 keyword: RESERVED_WORDS, 9610 built_in: BUILT_INS, 9611 literal: LITERALS, 9612 type: TYPES 9613 }; 9614 const PROMPT = { 9615 className: "meta", 9616 begin: /^(>>>|\.\.\.) / 9617 }; 9618 const SUBST = { 9619 className: "subst", 9620 begin: /\{/, 9621 end: /\}/, 9622 keywords: KEYWORDS, 9623 illegal: /#/ 9624 }; 9625 const LITERAL_BRACKET = { 9626 begin: /\{\{/, 9627 relevance: 0 9628 }; 9629 const STRING = { 9630 className: "string", 9631 contains: [hljs.BACKSLASH_ESCAPE], 9632 variants: [ 9633 { 9634 begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/, 9635 end: /'''/, 9636 contains: [ 9637 hljs.BACKSLASH_ESCAPE, 9638 PROMPT 9639 ], 9640 relevance: 10 9641 }, 9642 { 9643 begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/, 9644 end: /"""/, 9645 contains: [ 9646 hljs.BACKSLASH_ESCAPE, 9647 PROMPT 9648 ], 9649 relevance: 10 9650 }, 9651 { 9652 begin: /([fFtT][rR]|[rR][fFtT]|[fFtT])'''/, 9653 end: /'''/, 9654 contains: [ 9655 hljs.BACKSLASH_ESCAPE, 9656 PROMPT, 9657 LITERAL_BRACKET, 9658 SUBST 9659 ] 9660 }, 9661 { 9662 begin: /([fFtT][rR]|[rR][fFtT]|[fFtT])"""/, 9663 end: /"""/, 9664 contains: [ 9665 hljs.BACKSLASH_ESCAPE, 9666 PROMPT, 9667 LITERAL_BRACKET, 9668 SUBST 9669 ] 9670 }, 9671 { 9672 begin: /([uU]|[rR])'/, 9673 end: /'/, 9674 relevance: 10 9675 }, 9676 { 9677 begin: /([uU]|[rR])"/, 9678 end: /"/, 9679 relevance: 10 9680 }, 9681 { 9682 begin: /([bB]|[bB][rR]|[rR][bB])'/, 9683 end: /'/ 9684 }, 9685 { 9686 begin: /([bB]|[bB][rR]|[rR][bB])"/, 9687 end: /"/ 9688 }, 9689 { 9690 begin: /([fFtT][rR]|[rR][fFtT]|[fFtT])'/, 9691 end: /'/, 9692 contains: [ 9693 hljs.BACKSLASH_ESCAPE, 9694 LITERAL_BRACKET, 9695 SUBST 9696 ] 9697 }, 9698 { 9699 begin: /([fFtT][rR]|[rR][fFtT]|[fFtT])"/, 9700 end: /"/, 9701 contains: [ 9702 hljs.BACKSLASH_ESCAPE, 9703 LITERAL_BRACKET, 9704 SUBST 9705 ] 9706 }, 9707 hljs.APOS_STRING_MODE, 9708 hljs.QUOTE_STRING_MODE 9709 ] 9710 }; 9711 const digitpart = "[0-9](_?[0-9])*"; 9712 const pointfloat = `(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`; 9713 const lookahead = `\\b|${RESERVED_WORDS.join("|")}`; 9714 const NUMBER = { 9715 className: "number", 9716 relevance: 0, 9717 variants: [ 9718 // exponentfloat, pointfloat 9719 // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals 9720 // optionally imaginary 9721 // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals 9722 // Note: no leading \b because floats can start with a decimal point 9723 // and we don't want to mishandle e.g. `fn(.5)`, 9724 // no trailing \b for pointfloat because it can end with a decimal point 9725 // and we don't want to mishandle e.g. `0..hex()`; this should be safe 9726 // because both MUST contain a decimal point and so cannot be confused with 9727 // the interior part of an identifier 9728 { 9729 begin: `(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead})` 9730 }, 9731 { 9732 begin: `(${pointfloat})[jJ]?` 9733 }, 9734 // decinteger, bininteger, octinteger, hexinteger 9735 // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals 9736 // optionally "long" in Python 2 9737 // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals 9738 // decinteger is optionally imaginary 9739 // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals 9740 { 9741 begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead})` 9742 }, 9743 { 9744 begin: `\\b0[bB](_?[01])+[lL]?(?=${lookahead})` 9745 }, 9746 { 9747 begin: `\\b0[oO](_?[0-7])+[lL]?(?=${lookahead})` 9748 }, 9749 { 9750 begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${lookahead})` 9751 }, 9752 // imagnumber (digitpart-based) 9753 // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals 9754 { 9755 begin: `\\b(${digitpart})[jJ](?=${lookahead})` 9756 } 9757 ] 9758 }; 9759 const COMMENT_TYPE = { 9760 className: "comment", 9761 begin: regex.lookahead(/# type:/), 9762 end: /$/, 9763 keywords: KEYWORDS, 9764 contains: [ 9765 { 9766 // prevent keywords from coloring `type` 9767 begin: /# type:/ 9768 }, 9769 // comment within a datatype comment includes no keywords 9770 { 9771 begin: /#/, 9772 end: /\b\B/, 9773 endsWithParent: true 9774 } 9775 ] 9776 }; 9777 const PARAMS = { 9778 className: "params", 9779 variants: [ 9780 // Exclude params in functions without params 9781 { 9782 className: "", 9783 begin: /\(\s*\)/, 9784 skip: true 9785 }, 9786 { 9787 begin: /\(/, 9788 end: /\)/, 9789 excludeBegin: true, 9790 excludeEnd: true, 9791 keywords: KEYWORDS, 9792 contains: [ 9793 "self", 9794 PROMPT, 9795 NUMBER, 9796 STRING, 9797 hljs.HASH_COMMENT_MODE 9798 ] 9799 } 9800 ] 9801 }; 9802 SUBST.contains = [ 9803 STRING, 9804 NUMBER, 9805 PROMPT 9806 ]; 9807 return { 9808 name: "Python", 9809 aliases: [ 9810 "py", 9811 "gyp", 9812 "ipython" 9813 ], 9814 unicodeRegex: true, 9815 keywords: KEYWORDS, 9816 illegal: /(<\/|\?)|=>/, 9817 contains: [ 9818 PROMPT, 9819 NUMBER, 9820 { 9821 // very common convention 9822 scope: "variable.language", 9823 match: /\bself\b/ 9824 }, 9825 { 9826 // eat "if" prior to string so that it won't accidentally be 9827 // labeled as an f-string 9828 beginKeywords: "if", 9829 relevance: 0 9830 }, 9831 { match: /\bor\b/, scope: "keyword" }, 9832 STRING, 9833 COMMENT_TYPE, 9834 hljs.HASH_COMMENT_MODE, 9835 { 9836 match: [ 9837 /\bdef/, 9838 /\s+/, 9839 IDENT_RE 9840 ], 9841 scope: { 9842 1: "keyword", 9843 3: "title.function" 9844 }, 9845 contains: [PARAMS] 9846 }, 9847 { 9848 variants: [ 9849 { 9850 match: [ 9851 /\bclass/, 9852 /\s+/, 9853 IDENT_RE, 9854 /\s*/, 9855 /\(\s*/, 9856 IDENT_RE, 9857 /\s*\)/ 9858 ] 9859 }, 9860 { 9861 match: [ 9862 /\bclass/, 9863 /\s+/, 9864 IDENT_RE 9865 ] 9866 } 9867 ], 9868 scope: { 9869 1: "keyword", 9870 3: "title.class", 9871 6: "title.class.inherited" 9872 } 9873 }, 9874 { 9875 className: "meta", 9876 begin: /^[\t ]*@/, 9877 end: /(?=#)|$/, 9878 contains: [ 9879 NUMBER, 9880 PARAMS, 9881 STRING 9882 ] 9883 } 9884 ] 9885 }; 9886 } 9887 module.exports = python; 9888 } 9889}); 9890
vendor: 818 bytes, lines 9891-9920
9891// node_modules/highlight.js/lib/languages/python-repl.js 9892var require_python_repl = __commonJS({ 9893 "node_modules/highlight.js/lib/languages/python-repl.js"(exports, module) { 9894 function pythonRepl(hljs) { 9895 return { 9896 aliases: ["pycon"], 9897 contains: [ 9898 { 9899 className: "meta.prompt", 9900 starts: { 9901 // a space separates the REPL prefix from the actual code 9902 // this is purely for cleaner HTML output 9903 end: / |$/, 9904 starts: { 9905 end: "$", 9906 subLanguage: "python" 9907 } 9908 }, 9909 variants: [ 9910 { begin: /^>>>(?=[ ]|$)/ }, 9911 { begin: /^\.\.\.(?=[ ]|$)/ } 9912 ] 9913 } 9914 ] 9915 }; 9916 } 9917 module.exports = pythonRepl; 9918 } 9919}); 9920
vendor: 7,832 bytes, lines 9921-10135
9921// node_modules/highlight.js/lib/languages/r.js 9922var require_r = __commonJS({ 9923 "node_modules/highlight.js/lib/languages/r.js"(exports, module) { 9924 function r(hljs) { 9925 const regex = hljs.regex; 9926 const IDENT_RE = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/; 9927 const NUMBER_TYPES_RE = regex.either( 9928 // Special case: only hexadecimal binary powers can contain fractions 9929 /0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, 9930 // Hexadecimal numbers without fraction and optional binary power 9931 /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/, 9932 // Decimal numbers 9933 /(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/ 9934 ); 9935 const OPERATORS_RE = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/; 9936 const PUNCTUATION_RE = regex.either( 9937 /[()]/, 9938 /[{}]/, 9939 /\[\[/, 9940 /[[\]]/, 9941 /\\/, 9942 /,/ 9943 ); 9944 return { 9945 name: "R", 9946 keywords: { 9947 $pattern: IDENT_RE, 9948 keyword: "function if in break next repeat else for while", 9949 literal: "NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", 9950 built_in: ( 9951 // Builtin constants 9952 "LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" 9953 ) 9954 }, 9955 contains: [ 9956 // Roxygen comments 9957 hljs.COMMENT( 9958 /#'/, 9959 /$/, 9960 { contains: [ 9961 { 9962 // Handle `@examples` separately to cause all subsequent code 9963 // until the next `@`-tag on its own line to be kept as-is, 9964 // preventing highlighting. This code is example R code, so nested 9965 // doctags shouldn’t be treated as such. See 9966 // `test/markup/r/roxygen.txt` for an example. 9967 scope: "doctag", 9968 match: /@examples/, 9969 starts: { 9970 end: regex.lookahead(regex.either( 9971 // end if another doc comment 9972 /\n^#'\s*(?=@[a-zA-Z]+)/, 9973 // or a line with no comment 9974 /\n^(?!#')/ 9975 )), 9976 endsParent: true 9977 } 9978 }, 9979 { 9980 // Handle `@param` to highlight the parameter name following 9981 // after. 9982 scope: "doctag", 9983 begin: "@param", 9984 end: /$/, 9985 contains: [ 9986 { 9987 scope: "variable", 9988 variants: [ 9989 { match: IDENT_RE }, 9990 { match: /`(?:\\.|[^`\\])+`/ } 9991 ], 9992 endsParent: true 9993 } 9994 ] 9995 }, 9996 { 9997 scope: "doctag", 9998 match: /@[a-zA-Z]+/ 9999 }, 10000 { 10001 scope: "keyword", 10002 match: /\\[a-zA-Z]+/ 10003 } 10004 ] } 10005 ), 10006 hljs.HASH_COMMENT_MODE, 10007 { 10008 scope: "string", 10009 contains: [hljs.BACKSLASH_ESCAPE], 10010 variants: [ 10011 hljs.END_SAME_AS_BEGIN({ 10012 begin: /[rR]"(-*)\(/, 10013 end: /\)(-*)"/ 10014 }), 10015 hljs.END_SAME_AS_BEGIN({ 10016 begin: /[rR]"(-*)\{/, 10017 end: /\}(-*)"/ 10018 }), 10019 hljs.END_SAME_AS_BEGIN({ 10020 begin: /[rR]"(-*)\[/, 10021 end: /\](-*)"/ 10022 }), 10023 hljs.END_SAME_AS_BEGIN({ 10024 begin: /[rR]'(-*)\(/, 10025 end: /\)(-*)'/ 10026 }), 10027 hljs.END_SAME_AS_BEGIN({ 10028 begin: /[rR]'(-*)\{/, 10029 end: /\}(-*)'/ 10030 }), 10031 hljs.END_SAME_AS_BEGIN({ 10032 begin: /[rR]'(-*)\[/, 10033 end: /\](-*)'/ 10034 }), 10035 { 10036 begin: '"', 10037 end: '"', 10038 relevance: 0 10039 }, 10040 { 10041 begin: "'", 10042 end: "'", 10043 relevance: 0 10044 } 10045 ] 10046 }, 10047 // Matching numbers immediately following punctuation and operators is 10048 // tricky since we need to look at the character ahead of a number to 10049 // ensure the number is not part of an identifier, and we cannot use 10050 // negative look-behind assertions. So instead we explicitly handle all 10051 // possible combinations of (operator|punctuation), number. 10052 // TODO: replace with negative look-behind when available 10053 // { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ }, 10054 // { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ }, 10055 // { begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ } 10056 { 10057 relevance: 0, 10058 variants: [ 10059 { 10060 scope: { 10061 1: "operator", 10062 2: "number" 10063 }, 10064 match: [ 10065 OPERATORS_RE, 10066 NUMBER_TYPES_RE 10067 ] 10068 }, 10069 { 10070 scope: { 10071 1: "operator", 10072 2: "number" 10073 }, 10074 match: [ 10075 /%[^%]*%/, 10076 NUMBER_TYPES_RE 10077 ] 10078 }, 10079 { 10080 scope: { 10081 1: "punctuation", 10082 2: "number" 10083 }, 10084 match: [ 10085 PUNCTUATION_RE, 10086 NUMBER_TYPES_RE 10087 ] 10088 }, 10089 { 10090 scope: { 2: "number" }, 10091 match: [ 10092 /[^a-zA-Z0-9._]|^/, 10093 // not part of an identifier, or start of document 10094 NUMBER_TYPES_RE 10095 ] 10096 } 10097 ] 10098 }, 10099 // Operators/punctuation when they're not directly followed by numbers 10100 { 10101 // Relevance boost for the most common assignment form. 10102 scope: { 3: "operator" }, 10103 match: [ 10104 IDENT_RE, 10105 /\s+/, 10106 /<-/, 10107 /\s+/ 10108 ] 10109 }, 10110 { 10111 scope: "operator", 10112 relevance: 0, 10113 variants: [ 10114 { match: OPERATORS_RE }, 10115 { match: /%[^%]*%/ } 10116 ] 10117 }, 10118 { 10119 scope: "punctuation", 10120 relevance: 0, 10121 match: PUNCTUATION_RE 10122 }, 10123 { 10124 // Escaped identifier 10125 begin: "`", 10126 end: "`", 10127 contains: [{ begin: /\\./ }] 10128 } 10129 ] 10130 }; 10131 } 10132 module.exports = r; 10133 } 10134}); 10135
vendor: 7,314 bytes, lines 10136-10467
10136// node_modules/highlight.js/lib/languages/rust.js 10137var require_rust = __commonJS({ 10138 "node_modules/highlight.js/lib/languages/rust.js"(exports, module) { 10139 function rust(hljs) { 10140 const regex = hljs.regex; 10141 const RAW_IDENTIFIER = /(r#)?/; 10142 const UNDERSCORE_IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE); 10143 const IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE); 10144 const FUNCTION_INVOKE = { 10145 scope: "title.function.invoke", 10146 relevance: 0, 10147 begin: regex.concat( 10148 /\b/, 10149 /(?!(?:let|for|while|if|else|match)\b)/, 10150 IDENT_RE, 10151 regex.lookahead(/\s*\(/) 10152 ) 10153 }; 10154 const NUMBER_SUFFIX = "([ui](8|16|32|64|128|size)|f(16|32|64|128))?"; 10155 const KEYWORDS = [ 10156 "abstract", 10157 "as", 10158 "async", 10159 "await", 10160 "become", 10161 "box", 10162 "break", 10163 "const", 10164 "continue", 10165 "crate", 10166 "do", 10167 "dyn", 10168 "else", 10169 "enum", 10170 "extern", 10171 "false", 10172 "final", 10173 "fn", 10174 "for", 10175 "if", 10176 "impl", 10177 "in", 10178 "let", 10179 "loop", 10180 "macro", 10181 "match", 10182 "mod", 10183 "move", 10184 "mut", 10185 "override", 10186 "priv", 10187 "pub", 10188 "raw", 10189 "ref", 10190 "return", 10191 "self", 10192 "Self", 10193 "static", 10194 "struct", 10195 "super", 10196 "trait", 10197 "true", 10198 "try", 10199 "type", 10200 "typeof", 10201 "union", 10202 "unsafe", 10203 "unsized", 10204 "use", 10205 "virtual", 10206 "where", 10207 "while", 10208 "yield" 10209 ]; 10210 const LITERALS = [ 10211 "true", 10212 "false", 10213 "Some", 10214 "None", 10215 "Ok", 10216 "Err" 10217 ]; 10218 const BUILTINS = [ 10219 // functions 10220 "drop ", 10221 // traits 10222 "Copy", 10223 "Send", 10224 "Sized", 10225 "Sync", 10226 "Drop", 10227 "Fn", 10228 "FnMut", 10229 "FnOnce", 10230 "ToOwned", 10231 "Clone", 10232 "Debug", 10233 "PartialEq", 10234 "PartialOrd", 10235 "Eq", 10236 "Ord", 10237 "AsRef", 10238 "AsMut", 10239 "Into", 10240 "From", 10241 "Default", 10242 "Iterator", 10243 "Extend", 10244 "IntoIterator", 10245 "DoubleEndedIterator", 10246 "ExactSizeIterator", 10247 "SliceConcatExt", 10248 "ToString", 10249 // macros 10250 "assert!", 10251 "assert_eq!", 10252 "bitflags!", 10253 "bytes!", 10254 "cfg!", 10255 "col!", 10256 "concat!", 10257 "concat_idents!", 10258 "debug_assert!", 10259 "debug_assert_eq!", 10260 "env!", 10261 "eprintln!", 10262 "panic!", 10263 "file!", 10264 "format!", 10265 "format_args!", 10266 "include_bytes!", 10267 "include_str!", 10268 "line!", 10269 "local_data_key!", 10270 "module_path!", 10271 "option_env!", 10272 "print!", 10273 "println!", 10274 "select!", 10275 "stringify!", 10276 "try!", 10277 "unimplemented!", 10278 "unreachable!", 10279 "vec!", 10280 "write!", 10281 "writeln!", 10282 "macro_rules!", 10283 "assert_ne!", 10284 "debug_assert_ne!" 10285 ]; 10286 const TYPES = [ 10287 "i8", 10288 "i16", 10289 "i32", 10290 "i64", 10291 "i128", 10292 "isize", 10293 "u8", 10294 "u16", 10295 "u32", 10296 "u64", 10297 "u128", 10298 "usize", 10299 "f16", 10300 "f32", 10301 "f64", 10302 "f128", 10303 "str", 10304 "char", 10305 "bool", 10306 "Box", 10307 "Option", 10308 "Result", 10309 "String", 10310 "Vec" 10311 ]; 10312 return { 10313 name: "Rust", 10314 aliases: ["rs"], 10315 keywords: { 10316 $pattern: hljs.IDENT_RE + "!?", 10317 type: TYPES, 10318 keyword: KEYWORDS, 10319 literal: LITERALS, 10320 built_in: BUILTINS 10321 }, 10322 illegal: "</", 10323 contains: [ 10324 hljs.C_LINE_COMMENT_MODE, 10325 hljs.COMMENT("/\\*", "\\*/", { contains: ["self"] }), 10326 hljs.inherit(hljs.QUOTE_STRING_MODE, { 10327 begin: /b?"/, 10328 illegal: null 10329 }), 10330 { 10331 scope: "symbol", 10332 // negative lookahead to avoid matching `'` 10333 begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/ 10334 }, 10335 { 10336 scope: "string", 10337 variants: [ 10338 { begin: /b?r(#*)"(.|\n)*?"\1(?!#)/ }, 10339 { 10340 begin: /b?'/, 10341 end: /'/, 10342 contains: [ 10343 { 10344 scope: "char.escape", 10345 match: /\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/ 10346 } 10347 ] 10348 } 10349 ] 10350 }, 10351 { 10352 scope: "number", 10353 variants: [ 10354 { begin: "\\b0b([01_]+)" + NUMBER_SUFFIX }, 10355 { begin: "\\b0o([0-7_]+)" + NUMBER_SUFFIX }, 10356 { begin: "\\b0x([A-Fa-f0-9_]+)" + NUMBER_SUFFIX }, 10357 { begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + NUMBER_SUFFIX } 10358 ], 10359 relevance: 0 10360 }, 10361 { 10362 begin: [ 10363 /\bsafe/, 10364 /\s+/, 10365 /extern/ 10366 ], 10367 scope: { 10368 1: "keyword", 10369 3: "keyword" 10370 } 10371 }, 10372 { 10373 begin: [ 10374 /fn/, 10375 /\s+/, 10376 UNDERSCORE_IDENT_RE 10377 ], 10378 scope: { 10379 1: "keyword", 10380 3: "title.function" 10381 } 10382 }, 10383 { 10384 scope: "meta", 10385 begin: "#!?\\[", 10386 end: "\\]", 10387 contains: [ 10388 { 10389 scope: "string", 10390 begin: /"/, 10391 end: /"/, 10392 contains: [ 10393 hljs.BACKSLASH_ESCAPE 10394 ] 10395 } 10396 ] 10397 }, 10398 { 10399 begin: [ 10400 /let/, 10401 /\s+/, 10402 /(?:mut\s+)?/, 10403 UNDERSCORE_IDENT_RE 10404 ], 10405 scope: { 10406 1: "keyword", 10407 3: "keyword", 10408 4: "variable" 10409 } 10410 }, 10411 // must come before impl/for rule later 10412 { 10413 begin: [ 10414 /for/, 10415 /\s+/, 10416 UNDERSCORE_IDENT_RE, 10417 /\s+/, 10418 /in/ 10419 ], 10420 scope: { 10421 1: "keyword", 10422 3: "variable", 10423 5: "keyword" 10424 } 10425 }, 10426 { 10427 begin: [ 10428 /type/, 10429 /\s+/, 10430 UNDERSCORE_IDENT_RE 10431 ], 10432 scope: { 10433 1: "keyword", 10434 3: "title.class" 10435 } 10436 }, 10437 { 10438 begin: [ 10439 /(?:trait|enum|struct|union|impl|for)/, 10440 /\s+/, 10441 UNDERSCORE_IDENT_RE 10442 ], 10443 scope: { 10444 1: "keyword", 10445 3: "title.class" 10446 } 10447 }, 10448 { 10449 begin: hljs.IDENT_RE + "::", 10450 keywords: { 10451 keyword: "Self", 10452 built_in: BUILTINS, 10453 type: TYPES 10454 } 10455 }, 10456 { 10457 scope: "punctuation", 10458 begin: "->" 10459 }, 10460 FUNCTION_INVOKE 10461 ] 10462 }; 10463 } 10464 module.exports = rust; 10465 } 10466}); 10467
vendor: 23,072 bytes, lines 10468-11405
10468// node_modules/highlight.js/lib/languages/scss.js 10469var require_scss = __commonJS({ 10470 "node_modules/highlight.js/lib/languages/scss.js"(exports, module) { 10471 var MODES = (hljs) => { 10472 return { 10473 IMPORTANT: { 10474 scope: "meta", 10475 begin: "!important" 10476 }, 10477 BLOCK_COMMENT: hljs.C_BLOCK_COMMENT_MODE, 10478 HEXCOLOR: { 10479 scope: "number", 10480 begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/ 10481 }, 10482 UNICODE_RANGE: { 10483 scope: "number", 10484 begin: /\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/ 10485 }, 10486 FUNCTION_DISPATCH: { 10487 className: "built_in", 10488 begin: /[\w-]+(?=\()/ 10489 }, 10490 ATTRIBUTE_SELECTOR_MODE: { 10491 scope: "selector-attr", 10492 begin: /\[/, 10493 end: /\]/, 10494 illegal: "$", 10495 contains: [ 10496 hljs.APOS_STRING_MODE, 10497 hljs.QUOTE_STRING_MODE 10498 ] 10499 }, 10500 CSS_NUMBER_MODE: { 10501 scope: "number", 10502 begin: hljs.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", 10503 relevance: 0 10504 }, 10505 CSS_VARIABLE: { 10506 className: "attr", 10507 begin: /--[A-Za-z_][A-Za-z0-9_-]*/ 10508 } 10509 }; 10510 }; 10511 var HTML_TAGS = [ 10512 "a", 10513 "abbr", 10514 "address", 10515 "article", 10516 "aside", 10517 "audio", 10518 "b", 10519 "blockquote", 10520 "body", 10521 "button", 10522 "canvas", 10523 "caption", 10524 "cite", 10525 "code", 10526 "dd", 10527 "del", 10528 "details", 10529 "dfn", 10530 "div", 10531 "dl", 10532 "dt", 10533 "em", 10534 "fieldset", 10535 "figcaption", 10536 "figure", 10537 "footer", 10538 "form", 10539 "h1", 10540 "h2", 10541 "h3", 10542 "h4", 10543 "h5", 10544 "h6", 10545 "header", 10546 "hgroup", 10547 "html", 10548 "i", 10549 "iframe", 10550 "img", 10551 "input", 10552 "ins", 10553 "kbd", 10554 "label", 10555 "legend", 10556 "li", 10557 "main", 10558 "mark", 10559 "menu", 10560 "nav", 10561 "object", 10562 "ol", 10563 "optgroup", 10564 "option", 10565 "p", 10566 "picture", 10567 "q", 10568 "quote", 10569 "samp", 10570 "section", 10571 "select", 10572 "source", 10573 "span", 10574 "strong", 10575 "summary", 10576 "sup", 10577 "table", 10578 "tbody", 10579 "td", 10580 "textarea", 10581 "tfoot", 10582 "th", 10583 "thead", 10584 "time", 10585 "tr", 10586 "ul", 10587 "var", 10588 "video" 10589 ]; 10590 var SVG_TAGS = [ 10591 "defs", 10592 "g", 10593 "marker", 10594 "mask", 10595 "pattern", 10596 "svg", 10597 "switch", 10598 "symbol", 10599 "feBlend", 10600 "feColorMatrix", 10601 "feComponentTransfer", 10602 "feComposite", 10603 "feConvolveMatrix", 10604 "feDiffuseLighting", 10605 "feDisplacementMap", 10606 "feFlood", 10607 "feGaussianBlur", 10608 "feImage", 10609 "feMerge", 10610 "feMorphology", 10611 "feOffset", 10612 "feSpecularLighting", 10613 "feTile", 10614 "feTurbulence", 10615 "linearGradient", 10616 "radialGradient", 10617 "stop", 10618 "circle", 10619 "ellipse", 10620 "image", 10621 "line", 10622 "path", 10623 "polygon", 10624 "polyline", 10625 "rect", 10626 "text", 10627 "use", 10628 "textPath", 10629 "tspan", 10630 "foreignObject", 10631 "clipPath" 10632 ]; 10633 var TAGS = [ 10634 ...HTML_TAGS, 10635 ...SVG_TAGS 10636 ]; 10637 var MEDIA_FEATURES = [ 10638 "any-hover", 10639 "any-pointer", 10640 "aspect-ratio", 10641 "color", 10642 "color-gamut", 10643 "color-index", 10644 "device-aspect-ratio", 10645 "device-height", 10646 "device-width", 10647 "display-mode", 10648 "forced-colors", 10649 "grid", 10650 "height", 10651 "hover", 10652 "inverted-colors", 10653 "monochrome", 10654 "orientation", 10655 "overflow-block", 10656 "overflow-inline", 10657 "pointer", 10658 "prefers-color-scheme", 10659 "prefers-contrast", 10660 "prefers-reduced-motion", 10661 "prefers-reduced-transparency", 10662 "resolution", 10663 "scan", 10664 "scripting", 10665 "update", 10666 "width", 10667 // TODO: find a better solution? 10668 "min-width", 10669 "max-width", 10670 "min-height", 10671 "max-height" 10672 ].sort().reverse(); 10673 var PSEUDO_CLASSES = [ 10674 "active", 10675 "any-link", 10676 "blank", 10677 "checked", 10678 "current", 10679 "default", 10680 "defined", 10681 "dir", 10682 // dir() 10683 "disabled", 10684 "drop", 10685 "empty", 10686 "enabled", 10687 "first", 10688 "first-child", 10689 "first-of-type", 10690 "fullscreen", 10691 "future", 10692 "focus", 10693 "focus-visible", 10694 "focus-within", 10695 "has", 10696 // has() 10697 "host", 10698 // host or host() 10699 "host-context", 10700 // host-context() 10701 "hover", 10702 "indeterminate", 10703 "in-range", 10704 "invalid", 10705 "is", 10706 // is() 10707 "lang", 10708 // lang() 10709 "last-child", 10710 "last-of-type", 10711 "left", 10712 "link", 10713 "local-link", 10714 "not", 10715 // not() 10716 "nth-child", 10717 // nth-child() 10718 "nth-col", 10719 // nth-col() 10720 "nth-last-child", 10721 // nth-last-child() 10722 "nth-last-col", 10723 // nth-last-col() 10724 "nth-last-of-type", 10725 //nth-last-of-type() 10726 "nth-of-type", 10727 //nth-of-type() 10728 "only-child", 10729 "only-of-type", 10730 "optional", 10731 "out-of-range", 10732 "past", 10733 "placeholder-shown", 10734 "read-only", 10735 "read-write", 10736 "required", 10737 "right", 10738 "root", 10739 "scope", 10740 "target", 10741 "target-within", 10742 "user-invalid", 10743 "valid", 10744 "visited", 10745 "where" 10746 // where() 10747 ].sort().reverse(); 10748 var PSEUDO_ELEMENTS = [ 10749 "after", 10750 "backdrop", 10751 "before", 10752 "cue", 10753 "cue-region", 10754 "first-letter", 10755 "first-line", 10756 "grammar-error", 10757 "marker", 10758 "part", 10759 "placeholder", 10760 "selection", 10761 "slotted", 10762 "spelling-error" 10763 ].sort().reverse(); 10764 var ATTRIBUTES = [ 10765 "accent-color", 10766 "align-content", 10767 "align-items", 10768 "align-self", 10769 "alignment-baseline", 10770 "all", 10771 "anchor-name", 10772 "animation", 10773 "animation-composition", 10774 "animation-delay", 10775 "animation-direction", 10776 "animation-duration", 10777 "animation-fill-mode", 10778 "animation-iteration-count", 10779 "animation-name", 10780 "animation-play-state", 10781 "animation-range", 10782 "animation-range-end", 10783 "animation-range-start", 10784 "animation-timeline", 10785 "animation-timing-function", 10786 "appearance", 10787 "aspect-ratio", 10788 "backdrop-filter", 10789 "backface-visibility", 10790 "background", 10791 "background-attachment", 10792 "background-blend-mode", 10793 "background-clip", 10794 "background-color", 10795 "background-image", 10796 "background-origin", 10797 "background-position", 10798 "background-position-x", 10799 "background-position-y", 10800 "background-repeat", 10801 "background-size", 10802 "baseline-shift", 10803 "block-size", 10804 "border", 10805 "border-block", 10806 "border-block-color", 10807 "border-block-end", 10808 "border-block-end-color", 10809 "border-block-end-style", 10810 "border-block-end-width", 10811 "border-block-start", 10812 "border-block-start-color", 10813 "border-block-start-style", 10814 "border-block-start-width", 10815 "border-block-style", 10816 "border-block-width", 10817 "border-bottom", 10818 "border-bottom-color", 10819 "border-bottom-left-radius", 10820 "border-bottom-right-radius", 10821 "border-bottom-style", 10822 "border-bottom-width", 10823 "border-collapse", 10824 "border-color", 10825 "border-end-end-radius", 10826 "border-end-start-radius", 10827 "border-image", 10828 "border-image-outset", 10829 "border-image-repeat", 10830 "border-image-slice", 10831 "border-image-source", 10832 "border-image-width", 10833 "border-inline", 10834 "border-inline-color", 10835 "border-inline-end", 10836 "border-inline-end-color", 10837 "border-inline-end-style", 10838 "border-inline-end-width", 10839 "border-inline-start", 10840 "border-inline-start-color", 10841 "border-inline-start-style", 10842 "border-inline-start-width", 10843 "border-inline-style", 10844 "border-inline-width", 10845 "border-left", 10846 "border-left-color", 10847 "border-left-style", 10848 "border-left-width", 10849 "border-radius", 10850 "border-right", 10851 "border-right-color", 10852 "border-right-style", 10853 "border-right-width", 10854 "border-spacing", 10855 "border-start-end-radius", 10856 "border-start-start-radius", 10857 "border-style", 10858 "border-top", 10859 "border-top-color", 10860 "border-top-left-radius", 10861 "border-top-right-radius", 10862 "border-top-style", 10863 "border-top-width", 10864 "border-width", 10865 "bottom", 10866 "box-align", 10867 "box-decoration-break", 10868 "box-direction", 10869 "box-flex", 10870 "box-flex-group", 10871 "box-lines", 10872 "box-ordinal-group", 10873 "box-orient", 10874 "box-pack", 10875 "box-shadow", 10876 "box-sizing", 10877 "break-after", 10878 "break-before", 10879 "break-inside", 10880 "caption-side", 10881 "caret-color", 10882 "clear", 10883 "clip", 10884 "clip-path", 10885 "clip-rule", 10886 "color", 10887 "color-interpolation", 10888 "color-interpolation-filters", 10889 "color-profile", 10890 "color-rendering", 10891 "color-scheme", 10892 "column-count", 10893 "column-fill", 10894 "column-gap", 10895 "column-rule", 10896 "column-rule-color", 10897 "column-rule-style", 10898 "column-rule-width", 10899 "column-span", 10900 "column-width", 10901 "columns", 10902 "contain", 10903 "contain-intrinsic-block-size", 10904 "contain-intrinsic-height", 10905 "contain-intrinsic-inline-size", 10906 "contain-intrinsic-size", 10907 "contain-intrinsic-width", 10908 "container", 10909 "container-name", 10910 "container-type", 10911 "content", 10912 "content-visibility", 10913 "corner-bottom-left-shape", 10914 "corner-bottom-right-shape", 10915 "corner-shape", 10916 "corner-top-left-shape", 10917 "corner-top-right-shape", 10918 "counter-increment", 10919 "counter-reset", 10920 "counter-set", 10921 "cue", 10922 "cue-after", 10923 "cue-before", 10924 "cursor", 10925 "cx", 10926 "cy", 10927 "direction", 10928 "display", 10929 "dominant-baseline", 10930 "empty-cells", 10931 "enable-background", 10932 "field-sizing", 10933 "fill", 10934 "fill-opacity", 10935 "fill-rule", 10936 "filter", 10937 "flex", 10938 "flex-basis", 10939 "flex-direction", 10940 "flex-flow", 10941 "flex-grow", 10942 "flex-shrink", 10943 "flex-wrap", 10944 "float", 10945 "flood-color", 10946 "flood-opacity", 10947 "flow", 10948 "font", 10949 "font-display", 10950 "font-family", 10951 "font-feature-settings", 10952 "font-kerning", 10953 "font-language-override", 10954 "font-optical-sizing", 10955 "font-palette", 10956 "font-size", 10957 "font-size-adjust", 10958 "font-smooth", 10959 "font-smoothing", 10960 "font-stretch", 10961 "font-style", 10962 "font-synthesis", 10963 "font-synthesis-position", 10964 "font-synthesis-small-caps", 10965 "font-synthesis-style", 10966 "font-synthesis-weight", 10967 "font-variant", 10968 "font-variant-alternates", 10969 "font-variant-caps", 10970 "font-variant-east-asian", 10971 "font-variant-emoji", 10972 "font-variant-ligatures", 10973 "font-variant-numeric", 10974 "font-variant-position", 10975 "font-variation-settings", 10976 "font-weight", 10977 "forced-color-adjust", 10978 "gap", 10979 "glyph-orientation-horizontal", 10980 "glyph-orientation-vertical", 10981 "grid", 10982 "grid-area", 10983 "grid-auto-columns", 10984 "grid-auto-flow", 10985 "grid-auto-rows", 10986 "grid-column", 10987 "grid-column-end", 10988 "grid-column-start", 10989 "grid-gap", 10990 "grid-row", 10991 "grid-row-end", 10992 "grid-row-start", 10993 "grid-template", 10994 "grid-template-areas", 10995 "grid-template-columns", 10996 "grid-template-rows", 10997 "hanging-punctuation", 10998 "height", 10999 "hyphenate-character", 11000 "hyphenate-limit-chars", 11001 "hyphens", 11002 "icon", 11003 "image-orientation", 11004 "image-rendering", 11005 "image-resolution", 11006 "ime-mode", 11007 "initial-letter", 11008 "initial-letter-align", 11009 "inline-size", 11010 "inset", 11011 "inset-area", 11012 "inset-block", 11013 "inset-block-end", 11014 "inset-block-start", 11015 "inset-inline", 11016 "inset-inline-end", 11017 "inset-inline-start", 11018 "isolation", 11019 "justify-content", 11020 "justify-items", 11021 "justify-self", 11022 "kerning", 11023 "left", 11024 "letter-spacing", 11025 "lighting-color", 11026 "line-break", 11027 "line-height", 11028 "line-height-step", 11029 "list-style", 11030 "list-style-image", 11031 "list-style-position", 11032 "list-style-type", 11033 "margin", 11034 "margin-block", 11035 "margin-block-end", 11036 "margin-block-start", 11037 "margin-bottom", 11038 "margin-inline", 11039 "margin-inline-end", 11040 "margin-inline-start", 11041 "margin-left", 11042 "margin-right", 11043 "margin-top", 11044 "margin-trim", 11045 "marker", 11046 "marker-end", 11047 "marker-mid", 11048 "marker-start", 11049 "marks", 11050 "mask", 11051 "mask-border", 11052 "mask-border-mode", 11053 "mask-border-outset", 11054 "mask-border-repeat", 11055 "mask-border-slice", 11056 "mask-border-source", 11057 "mask-border-width", 11058 "mask-clip", 11059 "mask-composite", 11060 "mask-image", 11061 "mask-mode", 11062 "mask-origin", 11063 "mask-position", 11064 "mask-repeat", 11065 "mask-size", 11066 "mask-type", 11067 "masonry-auto-flow", 11068 "math-depth", 11069 "math-shift", 11070 "math-style", 11071 "max-block-size", 11072 "max-height", 11073 "max-inline-size", 11074 "max-width", 11075 "min-block-size", 11076 "min-height", 11077 "min-inline-size", 11078 "min-width", 11079 "mix-blend-mode", 11080 "nav-down", 11081 "nav-index", 11082 "nav-left", 11083 "nav-right", 11084 "nav-up", 11085 "none", 11086 "normal", 11087 "object-fit", 11088 "object-position", 11089 "offset", 11090 "offset-anchor", 11091 "offset-distance", 11092 "offset-path", 11093 "offset-position", 11094 "offset-rotate", 11095 "opacity", 11096 "order", 11097 "orphans", 11098 "outline", 11099 "outline-color", 11100 "outline-offset", 11101 "outline-style", 11102 "outline-width", 11103 "overflow", 11104 "overflow-anchor", 11105 "overflow-block", 11106 "overflow-clip-margin", 11107 "overflow-inline", 11108 "overflow-wrap", 11109 "overflow-x", 11110 "overflow-y", 11111 "overlay", 11112 "overscroll-behavior", 11113 "overscroll-behavior-block", 11114 "overscroll-behavior-inline", 11115 "overscroll-behavior-x", 11116 "overscroll-behavior-y", 11117 "padding", 11118 "padding-block", 11119 "padding-block-end", 11120 "padding-block-start", 11121 "padding-bottom", 11122 "padding-inline", 11123 "padding-inline-end", 11124 "padding-inline-start", 11125 "padding-left", 11126 "padding-right", 11127 "padding-top", 11128 "page", 11129 "page-break-after", 11130 "page-break-before", 11131 "page-break-inside", 11132 "paint-order", 11133 "pause", 11134 "pause-after", 11135 "pause-before", 11136 "perspective", 11137 "perspective-origin", 11138 "place-content", 11139 "place-items", 11140 "place-self", 11141 "pointer-events", 11142 "position", 11143 "position-anchor", 11144 "position-visibility", 11145 "print-color-adjust", 11146 "quotes", 11147 "r", 11148 "resize", 11149 "rest", 11150 "rest-after", 11151 "rest-before", 11152 "right", 11153 "rotate", 11154 "row-gap", 11155 "ruby-align", 11156 "ruby-position", 11157 "scale", 11158 "scroll-behavior", 11159 "scroll-margin", 11160 "scroll-margin-block", 11161 "scroll-margin-block-end", 11162 "scroll-margin-block-start", 11163 "scroll-margin-bottom", 11164 "scroll-margin-inline", 11165 "scroll-margin-inline-end", 11166 "scroll-margin-inline-start", 11167 "scroll-margin-left", 11168 "scroll-margin-right", 11169 "scroll-margin-top", 11170 "scroll-padding", 11171 "scroll-padding-block", 11172 "scroll-padding-block-end", 11173 "scroll-padding-block-start", 11174 "scroll-padding-bottom", 11175 "scroll-padding-inline", 11176 "scroll-padding-inline-end", 11177 "scroll-padding-inline-start", 11178 "scroll-padding-left", 11179 "scroll-padding-right", 11180 "scroll-padding-top", 11181 "scroll-snap-align", 11182 "scroll-snap-stop", 11183 "scroll-snap-type", 11184 "scroll-timeline", 11185 "scroll-timeline-axis", 11186 "scroll-timeline-name", 11187 "scrollbar-color", 11188 "scrollbar-gutter", 11189 "scrollbar-width", 11190 "shape-image-threshold", 11191 "shape-margin", 11192 "shape-outside", 11193 "shape-rendering", 11194 "speak", 11195 "speak-as", 11196 "src", 11197 // @font-face 11198 "stop-color", 11199 "stop-opacity", 11200 "stroke", 11201 "stroke-dasharray", 11202 "stroke-dashoffset", 11203 "stroke-linecap", 11204 "stroke-linejoin", 11205 "stroke-miterlimit", 11206 "stroke-opacity", 11207 "stroke-width", 11208 "tab-size", 11209 "table-layout", 11210 "text-align", 11211 "text-align-all", 11212 "text-align-last", 11213 "text-anchor", 11214 "text-combine-upright", 11215 "text-decoration", 11216 "text-decoration-color", 11217 "text-decoration-line", 11218 "text-decoration-skip", 11219 "text-decoration-skip-ink", 11220 "text-decoration-style", 11221 "text-decoration-thickness", 11222 "text-emphasis", 11223 "text-emphasis-color", 11224 "text-emphasis-position", 11225 "text-emphasis-style", 11226 "text-indent", 11227 "text-justify", 11228 "text-orientation", 11229 "text-overflow", 11230 "text-rendering", 11231 "text-shadow", 11232 "text-size-adjust", 11233 "text-transform", 11234 "text-underline-offset", 11235 "text-underline-position", 11236 "text-wrap", 11237 "text-wrap-mode", 11238 "text-wrap-style", 11239 "timeline-scope", 11240 "top", 11241 "touch-action", 11242 "transform", 11243 "transform-box", 11244 "transform-origin", 11245 "transform-style", 11246 "transition", 11247 "transition-behavior", 11248 "transition-delay", 11249 "transition-duration", 11250 "transition-property", 11251 "transition-timing-function", 11252 "translate", 11253 "unicode-bidi", 11254 "unicode-range", 11255 "user-modify", 11256 "user-select", 11257 "vector-effect", 11258 "vertical-align", 11259 "view-timeline", 11260 "view-timeline-axis", 11261 "view-timeline-inset", 11262 "view-timeline-name", 11263 "view-transition-name", 11264 "visibility", 11265 "voice-balance", 11266 "voice-duration", 11267 "voice-family", 11268 "voice-pitch", 11269 "voice-range", 11270 "voice-rate", 11271 "voice-stress", 11272 "voice-volume", 11273 "white-space", 11274 "white-space-collapse", 11275 "widows", 11276 "width", 11277 "will-change", 11278 "word-break", 11279 "word-spacing", 11280 "word-wrap", 11281 "writing-mode", 11282 "x", 11283 "y", 11284 "z-index", 11285 "zoom" 11286 ].sort().reverse(); 11287 function scss(hljs) { 11288 const modes = MODES(hljs); 11289 const PSEUDO_ELEMENTS$1 = PSEUDO_ELEMENTS; 11290 const PSEUDO_CLASSES$1 = PSEUDO_CLASSES; 11291 const AT_IDENTIFIER = "@[a-z-]+"; 11292 const AT_MODIFIERS = "and or not only"; 11293 const IDENT_RE = "[a-zA-Z-][a-zA-Z0-9_-]*"; 11294 const VARIABLE = { 11295 className: "variable", 11296 begin: "(\\$" + IDENT_RE + ")\\b", 11297 relevance: 0 11298 }; 11299 return { 11300 name: "SCSS", 11301 case_insensitive: true, 11302 illegal: "[=/|']", 11303 contains: [ 11304 hljs.C_LINE_COMMENT_MODE, 11305 hljs.C_BLOCK_COMMENT_MODE, 11306 // to recognize keyframe 40% etc which are outside the scope of our 11307 // attribute value mode 11308 modes.CSS_NUMBER_MODE, 11309 { 11310 className: "selector-id", 11311 begin: "#[A-Za-z0-9_-]+", 11312 relevance: 0 11313 }, 11314 { 11315 className: "selector-class", 11316 begin: "\\.[A-Za-z0-9_-]+", 11317 relevance: 0 11318 }, 11319 modes.ATTRIBUTE_SELECTOR_MODE, 11320 { 11321 className: "selector-tag", 11322 begin: "\\b(" + TAGS.join("|") + ")\\b", 11323 // was there, before, but why? 11324 relevance: 0 11325 }, 11326 { 11327 className: "selector-pseudo", 11328 begin: ":(" + PSEUDO_CLASSES$1.join("|") + ")" 11329 }, 11330 { 11331 className: "selector-pseudo", 11332 begin: ":(:)?(" + PSEUDO_ELEMENTS$1.join("|") + ")" 11333 }, 11334 VARIABLE, 11335 { 11336 // pseudo-selector params 11337 begin: /\(/, 11338 end: /\)/, 11339 contains: [modes.CSS_NUMBER_MODE] 11340 }, 11341 modes.CSS_VARIABLE, 11342 { 11343 className: "attribute", 11344 begin: "\\b(" + ATTRIBUTES.join("|") + ")\\b" 11345 }, 11346 { begin: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" }, 11347 { 11348 begin: /:/, 11349 end: /[;}{]/, 11350 relevance: 0, 11351 contains: [ 11352 modes.BLOCK_COMMENT, 11353 VARIABLE, 11354 modes.HEXCOLOR, 11355 modes.CSS_NUMBER_MODE, 11356 modes.UNICODE_RANGE, 11357 hljs.QUOTE_STRING_MODE, 11358 hljs.APOS_STRING_MODE, 11359 modes.IMPORTANT, 11360 modes.FUNCTION_DISPATCH 11361 ] 11362 }, 11363 // matching these here allows us to treat them more like regular CSS 11364 // rules so everything between the {} gets regular rule highlighting, 11365 // which is what we want for page and font-face 11366 { 11367 begin: "@(page|font-face)", 11368 keywords: { 11369 $pattern: AT_IDENTIFIER, 11370 keyword: "@page @font-face" 11371 } 11372 }, 11373 { 11374 begin: "@", 11375 end: "[{;]", 11376 returnBegin: true, 11377 keywords: { 11378 $pattern: /[a-z-]+/, 11379 keyword: AT_MODIFIERS, 11380 attribute: MEDIA_FEATURES.join(" ") 11381 }, 11382 contains: [ 11383 { 11384 begin: AT_IDENTIFIER, 11385 className: "keyword" 11386 }, 11387 { 11388 begin: /[a-z-]+(?=:)/, 11389 className: "attribute" 11390 }, 11391 VARIABLE, 11392 hljs.QUOTE_STRING_MODE, 11393 hljs.APOS_STRING_MODE, 11394 modes.HEXCOLOR, 11395 modes.CSS_NUMBER_MODE 11396 ] 11397 }, 11398 modes.FUNCTION_DISPATCH 11399 ] 11400 }; 11401 } 11402 module.exports = scss; 11403 } 11404}); 11405
vendor: 891 bytes, lines 11406-11434
11406// node_modules/highlight.js/lib/languages/shell.js 11407var require_shell = __commonJS({ 11408 "node_modules/highlight.js/lib/languages/shell.js"(exports, module) { 11409 function shell(hljs) { 11410 return { 11411 name: "Shell Session", 11412 aliases: [ 11413 "console", 11414 "shellsession" 11415 ], 11416 contains: [ 11417 { 11418 className: "meta.prompt", 11419 // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result. 11420 // For instance, in the following example, it would match "echo /path/to/home >" as a prompt: 11421 // echo /path/to/home > t.exe 11422 begin: /^\s{0,3}[./~\w\d[\]()@-]*[>%$#][ ]?/, 11423 starts: { 11424 end: /[^\\](?=\s*$)/, 11425 subLanguage: "bash" 11426 } 11427 } 11428 ] 11429 }; 11430 } 11431 module.exports = shell; 11432 } 11433}); 11434
vendor: 13,488 bytes, lines 11435-12082
11435// node_modules/highlight.js/lib/languages/sql.js 11436var require_sql = __commonJS({ 11437 "node_modules/highlight.js/lib/languages/sql.js"(exports, module) { 11438 function sql(hljs) { 11439 const regex = hljs.regex; 11440 const COMMENT_MODE = hljs.COMMENT("--", "$"); 11441 const STRING = { 11442 scope: "string", 11443 variants: [ 11444 { 11445 begin: /'/, 11446 end: /'/, 11447 contains: [{ match: /''/ }] 11448 } 11449 ] 11450 }; 11451 const QUOTED_IDENTIFIER = { 11452 begin: /"/, 11453 end: /"/, 11454 contains: [{ match: /""/ }] 11455 }; 11456 const LITERALS = [ 11457 "true", 11458 "false", 11459 // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way. 11460 // "null", 11461 "unknown" 11462 ]; 11463 const MULTI_WORD_TYPES = [ 11464 "double precision", 11465 "large object", 11466 "with timezone", 11467 "without timezone" 11468 ]; 11469 const TYPES = [ 11470 "bigint", 11471 "binary", 11472 "blob", 11473 "boolean", 11474 "char", 11475 "character", 11476 "clob", 11477 "date", 11478 "dec", 11479 "decfloat", 11480 "decimal", 11481 "float", 11482 "int", 11483 "integer", 11484 "interval", 11485 "nchar", 11486 "nclob", 11487 "national", 11488 "numeric", 11489 "real", 11490 "row", 11491 "smallint", 11492 "time", 11493 "timestamp", 11494 "varchar", 11495 "varying", 11496 // modifier (character varying) 11497 "varbinary" 11498 ]; 11499 const NON_RESERVED_WORDS = [ 11500 "add", 11501 "asc", 11502 "collation", 11503 "desc", 11504 "final", 11505 "first", 11506 "last", 11507 "view" 11508 ]; 11509 const RESERVED_WORDS = [ 11510 "abs", 11511 "acos", 11512 "all", 11513 "allocate", 11514 "alter", 11515 "and", 11516 "any", 11517 "are", 11518 "array", 11519 "array_agg", 11520 "array_max_cardinality", 11521 "as", 11522 "asensitive", 11523 "asin", 11524 "asymmetric", 11525 "at", 11526 "atan", 11527 "atomic", 11528 "authorization", 11529 "avg", 11530 "begin", 11531 "begin_frame", 11532 "begin_partition", 11533 "between", 11534 "bigint", 11535 "binary", 11536 "blob", 11537 "boolean", 11538 "both", 11539 "by", 11540 "call", 11541 "called", 11542 "cardinality", 11543 "cascaded", 11544 "case", 11545 "cast", 11546 "ceil", 11547 "ceiling", 11548 "char", 11549 "char_length", 11550 "character", 11551 "character_length", 11552 "check", 11553 "classifier", 11554 "clob", 11555 "close", 11556 "coalesce", 11557 "collate", 11558 "collect", 11559 "column", 11560 "commit", 11561 "condition", 11562 "connect", 11563 "constraint", 11564 "contains", 11565 "convert", 11566 "copy", 11567 "corr", 11568 "corresponding", 11569 "cos", 11570 "cosh", 11571 "count", 11572 "covar_pop", 11573 "covar_samp", 11574 "create", 11575 "cross", 11576 "cube", 11577 "cume_dist", 11578 "current", 11579 "current_catalog", 11580 "current_date", 11581 "current_default_transform_group", 11582 "current_path", 11583 "current_role", 11584 "current_row", 11585 "current_schema", 11586 "current_time", 11587 "current_timestamp", 11588 "current_path", 11589 "current_role", 11590 "current_transform_group_for_type", 11591 "current_user", 11592 "cursor", 11593 "cycle", 11594 "date", 11595 "day", 11596 "deallocate", 11597 "dec", 11598 "decimal", 11599 "decfloat", 11600 "declare", 11601 "default", 11602 "define", 11603 "delete", 11604 "dense_rank", 11605 "deref", 11606 "describe", 11607 "deterministic", 11608 "disconnect", 11609 "distinct", 11610 "double", 11611 "drop", 11612 "dynamic", 11613 "each", 11614 "element", 11615 "else", 11616 "empty", 11617 "end", 11618 "end_frame", 11619 "end_partition", 11620 "end-exec", 11621 "equals", 11622 "escape", 11623 "every", 11624 "except", 11625 "exec", 11626 "execute", 11627 "exists", 11628 "exp", 11629 "external", 11630 "extract", 11631 "false", 11632 "fetch", 11633 "filter", 11634 "first_value", 11635 "float", 11636 "floor", 11637 "for", 11638 "foreign", 11639 "frame_row", 11640 "free", 11641 "from", 11642 "full", 11643 "function", 11644 "fusion", 11645 "get", 11646 "global", 11647 "grant", 11648 "group", 11649 "grouping", 11650 "groups", 11651 "having", 11652 "hold", 11653 "hour", 11654 "identity", 11655 "in", 11656 "indicator", 11657 "initial", 11658 "inner", 11659 "inout", 11660 "insensitive", 11661 "insert", 11662 "int", 11663 "integer", 11664 "intersect", 11665 "intersection", 11666 "interval", 11667 "into", 11668 "is", 11669 "join", 11670 "json_array", 11671 "json_arrayagg", 11672 "json_exists", 11673 "json_object", 11674 "json_objectagg", 11675 "json_query", 11676 "json_table", 11677 "json_table_primitive", 11678 "json_value", 11679 "lag", 11680 "language", 11681 "large", 11682 "last_value", 11683 "lateral", 11684 "lead", 11685 "leading", 11686 "left", 11687 "like", 11688 "like_regex", 11689 "listagg", 11690 "ln", 11691 "local", 11692 "localtime", 11693 "localtimestamp", 11694 "log", 11695 "log10", 11696 "lower", 11697 "match", 11698 "match_number", 11699 "match_recognize", 11700 "matches", 11701 "max", 11702 "member", 11703 "merge", 11704 "method", 11705 "min", 11706 "minute", 11707 "mod", 11708 "modifies", 11709 "module", 11710 "month", 11711 "multiset", 11712 "national", 11713 "natural", 11714 "nchar", 11715 "nclob", 11716 "new", 11717 "no", 11718 "none", 11719 "normalize", 11720 "not", 11721 "nth_value", 11722 "ntile", 11723 "null", 11724 "nullif", 11725 "numeric", 11726 "octet_length", 11727 "occurrences_regex", 11728 "of", 11729 "offset", 11730 "old", 11731 "omit", 11732 "on", 11733 "one", 11734 "only", 11735 "open", 11736 "or", 11737 "order", 11738 "out", 11739 "outer", 11740 "over", 11741 "overlaps", 11742 "overlay", 11743 "parameter", 11744 "partition", 11745 "pattern", 11746 "per", 11747 "percent", 11748 "percent_rank", 11749 "percentile_cont", 11750 "percentile_disc", 11751 "period", 11752 "portion", 11753 "position", 11754 "position_regex", 11755 "power", 11756 "precedes", 11757 "precision", 11758 "prepare", 11759 "primary", 11760 "procedure", 11761 "ptf", 11762 "range", 11763 "rank", 11764 "reads", 11765 "real", 11766 "recursive", 11767 "ref", 11768 "references", 11769 "referencing", 11770 "regr_avgx", 11771 "regr_avgy", 11772 "regr_count", 11773 "regr_intercept", 11774 "regr_r2", 11775 "regr_slope", 11776 "regr_sxx", 11777 "regr_sxy", 11778 "regr_syy", 11779 "release", 11780 "result", 11781 "return", 11782 "returns", 11783 "revoke", 11784 "right", 11785 "rollback", 11786 "rollup", 11787 "row", 11788 "row_number", 11789 "rows", 11790 "running", 11791 "savepoint", 11792 "scope", 11793 "scroll", 11794 "search", 11795 "second", 11796 "seek", 11797 "select", 11798 "sensitive", 11799 "session_user", 11800 "set", 11801 "show", 11802 "similar", 11803 "sin", 11804 "sinh", 11805 "skip", 11806 "smallint", 11807 "some", 11808 "specific", 11809 "specifictype", 11810 "sql", 11811 "sqlexception", 11812 "sqlstate", 11813 "sqlwarning", 11814 "sqrt", 11815 "start", 11816 "static", 11817 "stddev_pop", 11818 "stddev_samp", 11819 "submultiset", 11820 "subset", 11821 "substring", 11822 "substring_regex", 11823 "succeeds", 11824 "sum", 11825 "symmetric", 11826 "system", 11827 "system_time", 11828 "system_user", 11829 "table", 11830 "tablesample", 11831 "tan", 11832 "tanh", 11833 "then", 11834 "time", 11835 "timestamp", 11836 "timezone_hour", 11837 "timezone_minute", 11838 "to", 11839 "trailing", 11840 "translate", 11841 "translate_regex", 11842 "translation", 11843 "treat", 11844 "trigger", 11845 "trim", 11846 "trim_array", 11847 "true", 11848 "truncate", 11849 "uescape", 11850 "union", 11851 "unique", 11852 "unknown", 11853 "unnest", 11854 "update", 11855 "upper", 11856 "user", 11857 "using", 11858 "value", 11859 "values", 11860 "value_of", 11861 "var_pop", 11862 "var_samp", 11863 "varbinary", 11864 "varchar", 11865 "varying", 11866 "versioning", 11867 "when", 11868 "whenever", 11869 "where", 11870 "width_bucket", 11871 "window", 11872 "with", 11873 "within", 11874 "without", 11875 "year" 11876 ]; 11877 const RESERVED_FUNCTIONS = [ 11878 "abs", 11879 "acos", 11880 "array_agg", 11881 "asin", 11882 "atan", 11883 "avg", 11884 "cast", 11885 "ceil", 11886 "ceiling", 11887 "coalesce", 11888 "corr", 11889 "cos", 11890 "cosh", 11891 "count", 11892 "covar_pop", 11893 "covar_samp", 11894 "cume_dist", 11895 "dense_rank", 11896 "deref", 11897 "element", 11898 "exp", 11899 "extract", 11900 "first_value", 11901 "floor", 11902 "json_array", 11903 "json_arrayagg", 11904 "json_exists", 11905 "json_object", 11906 "json_objectagg", 11907 "json_query", 11908 "json_table", 11909 "json_table_primitive", 11910 "json_value", 11911 "lag", 11912 "last_value", 11913 "lead", 11914 "listagg", 11915 "ln", 11916 "log", 11917 "log10", 11918 "lower", 11919 "max", 11920 "min", 11921 "mod", 11922 "nth_value", 11923 "ntile", 11924 "nullif", 11925 "percent_rank", 11926 "percentile_cont", 11927 "percentile_disc", 11928 "position", 11929 "position_regex", 11930 "power", 11931 "rank", 11932 "regr_avgx", 11933 "regr_avgy", 11934 "regr_count", 11935 "regr_intercept", 11936 "regr_r2", 11937 "regr_slope", 11938 "regr_sxx", 11939 "regr_sxy", 11940 "regr_syy", 11941 "row_number", 11942 "sin", 11943 "sinh", 11944 "sqrt", 11945 "stddev_pop", 11946 "stddev_samp", 11947 "substring", 11948 "substring_regex", 11949 "sum", 11950 "tan", 11951 "tanh", 11952 "translate", 11953 "translate_regex", 11954 "treat", 11955 "trim", 11956 "trim_array", 11957 "unnest", 11958 "upper", 11959 "value_of", 11960 "var_pop", 11961 "var_samp", 11962 "width_bucket" 11963 ]; 11964 const POSSIBLE_WITHOUT_PARENS = [ 11965 "current_catalog", 11966 "current_date", 11967 "current_default_transform_group", 11968 "current_path", 11969 "current_role", 11970 "current_schema", 11971 "current_transform_group_for_type", 11972 "current_user", 11973 "session_user", 11974 "system_time", 11975 "system_user", 11976 "current_time", 11977 "localtime", 11978 "current_timestamp", 11979 "localtimestamp" 11980 ]; 11981 const COMBOS = [ 11982 "create table", 11983 "insert into", 11984 "primary key", 11985 "foreign key", 11986 "not null", 11987 "alter table", 11988 "add constraint", 11989 "grouping sets", 11990 "on overflow", 11991 "character set", 11992 "respect nulls", 11993 "ignore nulls", 11994 "nulls first", 11995 "nulls last", 11996 "depth first", 11997 "breadth first" 11998 ]; 11999 const FUNCTIONS = RESERVED_FUNCTIONS; 12000 const KEYWORDS = [ 12001 ...RESERVED_WORDS, 12002 ...NON_RESERVED_WORDS 12003 ].filter((keyword) => { 12004 return !RESERVED_FUNCTIONS.includes(keyword); 12005 }); 12006 const VARIABLE = { 12007 scope: "variable", 12008 match: /@[a-z0-9][a-z0-9_]*/ 12009 }; 12010 const OPERATOR = { 12011 scope: "operator", 12012 match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, 12013 relevance: 0 12014 }; 12015 const FUNCTION_CALL = { 12016 match: regex.concat(/\b/, regex.either(...FUNCTIONS), /\s*\(/), 12017 relevance: 0, 12018 keywords: { built_in: FUNCTIONS } 12019 }; 12020 function kws_to_regex(list) { 12021 return regex.concat( 12022 /\b/, 12023 regex.either(...list.map((kw) => { 12024 return kw.replace(/\s+/, "\\s+"); 12025 })), 12026 /\b/ 12027 ); 12028 } 12029 const MULTI_WORD_KEYWORDS = { 12030 scope: "keyword", 12031 match: kws_to_regex(COMBOS), 12032 relevance: 0 12033 }; 12034 function reduceRelevancy(list, { 12035 exceptions, 12036 when 12037 } = {}) { 12038 const qualifyFn = when; 12039 exceptions = exceptions || []; 12040 return list.map((item) => { 12041 if (item.match(/\|\d+$/) || exceptions.includes(item)) { 12042 return item; 12043 } else if (qualifyFn(item)) { 12044 return `${item}|0`; 12045 } else { 12046 return item; 12047 } 12048 }); 12049 } 12050 return { 12051 name: "SQL", 12052 case_insensitive: true, 12053 // does not include {} or HTML tags `</` 12054 illegal: /[{}]|<\//, 12055 keywords: { 12056 $pattern: /\b[\w\.]+/, 12057 keyword: reduceRelevancy(KEYWORDS, { when: (x) => x.length < 3 }), 12058 literal: LITERALS, 12059 type: TYPES, 12060 built_in: POSSIBLE_WITHOUT_PARENS 12061 }, 12062 contains: [ 12063 { 12064 scope: "type", 12065 match: kws_to_regex(MULTI_WORD_TYPES) 12066 }, 12067 MULTI_WORD_KEYWORDS, 12068 FUNCTION_CALL, 12069 VARIABLE, 12070 STRING, 12071 QUOTED_IDENTIFIER, 12072 hljs.C_NUMBER_MODE, 12073 hljs.C_BLOCK_COMMENT_MODE, 12074 COMMENT_MODE, 12075 OPERATOR 12076 ] 12077 }; 12078 } 12079 module.exports = sql; 12080 } 12081}); 12082
vendor: 22,615 bytes, lines 12083-12976
12083// node_modules/highlight.js/lib/languages/swift.js 12084var require_swift = __commonJS({ 12085 "node_modules/highlight.js/lib/languages/swift.js"(exports, module) { 12086 function source(re) { 12087 if (!re) return null; 12088 if (typeof re === "string") return re; 12089 return re.source; 12090 } 12091 function lookahead(re) { 12092 return concat("(?=", re, ")"); 12093 } 12094 function concat(...args) { 12095 const joined = args.map((x) => source(x)).join(""); 12096 return joined; 12097 } 12098 function stripOptionsFromArgs(args) { 12099 const opts = args[args.length - 1]; 12100 if (typeof opts === "object" && opts.constructor === Object) { 12101 args.splice(args.length - 1, 1); 12102 return opts; 12103 } else { 12104 return {}; 12105 } 12106 } 12107 function either(...args) { 12108 const opts = stripOptionsFromArgs(args); 12109 const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")"; 12110 return joined; 12111 } 12112 new RegExp(either( 12113 /\[(?:[^\\\]]|\\.)*\]/, 12114 // a character class, inside which ( and \ lose their meaning 12115 /\(\?<(?![=!])[^>]+>/, 12116 // a named capture group `(?<name>` (not a lookbehind `(?<=` / `(?<!`) 12117 /\(\?'[^']+'/, 12118 // a named capture group `(?'name'` 12119 /\(\??/, 12120 // an opening parenthesis, capturing or non-capturing / lookahead 12121 /\\([1-9][0-9]*)/, 12122 // a backreference like `\1` 12123 /\\./ 12124 // any other escape sequence 12125 )); 12126 var keywordWrapper = (keyword) => concat( 12127 /\b/, 12128 keyword, 12129 /\w$/.test(keyword) ? /\b/ : /\B/ 12130 ); 12131 var dotKeywords = [ 12132 "Protocol", 12133 // contextual 12134 "Type" 12135 // contextual 12136 ].map(keywordWrapper); 12137 var optionalDotKeywords = [ 12138 "init", 12139 "self" 12140 ].map(keywordWrapper); 12141 var keywordTypes = [ 12142 "Any", 12143 "Self" 12144 ]; 12145 var keywords = [ 12146 // strings below will be fed into the regular `keywords` engine while regex 12147 // will result in additional modes being created to scan for those keywords to 12148 // avoid conflicts with other rules 12149 "actor", 12150 "any", 12151 // contextual 12152 "associatedtype", 12153 "async", 12154 "await", 12155 /as\?/, 12156 // operator 12157 /as!/, 12158 // operator 12159 "as", 12160 // operator 12161 "borrowing", 12162 // contextual 12163 "break", 12164 "case", 12165 "catch", 12166 "class", 12167 "consume", 12168 // contextual 12169 "consuming", 12170 // contextual 12171 "continue", 12172 "convenience", 12173 // contextual 12174 "copy", 12175 // contextual 12176 "default", 12177 "defer", 12178 "deinit", 12179 "didSet", 12180 // contextual 12181 "distributed", 12182 "do", 12183 "dynamic", 12184 // contextual 12185 "each", 12186 "else", 12187 "enum", 12188 "extension", 12189 "fallthrough", 12190 /fileprivate\(set\)/, 12191 "fileprivate", 12192 "final", 12193 // contextual 12194 "for", 12195 "func", 12196 "get", 12197 // contextual 12198 "guard", 12199 "if", 12200 "import", 12201 "indirect", 12202 // contextual 12203 "infix", 12204 // contextual 12205 /init\?/, 12206 /init!/, 12207 "inout", 12208 /internal\(set\)/, 12209 "internal", 12210 "in", 12211 "is", 12212 // operator 12213 "isolated", 12214 // contextual 12215 "nonisolated", 12216 // contextual 12217 "lazy", 12218 // contextual 12219 "let", 12220 "macro", 12221 "mutating", 12222 // contextual 12223 "nonmutating", 12224 // contextual 12225 /open\(set\)/, 12226 // contextual 12227 "open", 12228 // contextual 12229 "operator", 12230 "optional", 12231 // contextual 12232 "override", 12233 // contextual 12234 "package", 12235 "postfix", 12236 // contextual 12237 "precedencegroup", 12238 "prefix", 12239 // contextual 12240 /private\(set\)/, 12241 "private", 12242 "protocol", 12243 /public\(set\)/, 12244 "public", 12245 "repeat", 12246 "required", 12247 // contextual 12248 "rethrows", 12249 "return", 12250 "set", 12251 // contextual 12252 "some", 12253 // contextual 12254 "static", 12255 "struct", 12256 "subscript", 12257 "super", 12258 "switch", 12259 "throws", 12260 "throw", 12261 /try\?/, 12262 // operator 12263 /try!/, 12264 // operator 12265 "try", 12266 // operator 12267 "typealias", 12268 /unowned\(safe\)/, 12269 // contextual 12270 /unowned\(unsafe\)/, 12271 // contextual 12272 "unowned", 12273 // contextual 12274 "var", 12275 "weak", 12276 // contextual 12277 "where", 12278 "while", 12279 "willSet" 12280 // contextual 12281 ]; 12282 var literals = [ 12283 "false", 12284 "nil", 12285 "true" 12286 ]; 12287 var precedencegroupKeywords = [ 12288 "assignment", 12289 "associativity", 12290 "higherThan", 12291 "left", 12292 "lowerThan", 12293 "none", 12294 "right" 12295 ]; 12296 var numberSignKeywords = [ 12297 "#colorLiteral", 12298 "#column", 12299 "#dsohandle", 12300 "#else", 12301 "#elseif", 12302 "#endif", 12303 "#error", 12304 "#file", 12305 "#fileID", 12306 "#fileLiteral", 12307 "#filePath", 12308 "#function", 12309 "#if", 12310 "#imageLiteral", 12311 "#keyPath", 12312 "#line", 12313 "#selector", 12314 "#sourceLocation", 12315 "#warning" 12316 ]; 12317 var builtIns = [ 12318 "abs", 12319 "all", 12320 "any", 12321 "assert", 12322 "assertionFailure", 12323 "debugPrint", 12324 "dump", 12325 "fatalError", 12326 "getVaList", 12327 "isKnownUniquelyReferenced", 12328 "max", 12329 "min", 12330 "numericCast", 12331 "pointwiseMax", 12332 "pointwiseMin", 12333 "precondition", 12334 "preconditionFailure", 12335 "print", 12336 "readLine", 12337 "repeatElement", 12338 "sequence", 12339 "stride", 12340 "swap", 12341 "swift_unboxFromSwiftValueWithType", 12342 "transcode", 12343 "type", 12344 "unsafeBitCast", 12345 "unsafeDowncast", 12346 "withExtendedLifetime", 12347 "withUnsafeMutablePointer", 12348 "withUnsafePointer", 12349 "withVaList", 12350 "withoutActuallyEscaping", 12351 "zip" 12352 ]; 12353 var operatorHead = either( 12354 /[/=\-+!*%<>&|^~?]/, 12355 /[\u00A1-\u00A7]/, 12356 /[\u00A9\u00AB]/, 12357 /[\u00AC\u00AE]/, 12358 /[\u00B0\u00B1]/, 12359 /[\u00B6\u00BB\u00BF\u00D7\u00F7]/, 12360 /[\u2016-\u2017]/, 12361 /[\u2020-\u2027]/, 12362 /[\u2030-\u203E]/, 12363 /[\u2041-\u2053]/, 12364 /[\u2055-\u205E]/, 12365 /[\u2190-\u23FF]/, 12366 /[\u2500-\u2775]/, 12367 /[\u2794-\u2BFF]/, 12368 /[\u2E00-\u2E7F]/, 12369 /[\u3001-\u3003]/, 12370 /[\u3008-\u3020]/, 12371 /[\u3030]/ 12372 ); 12373 var operatorCharacter = either( 12374 operatorHead, 12375 /[\u0300-\u036F]/, 12376 /[\u1DC0-\u1DFF]/, 12377 /[\u20D0-\u20FF]/, 12378 /[\uFE00-\uFE0F]/, 12379 /[\uFE20-\uFE2F]/ 12380 // TODO: The following characters are also allowed, but the regex isn't supported yet. 12381 // /[\u{E0100}-\u{E01EF}]/u 12382 ); 12383 var operator = concat(operatorHead, operatorCharacter, "*"); 12384 var identifierHead = either( 12385 /[a-zA-Z_]/, 12386 /[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/, 12387 /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/, 12388 /[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/, 12389 /[\u1E00-\u1FFF]/, 12390 /[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/, 12391 /[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/, 12392 /[\u2C00-\u2DFF\u2E80-\u2FFF]/, 12393 /[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/, 12394 /[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/, 12395 /[\uFE47-\uFEFE\uFF00-\uFFFD]/ 12396 // Should be /[\uFE47-\uFFFD]/, but we have to exclude FEFF. 12397 // The following characters are also allowed, but the regexes aren't supported yet. 12398 // /[\u{10000}-\u{1FFFD}\u{20000-\u{2FFFD}\u{30000}-\u{3FFFD}\u{40000}-\u{4FFFD}]/u, 12399 // /[\u{50000}-\u{5FFFD}\u{60000-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}]/u, 12400 // /[\u{90000}-\u{9FFFD}\u{A0000-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}]/u, 12401 // /[\u{D0000}-\u{DFFFD}\u{E0000-\u{EFFFD}]/u 12402 ); 12403 var identifierCharacter = either( 12404 identifierHead, 12405 /\d/, 12406 /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/ 12407 ); 12408 var identifier = concat(identifierHead, identifierCharacter, "*"); 12409 var typeIdentifier = concat(/[A-Z]/, identifierCharacter, "*"); 12410 var keywordAttributes = [ 12411 "attached", 12412 "autoclosure", 12413 concat(/convention\(/, either("swift", "block", "c"), /\)/), 12414 "discardableResult", 12415 "dynamicCallable", 12416 "dynamicMemberLookup", 12417 "escaping", 12418 "freestanding", 12419 "frozen", 12420 "GKInspectable", 12421 "IBAction", 12422 "IBDesignable", 12423 "IBInspectable", 12424 "IBOutlet", 12425 "IBSegueAction", 12426 "inlinable", 12427 "main", 12428 "nonobjc", 12429 "NSApplicationMain", 12430 "NSCopying", 12431 "NSManaged", 12432 concat(/objc\(/, identifier, /\)/), 12433 "objc", 12434 "objcMembers", 12435 "propertyWrapper", 12436 "requires_stored_property_inits", 12437 "resultBuilder", 12438 "Sendable", 12439 "testable", 12440 "UIApplicationMain", 12441 "unchecked", 12442 "unknown", 12443 "usableFromInline", 12444 "warn_unqualified_access" 12445 ]; 12446 var availabilityKeywords = [ 12447 "iOS", 12448 "iOSApplicationExtension", 12449 "macOS", 12450 "macOSApplicationExtension", 12451 "macCatalyst", 12452 "macCatalystApplicationExtension", 12453 "watchOS", 12454 "watchOSApplicationExtension", 12455 "tvOS", 12456 "tvOSApplicationExtension", 12457 "swift" 12458 ]; 12459 function swift(hljs) { 12460 const WHITESPACE = { 12461 match: /\s+/, 12462 relevance: 0 12463 }; 12464 const BLOCK_COMMENT = hljs.COMMENT( 12465 "/\\*", 12466 "\\*/", 12467 { contains: ["self"] } 12468 ); 12469 const COMMENTS = [ 12470 hljs.C_LINE_COMMENT_MODE, 12471 BLOCK_COMMENT 12472 ]; 12473 const DOT_KEYWORD = { 12474 match: [ 12475 /\./, 12476 either(...dotKeywords, ...optionalDotKeywords) 12477 ], 12478 className: { 2: "keyword" } 12479 }; 12480 const KEYWORD_GUARD = { 12481 // Consume .keyword to prevent highlighting properties and methods as keywords. 12482 match: concat(/\./, either(...keywords)), 12483 relevance: 0 12484 }; 12485 const PLAIN_KEYWORDS = keywords.filter((kw) => typeof kw === "string").concat(["_|0"]); 12486 const REGEX_KEYWORDS = keywords.filter((kw) => typeof kw !== "string").concat(keywordTypes).map(keywordWrapper); 12487 const KEYWORD = { variants: [ 12488 { 12489 className: "keyword", 12490 match: either(...REGEX_KEYWORDS, ...optionalDotKeywords) 12491 } 12492 ] }; 12493 const KEYWORDS = { 12494 $pattern: either( 12495 /\b\w+/, 12496 // regular keywords 12497 /#\w+/ 12498 // number keywords 12499 ), 12500 keyword: PLAIN_KEYWORDS.concat(numberSignKeywords), 12501 literal: literals 12502 }; 12503 const KEYWORD_MODES = [ 12504 DOT_KEYWORD, 12505 KEYWORD_GUARD, 12506 KEYWORD 12507 ]; 12508 const BUILT_IN_GUARD = { 12509 // Consume .built_in to prevent highlighting properties and methods. 12510 match: concat(/\./, either(...builtIns)), 12511 relevance: 0 12512 }; 12513 const BUILT_IN = { 12514 className: "built_in", 12515 match: concat(/\b/, either(...builtIns), /(?=\()/) 12516 }; 12517 const BUILT_INS = [ 12518 BUILT_IN_GUARD, 12519 BUILT_IN 12520 ]; 12521 const OPERATOR_GUARD = { 12522 // Prevent -> from being highlighting as an operator. 12523 match: /->/, 12524 relevance: 0 12525 }; 12526 const OPERATOR = { 12527 className: "operator", 12528 relevance: 0, 12529 variants: [ 12530 { match: operator }, 12531 { 12532 // dot-operator: only operators that start with a dot are allowed to use dots as 12533 // characters (..., ...<, .*, etc). So there rule here is: a dot followed by one or more 12534 // characters that may also include dots. 12535 match: `\\.(\\.|${operatorCharacter})+` 12536 } 12537 ] 12538 }; 12539 const OPERATORS = [ 12540 OPERATOR_GUARD, 12541 OPERATOR 12542 ]; 12543 const decimalDigits = "([0-9]_*)+"; 12544 const hexDigits = "([0-9a-fA-F]_*)+"; 12545 const NUMBER = { 12546 className: "number", 12547 relevance: 0, 12548 variants: [ 12549 // decimal floating-point-literal (subsumes decimal-literal) 12550 { match: `\\b(${decimalDigits})(\\.(${decimalDigits}))?([eE][+-]?(${decimalDigits}))?\\b` }, 12551 // hexadecimal floating-point-literal (subsumes hexadecimal-literal) 12552 { match: `\\b0x(${hexDigits})(\\.(${hexDigits}))?([pP][+-]?(${decimalDigits}))?\\b` }, 12553 // octal-literal 12554 { match: /\b0o([0-7]_*)+\b/ }, 12555 // binary-literal 12556 { match: /\b0b([01]_*)+\b/ } 12557 ] 12558 }; 12559 const ESCAPED_CHARACTER = (rawDelimiter = "") => ({ 12560 className: "subst", 12561 variants: [ 12562 { match: concat(/\\/, rawDelimiter, /[0\\tnr"']/) }, 12563 { match: concat(/\\/, rawDelimiter, /u\{[0-9a-fA-F]{1,8}\}/) } 12564 ] 12565 }); 12566 const ESCAPED_NEWLINE = (rawDelimiter = "") => ({ 12567 className: "subst", 12568 match: concat(/\\/, rawDelimiter, /[\t ]*(?:[\r\n]|\r\n)/) 12569 }); 12570 const INTERPOLATION = (rawDelimiter = "") => ({ 12571 className: "subst", 12572 label: "interpol", 12573 begin: concat(/\\/, rawDelimiter, /\(/), 12574 end: /\)/ 12575 }); 12576 const MULTILINE_STRING = (rawDelimiter = "") => ({ 12577 begin: concat(rawDelimiter, /"""/), 12578 end: concat(/"""/, rawDelimiter), 12579 contains: [ 12580 ESCAPED_CHARACTER(rawDelimiter), 12581 ESCAPED_NEWLINE(rawDelimiter), 12582 INTERPOLATION(rawDelimiter) 12583 ] 12584 }); 12585 const SINGLE_LINE_STRING = (rawDelimiter = "") => ({ 12586 begin: concat(rawDelimiter, /"/), 12587 end: concat(/"/, rawDelimiter), 12588 contains: [ 12589 ESCAPED_CHARACTER(rawDelimiter), 12590 INTERPOLATION(rawDelimiter) 12591 ] 12592 }); 12593 const STRING = { 12594 className: "string", 12595 variants: [ 12596 MULTILINE_STRING(), 12597 MULTILINE_STRING("#"), 12598 MULTILINE_STRING("##"), 12599 MULTILINE_STRING("###"), 12600 SINGLE_LINE_STRING(), 12601 SINGLE_LINE_STRING("#"), 12602 SINGLE_LINE_STRING("##"), 12603 SINGLE_LINE_STRING("###") 12604 ] 12605 }; 12606 const REGEXP_CONTENTS = [ 12607 hljs.BACKSLASH_ESCAPE, 12608 { 12609 begin: /\[/, 12610 end: /\]/, 12611 relevance: 0, 12612 contains: [hljs.BACKSLASH_ESCAPE] 12613 } 12614 ]; 12615 const BARE_REGEXP_LITERAL = { 12616 begin: /\/[^\s](?=[^/\n]*\/)/, 12617 end: /\//, 12618 contains: REGEXP_CONTENTS 12619 }; 12620 const EXTENDED_REGEXP_LITERAL = (rawDelimiter) => { 12621 const begin = concat(rawDelimiter, /\//); 12622 const end = concat(/\//, rawDelimiter); 12623 return { 12624 begin, 12625 end, 12626 contains: [ 12627 ...REGEXP_CONTENTS, 12628 { 12629 scope: "comment", 12630 begin: `#(?!.*${end})`, 12631 end: /$/ 12632 } 12633 ] 12634 }; 12635 }; 12636 const REGEXP = { 12637 scope: "regexp", 12638 variants: [ 12639 EXTENDED_REGEXP_LITERAL("###"), 12640 EXTENDED_REGEXP_LITERAL("##"), 12641 EXTENDED_REGEXP_LITERAL("#"), 12642 BARE_REGEXP_LITERAL 12643 ] 12644 }; 12645 const QUOTED_IDENTIFIER = { match: concat(/`/, identifier, /`/) }; 12646 const IMPLICIT_PARAMETER = { 12647 className: "variable", 12648 match: /\$\d+/ 12649 }; 12650 const PROPERTY_WRAPPER_PROJECTION = { 12651 className: "variable", 12652 match: `\\$${identifierCharacter}+` 12653 }; 12654 const IDENTIFIERS = [ 12655 QUOTED_IDENTIFIER, 12656 IMPLICIT_PARAMETER, 12657 PROPERTY_WRAPPER_PROJECTION 12658 ]; 12659 const AVAILABLE_ATTRIBUTE = { 12660 match: /(@|#(un)?)available/, 12661 scope: "keyword", 12662 starts: { contains: [ 12663 { 12664 begin: /\(/, 12665 end: /\)/, 12666 keywords: availabilityKeywords, 12667 contains: [ 12668 ...OPERATORS, 12669 NUMBER, 12670 STRING 12671 ] 12672 } 12673 ] } 12674 }; 12675 const KEYWORD_ATTRIBUTE = { 12676 scope: "keyword", 12677 match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/))) 12678 }; 12679 const USER_DEFINED_ATTRIBUTE = { 12680 scope: "meta", 12681 match: concat(/@/, identifier) 12682 }; 12683 const ATTRIBUTES = [ 12684 AVAILABLE_ATTRIBUTE, 12685 KEYWORD_ATTRIBUTE, 12686 USER_DEFINED_ATTRIBUTE 12687 ]; 12688 const TYPE = { 12689 match: lookahead(/\b[A-Z]/), 12690 relevance: 0, 12691 contains: [ 12692 { 12693 // Common Apple frameworks, for relevance boost 12694 className: "type", 12695 match: concat(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, identifierCharacter, "+") 12696 }, 12697 { 12698 // Type identifier 12699 className: "type", 12700 match: typeIdentifier, 12701 relevance: 0 12702 }, 12703 { 12704 // Optional type 12705 match: /[?!]+/, 12706 relevance: 0 12707 }, 12708 { 12709 // Variadic parameter 12710 match: /\.\.\./, 12711 relevance: 0 12712 }, 12713 { 12714 // Protocol composition 12715 match: concat(/\s+&\s+/, lookahead(typeIdentifier)), 12716 relevance: 0 12717 } 12718 ] 12719 }; 12720 const GENERIC_ARGUMENTS = { 12721 begin: /</, 12722 end: />/, 12723 keywords: KEYWORDS, 12724 contains: [ 12725 ...COMMENTS, 12726 ...KEYWORD_MODES, 12727 ...ATTRIBUTES, 12728 OPERATOR_GUARD, 12729 TYPE 12730 ] 12731 }; 12732 TYPE.contains.push(GENERIC_ARGUMENTS); 12733 const TUPLE_ELEMENT_NAME = { 12734 match: concat(identifier, /\s*:/), 12735 keywords: "_|0", 12736 relevance: 0 12737 }; 12738 const TUPLE = { 12739 begin: /\(/, 12740 end: /\)/, 12741 relevance: 0, 12742 keywords: KEYWORDS, 12743 contains: [ 12744 "self", 12745 TUPLE_ELEMENT_NAME, 12746 ...COMMENTS, 12747 REGEXP, 12748 ...KEYWORD_MODES, 12749 ...BUILT_INS, 12750 ...OPERATORS, 12751 NUMBER, 12752 STRING, 12753 ...IDENTIFIERS, 12754 ...ATTRIBUTES, 12755 TYPE 12756 ] 12757 }; 12758 const GENERIC_PARAMETERS = { 12759 begin: /</, 12760 end: />/, 12761 keywords: "repeat each", 12762 contains: [ 12763 ...COMMENTS, 12764 TYPE 12765 ] 12766 }; 12767 const FUNCTION_PARAMETER_NAME = { 12768 begin: either( 12769 lookahead(concat(identifier, /\s*:/)), 12770 lookahead(concat(identifier, /\s+/, identifier, /\s*:/)) 12771 ), 12772 end: /:/, 12773 relevance: 0, 12774 contains: [ 12775 { 12776 className: "keyword", 12777 match: /\b_\b/ 12778 }, 12779 { 12780 className: "params", 12781 match: identifier 12782 } 12783 ] 12784 }; 12785 const FUNCTION_PARAMETERS = { 12786 begin: /\(/, 12787 end: /\)/, 12788 keywords: KEYWORDS, 12789 contains: [ 12790 FUNCTION_PARAMETER_NAME, 12791 ...COMMENTS, 12792 ...KEYWORD_MODES, 12793 ...OPERATORS, 12794 NUMBER, 12795 STRING, 12796 ...ATTRIBUTES, 12797 TYPE, 12798 TUPLE 12799 ], 12800 endsParent: true, 12801 illegal: /["']/ 12802 }; 12803 const FUNCTION_OR_MACRO = { 12804 match: [ 12805 /(func|macro)/, 12806 /\s+/, 12807 either(QUOTED_IDENTIFIER.match, identifier, operator) 12808 ], 12809 className: { 12810 1: "keyword", 12811 3: "title.function" 12812 }, 12813 contains: [ 12814 GENERIC_PARAMETERS, 12815 FUNCTION_PARAMETERS, 12816 WHITESPACE 12817 ], 12818 illegal: [ 12819 /\[/, 12820 /%/ 12821 ] 12822 }; 12823 const INIT_SUBSCRIPT = { 12824 match: [ 12825 /\b(?:subscript|init[?!]?)/, 12826 /\s*(?=[<(])/ 12827 ], 12828 className: { 1: "keyword" }, 12829 contains: [ 12830 GENERIC_PARAMETERS, 12831 FUNCTION_PARAMETERS, 12832 WHITESPACE 12833 ], 12834 illegal: /\[|%/ 12835 }; 12836 const OPERATOR_DECLARATION = { 12837 match: [ 12838 /operator/, 12839 /\s+/, 12840 operator 12841 ], 12842 className: { 12843 1: "keyword", 12844 3: "title" 12845 } 12846 }; 12847 const PRECEDENCEGROUP = { 12848 begin: [ 12849 /precedencegroup/, 12850 /\s+/, 12851 typeIdentifier 12852 ], 12853 className: { 12854 1: "keyword", 12855 3: "title" 12856 }, 12857 contains: [TYPE], 12858 keywords: [ 12859 ...precedencegroupKeywords, 12860 ...literals 12861 ], 12862 end: /}/ 12863 }; 12864 const CLASS_FUNC_DECLARATION = { 12865 match: [ 12866 /class\b/, 12867 /\s+/, 12868 /func\b/, 12869 /\s+/, 12870 /\b[A-Za-z_][A-Za-z0-9_]*\b/ 12871 ], 12872 scope: { 12873 1: "keyword", 12874 3: "keyword", 12875 5: "title.function" 12876 } 12877 }; 12878 const CLASS_VAR_DECLARATION = { 12879 match: [ 12880 /class\b/, 12881 /\s+/, 12882 /var\b/ 12883 ], 12884 scope: { 12885 1: "keyword", 12886 3: "keyword" 12887 } 12888 }; 12889 const TYPE_DECLARATION = { 12890 begin: [ 12891 /(struct|protocol|class|extension|enum|actor)/, 12892 /\s+/, 12893 identifier, 12894 /\s*/ 12895 ], 12896 beginScope: { 12897 1: "keyword", 12898 3: "title.class" 12899 }, 12900 keywords: KEYWORDS, 12901 contains: [ 12902 GENERIC_PARAMETERS, 12903 ...KEYWORD_MODES, 12904 { 12905 begin: /:/, 12906 end: /\{/, 12907 keywords: KEYWORDS, 12908 contains: [ 12909 { 12910 scope: "title.class.inherited", 12911 match: typeIdentifier 12912 }, 12913 ...KEYWORD_MODES 12914 ], 12915 relevance: 0 12916 } 12917 ] 12918 }; 12919 for (const variant of STRING.variants) { 12920 const interpolation = variant.contains.find((mode) => mode.label === "interpol"); 12921 interpolation.keywords = KEYWORDS; 12922 const submodes = [ 12923 ...KEYWORD_MODES, 12924 ...BUILT_INS, 12925 ...OPERATORS, 12926 NUMBER, 12927 STRING, 12928 ...IDENTIFIERS 12929 ]; 12930 interpolation.contains = [ 12931 ...submodes, 12932 { 12933 begin: /\(/, 12934 end: /\)/, 12935 contains: [ 12936 "self", 12937 ...submodes 12938 ] 12939 } 12940 ]; 12941 } 12942 return { 12943 name: "Swift", 12944 keywords: KEYWORDS, 12945 contains: [ 12946 ...COMMENTS, 12947 FUNCTION_OR_MACRO, 12948 INIT_SUBSCRIPT, 12949 CLASS_FUNC_DECLARATION, 12950 CLASS_VAR_DECLARATION, 12951 TYPE_DECLARATION, 12952 OPERATOR_DECLARATION, 12953 PRECEDENCEGROUP, 12954 { 12955 beginKeywords: "import", 12956 end: /$/, 12957 contains: [...COMMENTS], 12958 relevance: 0 12959 }, 12960 REGEXP, 12961 ...KEYWORD_MODES, 12962 ...BUILT_INS, 12963 ...OPERATORS, 12964 NUMBER, 12965 STRING, 12966 ...IDENTIFIERS, 12967 ...ATTRIBUTES, 12968 TYPE, 12969 TUPLE 12970 ] 12971 }; 12972 } 12973 module.exports = swift; 12974 } 12975}); 12976
vendor: 5,378 bytes, lines 12977-13182
12977// node_modules/highlight.js/lib/languages/yaml.js 12978var require_yaml = __commonJS({ 12979 "node_modules/highlight.js/lib/languages/yaml.js"(exports, module) { 12980 function yaml(hljs) { 12981 const LITERALS = "true false yes no null"; 12982 const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+"; 12983 const KEY = { 12984 className: "attr", 12985 variants: [ 12986 // added brackets support and special char support 12987 { begin: /[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/ }, 12988 { 12989 // double quoted keys - with brackets and special char support 12990 begin: /"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/ 12991 }, 12992 { 12993 // single quoted keys - with brackets and special char support 12994 begin: /'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/ 12995 } 12996 ] 12997 }; 12998 const TEMPLATE_VARIABLES = { 12999 className: "template-variable", 13000 variants: [ 13001 { 13002 // jinja templates Ansible 13003 begin: /\{\{/, 13004 end: /\}\}/ 13005 }, 13006 { 13007 // Ruby i18n 13008 begin: /%\{/, 13009 end: /\}/ 13010 } 13011 ] 13012 }; 13013 const SINGLE_QUOTE_STRING = { 13014 className: "string", 13015 relevance: 0, 13016 begin: /'/, 13017 end: /'/, 13018 contains: [ 13019 { 13020 match: /''/, 13021 scope: "char.escape", 13022 relevance: 0 13023 } 13024 ] 13025 }; 13026 const STRING = { 13027 className: "string", 13028 relevance: 0, 13029 variants: [ 13030 { 13031 begin: /"/, 13032 end: /"/ 13033 }, 13034 { begin: /\S+/ } 13035 ], 13036 contains: [ 13037 hljs.BACKSLASH_ESCAPE, 13038 TEMPLATE_VARIABLES 13039 ] 13040 }; 13041 const CONTAINER_STRING = hljs.inherit(STRING, { variants: [ 13042 { 13043 begin: /'/, 13044 end: /'/, 13045 contains: [ 13046 { 13047 begin: /''/, 13048 relevance: 0 13049 } 13050 ] 13051 }, 13052 { 13053 begin: /"/, 13054 end: /"/ 13055 }, 13056 { begin: /[^\s,{}[\]]+/ } 13057 ] }); 13058 const DATE_RE = "[0-9]{4}(-[0-9][0-9]){0,2}"; 13059 const TIME_RE = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"; 13060 const FRACTION_RE = "(\\.[0-9]*)?"; 13061 const ZONE_RE = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"; 13062 const TIMESTAMP = { 13063 className: "number", 13064 begin: "\\b" + DATE_RE + TIME_RE + FRACTION_RE + ZONE_RE + "\\b" 13065 }; 13066 const VALUE_CONTAINER = { 13067 end: ",", 13068 endsWithParent: true, 13069 excludeEnd: true, 13070 keywords: LITERALS, 13071 relevance: 0 13072 }; 13073 const OBJECT = { 13074 begin: /\{/, 13075 end: /\}/, 13076 contains: [VALUE_CONTAINER], 13077 illegal: "\\n", 13078 relevance: 0 13079 }; 13080 const ARRAY = { 13081 begin: "\\[", 13082 end: "\\]", 13083 contains: [VALUE_CONTAINER], 13084 illegal: "\\n", 13085 relevance: 0 13086 }; 13087 const MODES = [ 13088 KEY, 13089 { 13090 className: "meta", 13091 begin: "^---\\s*$", 13092 relevance: 10 13093 }, 13094 { 13095 // multi line string 13096 // Blocks start with a | or > followed by a newline 13097 // 13098 // Indentation of subsequent lines must be the same to 13099 // be considered part of the block 13100 className: "string", 13101 begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*" 13102 }, 13103 { 13104 // Ruby/Rails erb 13105 begin: "<%[%=-]?", 13106 end: "[%-]?%>", 13107 subLanguage: "ruby", 13108 excludeBegin: true, 13109 excludeEnd: true, 13110 relevance: 0 13111 }, 13112 { 13113 // named tags 13114 className: "type", 13115 begin: "!\\w+!" + URI_CHARACTERS 13116 }, 13117 // https://yaml.org/spec/1.2/spec.html#id2784064 13118 { 13119 // verbatim tags 13120 className: "type", 13121 begin: "!<" + URI_CHARACTERS + ">" 13122 }, 13123 { 13124 // primary tags 13125 className: "type", 13126 begin: "!" + URI_CHARACTERS 13127 }, 13128 { 13129 // secondary tags 13130 className: "type", 13131 begin: "!!" + URI_CHARACTERS 13132 }, 13133 { 13134 // fragment id &ref 13135 className: "meta", 13136 begin: "&" + hljs.UNDERSCORE_IDENT_RE + "$" 13137 }, 13138 { 13139 // fragment reference *ref 13140 className: "meta", 13141 begin: "\\*" + hljs.UNDERSCORE_IDENT_RE + "$" 13142 }, 13143 { 13144 // array listing 13145 className: "bullet", 13146 // TODO: remove |$ hack when we have proper look-ahead support 13147 begin: "-(?=[ ]|$)", 13148 relevance: 0 13149 }, 13150 hljs.HASH_COMMENT_MODE, 13151 { 13152 beginKeywords: LITERALS, 13153 keywords: { literal: LITERALS } 13154 }, 13155 TIMESTAMP, 13156 // numbers are any valid C-style number that 13157 // sit isolated from other words 13158 { 13159 className: "number", 13160 begin: hljs.C_NUMBER_RE + "\\b", 13161 relevance: 0 13162 }, 13163 OBJECT, 13164 ARRAY, 13165 SINGLE_QUOTE_STRING, 13166 STRING 13167 ]; 13168 const VALUE_MODES = [...MODES]; 13169 VALUE_MODES.pop(); 13170 VALUE_MODES.push(CONTAINER_STRING); 13171 VALUE_CONTAINER.contains = VALUE_MODES; 13172 return { 13173 name: "YAML", 13174 case_insensitive: true, 13175 aliases: ["yml"], 13176 contains: MODES 13177 }; 13178 } 13179 module.exports = yaml; 13180 } 13181}); 13182
vendor: 22,337 bytes, lines 13183-14003
13183// node_modules/highlight.js/lib/languages/typescript.js 13184var require_typescript = __commonJS({ 13185 "node_modules/highlight.js/lib/languages/typescript.js"(exports, module) { 13186 var IDENT_RE = "[A-Za-z$_][0-9A-Za-z$_]*"; 13187 var KEYWORDS = [ 13188 "as", 13189 // for exports 13190 "in", 13191 "of", 13192 "if", 13193 "for", 13194 "while", 13195 "finally", 13196 "var", 13197 "new", 13198 "function", 13199 "do", 13200 "return", 13201 "void", 13202 "else", 13203 "break", 13204 "catch", 13205 "instanceof", 13206 "with", 13207 "throw", 13208 "case", 13209 "default", 13210 "try", 13211 "switch", 13212 "continue", 13213 "typeof", 13214 "delete", 13215 "let", 13216 "yield", 13217 "const", 13218 "class", 13219 // JS handles these with a special rule 13220 // "get", 13221 // "set", 13222 "debugger", 13223 "async", 13224 "await", 13225 "static", 13226 "import", 13227 "from", 13228 "export", 13229 "extends", 13230 // It's reached stage 3, which is "recommended for implementation": 13231 "using" 13232 ]; 13233 var LITERALS = [ 13234 "true", 13235 "false", 13236 "null", 13237 "undefined", 13238 "NaN", 13239 "Infinity" 13240 ]; 13241 var TYPES = [ 13242 // Fundamental objects 13243 "Object", 13244 "Function", 13245 "Boolean", 13246 "Symbol", 13247 // numbers and dates 13248 "Math", 13249 "Date", 13250 "Number", 13251 "BigInt", 13252 // text 13253 "String", 13254 "RegExp", 13255 // Indexed collections 13256 "Array", 13257 "Float32Array", 13258 "Float64Array", 13259 "Int8Array", 13260 "Uint8Array", 13261 "Uint8ClampedArray", 13262 "Int16Array", 13263 "Int32Array", 13264 "Uint16Array", 13265 "Uint32Array", 13266 "BigInt64Array", 13267 "BigUint64Array", 13268 // Keyed collections 13269 "Set", 13270 "Map", 13271 "WeakSet", 13272 "WeakMap", 13273 // Structured data 13274 "ArrayBuffer", 13275 "SharedArrayBuffer", 13276 "Atomics", 13277 "DataView", 13278 "JSON", 13279 // Control abstraction objects 13280 "Promise", 13281 "Generator", 13282 "GeneratorFunction", 13283 "AsyncFunction", 13284 // Reflection 13285 "Reflect", 13286 "Proxy", 13287 // Internationalization 13288 "Intl", 13289 // WebAssembly 13290 "WebAssembly" 13291 ]; 13292 var ERROR_TYPES = [ 13293 "Error", 13294 "EvalError", 13295 "InternalError", 13296 "RangeError", 13297 "ReferenceError", 13298 "SyntaxError", 13299 "TypeError", 13300 "URIError" 13301 ]; 13302 var BUILT_IN_GLOBALS = [ 13303 "setInterval", 13304 "setTimeout", 13305 "clearInterval", 13306 "clearTimeout", 13307 "require", 13308 "exports", 13309 "eval", 13310 "isFinite", 13311 "isNaN", 13312 "parseFloat", 13313 "parseInt", 13314 "decodeURI", 13315 "decodeURIComponent", 13316 "encodeURI", 13317 "encodeURIComponent", 13318 "escape", 13319 "unescape" 13320 ]; 13321 var BUILT_IN_VARIABLES = [ 13322 "arguments", 13323 "this", 13324 "super", 13325 "console", 13326 "window", 13327 "document", 13328 "localStorage", 13329 "sessionStorage", 13330 "module", 13331 "self", 13332 "global" 13333 // Node.js 13334 ]; 13335 var BUILT_INS = [].concat( 13336 BUILT_IN_GLOBALS, 13337 TYPES, 13338 ERROR_TYPES 13339 ); 13340 function javascript(hljs) { 13341 const regex = hljs.regex; 13342 const hasClosingTag = (match, { after }) => { 13343 const tag = "</" + match[0].slice(1); 13344 const pos = match.input.indexOf(tag, after); 13345 return pos !== -1; 13346 }; 13347 const IDENT_RE$1 = IDENT_RE; 13348 const FRAGMENT = { 13349 begin: "<>", 13350 end: "</>" 13351 }; 13352 const XML_SELF_CLOSING = /<[A-Za-z0-9\\._:-]+\s*\/>/; 13353 const XML_TAG = { 13354 begin: /<[A-Za-z0-9\\._:-]+/, 13355 end: /\/[A-Za-z0-9\\._:-]+>|\/>/, 13356 /** 13357 * @param {RegExpMatchArray} match 13358 * @param {CallbackResponse} response 13359 */ 13360 isTrulyOpeningTag: (match, response) => { 13361 const afterMatchIndex = match[0].length + match.index; 13362 const nextChar = match.input[afterMatchIndex]; 13363 if ( 13364 // HTML should not include another raw `<` inside a tag 13365 // nested type? 13366 // `<Array<Array<number>>`, etc. 13367 nextChar === "<" || // the , gives away that this is not HTML 13368 // `<T, A extends keyof T, V>` 13369 nextChar === "," 13370 ) { 13371 response.ignoreMatch(); 13372 return; 13373 } 13374 if (nextChar === ">") { 13375 if (!hasClosingTag(match, { after: afterMatchIndex })) { 13376 response.ignoreMatch(); 13377 } 13378 } 13379 let m; 13380 const afterMatch = match.input.substring(afterMatchIndex); 13381 if (m = afterMatch.match(/^\s*=/)) { 13382 response.ignoreMatch(); 13383 return; 13384 } 13385 if (m = afterMatch.match(/^\s+extends\s+/)) { 13386 if (m.index === 0) { 13387 response.ignoreMatch(); 13388 return; 13389 } 13390 } 13391 } 13392 }; 13393 const KEYWORDS$1 = { 13394 $pattern: IDENT_RE, 13395 keyword: KEYWORDS, 13396 literal: LITERALS, 13397 built_in: BUILT_INS, 13398 "variable.language": BUILT_IN_VARIABLES 13399 }; 13400 const decimalDigits = "[0-9](_?[0-9])*"; 13401 const frac = `\\.(${decimalDigits})`; 13402 const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`; 13403 const NUMBER = { 13404 className: "number", 13405 variants: [ 13406 // DecimalLiteral 13407 { begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})\\b` }, 13408 { begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` }, 13409 // DecimalBigIntegerLiteral 13410 { begin: `\\b(0|[1-9](_?[0-9])*)n\\b` }, 13411 // NonDecimalIntegerLiteral 13412 { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" }, 13413 { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" }, 13414 { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" }, 13415 // LegacyOctalIntegerLiteral (does not include underscore separators) 13416 // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals 13417 { begin: "\\b0[0-7]+n?\\b" } 13418 ], 13419 relevance: 0 13420 }; 13421 const SUBST = { 13422 className: "subst", 13423 begin: "\\$\\{", 13424 end: "\\}", 13425 keywords: KEYWORDS$1, 13426 contains: [] 13427 // defined later 13428 }; 13429 const HTML_TEMPLATE = { 13430 begin: ".?html`", 13431 end: "", 13432 starts: { 13433 end: "`", 13434 returnEnd: false, 13435 contains: [ 13436 hljs.BACKSLASH_ESCAPE, 13437 SUBST 13438 ], 13439 subLanguage: "xml" 13440 } 13441 }; 13442 const CSS_TEMPLATE = { 13443 begin: ".?css`", 13444 end: "", 13445 starts: { 13446 end: "`", 13447 returnEnd: false, 13448 contains: [ 13449 hljs.BACKSLASH_ESCAPE, 13450 SUBST 13451 ], 13452 subLanguage: "css" 13453 } 13454 }; 13455 const GRAPHQL_TEMPLATE = { 13456 begin: ".?gql`", 13457 end: "", 13458 starts: { 13459 end: "`", 13460 returnEnd: false, 13461 contains: [ 13462 hljs.BACKSLASH_ESCAPE, 13463 SUBST 13464 ], 13465 subLanguage: "graphql" 13466 } 13467 }; 13468 const TEMPLATE_STRING = { 13469 className: "string", 13470 begin: "`", 13471 end: "`", 13472 contains: [ 13473 hljs.BACKSLASH_ESCAPE, 13474 SUBST 13475 ] 13476 }; 13477 const JSDOC_COMMENT = hljs.COMMENT( 13478 /\/\*\*(?!\/)/, 13479 "\\*/", 13480 { 13481 relevance: 0, 13482 contains: [ 13483 { 13484 begin: "(?=@[A-Za-z]+)", 13485 relevance: 0, 13486 contains: [ 13487 { 13488 className: "doctag", 13489 begin: "@[A-Za-z]+" 13490 }, 13491 { 13492 className: "type", 13493 begin: "\\{", 13494 end: "\\}", 13495 excludeEnd: true, 13496 excludeBegin: true, 13497 relevance: 0 13498 }, 13499 { 13500 className: "variable", 13501 begin: IDENT_RE$1 + "(?=\\s*(-)|$)", 13502 endsParent: true, 13503 relevance: 0 13504 }, 13505 // eat spaces (not newlines) so we can find 13506 // types or variables 13507 { 13508 begin: /(?=[^\n])\s/, 13509 relevance: 0 13510 } 13511 ] 13512 } 13513 ] 13514 } 13515 ); 13516 const COMMENT = { 13517 className: "comment", 13518 variants: [ 13519 JSDOC_COMMENT, 13520 hljs.C_BLOCK_COMMENT_MODE, 13521 hljs.C_LINE_COMMENT_MODE 13522 ] 13523 }; 13524 const SUBST_INTERNALS = [ 13525 hljs.APOS_STRING_MODE, 13526 hljs.QUOTE_STRING_MODE, 13527 HTML_TEMPLATE, 13528 CSS_TEMPLATE, 13529 GRAPHQL_TEMPLATE, 13530 TEMPLATE_STRING, 13531 // Skip numbers when they are part of a variable name 13532 { match: /\$\d+/ }, 13533 NUMBER 13534 // This is intentional: 13535 // See https://github.com/highlightjs/highlight.js/issues/3288 13536 // hljs.REGEXP_MODE 13537 ]; 13538 SUBST.contains = SUBST_INTERNALS.concat({ 13539 // we need to pair up {} inside our subst to prevent 13540 // it from ending too early by matching another } 13541 begin: /\{/, 13542 end: /\}/, 13543 keywords: KEYWORDS$1, 13544 contains: [ 13545 "self" 13546 ].concat(SUBST_INTERNALS) 13547 }); 13548 const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains); 13549 const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([ 13550 // eat recursive parens in sub expressions 13551 { 13552 begin: /(\s*)\(/, 13553 end: /\)/, 13554 keywords: KEYWORDS$1, 13555 contains: ["self"].concat(SUBST_AND_COMMENTS) 13556 } 13557 ]); 13558 const PARAMS = { 13559 className: "params", 13560 // convert this to negative lookbehind in v12 13561 begin: /(\s*)\(/, 13562 // to match the parms with 13563 end: /\)/, 13564 excludeBegin: true, 13565 excludeEnd: true, 13566 keywords: KEYWORDS$1, 13567 contains: PARAMS_CONTAINS 13568 }; 13569 const CLASS_OR_EXTENDS = { 13570 variants: [ 13571 // class Car extends vehicle 13572 { 13573 match: [ 13574 /class/, 13575 /\s+/, 13576 IDENT_RE$1, 13577 /\s+/, 13578 /extends/, 13579 /\s+/, 13580 regex.concat(IDENT_RE$1, "(", regex.concat(/\./, IDENT_RE$1), ")*") 13581 ], 13582 scope: { 13583 1: "keyword", 13584 3: "title.class", 13585 5: "keyword", 13586 7: "title.class.inherited" 13587 } 13588 }, 13589 // class Car 13590 { 13591 match: [ 13592 /class/, 13593 /\s+/, 13594 IDENT_RE$1 13595 ], 13596 scope: { 13597 1: "keyword", 13598 3: "title.class" 13599 } 13600 } 13601 ] 13602 }; 13603 const CLASS_REFERENCE = { 13604 relevance: 0, 13605 match: regex.either( 13606 // Hard coded exceptions 13607 /\bJSON/, 13608 // Float32Array, OutT 13609 /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, 13610 // CSSFactory, CSSFactoryT 13611 /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, 13612 // FPs, FPsT 13613 /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/ 13614 // P 13615 // single letters are not highlighted 13616 // BLAH 13617 // this will be flagged as a UPPER_CASE_CONSTANT instead 13618 ), 13619 className: "title.class", 13620 keywords: { 13621 _: [ 13622 // se we still get relevance credit for JS library classes 13623 ...TYPES, 13624 ...ERROR_TYPES 13625 ] 13626 } 13627 }; 13628 const USE_STRICT = { 13629 label: "use_strict", 13630 className: "meta", 13631 relevance: 10, 13632 begin: /^\s*['"]use (strict|asm)['"]/ 13633 }; 13634 const FUNCTION_DEFINITION = { 13635 variants: [ 13636 { 13637 match: [ 13638 /function/, 13639 /\s+/, 13640 IDENT_RE$1, 13641 /(?=\s*\()/ 13642 ] 13643 }, 13644 // anonymous function 13645 { 13646 match: [ 13647 /function/, 13648 /\s*(?=\()/ 13649 ] 13650 } 13651 ], 13652 className: { 13653 1: "keyword", 13654 3: "title.function" 13655 }, 13656 label: "func.def", 13657 contains: [PARAMS], 13658 illegal: /%/ 13659 }; 13660 const UPPER_CASE_CONSTANT = { 13661 relevance: 0, 13662 match: /\b[A-Z][A-Z_0-9]+\b/, 13663 className: "variable.constant" 13664 }; 13665 function noneOf(list) { 13666 return regex.concat("(?!", list.join("|"), ")"); 13667 } 13668 const FUNCTION_CALL = { 13669 match: regex.concat( 13670 /\b/, 13671 noneOf([ 13672 ...BUILT_IN_GLOBALS, 13673 "super", 13674 "import", 13675 "await" 13676 ].map((x) => `${x}\\s*\\(`)), 13677 IDENT_RE$1, 13678 regex.lookahead(/\s*\(/) 13679 ), 13680 className: "title.function", 13681 relevance: 0 13682 }; 13683 const PROPERTY_ACCESS = { 13684 begin: regex.concat(/\./, regex.lookahead( 13685 regex.concat(IDENT_RE$1, /(?![0-9A-Za-z$_(])/) 13686 )), 13687 end: IDENT_RE$1, 13688 excludeBegin: true, 13689 keywords: "prototype", 13690 className: "property", 13691 relevance: 0 13692 }; 13693 const GETTER_OR_SETTER = { 13694 match: [ 13695 /get|set/, 13696 /\s+/, 13697 IDENT_RE$1, 13698 /(?=\()/ 13699 ], 13700 className: { 13701 1: "keyword", 13702 3: "title.function" 13703 }, 13704 contains: [ 13705 { 13706 // eat to avoid empty params 13707 begin: /\(\)/ 13708 }, 13709 PARAMS 13710 ] 13711 }; 13712 const FUNC_LEAD_IN_RE = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + hljs.UNDERSCORE_IDENT_RE + ")\\s*=>"; 13713 const FUNCTION_VARIABLE = { 13714 match: [ 13715 /const|var|let/, 13716 /\s+/, 13717 IDENT_RE$1, 13718 /\s*/, 13719 /=\s*/, 13720 /(async\s*)?/, 13721 // async is optional 13722 regex.lookahead(FUNC_LEAD_IN_RE) 13723 ], 13724 keywords: "async", 13725 className: { 13726 1: "keyword", 13727 3: "title.function" 13728 }, 13729 contains: [ 13730 PARAMS 13731 ] 13732 }; 13733 return { 13734 name: "JavaScript", 13735 aliases: ["js", "jsx", "mjs", "cjs"], 13736 keywords: KEYWORDS$1, 13737 // this will be extended by TypeScript 13738 exports: { PARAMS_CONTAINS, CLASS_REFERENCE }, 13739 illegal: /#(?![$_A-Za-z])/, 13740 contains: [ 13741 hljs.SHEBANG({ 13742 label: "shebang", 13743 binary: "node", 13744 relevance: 5 13745 }), 13746 USE_STRICT, 13747 hljs.APOS_STRING_MODE, 13748 hljs.QUOTE_STRING_MODE, 13749 HTML_TEMPLATE, 13750 CSS_TEMPLATE, 13751 GRAPHQL_TEMPLATE, 13752 TEMPLATE_STRING, 13753 COMMENT, 13754 // Skip numbers when they are part of a variable name 13755 { match: /\$\d+/ }, 13756 NUMBER, 13757 CLASS_REFERENCE, 13758 { 13759 scope: "attr", 13760 match: IDENT_RE$1 + regex.lookahead(":"), 13761 relevance: 0 13762 }, 13763 FUNCTION_VARIABLE, 13764 { 13765 // "value" container 13766 begin: "(" + hljs.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", 13767 keywords: "return throw case", 13768 relevance: 0, 13769 contains: [ 13770 COMMENT, 13771 hljs.REGEXP_MODE, 13772 { 13773 className: "function", 13774 // we have to count the parens to make sure we actually have the 13775 // correct bounding ( ) before the =>. There could be any number of 13776 // sub-expressions inside also surrounded by parens. 13777 begin: FUNC_LEAD_IN_RE, 13778 returnBegin: true, 13779 end: "\\s*=>", 13780 contains: [ 13781 { 13782 className: "params", 13783 variants: [ 13784 { 13785 begin: hljs.UNDERSCORE_IDENT_RE, 13786 relevance: 0 13787 }, 13788 { 13789 className: null, 13790 begin: /\(\s*\)/, 13791 skip: true 13792 }, 13793 { 13794 begin: /(\s*)\(/, 13795 end: /\)/, 13796 excludeBegin: true, 13797 excludeEnd: true, 13798 keywords: KEYWORDS$1, 13799 contains: PARAMS_CONTAINS 13800 } 13801 ] 13802 } 13803 ] 13804 }, 13805 { 13806 // could be a comma delimited list of params to a function call 13807 begin: /,/, 13808 relevance: 0 13809 }, 13810 { 13811 match: /\s+/, 13812 relevance: 0 13813 }, 13814 { 13815 // JSX 13816 variants: [ 13817 { begin: FRAGMENT.begin, end: FRAGMENT.end }, 13818 { match: XML_SELF_CLOSING }, 13819 { 13820 begin: XML_TAG.begin, 13821 // we carefully check the opening tag to see if it truly 13822 // is a tag and not a false positive 13823 "on:begin": XML_TAG.isTrulyOpeningTag, 13824 end: XML_TAG.end 13825 } 13826 ], 13827 subLanguage: "xml", 13828 contains: [ 13829 { 13830 begin: XML_TAG.begin, 13831 end: XML_TAG.end, 13832 skip: true, 13833 contains: ["self"] 13834 } 13835 ] 13836 } 13837 ] 13838 }, 13839 FUNCTION_DEFINITION, 13840 { 13841 // prevent this from getting swallowed up by function 13842 // since they appear "function like" 13843 beginKeywords: "while if switch catch for" 13844 }, 13845 { 13846 // we have to count the parens to make sure we actually have the correct 13847 // bounding ( ). There could be any number of sub-expressions inside 13848 // also surrounded by parens. 13849 begin: "\\b(?!function)" + hljs.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", 13850 // end parens 13851 returnBegin: true, 13852 label: "func.def", 13853 contains: [ 13854 PARAMS, 13855 hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1, className: "title.function" }) 13856 ] 13857 }, 13858 // catch ... so it won't trigger the property rule below 13859 { 13860 match: /\.\.\./, 13861 relevance: 0 13862 }, 13863 PROPERTY_ACCESS, 13864 // hack: prevents detection of keywords in some circumstances 13865 // .keyword() 13866 // $keyword = x 13867 { 13868 match: "\\$" + IDENT_RE$1, 13869 relevance: 0 13870 }, 13871 { 13872 match: [/\bconstructor(?=\s*\()/], 13873 className: { 1: "title.function" }, 13874 contains: [PARAMS] 13875 }, 13876 FUNCTION_CALL, 13877 UPPER_CASE_CONSTANT, 13878 CLASS_OR_EXTENDS, 13879 GETTER_OR_SETTER, 13880 { 13881 match: /\$[(.]/ 13882 // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` 13883 } 13884 ] 13885 }; 13886 } 13887 function typescript(hljs) { 13888 const regex = hljs.regex; 13889 const tsLanguage = javascript(hljs); 13890 const IDENT_RE$1 = IDENT_RE; 13891 const TYPES2 = [ 13892 "any", 13893 "void", 13894 "number", 13895 "boolean", 13896 "string", 13897 "object", 13898 "never", 13899 "symbol", 13900 "bigint", 13901 "unknown" 13902 ]; 13903 const NAMESPACE = { 13904 begin: [ 13905 /namespace/, 13906 /\s+/, 13907 hljs.IDENT_RE 13908 ], 13909 beginScope: { 13910 1: "keyword", 13911 3: "title.class" 13912 } 13913 }; 13914 const INTERFACE = { 13915 beginKeywords: "interface", 13916 end: /\{/, 13917 excludeEnd: true, 13918 keywords: { 13919 keyword: "interface extends", 13920 built_in: TYPES2 13921 }, 13922 contains: [tsLanguage.exports.CLASS_REFERENCE] 13923 }; 13924 const USE_STRICT = { 13925 className: "meta", 13926 relevance: 10, 13927 begin: /^\s*['"]use strict['"]/ 13928 }; 13929 const TS_SPECIFIC_KEYWORDS = [ 13930 "type", 13931 // "namespace", 13932 "interface", 13933 "public", 13934 "private", 13935 "protected", 13936 "implements", 13937 "declare", 13938 "abstract", 13939 "readonly", 13940 "enum", 13941 "override", 13942 "satisfies" 13943 ]; 13944 const KEYWORDS$1 = { 13945 $pattern: IDENT_RE, 13946 keyword: KEYWORDS.concat(TS_SPECIFIC_KEYWORDS), 13947 literal: LITERALS, 13948 built_in: BUILT_INS.concat(TYPES2), 13949 "variable.language": BUILT_IN_VARIABLES 13950 }; 13951 const DECORATOR = { 13952 className: "meta", 13953 begin: "@" + IDENT_RE$1 13954 }; 13955 const swapMode = (mode, label, replacement) => { 13956 const indx = mode.contains.findIndex((m) => m.label === label); 13957 if (indx === -1) { 13958 throw new Error("can not find mode to replace"); 13959 } 13960 mode.contains.splice(indx, 1, replacement); 13961 }; 13962 Object.assign(tsLanguage.keywords, KEYWORDS$1); 13963 tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR); 13964 const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find((c) => c.scope === "attr"); 13965 const OPTIONAL_KEY_OR_ARGUMENT = Object.assign( 13966 {}, 13967 ATTRIBUTE_HIGHLIGHT, 13968 { match: regex.concat(IDENT_RE$1, regex.lookahead(/\s*\?:/)) } 13969 ); 13970 tsLanguage.exports.PARAMS_CONTAINS.push([ 13971 tsLanguage.exports.CLASS_REFERENCE, 13972 // class reference for highlighting the params types 13973 ATTRIBUTE_HIGHLIGHT, 13974 // highlight the params key 13975 OPTIONAL_KEY_OR_ARGUMENT 13976 // Added for optional property assignment highlighting 13977 ]); 13978 tsLanguage.contains = tsLanguage.contains.concat([ 13979 DECORATOR, 13980 NAMESPACE, 13981 INTERFACE, 13982 OPTIONAL_KEY_OR_ARGUMENT 13983 // Added for optional property assignment highlighting 13984 ]); 13985 swapMode(tsLanguage, "shebang", hljs.SHEBANG()); 13986 swapMode(tsLanguage, "use_strict", USE_STRICT); 13987 const functionDeclaration = tsLanguage.contains.find((m) => m.label === "func.def"); 13988 functionDeclaration.relevance = 0; 13989 Object.assign(tsLanguage, { 13990 name: "TypeScript", 13991 aliases: [ 13992 "ts", 13993 "tsx", 13994 "mts", 13995 "cts" 13996 ] 13997 }); 13998 return tsLanguage; 13999 } 14000 module.exports = typescript; 14001 } 14002}); 14003
vendor: 5,060 bytes, lines 14004-14141
14004// node_modules/highlight.js/lib/languages/vbnet.js 14005var require_vbnet = __commonJS({ 14006 "node_modules/highlight.js/lib/languages/vbnet.js"(exports, module) { 14007 function vbnet(hljs) { 14008 const regex = hljs.regex; 14009 const CHARACTER = { 14010 className: "string", 14011 begin: /"(""|[^/n])"C\b/ 14012 }; 14013 const STRING = { 14014 className: "string", 14015 begin: /"/, 14016 end: /"/, 14017 illegal: /\n/, 14018 contains: [ 14019 { 14020 // double quote escape 14021 begin: /""/ 14022 } 14023 ] 14024 }; 14025 const MM_DD_YYYY = /\d{1,2}\/\d{1,2}\/\d{4}/; 14026 const YYYY_MM_DD = /\d{4}-\d{1,2}-\d{1,2}/; 14027 const TIME_12H = /(\d|1[012])(:\d+){0,2} *(AM|PM)/; 14028 const TIME_24H = /\d{1,2}(:\d{1,2}){1,2}/; 14029 const DATE = { 14030 className: "literal", 14031 variants: [ 14032 { 14033 // #YYYY-MM-DD# (ISO-Date) or #M/D/YYYY# (US-Date) 14034 begin: regex.concat(/# */, regex.either(YYYY_MM_DD, MM_DD_YYYY), / *#/) 14035 }, 14036 { 14037 // #H:mm[:ss]# (24h Time) 14038 begin: regex.concat(/# */, TIME_24H, / *#/) 14039 }, 14040 { 14041 // #h[:mm[:ss]] A# (12h Time) 14042 begin: regex.concat(/# */, TIME_12H, / *#/) 14043 }, 14044 { 14045 // date plus time 14046 begin: regex.concat( 14047 /# */, 14048 regex.either(YYYY_MM_DD, MM_DD_YYYY), 14049 / +/, 14050 regex.either(TIME_12H, TIME_24H), 14051 / *#/ 14052 ) 14053 } 14054 ] 14055 }; 14056 const NUMBER = { 14057 className: "number", 14058 relevance: 0, 14059 variants: [ 14060 { 14061 // Float 14062 begin: /\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ 14063 }, 14064 { 14065 // Integer (base 10) 14066 begin: /\b\d[\d_]*((U?[SIL])|[%&])?/ 14067 }, 14068 { 14069 // Integer (base 16) 14070 begin: /&H[\dA-F_]+((U?[SIL])|[%&])?/ 14071 }, 14072 { 14073 // Integer (base 8) 14074 begin: /&O[0-7_]+((U?[SIL])|[%&])?/ 14075 }, 14076 { 14077 // Integer (base 2) 14078 begin: /&B[01_]+((U?[SIL])|[%&])?/ 14079 } 14080 ] 14081 }; 14082 const LABEL = { 14083 className: "label", 14084 begin: /^\w+:/ 14085 }; 14086 const DOC_COMMENT = hljs.COMMENT(/'''/, /$/, { contains: [ 14087 { 14088 className: "doctag", 14089 begin: /<\/?/, 14090 end: />/ 14091 } 14092 ] }); 14093 const COMMENT = hljs.COMMENT(null, /$/, { variants: [ 14094 { begin: /'/ }, 14095 { 14096 // TODO: Use multi-class for leading spaces 14097 begin: /([\t ]|^)REM(?=\s)/ 14098 } 14099 ] }); 14100 const DIRECTIVES = { 14101 className: "meta", 14102 // TODO: Use multi-class for indentation once available 14103 begin: /[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, 14104 end: /$/, 14105 keywords: { keyword: "const disable else elseif enable end externalsource if region then" }, 14106 contains: [COMMENT] 14107 }; 14108 return { 14109 name: "Visual Basic .NET", 14110 aliases: ["vb"], 14111 case_insensitive: true, 14112 classNameAliases: { label: "symbol" }, 14113 keywords: { 14114 keyword: "addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", 14115 built_in: ( 14116 // Operators https://docs.microsoft.com/dotnet/visual-basic/language-reference/operators 14117 "addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort" 14118 ), 14119 type: ( 14120 // Data types https://docs.microsoft.com/dotnet/visual-basic/language-reference/data-types 14121 "boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort" 14122 ), 14123 literal: "true false nothing" 14124 }, 14125 illegal: "//|\\{|\\}|endif|gosub|variant|wend|^\\$ ", 14126 contains: [ 14127 CHARACTER, 14128 STRING, 14129 DATE, 14130 NUMBER, 14131 LABEL, 14132 DOC_COMMENT, 14133 COMMENT, 14134 DIRECTIVES 14135 ] 14136 }; 14137 } 14138 module.exports = vbnet; 14139 } 14140}); 14141
vendor: 3,381 bytes, lines 14142-14267
14142// node_modules/highlight.js/lib/languages/wasm.js 14143var require_wasm = __commonJS({ 14144 "node_modules/highlight.js/lib/languages/wasm.js"(exports, module) { 14145 function wasm(hljs) { 14146 hljs.regex; 14147 const BLOCK_COMMENT = hljs.COMMENT(/\(;/, /;\)/); 14148 BLOCK_COMMENT.contains.push("self"); 14149 const LINE_COMMENT = hljs.COMMENT(/;;/, /$/); 14150 const KWS = [ 14151 "anyfunc", 14152 "block", 14153 "br", 14154 "br_if", 14155 "br_table", 14156 "call", 14157 "call_indirect", 14158 "data", 14159 "drop", 14160 "elem", 14161 "else", 14162 "end", 14163 "export", 14164 "func", 14165 "global.get", 14166 "global.set", 14167 "local.get", 14168 "local.set", 14169 "local.tee", 14170 "get_global", 14171 "get_local", 14172 "global", 14173 "if", 14174 "import", 14175 "local", 14176 "loop", 14177 "memory", 14178 "memory.grow", 14179 "memory.size", 14180 "module", 14181 "mut", 14182 "nop", 14183 "offset", 14184 "param", 14185 "result", 14186 "return", 14187 "select", 14188 "set_global", 14189 "set_local", 14190 "start", 14191 "table", 14192 "tee_local", 14193 "then", 14194 "type", 14195 "unreachable" 14196 ]; 14197 const FUNCTION_REFERENCE = { 14198 begin: [ 14199 /(?:func|call|call_indirect)/, 14200 /\s+/, 14201 /\$[^\s)]+/ 14202 ], 14203 className: { 14204 1: "keyword", 14205 3: "title.function" 14206 } 14207 }; 14208 const ARGUMENT = { 14209 className: "variable", 14210 begin: /\$[\w_]+/ 14211 }; 14212 const PARENS = { 14213 match: /(\((?!;)|\))+/, 14214 className: "punctuation", 14215 relevance: 0 14216 }; 14217 const NUMBER = { 14218 className: "number", 14219 relevance: 0, 14220 // borrowed from Prism, TODO: split out into variants 14221 match: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/ 14222 }; 14223 const TYPE = { 14224 // look-ahead prevents us from gobbling up opcodes 14225 match: /(i32|i64|f32|f64)(?!\.)/, 14226 className: "type" 14227 }; 14228 const MATH_OPERATIONS = { 14229 className: "keyword", 14230 // borrowed from Prism, TODO: split out into variants 14231 match: /\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/ 14232 }; 14233 const OFFSET_ALIGN = { 14234 match: [ 14235 /(?:offset|align)/, 14236 /\s*/, 14237 /=/ 14238 ], 14239 className: { 14240 1: "keyword", 14241 3: "operator" 14242 } 14243 }; 14244 return { 14245 name: "WebAssembly", 14246 keywords: { 14247 $pattern: /[\w.]+/, 14248 keyword: KWS 14249 }, 14250 contains: [ 14251 LINE_COMMENT, 14252 BLOCK_COMMENT, 14253 OFFSET_ALIGN, 14254 ARGUMENT, 14255 PARENS, 14256 FUNCTION_REFERENCE, 14257 hljs.QUOTE_STRING_MODE, 14258 TYPE, 14259 MATH_OPERATIONS, 14260 NUMBER 14261 ] 14262 }; 14263 } 14264 module.exports = wasm; 14265 } 14266}); 14267
vendor: 2,183 bytes, lines 14268-14313
14268// node_modules/highlight.js/lib/common.js 14269var require_common = __commonJS({ 14270 "node_modules/highlight.js/lib/common.js"(exports, module) { 14271 var hljs = require_core(); 14272 hljs.registerLanguage("xml", require_xml()); 14273 hljs.registerLanguage("bash", require_bash()); 14274 hljs.registerLanguage("c", require_c()); 14275 hljs.registerLanguage("cpp", require_cpp()); 14276 hljs.registerLanguage("csharp", require_csharp()); 14277 hljs.registerLanguage("css", require_css()); 14278 hljs.registerLanguage("markdown", require_markdown()); 14279 hljs.registerLanguage("diff", require_diff()); 14280 hljs.registerLanguage("ruby", require_ruby()); 14281 hljs.registerLanguage("go", require_go()); 14282 hljs.registerLanguage("graphql", require_graphql()); 14283 hljs.registerLanguage("ini", require_ini()); 14284 hljs.registerLanguage("java", require_java()); 14285 hljs.registerLanguage("javascript", require_javascript()); 14286 hljs.registerLanguage("json", require_json()); 14287 hljs.registerLanguage("kotlin", require_kotlin()); 14288 hljs.registerLanguage("less", require_less()); 14289 hljs.registerLanguage("lua", require_lua()); 14290 hljs.registerLanguage("makefile", require_makefile()); 14291 hljs.registerLanguage("perl", require_perl()); 14292 hljs.registerLanguage("objectivec", require_objectivec()); 14293 hljs.registerLanguage("php", require_php()); 14294 hljs.registerLanguage("php-template", require_php_template()); 14295 hljs.registerLanguage("plaintext", require_plaintext()); 14296 hljs.registerLanguage("python", require_python()); 14297 hljs.registerLanguage("python-repl", require_python_repl()); 14298 hljs.registerLanguage("r", require_r()); 14299 hljs.registerLanguage("rust", require_rust()); 14300 hljs.registerLanguage("scss", require_scss()); 14301 hljs.registerLanguage("shell", require_shell()); 14302 hljs.registerLanguage("sql", require_sql()); 14303 hljs.registerLanguage("swift", require_swift()); 14304 hljs.registerLanguage("yaml", require_yaml()); 14305 hljs.registerLanguage("typescript", require_typescript()); 14306 hljs.registerLanguage("vbnet", require_vbnet()); 14307 hljs.registerLanguage("wasm", require_wasm()); 14308 hljs.HighlightJS = hljs; 14309 hljs.default = hljs; 14310 module.exports = hljs; 14311 } 14312}); 14313
vendor: 137 bytes, lines 14314-14317
14314// node_modules/highlight.js/es/common.js 14315var import_common = __toESM(require_common(), 1); 14316var common_default = import_common.default; 14317
14318// app/assets/javascripts/highlight.js 14319var highlight_default = common_default; 14320export { 14321 highlight_default as default 14322}; 14323//# sourceMappingURL=/assets/highlight-26dd3773.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.