1/*! 2 * SyntaxHighlighter 3 * https://github.com/syntaxhighlighter/syntaxhighlighter 4 * 5 * SyntaxHighlighter is donationware. If you are using it, please donate. 6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 * 8 * @version 9 * 4.0.1 (Thu, 01 Mar 2018 15:43:03 GMT) 10 * 11 * @copyright 12 * Copyright (C) 2004-2016 Alex Gorbatchev. 13 * 14 * @license 15 * Dual licensed under the MIT and GPL licenses. 16 */ 17/******/ (function(modules) { // webpackBootstrap 18/******/ // The module cache 19/******/ var installedModules = {}; 20/******/ 21/******/ // The require function 22/******/ function __webpack_require__(moduleId) { 23/******/ 24/******/ // Check if module is in cache 25/******/ if(installedModules[moduleId]) 26/******/ return installedModules[moduleId].exports; 27/******/ 28/******/ // Create a new module (and put it into the cache) 29/******/ var module = installedModules[moduleId] = { 30/******/ exports: {}, 31/******/ id: moduleId, 32/******/ loaded: false 33/******/ }; 34/******/ 35/******/ // Execute the module function 36/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 37/******/ 38/******/ // Flag the module as loaded 39/******/ module.loaded = true; 40/******/ 41/******/ // Return the exports of the module 42/******/ return module.exports; 43/******/ } 44/******/ 45/******/ 46/******/ // expose the modules object (__webpack_modules__) 47/******/ __webpack_require__.m = modules; 48/******/ 49/******/ // expose the module cache 50/******/ __webpack_require__.c = installedModules; 51/******/ 52/******/ // __webpack_public_path__ 53/******/ __webpack_require__.p = ""; 54/******/ 55/******/ // Load entry module and return exports 56/******/ return __webpack_require__(0); 57/******/ }) 58/************************************************************************/ 59/******/ ([ 60/* 0 */ 61/***/ (function(module, exports, __webpack_require__) { 62 63 'use strict'; 64 65 Object.defineProperty(exports, "__esModule", { 66 value: true 67 }); 68 69 var _core = __webpack_require__(1); 70 71 Object.keys(_core).forEach(function (key) { 72 if (key === "default" || key === "__esModule") return; 73 Object.defineProperty(exports, key, { 74 enumerable: true, 75 get: function get() { 76 return _core[key]; 77 } 78 }); 79 }); 80 81 var _domready = __webpack_require__(60); 82 83 var _domready2 = _interopRequireDefault(_domready); 84 85 var _core2 = _interopRequireDefault(_core); 86 87 var _dasherize = __webpack_require__(61); 88 89 var dasherize = _interopRequireWildcard(_dasherize); 90 91 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } 92 93 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 94 95 // configured through the `--compat` parameter. 96 if (true) { 97 __webpack_require__(62); 98 } 99 100 (0, _domready2.default)(function () { 101 return _core2.default.highlight(dasherize.object(window.syntaxhighlighterConfig || {})); 102 }); 103 104/***/ }), 105/* 1 */ 106/***/ (function(module, exports, __webpack_require__) { 107 108 'use strict'; 109 110 Object.defineProperty(exports, "__esModule", { 111 value: true 112 }); 113 var optsParser = __webpack_require__(2), 114 match = __webpack_require__(5), 115 Renderer = __webpack_require__(9).default, 116 utils = __webpack_require__(10), 117 transformers = __webpack_require__(11), 118 dom = __webpack_require__(17), 119 config = __webpack_require__(18), 120 defaults = __webpack_require__(19), 121 HtmlScript = __webpack_require__(20); 122 123 var sh = { 124 Match: match.Match, 125 Highlighter: __webpack_require__(22), 126 127 config: __webpack_require__(18), 128 regexLib: __webpack_require__(3).commonRegExp, 129 130 /** Internal 'global' variables. */ 131 vars: { 132 discoveredBrushes: null, 133 highlighters: {} 134 }, 135 136 /** This object is populated by user included external brush files. */ 137 brushes: {}, 138 139 /** 140 * Finds all elements on the page which should be processes by SyntaxHighlighter. 141 * 142 * @param {Object} globalParams Optional parameters which override element's 143 * parameters. Only used if element is specified. 144 * 145 * @param {Object} element Optional element to highlight. If none is 146 * provided, all elements in the current document 147 * are returned which qualify. 148 * 149 * @return {Array} Returns list of <code>{ target: DOMElement, params: Object }</code> objects. 150 */ 151 findElements: function findElements(globalParams, element) { 152 var elements = element ? [element] : utils.toArray(document.getElementsByTagName(sh.config.tagName)), 153 conf = sh.config, 154 result = []; 155 156 // support for <SCRIPT TYPE="syntaxhighlighter" /> feature 157 elements = elements.concat(dom.getSyntaxHighlighterScriptTags()); 158 159 if (elements.length === 0) return result; 160 161 for (var i = 0, l = elements.length; i < l; i++) { 162 var item = { 163 target: elements[i], 164 // local params take precedence over globals 165 params: optsParser.defaults(optsParser.parse(elements[i].className), globalParams) 166 }; 167 168 if (item.params['brush'] == null) continue; 169 170 result.push(item); 171 } 172 173 return result; 174 }, 175 176 /** 177 * Shorthand to highlight all elements on the page that are marked as 178 * SyntaxHighlighter source code. 179 * 180 * @param {Object} globalParams Optional parameters which override element's 181 * parameters. Only used if element is specified. 182 * 183 * @param {Object} element Optional element to highlight. If none is 184 * provided, all elements in the current document 185 * are highlighted. 186 */ 187 highlight: function highlight(globalParams, element) { 188 var elements = sh.findElements(globalParams, element), 189 propertyName = 'innerHTML', 190 brush = null, 191 renderer, 192 conf = sh.config; 193 194 if (elements.length === 0) return; 195 196 for (var i = 0, l = elements.length; i < l; i++) { 197 var element = elements[i], 198 target = element.target, 199 params = element.params, 200 brushName = params.brush, 201 brush, 202 matches, 203 code; 204 205 if (brushName == null) continue; 206 207 brush = findBrush(brushName); 208 209 if (!brush) continue; 210 211 // local params take precedence over defaults 212 params = optsParser.defaults(params || {}, defaults); 213 params = optsParser.defaults(params, config); 214 215 // Instantiate a brush 216 if (params['html-script'] == true || defaults['html-script'] == true) { 217 brush = new HtmlScript(findBrush('xml'), brush); 218 brushName = 'htmlscript'; 219 } else { 220 brush = new brush(); 221 } 222 223 code = target[propertyName]; 224 225 // remove CDATA from <SCRIPT/> tags if it's present 226 if (conf.useScriptTags) code = stripCData(code); 227 228 // Inject title if the attribute is present 229 if ((target.title || '') != '') params.title = target.title; 230 231 params['brush'] = brushName; 232 233 code = transformers(code, params); 234 matches = match.applyRegexList(code, brush.regexList, params); 235 renderer = new Renderer(code, matches, params); 236 237 element = dom.create('div'); 238 element.innerHTML = renderer.getHtml(); 239 240 // id = utils.guid(); 241 // element.id = highlighters.id(id); 242 // highlighters.set(id, element); 243 244 if (params.quickCode) dom.attachEvent(dom.findElement(element, '.code'), 'dblclick', dom.quickCodeHandler); 245 246 // carry over ID 247 if ((target.id || '') != '') element.id = target.id; 248 249 target.parentNode.replaceChild(element, target); 250 } 251 } 252 }; // end of sh 253 254 /** 255 * Displays an alert. 256 * @param {String} str String to display. 257 */ 258 function alert(str) { 259 window.alert('SyntaxHighlighter\n\n' + str); 260 }; 261 262 /** 263 * Finds a brush by its alias. 264 * 265 * @param {String} alias Brush alias. 266 * @param {Boolean} showAlert Suppresses the alert if false. 267 * @return {Brush} Returns bursh constructor if found, null otherwise. 268 */ 269 function findBrush(alias, showAlert) { 270 var brushes = sh.vars.discoveredBrushes, 271 result = null; 272 273 if (brushes == null) { 274 brushes = {}; 275 276 // Find all brushes 277 for (var brushName in sh.brushes) { 278 var brush = sh.brushes[brushName], 279 aliases = brush.aliases; 280 281 if (aliases == null) { 282 continue; 283 } 284 285 brush.className = brush.className || brush.aliases[0]; 286 brush.brushName = brush.className || brushName.toLowerCase(); 287 288 for (var i = 0, l = aliases.length; i < l; i++) { 289 brushes[aliases[i]] = brushName; 290 } 291 } 292 293 sh.vars.discoveredBrushes = brushes; 294 } 295 296 result = sh.brushes[brushes[alias]]; 297 298 if (result == null && showAlert) alert(sh.config.strings.noBrush + alias); 299 300 return result; 301 }; 302 303 /** 304 * Strips <![CDATA[]]> from <SCRIPT /> content because it should be used 305 * there in most cases for XHTML compliance. 306 * @param {String} original Input code. 307 * @return {String} Returns code without leading <![CDATA[]]> tags. 308 */ 309 function stripCData(original) { 310 var left = '<![CDATA[', 311 right = ']]>', 312 313 // for some reason IE inserts some leading blanks here 314 copy = utils.trim(original), 315 changed = false, 316 leftLength = left.length, 317 rightLength = right.length; 318 319 if (copy.indexOf(left) == 0) { 320 copy = copy.substring(leftLength); 321 changed = true; 322 } 323 324 var copyLength = copy.length; 325 326 if (copy.indexOf(right) == copyLength - rightLength) { 327 copy = copy.substring(0, copyLength - rightLength); 328 changed = true; 329 } 330 331 return changed ? copy : original; 332 }; 333 334 var brushCounter = 0; 335 336 exports.default = sh; 337 var registerBrush = exports.registerBrush = function registerBrush(brush) { 338 return sh.brushes['brush' + brushCounter++] = brush.default || brush; 339 }; 340 var clearRegisteredBrushes = exports.clearRegisteredBrushes = function clearRegisteredBrushes() { 341 sh.brushes = {}; 342 brushCounter = 0; 343 }; 344 345 /* an EJS hook for `gulp build --brushes` command 346 * */ 347 348 registerBrush(__webpack_require__(23)); 349 350 registerBrush(__webpack_require__(24)); 351 352 registerBrush(__webpack_require__(22)); 353 354 registerBrush(__webpack_require__(25)); 355 356 registerBrush(__webpack_require__(26)); 357 358 registerBrush(__webpack_require__(27)); 359 360 registerBrush(__webpack_require__(28)); 361 362 registerBrush(__webpack_require__(29)); 363 364 registerBrush(__webpack_require__(30)); 365 366 registerBrush(__webpack_require__(31)); 367 368 registerBrush(__webpack_require__(32)); 369 370 registerBrush(__webpack_require__(33)); 371 372 registerBrush(__webpack_require__(34)); 373 374 registerBrush(__webpack_require__(35)); 375 376 registerBrush(__webpack_require__(36)); 377 378 registerBrush(__webpack_require__(37)); 379 380 registerBrush(__webpack_require__(38)); 381 382 registerBrush(__webpack_require__(39)); 383 384 registerBrush(__webpack_require__(40)); 385 386 registerBrush(__webpack_require__(41)); 387 388 registerBrush(__webpack_require__(42)); 389 390 registerBrush(__webpack_require__(43)); 391 392 registerBrush(__webpack_require__(44)); 393 394 registerBrush(__webpack_require__(45)); 395 396 registerBrush(__webpack_require__(46)); 397 398 registerBrush(__webpack_require__(47)); 399 400 registerBrush(__webpack_require__(48)); 401 402 registerBrush(__webpack_require__(49)); 403 404 registerBrush(__webpack_require__(50)); 405 406 registerBrush(__webpack_require__(51)); 407 408 registerBrush(__webpack_require__(52)); 409 410 registerBrush(__webpack_require__(53)); 411 412 registerBrush(__webpack_require__(54)); 413 414 registerBrush(__webpack_require__(55)); 415 416 registerBrush(__webpack_require__(56)); 417 418 registerBrush(__webpack_require__(57)); 419 420 registerBrush(__webpack_require__(58)); 421 422 registerBrush(__webpack_require__(59)); 423 424 /* 425 426 */ 427 428/***/ }), 429/* 2 */ 430/***/ (function(module, exports, __webpack_require__) { 431 432 'use strict'; 433 434 var XRegExp = __webpack_require__(3).XRegExp; 435 436 var BOOLEANS = { 'true': true, 'false': false }; 437 438 function camelize(key) { 439 return key.replace(/-(\w+)/g, function (match, word) { 440 return word.charAt(0).toUpperCase() + word.substr(1); 441 }); 442 } 443 444 function process(value) { 445 var result = BOOLEANS[value]; 446 return result == null ? value : result; 447 } 448 449 module.exports = { 450 defaults: function defaults(target, source) { 451 for (var key in source || {}) { 452 if (!target.hasOwnProperty(key)) target[key] = target[camelize(key)] = source[key]; 453 }return target; 454 }, 455 456 parse: function parse(str) { 457 var match, 458 key, 459 result = {}, 460 arrayRegex = XRegExp("^\\[(?<values>(.*?))\\]$"), 461 pos = 0, 462 regex = XRegExp("(?<name>[\\w-]+)" + "\\s*:\\s*" + "(?<value>" + "[\\w%#-]+|" + // word 463 "\\[.*?\\]|" + // [] array 464 '".*?"|' + // "" string 465 "'.*?'" + // '' string 466 ")\\s*;?", "g"); 467 468 while ((match = XRegExp.exec(str, regex, pos)) != null) { 469 var value = match.value.replace(/^['"]|['"]$/g, '') // strip quotes from end of strings 470 ; 471 472 // try to parse array value 473 if (value != null && arrayRegex.test(value)) { 474 var m = XRegExp.exec(value, arrayRegex); 475 value = m.values.length > 0 ? m.values.split(/\s*,\s*/) : []; 476 } 477 478 value = process(value); 479 result[match.name] = result[camelize(match.name)] = value; 480 pos = match.index + match[0].length; 481 } 482 483 return result; 484 } 485 }; 486 487/***/ }), 488/* 3 */ 489/***/ (function(module, exports, __webpack_require__) { 490 491 'use strict'; 492 493 Object.defineProperty(exports, "__esModule", { 494 value: true 495 }); 496 exports.commonRegExp = exports.XRegExp = undefined; 497 498 var _xregexp = __webpack_require__(4); 499 500 var _xregexp2 = _interopRequireDefault(_xregexp); 501 502 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 503 504 exports.XRegExp = _xregexp2.default; 505 var commonRegExp = exports.commonRegExp = { 506 multiLineCComments: (0, _xregexp2.default)('/\\*.*?\\*/', 'gs'), 507 singleLineCComments: /\/\/.*$/gm, 508 singleLinePerlComments: /#.*$/gm, 509 doubleQuotedString: /"([^\\"\n]|\\.)*"/g, 510 singleQuotedString: /'([^\\'\n]|\\.)*'/g, 511 multiLineDoubleQuotedString: (0, _xregexp2.default)('"([^\\\\"]|\\\\.)*"', 'gs'), 512 multiLineSingleQuotedString: (0, _xregexp2.default)("'([^\\\\']|\\\\.)*'", 'gs'), 513 xmlComments: (0, _xregexp2.default)('(<|<)!--.*?--(>|>)', 'gs'), 514 url: /\w+:\/\/[\w-.\/?%&=:@;#]*/g, 515 phpScriptTags: { left: /(<|<)\?(?:=|php)?/g, right: /\?(>|>)/g, 'eof': true }, 516 aspScriptTags: { left: /(<|<)%=?/g, right: /%(>|>)/g }, 517 scriptScriptTags: { left: /(<|<)\s*script.*?(>|>)/gi, right: /(<|<)\/\s*script\s*(>|>)/gi } 518 }; 519 520/***/ }), 521/* 4 */ 522/***/ (function(module, exports) { 523 524 /*! 525 * XRegExp 3.1.0-dev 526 * <xregexp.com> 527 * Steven Levithan (c) 2007-2015 MIT License 528 */ 529 530 /** 531 * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and 532 * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to 533 * make your client-side grepping simpler and more powerful, while freeing you from related 534 * cross-browser inconsistencies. 535 */ 536 537 'use strict'; 538 539 /* ============================== 540 * Private variables 541 * ============================== */ 542 543 // Property name used for extended regex instance data 544 545 var REGEX_DATA = 'xregexp'; 546 // Optional features that can be installed and uninstalled 547 var features = { 548 astral: false, 549 natives: false 550 }; 551 // Native methods to use and restore ('native' is an ES3 reserved keyword) 552 var nativ = { 553 exec: RegExp.prototype.exec, 554 test: RegExp.prototype.test, 555 match: String.prototype.match, 556 replace: String.prototype.replace, 557 split: String.prototype.split 558 }; 559 // Storage for fixed/extended native methods 560 var fixed = {}; 561 // Storage for regexes cached by `XRegExp.cache` 562 var regexCache = {}; 563 // Storage for pattern details cached by the `XRegExp` constructor 564 var patternCache = {}; 565 // Storage for regex syntax tokens added internally or by `XRegExp.addToken` 566 var tokens = []; 567 // Token scopes 568 var defaultScope = 'default'; 569 var classScope = 'class'; 570 // Regexes that match native regex syntax, including octals 571 var nativeTokens = { 572 // Any native multicharacter token in default scope, or any single character 573 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, 574 // Any native multicharacter token in character class scope, or any single character 575 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/ 576 }; 577 // Any backreference or dollar-prefixed character in replacement strings 578 var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g; 579 // Check for correct `exec` handling of nonparticipating capturing groups 580 var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; 581 // Check for ES6 `u` flag support 582 var hasNativeU = function () { 583 var isSupported = true; 584 try { 585 new RegExp('', 'u'); 586 } catch (exception) { 587 isSupported = false; 588 } 589 return isSupported; 590 }(); 591 // Check for ES6 `y` flag support 592 var hasNativeY = function () { 593 var isSupported = true; 594 try { 595 new RegExp('', 'y'); 596 } catch (exception) { 597 isSupported = false; 598 } 599 return isSupported; 600 }(); 601 // Check for ES6 `flags` prop support 602 var hasFlagsProp = /a/.flags !== undefined; 603 // Tracker for known flags, including addon flags 604 var registeredFlags = { 605 g: true, 606 i: true, 607 m: true, 608 u: hasNativeU, 609 y: hasNativeY 610 }; 611 // Shortcut to `Object.prototype.toString` 612 var toString = {}.toString; 613 614 /* ============================== 615 * Private functions 616 * ============================== */ 617 618 /** 619 * Attaches extended data and `XRegExp.prototype` properties to a regex object. 620 * 621 * @private 622 * @param {RegExp} regex Regex to augment. 623 * @param {Array} captureNames Array with capture names, or `null`. 624 * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A. 625 * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A. 626 * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal 627 * operations, and never exposed to users. For internal-only regexes, we can improve perf by 628 * skipping some operations like attaching `XRegExp.prototype` properties. 629 * @returns {RegExp} Augmented regex. 630 */ 631 function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { 632 var p; 633 634 regex[REGEX_DATA] = { 635 captureNames: captureNames 636 }; 637 638 if (isInternalOnly) { 639 return regex; 640 } 641 642 // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value 643 if (regex.__proto__) { 644 regex.__proto__ = XRegExp.prototype; 645 } else { 646 for (p in XRegExp.prototype) { 647 // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since 648 // this is performance sensitive, and enumerable `Object.prototype` or 649 // `RegExp.prototype` extensions exist on `regex.prototype` anyway 650 regex[p] = XRegExp.prototype[p]; 651 } 652 } 653 654 regex[REGEX_DATA].source = xSource; 655 // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order 656 regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags; 657 658 return regex; 659 } 660 661 /** 662 * Removes any duplicate characters from the provided string. 663 * 664 * @private 665 * @param {String} str String to remove duplicate characters from. 666 * @returns {String} String with any duplicate characters removed. 667 */ 668 function clipDuplicates(str) { 669 return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); 670 } 671 672 /** 673 * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype` 674 * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing 675 * flags g and y while copying the regex. 676 * 677 * @private 678 * @param {RegExp} regex Regex to copy. 679 * @param {Object} [options] Options object with optional properties: 680 * <li>`addG` {Boolean} Add flag g while copying the regex. 681 * <li>`addY` {Boolean} Add flag y while copying the regex. 682 * <li>`removeG` {Boolean} Remove flag g while copying the regex. 683 * <li>`removeY` {Boolean} Remove flag y while copying the regex. 684 * <li>`isInternalOnly` {Boolean} Whether the copied regex will be used only for internal 685 * operations, and never exposed to users. For internal-only regexes, we can improve perf by 686 * skipping some operations like attaching `XRegExp.prototype` properties. 687 * @returns {RegExp} Copy of the provided regex, possibly with modified flags. 688 */ 689 function copyRegex(regex, options) { 690 if (!XRegExp.isRegExp(regex)) { 691 throw new TypeError('Type RegExp expected'); 692 } 693 694 var xData = regex[REGEX_DATA] || {}, 695 flags = getNativeFlags(regex), 696 flagsToAdd = '', 697 flagsToRemove = '', 698 xregexpSource = null, 699 xregexpFlags = null; 700 701 options = options || {}; 702 703 if (options.removeG) { 704 flagsToRemove += 'g'; 705 } 706 if (options.removeY) { 707 flagsToRemove += 'y'; 708 } 709 if (flagsToRemove) { 710 flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), ''); 711 } 712 713 if (options.addG) { 714 flagsToAdd += 'g'; 715 } 716 if (options.addY) { 717 flagsToAdd += 'y'; 718 } 719 if (flagsToAdd) { 720 flags = clipDuplicates(flags + flagsToAdd); 721 } 722 723 if (!options.isInternalOnly) { 724 if (xData.source !== undefined) { 725 xregexpSource = xData.source; 726 } 727 // null or undefined; don't want to add to `flags` if the previous value was null, since 728 // that indicates we're not tracking original precompilation flags 729 if (xData.flags != null) { 730 // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are 731 // never removed for non-internal regexes, so don't need to handle it 732 xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags; 733 } 734 } 735 736 // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to 737 // avoid searching for special tokens. That would be wrong for regexes constructed by 738 // `RegExp`, and unnecessary for regexes constructed by `XRegExp` because the regex has 739 // already undergone the translation to native regex syntax 740 regex = augment(new RegExp(regex.source, flags), hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, xregexpSource, xregexpFlags, options.isInternalOnly); 741 742 return regex; 743 } 744 745 /** 746 * Converts hexadecimal to decimal. 747 * 748 * @private 749 * @param {String} hex 750 * @returns {Number} 751 */ 752 function dec(hex) { 753 return parseInt(hex, 16); 754 } 755 756 /** 757 * Returns native `RegExp` flags used by a regex object. 758 * 759 * @private 760 * @param {RegExp} regex Regex to check. 761 * @returns {String} Native flags in use. 762 */ 763 function getNativeFlags(regex) { 764 return hasFlagsProp ? regex.flags : 765 // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or 766 // concatenation with an empty string) allows this to continue working predictably when 767 // `XRegExp.proptotype.toString` is overriden 768 nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1]; 769 } 770 771 /** 772 * Determines whether a regex has extended instance data used to track capture names. 773 * 774 * @private 775 * @param {RegExp} regex Regex to check. 776 * @returns {Boolean} Whether the regex uses named capture. 777 */ 778 function hasNamedCapture(regex) { 779 return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); 780 } 781 782 /** 783 * Converts decimal to hexadecimal. 784 * 785 * @private 786 * @param {Number|String} dec 787 * @returns {String} 788 */ 789 function hex(dec) { 790 return parseInt(dec, 10).toString(16); 791 } 792 793 /** 794 * Returns the first index at which a given value can be found in an array. 795 * 796 * @private 797 * @param {Array} array Array to search. 798 * @param {*} value Value to locate in the array. 799 * @returns {Number} Zero-based index at which the item is found, or -1. 800 */ 801 function indexOf(array, value) { 802 var len = array.length, 803 i; 804 805 for (i = 0; i < len; ++i) { 806 if (array[i] === value) { 807 return i; 808 } 809 } 810 811 return -1; 812 } 813 814 /** 815 * Determines whether a value is of the specified type, by resolving its internal [[Class]]. 816 * 817 * @private 818 * @param {*} value Object to check. 819 * @param {String} type Type to check for, in TitleCase. 820 * @returns {Boolean} Whether the object matches the type. 821 */ 822 function isType(value, type) { 823 return toString.call(value) === '[object ' + type + ']'; 824 } 825 826 /** 827 * Checks whether the next nonignorable token after the specified position is a quantifier. 828 * 829 * @private 830 * @param {String} pattern Pattern to search within. 831 * @param {Number} pos Index in `pattern` to search at. 832 * @param {String} flags Flags used by the pattern. 833 * @returns {Boolean} Whether the next token is a quantifier. 834 */ 835 function isQuantifierNext(pattern, pos, flags) { 836 return nativ.test.call(flags.indexOf('x') > -1 ? 837 // Ignore any leading whitespace, line comments, and inline comments 838 /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : 839 // Ignore any leading inline comments 840 /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, pattern.slice(pos)); 841 } 842 843 /** 844 * Pads the provided string with as many leading zeros as needed to get to length 4. Used to produce 845 * fixed-length hexadecimal values. 846 * 847 * @private 848 * @param {String} str 849 * @returns {String} 850 */ 851 function pad4(str) { 852 while (str.length < 4) { 853 str = '0' + str; 854 } 855 return str; 856 } 857 858 /** 859 * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads 860 * the flag preparation logic from the `XRegExp` constructor. 861 * 862 * @private 863 * @param {String} pattern Regex pattern, possibly with a leading mode modifier. 864 * @param {String} flags Any combination of flags. 865 * @returns {Object} Object with properties `pattern` and `flags`. 866 */ 867 function prepareFlags(pattern, flags) { 868 var i; 869 870 // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags 871 if (clipDuplicates(flags) !== flags) { 872 throw new SyntaxError('Invalid duplicate regex flag ' + flags); 873 } 874 875 // Strip and apply a leading mode modifier with any combination of flags except g or y 876 pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function ($0, $1) { 877 if (nativ.test.call(/[gy]/, $1)) { 878 throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0); 879 } 880 // Allow duplicate flags within the mode modifier 881 flags = clipDuplicates(flags + $1); 882 return ''; 883 }); 884 885 // Throw on unknown native or nonnative flags 886 for (i = 0; i < flags.length; ++i) { 887 if (!registeredFlags[flags.charAt(i)]) { 888 throw new SyntaxError('Unknown regex flag ' + flags.charAt(i)); 889 } 890 } 891 892 return { 893 pattern: pattern, 894 flags: flags 895 }; 896 } 897 898 /** 899 * Prepares an options object from the given value. 900 * 901 * @private 902 * @param {String|Object} value Value to convert to an options object. 903 * @returns {Object} Options object. 904 */ 905 function prepareOptions(value) { 906 var options = {}; 907 908 if (isType(value, 'String')) { 909 XRegExp.forEach(value, /[^\s,]+/, function (match) { 910 options[match] = true; 911 }); 912 913 return options; 914 } 915 916 return value; 917 } 918 919 /** 920 * Registers a flag so it doesn't throw an 'unknown flag' error. 921 * 922 * @private 923 * @param {String} flag Single-character flag to register. 924 */ 925 function registerFlag(flag) { 926 if (!/^[\w$]$/.test(flag)) { 927 throw new Error('Flag must be a single character A-Za-z0-9_$'); 928 } 929 930 registeredFlags[flag] = true; 931 } 932 933 /** 934 * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified 935 * position, until a match is found. 936 * 937 * @private 938 * @param {String} pattern Original pattern from which an XRegExp object is being built. 939 * @param {String} flags Flags being used to construct the regex. 940 * @param {Number} pos Position to search for tokens within `pattern`. 941 * @param {Number} scope Regex scope to apply: 'default' or 'class'. 942 * @param {Object} context Context object to use for token handler functions. 943 * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`. 944 */ 945 function runTokens(pattern, flags, pos, scope, context) { 946 var i = tokens.length, 947 leadChar = pattern.charAt(pos), 948 result = null, 949 match, 950 t; 951 952 // Run in reverse insertion order 953 while (i--) { 954 t = tokens[i]; 955 if (t.leadChar && t.leadChar !== leadChar || t.scope !== scope && t.scope !== 'all' || t.flag && flags.indexOf(t.flag) === -1) { 956 continue; 957 } 958 959 match = XRegExp.exec(pattern, t.regex, pos, 'sticky'); 960 if (match) { 961 result = { 962 matchLength: match[0].length, 963 output: t.handler.call(context, match, scope, flags), 964 reparse: t.reparse 965 }; 966 // Finished with token tests 967 break; 968 } 969 } 970 971 return result; 972 } 973 974 /** 975 * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to 976 * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if 977 * the Unicode Base addon is not available, since flag A is registered by that addon. 978 * 979 * @private 980 * @param {Boolean} on `true` to enable; `false` to disable. 981 */ 982 function setAstral(on) { 983 features.astral = on; 984 } 985 986 /** 987 * Enables or disables native method overrides. 988 * 989 * @private 990 * @param {Boolean} on `true` to enable; `false` to disable. 991 */ 992 function setNatives(on) { 993 RegExp.prototype.exec = (on ? fixed : nativ).exec; 994 RegExp.prototype.test = (on ? fixed : nativ).test; 995 String.prototype.match = (on ? fixed : nativ).match; 996 String.prototype.replace = (on ? fixed : nativ).replace; 997 String.prototype.split = (on ? fixed : nativ).split; 998 999 features.natives = on; 1000 } 1001 1002 /** 1003 * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow 1004 * the ES5 abstract operation `ToObject`. 1005 * 1006 * @private 1007 * @param {*} value Object to check and return. 1008 * @returns {*} The provided object. 1009 */ 1010 function toObject(value) { 1011 // null or undefined 1012 if (value == null) { 1013 throw new TypeError('Cannot convert null or undefined to object'); 1014 } 1015 1016 return value; 1017 } 1018 1019 /* ============================== 1020 * Constructor 1021 * ============================== */ 1022 1023 /** 1024 * Creates an extended regular expression object for matching text with a pattern. Differs from a 1025 * native regular expression in that additional syntax and flags are supported. The returned object 1026 * is in fact a native `RegExp` and works with all native methods. 1027 * 1028 * @class XRegExp 1029 * @constructor 1030 * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy. 1031 * @param {String} [flags] Any combination of flags. 1032 * Native flags: 1033 * <li>`g` - global 1034 * <li>`i` - ignore case 1035 * <li>`m` - multiline anchors 1036 * <li>`u` - unicode (ES6) 1037 * <li>`y` - sticky (Firefox 3+, ES6) 1038 * Additional XRegExp flags: 1039 * <li>`n` - explicit capture 1040 * <li>`s` - dot matches all (aka singleline) 1041 * <li>`x` - free-spacing and line comments (aka extended) 1042 * <li>`A` - astral (requires the Unicode Base addon) 1043 * Flags cannot be provided when constructing one `RegExp` from another. 1044 * @returns {RegExp} Extended regular expression object. 1045 * @example 1046 * 1047 * // With named capture and flag x 1048 * XRegExp('(?<year> [0-9]{4} ) -? # year \n\ 1049 * (?<month> [0-9]{2} ) -? # month \n\ 1050 * (?<day> [0-9]{2} ) # day ', 'x'); 1051 * 1052 * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp) 1053 * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and 1054 * // have fresh `lastIndex` properties (set to zero). 1055 * XRegExp(/regex/); 1056 */ 1057 function XRegExp(pattern, flags) { 1058 var context = { 1059 hasNamedCapture: false, 1060 captureNames: [] 1061 }, 1062 scope = defaultScope, 1063 output = '', 1064 pos = 0, 1065 result, 1066 token, 1067 generated, 1068 appliedPattern, 1069 appliedFlags; 1070 1071 if (XRegExp.isRegExp(pattern)) { 1072 if (flags !== undefined) { 1073 throw new TypeError('Cannot supply flags when copying a RegExp'); 1074 } 1075 return copyRegex(pattern); 1076 } 1077 1078 // Copy the argument behavior of `RegExp` 1079 pattern = pattern === undefined ? '' : String(pattern); 1080 flags = flags === undefined ? '' : String(flags); 1081 1082 if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) { 1083 // This causes an error to be thrown if the Unicode Base addon is not available 1084 flags += 'A'; 1085 } 1086 1087 if (!patternCache[pattern]) { 1088 patternCache[pattern] = {}; 1089 } 1090 1091 if (!patternCache[pattern][flags]) { 1092 // Check for flag-related errors, and strip/apply flags in a leading mode modifier 1093 result = prepareFlags(pattern, flags); 1094 appliedPattern = result.pattern; 1095 appliedFlags = result.flags; 1096 1097 // Use XRegExp's tokens to translate the pattern to a native regex pattern. 1098 // `appliedPattern.length` may change on each iteration if tokens use `reparse` 1099 while (pos < appliedPattern.length) { 1100 do { 1101 // Check for custom tokens at the current position 1102 result = runTokens(appliedPattern, appliedFlags, pos, scope, context); 1103 // If the matched token used the `reparse` option, splice its output into the 1104 // pattern before running tokens again at the same position 1105 if (result && result.reparse) { 1106 appliedPattern = appliedPattern.slice(0, pos) + result.output + appliedPattern.slice(pos + result.matchLength); 1107 } 1108 } while (result && result.reparse); 1109 1110 if (result) { 1111 output += result.output; 1112 pos += result.matchLength || 1; 1113 } else { 1114 // Get the native token at the current position 1115 token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0]; 1116 output += token; 1117 pos += token.length; 1118 if (token === '[' && scope === defaultScope) { 1119 scope = classScope; 1120 } else if (token === ']' && scope === classScope) { 1121 scope = defaultScope; 1122 } 1123 } 1124 } 1125 1126 patternCache[pattern][flags] = { 1127 // Cleanup token cruft: repeated `(?:)(?:)` and leading/trailing `(?:)` 1128 pattern: nativ.replace.call(output, /\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??(?=\(\?:\))|^\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??|\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??$/g, ''), 1129 // Strip all but native flags 1130 flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''), 1131 // `context.captureNames` has an item for each capturing group, even if unnamed 1132 captures: context.hasNamedCapture ? context.captureNames : null 1133 }; 1134 } 1135 1136 generated = patternCache[pattern][flags]; 1137 return augment(new RegExp(generated.pattern, generated.flags), generated.captures, pattern, flags); 1138 }; 1139 1140 // Add `RegExp.prototype` to the prototype chain 1141 XRegExp.prototype = new RegExp(); 1142 1143 /* ============================== 1144 * Public properties 1145 * ============================== */ 1146 1147 /** 1148 * The XRegExp version number as a string containing three dot-separated parts. For example, 1149 * '2.0.0-beta-3'. 1150 * 1151 * @static 1152 * @memberOf XRegExp 1153 * @type String 1154 */ 1155 XRegExp.version = '3.1.0-dev'; 1156 1157 /* ============================== 1158 * Public methods 1159 * ============================== */ 1160 1161 /** 1162 * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to 1163 * create XRegExp addons. If more than one token can match the same string, the last added wins. 1164 * 1165 * @memberOf XRegExp 1166 * @param {RegExp} regex Regex object that matches the new token. 1167 * @param {Function} handler Function that returns a new pattern string (using native regex syntax) 1168 * to replace the matched token within all future XRegExp regexes. Has access to persistent 1169 * properties of the regex being built, through `this`. Invoked with three arguments: 1170 * <li>The match array, with named backreference properties. 1171 * <li>The regex scope where the match was found: 'default' or 'class'. 1172 * <li>The flags used by the regex, including any flags in a leading mode modifier. 1173 * The handler function becomes part of the XRegExp construction process, so be careful not to 1174 * construct XRegExps within the function or you will trigger infinite recursion. 1175 * @param {Object} [options] Options object with optional properties: 1176 * <li>`scope` {String} Scope where the token applies: 'default', 'class', or 'all'. 1177 * <li>`flag` {String} Single-character flag that triggers the token. This also registers the 1178 * flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used. 1179 * <li>`optionalFlags` {String} Any custom flags checked for within the token `handler` that are 1180 * not required to trigger the token. This registers the flags, to prevent XRegExp from 1181 * throwing an 'unknown flag' error when any of the flags are used. 1182 * <li>`reparse` {Boolean} Whether the `handler` function's output should not be treated as 1183 * final, and instead be reparseable by other tokens (including the current token). Allows 1184 * token chaining or deferring. 1185 * <li>`leadChar` {String} Single character that occurs at the beginning of any successful match 1186 * of the token (not always applicable). This doesn't change the behavior of the token unless 1187 * you provide an erroneous value. However, providing it can increase the token's performance 1188 * since the token can be skipped at any positions where this character doesn't appear. 1189 * @example 1190 * 1191 * // Basic usage: Add \a for the ALERT control code 1192 * XRegExp.addToken( 1193 * /\\a/, 1194 * function() {return '\\x07';}, 1195 * {scope: 'all'} 1196 * ); 1197 * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true 1198 * 1199 * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers. 1200 * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of 1201 * // character classes only) 1202 * XRegExp.addToken( 1203 * /([?*+]|{\d+(?:,\d*)?})(\??)/, 1204 * function(match) {return match[1] + (match[2] ? '' : '?');}, 1205 * {flag: 'U'} 1206 * ); 1207 * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a' 1208 * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa' 1209 */ 1210 XRegExp.addToken = function (regex, handler, options) { 1211 options = options || {}; 1212 var optionalFlags = options.optionalFlags, 1213 i; 1214 1215 if (options.flag) { 1216 registerFlag(options.flag); 1217 } 1218 1219 if (optionalFlags) { 1220 optionalFlags = nativ.split.call(optionalFlags, ''); 1221 for (i = 0; i < optionalFlags.length; ++i) { 1222 registerFlag(optionalFlags[i]); 1223 } 1224 } 1225 1226 // Add to the private list of syntax tokens 1227 tokens.push({ 1228 regex: copyRegex(regex, { 1229 addG: true, 1230 addY: hasNativeY, 1231 isInternalOnly: true 1232 }), 1233 handler: handler, 1234 scope: options.scope || defaultScope, 1235 flag: options.flag, 1236 reparse: options.reparse, 1237 leadChar: options.leadChar 1238 }); 1239 1240 // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and 1241 // flags might now produce different results 1242 XRegExp.cache.flush('patterns'); 1243 }; 1244 1245 /** 1246 * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with 1247 * the same pattern and flag combination, the cached copy of the regex is returned. 1248 * 1249 * @memberOf XRegExp 1250 * @param {String} pattern Regex pattern string. 1251 * @param {String} [flags] Any combination of XRegExp flags. 1252 * @returns {RegExp} Cached XRegExp object. 1253 * @example 1254 * 1255 * while (match = XRegExp.cache('.', 'gs').exec(str)) { 1256 * // The regex is compiled once only 1257 * } 1258 */ 1259 XRegExp.cache = function (pattern, flags) { 1260 if (!regexCache[pattern]) { 1261 regexCache[pattern] = {}; 1262 } 1263 return regexCache[pattern][flags] || (regexCache[pattern][flags] = XRegExp(pattern, flags)); 1264 }; 1265 1266 // Intentionally undocumented 1267 XRegExp.cache.flush = function (cacheName) { 1268 if (cacheName === 'patterns') { 1269 // Flush the pattern cache used by the `XRegExp` constructor 1270 patternCache = {}; 1271 } else { 1272 // Flush the regex cache populated by `XRegExp.cache` 1273 regexCache = {}; 1274 } 1275 }; 1276 1277 /** 1278 * Escapes any regular expression metacharacters, for use when matching literal strings. The result 1279 * can safely be used at any point within a regex that uses any flags. 1280 * 1281 * @memberOf XRegExp 1282 * @param {String} str String to escape. 1283 * @returns {String} String with regex metacharacters escaped. 1284 * @example 1285 * 1286 * XRegExp.escape('Escaped? <.>'); 1287 * // -> 'Escaped\?\ <\.>' 1288 */ 1289 XRegExp.escape = function (str) { 1290 return nativ.replace.call(toObject(str), /[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); 1291 }; 1292 1293 /** 1294 * Executes a regex search in a specified string. Returns a match array or `null`. If the provided 1295 * regex uses named capture, named backreference properties are included on the match array. 1296 * Optional `pos` and `sticky` arguments specify the search start position, and whether the match 1297 * must start at the specified position only. The `lastIndex` property of the provided regex is not 1298 * used, but is updated for compatibility. Also fixes browser bugs compared to the native 1299 * `RegExp.prototype.exec` and can be used reliably cross-browser. 1300 * 1301 * @memberOf XRegExp 1302 * @param {String} str String to search. 1303 * @param {RegExp} regex Regex to search with. 1304 * @param {Number} [pos=0] Zero-based index at which to start the search. 1305 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position 1306 * only. The string `'sticky'` is accepted as an alternative to `true`. 1307 * @returns {Array} Match array with named backreference properties, or `null`. 1308 * @example 1309 * 1310 * // Basic use, with named backreference 1311 * var match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})')); 1312 * match.hex; // -> '2620' 1313 * 1314 * // With pos and sticky, in a loop 1315 * var pos = 2, result = [], match; 1316 * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) { 1317 * result.push(match[1]); 1318 * pos = match.index + match[0].length; 1319 * } 1320 * // result -> ['2', '3', '4'] 1321 */ 1322 XRegExp.exec = function (str, regex, pos, sticky) { 1323 var cacheKey = 'g', 1324 addY = false, 1325 match, 1326 r2; 1327 1328 addY = hasNativeY && !!(sticky || regex.sticky && sticky !== false); 1329 if (addY) { 1330 cacheKey += 'y'; 1331 } 1332 1333 regex[REGEX_DATA] = regex[REGEX_DATA] || {}; 1334 1335 // Shares cached copies with `XRegExp.match`/`replace` 1336 r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, { 1337 addG: true, 1338 addY: addY, 1339 removeY: sticky === false, 1340 isInternalOnly: true 1341 })); 1342 1343 r2.lastIndex = pos = pos || 0; 1344 1345 // Fixed `exec` required for `lastIndex` fix, named backreferences, etc. 1346 match = fixed.exec.call(r2, str); 1347 1348 if (sticky && match && match.index !== pos) { 1349 match = null; 1350 } 1351 1352 if (regex.global) { 1353 regex.lastIndex = match ? r2.lastIndex : 0; 1354 } 1355 1356 return match; 1357 }; 1358 1359 /** 1360 * Executes a provided function once per regex match. Searches always start at the beginning of the 1361 * string and continue until the end, regardless of the state of the regex's `global` property and 1362 * initial `lastIndex`. 1363 * 1364 * @memberOf XRegExp 1365 * @param {String} str String to search. 1366 * @param {RegExp} regex Regex to search with. 1367 * @param {Function} callback Function to execute for each match. Invoked with four arguments: 1368 * <li>The match array, with named backreference properties. 1369 * <li>The zero-based match index. 1370 * <li>The string being traversed. 1371 * <li>The regex object being used to traverse the string. 1372 * @example 1373 * 1374 * // Extracts every other digit from a string 1375 * var evens = []; 1376 * XRegExp.forEach('1a2345', /\d/, function(match, i) { 1377 * if (i % 2) evens.push(+match[0]); 1378 * }); 1379 * // evens -> [2, 4] 1380 */ 1381 XRegExp.forEach = function (str, regex, callback) { 1382 var pos = 0, 1383 i = -1, 1384 match; 1385 1386 while (match = XRegExp.exec(str, regex, pos)) { 1387 // Because `regex` is provided to `callback`, the function could use the deprecated/ 1388 // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since 1389 // `XRegExp.exec` doesn't use `lastIndex` to set the search position, this can't lead 1390 // to an infinite loop, at least. Actually, because of the way `XRegExp.exec` caches 1391 // globalized versions of regexes, mutating the regex will not have any effect on the 1392 // iteration or matched strings, which is a nice side effect that brings extra safety 1393 callback(match, ++i, str, regex); 1394 1395 pos = match.index + (match[0].length || 1); 1396 } 1397 }; 1398 1399 /** 1400 * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with 1401 * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native 1402 * regexes are not recompiled using XRegExp syntax. 1403 * 1404 * @memberOf XRegExp 1405 * @param {RegExp} regex Regex to globalize. 1406 * @returns {RegExp} Copy of the provided regex with flag `g` added. 1407 * @example 1408 * 1409 * var globalCopy = XRegExp.globalize(/regex/); 1410 * globalCopy.global; // -> true 1411 */ 1412 XRegExp.globalize = function (regex) { 1413 return copyRegex(regex, { addG: true }); 1414 }; 1415 1416 /** 1417 * Installs optional features according to the specified options. Can be undone using 1418 * {@link #XRegExp.uninstall}. 1419 * 1420 * @memberOf XRegExp 1421 * @param {Object|String} options Options object or string. 1422 * @example 1423 * 1424 * // With an options object 1425 * XRegExp.install({ 1426 * // Enables support for astral code points in Unicode addons (implicitly sets flag A) 1427 * astral: true, 1428 * 1429 * // Overrides native regex methods with fixed/extended versions that support named 1430 * // backreferences and fix numerous cross-browser bugs 1431 * natives: true 1432 * }); 1433 * 1434 * // With an options string 1435 * XRegExp.install('astral natives'); 1436 */ 1437 XRegExp.install = function (options) { 1438 options = prepareOptions(options); 1439 1440 if (!features.astral && options.astral) { 1441 setAstral(true); 1442 } 1443 1444 if (!features.natives && options.natives) { 1445 setNatives(true); 1446 } 1447 }; 1448 1449 /** 1450 * Checks whether an individual optional feature is installed. 1451 * 1452 * @memberOf XRegExp 1453 * @param {String} feature Name of the feature to check. One of: 1454 * <li>`natives` 1455 * <li>`astral` 1456 * @returns {Boolean} Whether the feature is installed. 1457 * @example 1458 * 1459 * XRegExp.isInstalled('natives'); 1460 */ 1461 XRegExp.isInstalled = function (feature) { 1462 return !!features[feature]; 1463 }; 1464 1465 /** 1466 * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes 1467 * created in another frame, when `instanceof` and `constructor` checks would fail. 1468 * 1469 * @memberOf XRegExp 1470 * @param {*} value Object to check. 1471 * @returns {Boolean} Whether the object is a `RegExp` object. 1472 * @example 1473 * 1474 * XRegExp.isRegExp('string'); // -> false 1475 * XRegExp.isRegExp(/regex/i); // -> true 1476 * XRegExp.isRegExp(RegExp('^', 'm')); // -> true 1477 * XRegExp.isRegExp(XRegExp('(?s).')); // -> true 1478 */ 1479 XRegExp.isRegExp = function (value) { 1480 return toString.call(value) === '[object RegExp]'; 1481 //return isType(value, 'RegExp'); 1482 }; 1483 1484 /** 1485 * Returns the first matched string, or in global mode, an array containing all matched strings. 1486 * This is essentially a more convenient re-implementation of `String.prototype.match` that gives 1487 * the result types you actually want (string instead of `exec`-style array in match-first mode, 1488 * and an empty array instead of `null` when no matches are found in match-all mode). It also lets 1489 * you override flag g and ignore `lastIndex`, and fixes browser bugs. 1490 * 1491 * @memberOf XRegExp 1492 * @param {String} str String to search. 1493 * @param {RegExp} regex Regex to search with. 1494 * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to 1495 * return an array of all matched strings. If not explicitly specified and `regex` uses flag g, 1496 * `scope` is 'all'. 1497 * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all 1498 * mode: Array of all matched strings, or an empty array. 1499 * @example 1500 * 1501 * // Match first 1502 * XRegExp.match('abc', /\w/); // -> 'a' 1503 * XRegExp.match('abc', /\w/g, 'one'); // -> 'a' 1504 * XRegExp.match('abc', /x/g, 'one'); // -> null 1505 * 1506 * // Match all 1507 * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c'] 1508 * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c'] 1509 * XRegExp.match('abc', /x/, 'all'); // -> [] 1510 */ 1511 XRegExp.match = function (str, regex, scope) { 1512 var global = regex.global && scope !== 'one' || scope === 'all', 1513 cacheKey = (global ? 'g' : '') + (regex.sticky ? 'y' : '') || 'noGY', 1514 result, 1515 r2; 1516 1517 regex[REGEX_DATA] = regex[REGEX_DATA] || {}; 1518 1519 // Shares cached copies with `XRegExp.exec`/`replace` 1520 r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, { 1521 addG: !!global, 1522 addY: !!regex.sticky, 1523 removeG: scope === 'one', 1524 isInternalOnly: true 1525 })); 1526 1527 result = nativ.match.call(toObject(str), r2); 1528 1529 if (regex.global) { 1530 regex.lastIndex = scope === 'one' && result ? 1531 // Can't use `r2.lastIndex` since `r2` is nonglobal in this case 1532 result.index + result[0].length : 0; 1533 } 1534 1535 return global ? result || [] : result && result[0]; 1536 }; 1537 1538 /** 1539 * Retrieves the matches from searching a string using a chain of regexes that successively search 1540 * within previous matches. The provided `chain` array can contain regexes and or objects with 1541 * `regex` and `backref` properties. When a backreference is specified, the named or numbered 1542 * backreference is passed forward to the next regex or returned. 1543 * 1544 * @memberOf XRegExp 1545 * @param {String} str String to search. 1546 * @param {Array} chain Regexes that each search for matches within preceding results. 1547 * @returns {Array} Matches by the last regex in the chain, or an empty array. 1548 * @example 1549 * 1550 * // Basic usage; matches numbers within <b> tags 1551 * XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [ 1552 * XRegExp('(?is)<b>.*?</b>'), 1553 * /\d+/ 1554 * ]); 1555 * // -> ['2', '4', '56'] 1556 * 1557 * // Passing forward and returning specific backreferences 1558 * html = '<a href="http://xregexp.com/api/">XRegExp</a>\ 1559 * <a href="http://www.google.com/">Google</a>'; 1560 * XRegExp.matchChain(html, [ 1561 * {regex: /<a href="([^"]+)">/i, backref: 1}, 1562 * {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'} 1563 * ]); 1564 * // -> ['xregexp.com', 'www.google.com'] 1565 */ 1566 XRegExp.matchChain = function (str, chain) { 1567 return function recurseChain(values, level) { 1568 var item = chain[level].regex ? chain[level] : { regex: chain[level] }, 1569 matches = [], 1570 addMatch = function addMatch(match) { 1571 if (item.backref) { 1572 /* Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold 1573 * the `undefined`s for backreferences to nonparticipating capturing 1574 * groups. In such cases, a `hasOwnProperty` or `in` check on its own would 1575 * inappropriately throw the exception, so also check if the backreference 1576 * is a number that is within the bounds of the array. 1577 */ 1578 if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) { 1579 throw new ReferenceError('Backreference to undefined group: ' + item.backref); 1580 } 1581 1582 matches.push(match[item.backref] || ''); 1583 } else { 1584 matches.push(match[0]); 1585 } 1586 }, 1587 i; 1588 1589 for (i = 0; i < values.length; ++i) { 1590 XRegExp.forEach(values[i], item.regex, addMatch); 1591 } 1592 1593 return level === chain.length - 1 || !matches.length ? matches : recurseChain(matches, level + 1); 1594 }([str], 0); 1595 }; 1596 1597 /** 1598 * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string 1599 * or regex, and the replacement can be a string or a function to be called for each match. To 1600 * perform a global search and replace, use the optional `scope` argument or include flag g if using 1601 * a regex. Replacement strings can use `${n}` for named and numbered backreferences. Replacement 1602 * functions can use named backreferences via `arguments[0].name`. Also fixes browser bugs compared 1603 * to the native `String.prototype.replace` and can be used reliably cross-browser. 1604 * 1605 * @memberOf XRegExp 1606 * @param {String} str String to search. 1607 * @param {RegExp|String} search Search pattern to be replaced. 1608 * @param {String|Function} replacement Replacement string or a function invoked to create it. 1609 * Replacement strings can include special replacement syntax: 1610 * <li>$$ - Inserts a literal $ character. 1611 * <li>$&, $0 - Inserts the matched substring. 1612 * <li>$` - Inserts the string that precedes the matched substring (left context). 1613 * <li>$' - Inserts the string that follows the matched substring (right context). 1614 * <li>$n, $nn - Where n/nn are digits referencing an existent capturing group, inserts 1615 * backreference n/nn. 1616 * <li>${n} - Where n is a name or any number of digits that reference an existent capturing 1617 * group, inserts backreference n. 1618 * Replacement functions are invoked with three or more arguments: 1619 * <li>The matched substring (corresponds to $& above). Named backreferences are accessible as 1620 * properties of this first argument. 1621 * <li>0..n arguments, one for each backreference (corresponding to $1, $2, etc. above). 1622 * <li>The zero-based index of the match within the total search string. 1623 * <li>The total string being searched. 1624 * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not 1625 * explicitly specified and using a regex with flag g, `scope` is 'all'. 1626 * @returns {String} New string with one or all matches replaced. 1627 * @example 1628 * 1629 * // Regex search, using named backreferences in replacement string 1630 * var name = XRegExp('(?<first>\\w+) (?<last>\\w+)'); 1631 * XRegExp.replace('John Smith', name, '${last}, ${first}'); 1632 * // -> 'Smith, John' 1633 * 1634 * // Regex search, using named backreferences in replacement function 1635 * XRegExp.replace('John Smith', name, function(match) { 1636 * return match.last + ', ' + match.first; 1637 * }); 1638 * // -> 'Smith, John' 1639 * 1640 * // String search, with replace-all 1641 * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all'); 1642 * // -> 'XRegExp builds XRegExps' 1643 */ 1644 XRegExp.replace = function (str, search, replacement, scope) { 1645 var isRegex = XRegExp.isRegExp(search), 1646 global = search.global && scope !== 'one' || scope === 'all', 1647 cacheKey = (global ? 'g' : '') + (search.sticky ? 'y' : '') || 'noGY', 1648 s2 = search, 1649 result; 1650 1651 if (isRegex) { 1652 search[REGEX_DATA] = search[REGEX_DATA] || {}; 1653 1654 // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s 1655 // `lastIndex` isn't updated *during* replacement iterations 1656 s2 = search[REGEX_DATA][cacheKey] || (search[REGEX_DATA][cacheKey] = copyRegex(search, { 1657 addG: !!global, 1658 addY: !!search.sticky, 1659 removeG: scope === 'one', 1660 isInternalOnly: true 1661 })); 1662 } else if (global) { 1663 s2 = new RegExp(XRegExp.escape(String(search)), 'g'); 1664 } 1665 1666 // Fixed `replace` required for named backreferences, etc. 1667 result = fixed.replace.call(toObject(str), s2, replacement); 1668 1669 if (isRegex && search.global) { 1670 // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) 1671 search.lastIndex = 0; 1672 } 1673 1674 return result; 1675 }; 1676 1677 /** 1678 * Performs batch processing of string replacements. Used like {@link #XRegExp.replace}, but 1679 * accepts an array of replacement details. Later replacements operate on the output of earlier 1680 * replacements. Replacement details are accepted as an array with a regex or string to search for, 1681 * the replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp 1682 * replacement text syntax, which supports named backreference properties via `${name}`. 1683 * 1684 * @memberOf XRegExp 1685 * @param {String} str String to search. 1686 * @param {Array} replacements Array of replacement detail arrays. 1687 * @returns {String} New string with all replacements. 1688 * @example 1689 * 1690 * str = XRegExp.replaceEach(str, [ 1691 * [XRegExp('(?<name>a)'), 'z${name}'], 1692 * [/b/gi, 'y'], 1693 * [/c/g, 'x', 'one'], // scope 'one' overrides /g 1694 * [/d/, 'w', 'all'], // scope 'all' overrides lack of /g 1695 * ['e', 'v', 'all'], // scope 'all' allows replace-all for strings 1696 * [/f/g, function($0) { 1697 * return $0.toUpperCase(); 1698 * }] 1699 * ]); 1700 */ 1701 XRegExp.replaceEach = function (str, replacements) { 1702 var i, r; 1703 1704 for (i = 0; i < replacements.length; ++i) { 1705 r = replacements[i]; 1706 str = XRegExp.replace(str, r[0], r[1], r[2]); 1707 } 1708 1709 return str; 1710 }; 1711 1712 /** 1713 * Splits a string into an array of strings using a regex or string separator. Matches of the 1714 * separator are not included in the result array. However, if `separator` is a regex that contains 1715 * capturing groups, backreferences are spliced into the result each time `separator` is matched. 1716 * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably 1717 * cross-browser. 1718 * 1719 * @memberOf XRegExp 1720 * @param {String} str String to split. 1721 * @param {RegExp|String} separator Regex or string to use for separating the string. 1722 * @param {Number} [limit] Maximum number of items to include in the result array. 1723 * @returns {Array} Array of substrings. 1724 * @example 1725 * 1726 * // Basic use 1727 * XRegExp.split('a b c', ' '); 1728 * // -> ['a', 'b', 'c'] 1729 * 1730 * // With limit 1731 * XRegExp.split('a b c', ' ', 2); 1732 * // -> ['a', 'b'] 1733 * 1734 * // Backreferences in result array 1735 * XRegExp.split('..word1..', /([a-z]+)(\d+)/i); 1736 * // -> ['..', 'word', '1', '..'] 1737 */ 1738 XRegExp.split = function (str, separator, limit) { 1739 return fixed.split.call(toObject(str), separator, limit); 1740 }; 1741 1742 /** 1743 * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and 1744 * `sticky` arguments specify the search start position, and whether the match must start at the 1745 * specified position only. The `lastIndex` property of the provided regex is not used, but is 1746 * updated for compatibility. Also fixes browser bugs compared to the native 1747 * `RegExp.prototype.test` and can be used reliably cross-browser. 1748 * 1749 * @memberOf XRegExp 1750 * @param {String} str String to search. 1751 * @param {RegExp} regex Regex to search with. 1752 * @param {Number} [pos=0] Zero-based index at which to start the search. 1753 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position 1754 * only. The string `'sticky'` is accepted as an alternative to `true`. 1755 * @returns {Boolean} Whether the regex matched the provided value. 1756 * @example 1757 * 1758 * // Basic use 1759 * XRegExp.test('abc', /c/); // -> true 1760 * 1761 * // With pos and sticky 1762 * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false 1763 * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true 1764 */ 1765 XRegExp.test = function (str, regex, pos, sticky) { 1766 // Do this the easy way :-) 1767 return !!XRegExp.exec(str, regex, pos, sticky); 1768 }; 1769 1770 /** 1771 * Uninstalls optional features according to the specified options. All optional features start out 1772 * uninstalled, so this is used to undo the actions of {@link #XRegExp.install}. 1773 * 1774 * @memberOf XRegExp 1775 * @param {Object|String} options Options object or string. 1776 * @example 1777 * 1778 * // With an options object 1779 * XRegExp.uninstall({ 1780 * // Disables support for astral code points in Unicode addons 1781 * astral: true, 1782 * 1783 * // Restores native regex methods 1784 * natives: true 1785 * }); 1786 * 1787 * // With an options string 1788 * XRegExp.uninstall('astral natives'); 1789 */ 1790 XRegExp.uninstall = function (options) { 1791 options = prepareOptions(options); 1792 1793 if (features.astral && options.astral) { 1794 setAstral(false); 1795 } 1796 1797 if (features.natives && options.natives) { 1798 setNatives(false); 1799 } 1800 }; 1801 1802 /** 1803 * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as 1804 * regex objects or strings. Metacharacters are escaped in patterns provided as strings. 1805 * Backreferences in provided regex objects are automatically renumbered to work correctly within 1806 * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the 1807 * `flags` argument. 1808 * 1809 * @memberOf XRegExp 1810 * @param {Array} patterns Regexes and strings to combine. 1811 * @param {String} [flags] Any combination of XRegExp flags. 1812 * @returns {RegExp} Union of the provided regexes and strings. 1813 * @example 1814 * 1815 * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i'); 1816 * // -> /a\+b\*c|(dogs)\1|(cats)\2/i 1817 */ 1818 XRegExp.union = function (patterns, flags) { 1819 var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, 1820 output = [], 1821 numCaptures = 0, 1822 numPriorCaptures, 1823 captureNames, 1824 pattern, 1825 rewrite = function rewrite(match, paren, backref) { 1826 var name = captureNames[numCaptures - numPriorCaptures]; 1827 1828 // Capturing group 1829 if (paren) { 1830 ++numCaptures; 1831 // If the current capture has a name, preserve the name 1832 if (name) { 1833 return '(?<' + name + '>'; 1834 } 1835 // Backreference 1836 } else if (backref) { 1837 // Rewrite the backreference 1838 return '\\' + (+backref + numPriorCaptures); 1839 } 1840 1841 return match; 1842 }, 1843 i; 1844 1845 if (!(isType(patterns, 'Array') && patterns.length)) { 1846 throw new TypeError('Must provide a nonempty array of patterns to merge'); 1847 } 1848 1849 for (i = 0; i < patterns.length; ++i) { 1850 pattern = patterns[i]; 1851 1852 if (XRegExp.isRegExp(pattern)) { 1853 numPriorCaptures = numCaptures; 1854 captureNames = pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames || []; 1855 1856 // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns 1857 // are independently valid; helps keep this simple. Named captures are put back 1858 output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite)); 1859 } else { 1860 output.push(XRegExp.escape(pattern)); 1861 } 1862 } 1863 1864 return XRegExp(output.join('|'), flags); 1865 }; 1866 1867 /* ============================== 1868 * Fixed/extended native methods 1869 * ============================== */ 1870 1871 /** 1872 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser 1873 * bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to 1874 * override the native method. Use via `XRegExp.exec` without overriding natives. 1875 * 1876 * @private 1877 * @param {String} str String to search. 1878 * @returns {Array} Match array with named backreference properties, or `null`. 1879 */ 1880 fixed.exec = function (str) { 1881 var origLastIndex = this.lastIndex, 1882 match = nativ.exec.apply(this, arguments), 1883 name, 1884 r2, 1885 i; 1886 1887 if (match) { 1888 // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating 1889 // capturing groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of 1890 // older IEs. IE 9 in standards mode follows the spec 1891 if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) { 1892 r2 = copyRegex(this, { 1893 removeG: true, 1894 isInternalOnly: true 1895 }); 1896 // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed 1897 // matching due to characters outside the match 1898 nativ.replace.call(String(str).slice(match.index), r2, function () { 1899 var len = arguments.length, 1900 i; 1901 // Skip index 0 and the last 2 1902 for (i = 1; i < len - 2; ++i) { 1903 if (arguments[i] === undefined) { 1904 match[i] = undefined; 1905 } 1906 } 1907 }); 1908 } 1909 1910 // Attach named capture properties 1911 if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) { 1912 // Skip index 0 1913 for (i = 1; i < match.length; ++i) { 1914 name = this[REGEX_DATA].captureNames[i - 1]; 1915 if (name) { 1916 match[name] = match[i]; 1917 } 1918 } 1919 } 1920 1921 // Fix browsers that increment `lastIndex` after zero-length matches 1922 if (this.global && !match[0].length && this.lastIndex > match.index) { 1923 this.lastIndex = match.index; 1924 } 1925 } 1926 1927 if (!this.global) { 1928 // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) 1929 this.lastIndex = origLastIndex; 1930 } 1931 1932 return match; 1933 }; 1934 1935 /** 1936 * Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')` 1937 * uses this to override the native method. 1938 * 1939 * @private 1940 * @param {String} str String to search. 1941 * @returns {Boolean} Whether the regex matched the provided value. 1942 */ 1943 fixed.test = function (str) { 1944 // Do this the easy way :-) 1945 return !!fixed.exec.call(this, str); 1946 }; 1947 1948 /** 1949 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser 1950 * bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to 1951 * override the native method. 1952 * 1953 * @private 1954 * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`. 1955 * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g, 1956 * the result of calling `regex.exec(this)`. 1957 */ 1958 fixed.match = function (regex) { 1959 var result; 1960 1961 if (!XRegExp.isRegExp(regex)) { 1962 // Use the native `RegExp` rather than `XRegExp` 1963 regex = new RegExp(regex); 1964 } else if (regex.global) { 1965 result = nativ.match.apply(this, arguments); 1966 // Fixes IE bug 1967 regex.lastIndex = 0; 1968 1969 return result; 1970 } 1971 1972 return fixed.exec.call(regex, toObject(this)); 1973 }; 1974 1975 /** 1976 * Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and 1977 * provides named backreferences to replacement functions as `arguments[0].name`. Also fixes browser 1978 * bugs in replacement text syntax when performing a replacement using a nonregex search value, and 1979 * the value of a replacement regex's `lastIndex` property during replacement iterations and upon 1980 * completion. Calling `XRegExp.install('natives')` uses this to override the native method. Note 1981 * that this doesn't support SpiderMonkey's proprietary third (`flags`) argument. Use via 1982 * `XRegExp.replace` without overriding natives. 1983 * 1984 * @private 1985 * @param {RegExp|String} search Search pattern to be replaced. 1986 * @param {String|Function} replacement Replacement string or a function invoked to create it. 1987 * @returns {String} New string with one or all matches replaced. 1988 */ 1989 fixed.replace = function (search, replacement) { 1990 var isRegex = XRegExp.isRegExp(search), 1991 origLastIndex, 1992 captureNames, 1993 result; 1994 1995 if (isRegex) { 1996 if (search[REGEX_DATA]) { 1997 captureNames = search[REGEX_DATA].captureNames; 1998 } 1999 // Only needed if `search` is nonglobal 2000 origLastIndex = search.lastIndex; 2001 } else { 2002 search += ''; // Type-convert 2003 } 2004 2005 // Don't use `typeof`; some older browsers return 'function' for regex objects 2006 if (isType(replacement, 'Function')) { 2007 // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement 2008 // functions isn't type-converted to a string 2009 result = nativ.replace.call(String(this), search, function () { 2010 var args = arguments, 2011 i; 2012 if (captureNames) { 2013 // Change the `arguments[0]` string primitive to a `String` object that can 2014 // store properties. This really does need to use `String` as a constructor 2015 args[0] = new String(args[0]); 2016 // Store named backreferences on the first argument 2017 for (i = 0; i < captureNames.length; ++i) { 2018 if (captureNames[i]) { 2019 args[0][captureNames[i]] = args[i + 1]; 2020 } 2021 } 2022 } 2023 // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, 2024 // Safari bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1) 2025 if (isRegex && search.global) { 2026 search.lastIndex = args[args.length - 2] + args[0].length; 2027 } 2028 // ES6 specs the context for replacement functions as `undefined` 2029 return replacement.apply(undefined, args); 2030 }); 2031 } else { 2032 // Ensure that the last value of `args` will be a string when given nonstring `this`, 2033 // while still throwing on null or undefined context 2034 result = nativ.replace.call(this == null ? this : String(this), search, function () { 2035 // Keep this function's `arguments` available through closure 2036 var args = arguments; 2037 return nativ.replace.call(String(replacement), replacementToken, function ($0, $1, $2) { 2038 var n; 2039 // Named or numbered backreference with curly braces 2040 if ($1) { 2041 // XRegExp behavior for `${n}`: 2042 // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for 2043 // for the entire match. Any number of leading zeros may be used. 2044 // 2. Backreference to named capture `n`, if it exists and is not an 2045 // integer overridden by numbered capture. In practice, this does not 2046 // overlap with numbered capture since XRegExp does not allow named 2047 // capture to use a bare integer as the name. 2048 // 3. If the name or number does not refer to an existing capturing group, 2049 // it's an error. 2050 n = +$1; // Type-convert; drop leading zeros 2051 if (n <= args.length - 3) { 2052 return args[n] || ''; 2053 } 2054 // Groups with the same name is an error, else would need `lastIndexOf` 2055 n = captureNames ? indexOf(captureNames, $1) : -1; 2056 if (n < 0) { 2057 throw new SyntaxError('Backreference to undefined group ' + $0); 2058 } 2059 return args[n + 1] || ''; 2060 } 2061 // Else, special variable or numbered backreference without curly braces 2062 if ($2 === '$') { 2063 // $$ 2064 return '$'; 2065 } 2066 if ($2 === '&' || +$2 === 0) { 2067 // $&, $0 (not followed by 1-9), $00 2068 return args[0]; 2069 } 2070 if ($2 === '`') { 2071 // $` (left context) 2072 return args[args.length - 1].slice(0, args[args.length - 2]); 2073 } 2074 if ($2 === "'") { 2075 // $' (right context) 2076 return args[args.length - 1].slice(args[args.length - 2] + args[0].length); 2077 } 2078 // Else, numbered backreference without curly braces 2079 $2 = +$2; // Type-convert; drop leading zero 2080 // XRegExp behavior for `$n` and `$nn`: 2081 // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits. 2082 // - `$1` is an error if no capturing groups. 2083 // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead. 2084 // - `$01` is `$1` if at least one capturing group, else it's an error. 2085 // - `$0` (not followed by 1-9) and `$00` are the entire match. 2086 // Native behavior, for comparison: 2087 // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+. 2088 // - `$1` is a literal `$1` if no capturing groups. 2089 // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups. 2090 // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`. 2091 // - `$0` is a literal `$0`. 2092 if (!isNaN($2)) { 2093 if ($2 > args.length - 3) { 2094 throw new SyntaxError('Backreference to undefined group ' + $0); 2095 } 2096 return args[$2] || ''; 2097 } 2098 // `$` followed by an unsupported char is an error, unlike native JS 2099 throw new SyntaxError('Invalid token ' + $0); 2100 }); 2101 }); 2102 } 2103 2104 if (isRegex) { 2105 if (search.global) { 2106 // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) 2107 search.lastIndex = 0; 2108 } else { 2109 // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) 2110 search.lastIndex = origLastIndex; 2111 } 2112 } 2113 2114 return result; 2115 }; 2116 2117 /** 2118 * Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')` 2119 * uses this to override the native method. Use via `XRegExp.split` without overriding natives. 2120 * 2121 * @private 2122 * @param {RegExp|String} separator Regex or string to use for separating the string. 2123 * @param {Number} [limit] Maximum number of items to include in the result array. 2124 * @returns {Array} Array of substrings. 2125 */ 2126 fixed.split = function (separator, limit) { 2127 if (!XRegExp.isRegExp(separator)) { 2128 // Browsers handle nonregex split correctly, so use the faster native method 2129 return nativ.split.apply(this, arguments); 2130 } 2131 2132 var str = String(this), 2133 output = [], 2134 origLastIndex = separator.lastIndex, 2135 lastLastIndex = 0, 2136 lastLength; 2137 2138 // Values for `limit`, per the spec: 2139 // If undefined: pow(2,32) - 1 2140 // If 0, Infinity, or NaN: 0 2141 // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32); 2142 // If negative number: pow(2,32) - floor(abs(limit)) 2143 // If other: Type-convert, then use the above rules 2144 // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, 2145 // unless Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+ 2146 limit = (limit === undefined ? -1 : limit) >>> 0; 2147 2148 XRegExp.forEach(str, separator, function (match) { 2149 // This condition is not the same as `if (match[0].length)` 2150 if (match.index + match[0].length > lastLastIndex) { 2151 output.push(str.slice(lastLastIndex, match.index)); 2152 if (match.length > 1 && match.index < str.length) { 2153 Array.prototype.push.apply(output, match.slice(1)); 2154 } 2155 lastLength = match[0].length; 2156 lastLastIndex = match.index + lastLength; 2157 } 2158 }); 2159 2160 if (lastLastIndex === str.length) { 2161 if (!nativ.test.call(separator, '') || lastLength) { 2162 output.push(''); 2163 } 2164 } else { 2165 output.push(str.slice(lastLastIndex)); 2166 } 2167 2168 separator.lastIndex = origLastIndex; 2169 return output.length > limit ? output.slice(0, limit) : output; 2170 }; 2171 2172 /* ============================== 2173 * Built-in syntax/flag tokens 2174 * ============================== */ 2175 2176 /* 2177 * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be 2178 * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser 2179 * consistency and to reserve their syntax, but lets them be superseded by addons. 2180 */ 2181 XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function (match, scope) { 2182 // \B is allowed in default scope only 2183 if (match[1] === 'B' && scope === defaultScope) { 2184 return match[0]; 2185 } 2186 throw new SyntaxError('Invalid escape ' + match[0]); 2187 }, { 2188 scope: 'all', 2189 leadChar: '\\' 2190 }); 2191 2192 /* 2193 * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit 2194 * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag 2195 * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to 2196 * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior 2197 * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or 2198 * if you use the same in a character class. 2199 */ 2200 XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/, function (match, scope, flags) { 2201 var code = dec(match[1]); 2202 if (code > 0x10FFFF) { 2203 throw new SyntaxError('Invalid Unicode code point ' + match[0]); 2204 } 2205 if (code <= 0xFFFF) { 2206 // Converting to \uNNNN avoids needing to escape the literal character and keep it 2207 // separate from preceding tokens 2208 return '\\u' + pad4(hex(code)); 2209 } 2210 // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling 2211 if (hasNativeU && flags.indexOf('u') > -1) { 2212 return match[0]; 2213 } 2214 throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u'); 2215 }, { 2216 scope: 'all', 2217 leadChar: '\\' 2218 }); 2219 2220 /* 2221 * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency. 2222 * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because 2223 * character class endings can't be determined. 2224 */ 2225 XRegExp.addToken(/\[(\^?)]/, function (match) { 2226 // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. 2227 // (?!) should work like \b\B, but is unreliable in some versions of Firefox 2228 return match[1] ? '[\\s\\S]' : '\\b\\B'; 2229 }, { leadChar: '[' }); 2230 2231 /* 2232 * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in 2233 * free-spacing mode (flag x). 2234 */ 2235 XRegExp.addToken(/\(\?#[^)]*\)/, function (match, scope, flags) { 2236 // Keep tokens separated unless the following token is a quantifier 2237 return isQuantifierNext(match.input, match.index + match[0].length, flags) ? '' : '(?:)'; 2238 }, { leadChar: '(' }); 2239 2240 /* 2241 * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only. 2242 */ 2243 XRegExp.addToken(/\s+|#.*/, function (match, scope, flags) { 2244 // Keep tokens separated unless the following token is a quantifier 2245 return isQuantifierNext(match.input, match.index + match[0].length, flags) ? '' : '(?:)'; 2246 }, { flag: 'x' }); 2247 2248 /* 2249 * Dot, in dotall mode (aka singleline mode, flag s) only. 2250 */ 2251 XRegExp.addToken(/\./, function () { 2252 return '[\\s\\S]'; 2253 }, { 2254 flag: 's', 2255 leadChar: '.' 2256 }); 2257 2258 /* 2259 * Named backreference: `\k<name>`. Backreference names can use the characters A-Z, a-z, 0-9, _, 2260 * and $ only. Also allows numbered backreferences as `\k<n>`. 2261 */ 2262 XRegExp.addToken(/\\k<([\w$]+)>/, function (match) { 2263 // Groups with the same name is an error, else would need `lastIndexOf` 2264 var index = isNaN(match[1]) ? indexOf(this.captureNames, match[1]) + 1 : +match[1], 2265 endIndex = match.index + match[0].length; 2266 if (!index || index > this.captureNames.length) { 2267 throw new SyntaxError('Backreference to undefined group ' + match[0]); 2268 } 2269 // Keep backreferences separate from subsequent literal numbers 2270 return '\\' + index + (endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ? '' : '(?:)'); 2271 }, { leadChar: '\\' }); 2272 2273 /* 2274 * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0` 2275 * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches 2276 * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax. 2277 */ 2278 XRegExp.addToken(/\\(\d+)/, function (match, scope) { 2279 if (!(scope === defaultScope && /^[1-9]/.test(match[1]) && +match[1] <= this.captureNames.length) && match[1] !== '0') { 2280 throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' + match[0]); 2281 } 2282 return match[0]; 2283 }, { 2284 scope: 'all', 2285 leadChar: '\\' 2286 }); 2287 2288 /* 2289 * Named capturing group; match the opening delimiter only: `(?<name>`. Capture names can use the 2290 * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style 2291 * `(?P<name>` as an alternate syntax to avoid issues in some older versions of Opera which natively 2292 * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to 2293 * Python-style named capture as octals. 2294 */ 2295 XRegExp.addToken(/\(\?P?<([\w$]+)>/, function (match) { 2296 // Disallow bare integers as names because named backreferences are added to match 2297 // arrays and therefore numeric properties may lead to incorrect lookups 2298 if (!isNaN(match[1])) { 2299 throw new SyntaxError('Cannot use integer as capture name ' + match[0]); 2300 } 2301 if (match[1] === 'length' || match[1] === '__proto__') { 2302 throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]); 2303 } 2304 if (indexOf(this.captureNames, match[1]) > -1) { 2305 throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]); 2306 } 2307 this.captureNames.push(match[1]); 2308 this.hasNamedCapture = true; 2309 return '('; 2310 }, { leadChar: '(' }); 2311 2312 /* 2313 * Capturing group; match the opening parenthesis only. Required for support of named capturing 2314 * groups. Also adds explicit capture mode (flag n). 2315 */ 2316 XRegExp.addToken(/\((?!\?)/, function (match, scope, flags) { 2317 if (flags.indexOf('n') > -1) { 2318 return '(?:'; 2319 } 2320 this.captureNames.push(null); 2321 return '('; 2322 }, { 2323 optionalFlags: 'n', 2324 leadChar: '(' 2325 }); 2326 2327 /* ============================== 2328 * Expose XRegExp 2329 * ============================== */ 2330 2331 module.exports = XRegExp; 2332 2333/***/ }), 2334/* 5 */ 2335/***/ (function(module, exports, __webpack_require__) { 2336 2337 'use strict'; 2338 2339 Object.defineProperty(exports, "__esModule", { 2340 value: true 2341 }); 2342 2343 var _match = __webpack_require__(6); 2344 2345 Object.keys(_match).forEach(function (key) { 2346 if (key === "default" || key === "__esModule") return; 2347 Object.defineProperty(exports, key, { 2348 enumerable: true, 2349 get: function get() { 2350 return _match[key]; 2351 } 2352 }); 2353 }); 2354 2355 var _applyRegexList = __webpack_require__(7); 2356 2357 Object.keys(_applyRegexList).forEach(function (key) { 2358 if (key === "default" || key === "__esModule") return; 2359 Object.defineProperty(exports, key, { 2360 enumerable: true, 2361 get: function get() { 2362 return _applyRegexList[key]; 2363 } 2364 }); 2365 }); 2366 2367/***/ }), 2368/* 6 */ 2369/***/ (function(module, exports) { 2370 2371 "use strict"; 2372 2373 Object.defineProperty(exports, "__esModule", { 2374 value: true 2375 }); 2376 2377 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 2378 2379 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 2380 2381 var Match = exports.Match = function () { 2382 function Match(value, index, css) { 2383 _classCallCheck(this, Match); 2384 2385 this.value = value; 2386 this.index = index; 2387 this.length = value.length; 2388 this.css = css; 2389 this.brushName = null; 2390 } 2391 2392 _createClass(Match, [{ 2393 key: "toString", 2394 value: function toString() { 2395 return this.value; 2396 } 2397 }]); 2398 2399 return Match; 2400 }(); 2401 2402/***/ }), 2403/* 7 */ 2404/***/ (function(module, exports, __webpack_require__) { 2405 2406 'use strict'; 2407 2408 Object.defineProperty(exports, "__esModule", { 2409 value: true 2410 }); 2411 2412 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 2413 2414 exports.applyRegexList = applyRegexList; 2415 2416 var _matches = __webpack_require__(8); 2417 2418 /** 2419 * Applies all regular expression to the code and stores all found 2420 * matches in the `this.matches` array. 2421 */ 2422 function applyRegexList(code, regexList) { 2423 var result = []; 2424 2425 regexList = regexList || []; 2426 2427 for (var i = 0, l = regexList.length; i < l; i++) { 2428 // BUG: length returns len+1 for array if methods added to prototype chain (oising@gmail.com) 2429 if (_typeof(regexList[i]) === 'object') result = result.concat((0, _matches.find)(code, regexList[i])); 2430 } 2431 2432 result = (0, _matches.sort)(result); 2433 result = (0, _matches.removeNested)(result); 2434 result = (0, _matches.compact)(result); 2435 2436 return result; 2437 } 2438 2439/***/ }), 2440/* 8 */ 2441/***/ (function(module, exports, __webpack_require__) { 2442 2443 'use strict'; 2444 2445 Object.defineProperty(exports, "__esModule", { 2446 value: true 2447 }); 2448 exports.find = find; 2449 exports.sort = sort; 2450 exports.compact = compact; 2451 exports.removeNested = removeNested; 2452 2453 var _match = __webpack_require__(6); 2454 2455 var _syntaxhighlighterRegex = __webpack_require__(3); 2456 2457 /** 2458 * Executes given regular expression on provided code and returns all matches that are found. 2459 * 2460 * @param {String} code Code to execute regular expression on. 2461 * @param {Object} regex Regular expression item info from `regexList` collection. 2462 * @return {Array} Returns a list of Match objects. 2463 */ 2464 function find(code, regexInfo) { 2465 function defaultAdd(match, regexInfo) { 2466 return match[0]; 2467 }; 2468 2469 var index = 0, 2470 match = null, 2471 matches = [], 2472 process = regexInfo.func ? regexInfo.func : defaultAdd, 2473 pos = 0; 2474 2475 while (match = _syntaxhighlighterRegex.XRegExp.exec(code, regexInfo.regex, pos)) { 2476 var resultMatch = process(match, regexInfo); 2477 2478 if (typeof resultMatch === 'string') resultMatch = [new _match.Match(resultMatch, match.index, regexInfo.css)]; 2479 2480 matches = matches.concat(resultMatch); 2481 pos = match.index + match[0].length; 2482 } 2483 2484 return matches; 2485 }; 2486 2487 /** 2488 * Sorts matches by index position and then by length. 2489 */ 2490 function sort(matches) { 2491 function sortMatchesCallback(m1, m2) { 2492 // sort matches by index first 2493 if (m1.index < m2.index) return -1;else if (m1.index > m2.index) return 1;else { 2494 // if index is the same, sort by length 2495 if (m1.length < m2.length) return -1;else if (m1.length > m2.length) return 1; 2496 } 2497 2498 return 0; 2499 } 2500 2501 return matches.sort(sortMatchesCallback); 2502 } 2503 2504 function compact(matches) { 2505 var result = [], 2506 i, 2507 l; 2508 2509 for (i = 0, l = matches.length; i < l; i++) { 2510 if (matches[i]) result.push(matches[i]); 2511 }return result; 2512 } 2513 2514 /** 2515 * Checks to see if any of the matches are inside of other matches. 2516 * This process would get rid of highligted strings inside comments, 2517 * keywords inside strings and so on. 2518 */ 2519 function removeNested(matches) { 2520 // Optimized by Jose Prado (http://joseprado.com) 2521 for (var i = 0, l = matches.length; i < l; i++) { 2522 if (matches[i] === null) continue; 2523 2524 var itemI = matches[i], 2525 itemIEndPos = itemI.index + itemI.length; 2526 2527 for (var j = i + 1, l = matches.length; j < l && matches[i] !== null; j++) { 2528 var itemJ = matches[j]; 2529 2530 if (itemJ === null) continue;else if (itemJ.index > itemIEndPos) break;else if (itemJ.index == itemI.index && itemJ.length > itemI.length) matches[i] = null;else if (itemJ.index >= itemI.index && itemJ.index < itemIEndPos) matches[j] = null; 2531 } 2532 } 2533 2534 return matches; 2535 } 2536 2537/***/ }), 2538/* 9 */ 2539/***/ (function(module, exports) { 2540 2541 'use strict'; 2542 2543 Object.defineProperty(exports, "__esModule", { 2544 value: true 2545 }); 2546 exports.default = Renderer; 2547 /** 2548 * Pads number with zeros until it's length is the same as given length. 2549 * 2550 * @param {Number} number Number to pad. 2551 * @param {Number} length Max string length with. 2552 * @return {String} Returns a string padded with proper amount of '0'. 2553 */ 2554 function padNumber(number, length) { 2555 var result = number.toString(); 2556 2557 while (result.length < length) { 2558 result = '0' + result; 2559 }return result; 2560 }; 2561 2562 function getLines(str) { 2563 return str.split(/\r?\n/); 2564 } 2565 2566 function getLinesToHighlight(opts) { 2567 var results = {}, 2568 linesToHighlight, 2569 l, 2570 i; 2571 2572 linesToHighlight = opts.highlight || []; 2573 2574 if (typeof linesToHighlight.push !== 'function') linesToHighlight = [linesToHighlight]; 2575 2576 for (i = 0, l = linesToHighlight.length; i < l; i++) { 2577 results[linesToHighlight[i]] = true; 2578 }return results; 2579 } 2580 2581 function Renderer(code, matches, opts) { 2582 var _this = this; 2583 2584 _this.opts = opts; 2585 _this.code = code; 2586 _this.matches = matches; 2587 _this.lines = getLines(code); 2588 _this.linesToHighlight = getLinesToHighlight(opts); 2589 } 2590 2591 Renderer.prototype = { 2592 /** 2593 * Wraps each line of the string into <code/> tag with given style applied to it. 2594 * 2595 * @param {String} str Input string. 2596 * @param {String} css Style name to apply to the string. 2597 * @return {String} Returns input string with each line surrounded by <span/> tag. 2598 */ 2599 wrapLinesWithCode: function wrapLinesWithCode(str, css) { 2600 if (str == null || str.length == 0 || str == '\n' || css == null) return str; 2601 2602 var _this = this, 2603 results = [], 2604 lines, 2605 line, 2606 spaces, 2607 i, 2608 l; 2609 2610 str = str.replace(/</g, '<'); 2611 2612 // Replace two or more sequential spaces with leaving last space untouched. 2613 str = str.replace(/ {2,}/g, function (m) { 2614 spaces = ''; 2615 2616 for (i = 0, l = m.length; i < l - 1; i++) { 2617 spaces += _this.opts.space; 2618 }return spaces + ' '; 2619 }); 2620 2621 lines = getLines(str); 2622 2623 // Split each line and apply <span class="...">...</span> to them so that leading spaces aren't included. 2624 for (i = 0, l = lines.length; i < l; i++) { 2625 line = lines[i]; 2626 spaces = ''; 2627 2628 if (line.length > 0) { 2629 line = line.replace(/^( | )+/, function (s) { 2630 spaces = s; 2631 return ''; 2632 }); 2633 2634 line = line.length === 0 ? spaces : spaces + '<code class="' + css + '">' + line + '</code>'; 2635 } 2636 2637 results.push(line); 2638 } 2639 2640 return results.join('\n'); 2641 }, 2642 2643 /** 2644 * Turns all URLs in the code into <a/> tags. 2645 * @param {String} code Input code. 2646 * @return {String} Returns code with </a> tags. 2647 */ 2648 processUrls: function processUrls(code) { 2649 var gt = /(.*)((>|<).*)/, 2650 url = /\w+:\/\/[\w-.\/?%&=:@;#]*/g; 2651 2652 return code.replace(url, function (m) { 2653 var suffix = '', 2654 match = null; 2655 2656 // We include < and > in the URL for the common cases like <http://google.com> 2657 // The problem is that they get transformed into <http://google.com> 2658 // Where as > easily looks like part of the URL string. 2659 2660 if (match = gt.exec(m)) { 2661 m = match[1]; 2662 suffix = match[2]; 2663 } 2664 2665 return '<a href="' + m + '">' + m + '</a>' + suffix; 2666 }); 2667 }, 2668 2669 /** 2670 * Creates an array containing integer line numbers starting from the 'first-line' param. 2671 * @return {Array} Returns array of integers. 2672 */ 2673 figureOutLineNumbers: function figureOutLineNumbers(code) { 2674 var lineNumbers = [], 2675 lines = this.lines, 2676 firstLine = parseInt(this.opts.firstLine || 1), 2677 i, 2678 l; 2679 2680 for (i = 0, l = lines.length; i < l; i++) { 2681 lineNumbers.push(i + firstLine); 2682 }return lineNumbers; 2683 }, 2684 2685 /** 2686 * Generates HTML markup for a single line of code while determining alternating line style. 2687 * @param {Integer} lineNumber Line number. 2688 * @param {String} code Line HTML markup. 2689 * @return {String} Returns HTML markup. 2690 */ 2691 wrapLine: function wrapLine(lineIndex, lineNumber, lineHtml) { 2692 var classes = ['line', 'number' + lineNumber, 'index' + lineIndex, 'alt' + (lineNumber % 2 == 0 ? 1 : 2).toString()]; 2693 2694 if (this.linesToHighlight[lineNumber]) classes.push('highlighted'); 2695 2696 if (lineNumber == 0) classes.push('break'); 2697 2698 return '<div class="' + classes.join(' ') + '">' + lineHtml + '</div>'; 2699 }, 2700 2701 /** 2702 * Generates HTML markup for line number column. 2703 * @param {String} code Complete code HTML markup. 2704 * @param {Array} lineNumbers Calculated line numbers. 2705 * @return {String} Returns HTML markup. 2706 */ 2707 renderLineNumbers: function renderLineNumbers(code, lineNumbers) { 2708 var _this = this, 2709 opts = _this.opts, 2710 html = '', 2711 count = _this.lines.length, 2712 firstLine = parseInt(opts.firstLine || 1), 2713 pad = opts.padLineNumbers, 2714 lineNumber, 2715 i; 2716 2717 if (pad == true) pad = (firstLine + count - 1).toString().length;else if (isNaN(pad) == true) pad = 0; 2718 2719 for (i = 0; i < count; i++) { 2720 lineNumber = lineNumbers ? lineNumbers[i] : firstLine + i; 2721 code = lineNumber == 0 ? opts.space : padNumber(lineNumber, pad); 2722 html += _this.wrapLine(i, lineNumber, code); 2723 } 2724 2725 return html; 2726 }, 2727 2728 /** 2729 * Splits block of text into individual DIV lines. 2730 * @param {String} code Code to highlight. 2731 * @param {Array} lineNumbers Calculated line numbers. 2732 * @return {String} Returns highlighted code in HTML form. 2733 */ 2734 getCodeLinesHtml: function getCodeLinesHtml(html, lineNumbers) { 2735 // html = utils.trim(html); 2736 2737 var _this = this, 2738 opts = _this.opts, 2739 lines = getLines(html), 2740 padLength = opts.padLineNumbers, 2741 firstLine = parseInt(opts.firstLine || 1), 2742 brushName = opts.brush, 2743 html = ''; 2744 2745 for (var i = 0, l = lines.length; i < l; i++) { 2746 var line = lines[i], 2747 indent = /^( |\s)+/.exec(line), 2748 spaces = null, 2749 lineNumber = lineNumbers ? lineNumbers[i] : firstLine + i; 2750 ; 2751 2752 if (indent != null) { 2753 spaces = indent[0].toString(); 2754 line = line.substr(spaces.length); 2755 spaces = spaces.replace(' ', opts.space); 2756 } 2757 2758 // line = utils.trim(line); 2759 2760 if (line.length == 0) line = opts.space; 2761 2762 html += _this.wrapLine(i, lineNumber, (spaces != null ? '<code class="' + brushName + ' spaces">' + spaces + '</code>' : '') + line); 2763 } 2764 2765 return html; 2766 }, 2767 2768 /** 2769 * Returns HTML for the table title or empty string if title is null. 2770 */ 2771 getTitleHtml: function getTitleHtml(title) { 2772 return title ? '<caption>' + title + '</caption>' : ''; 2773 }, 2774 2775 /** 2776 * Finds all matches in the source code. 2777 * @param {String} code Source code to process matches in. 2778 * @param {Array} matches Discovered regex matches. 2779 * @return {String} Returns formatted HTML with processed mathes. 2780 */ 2781 getMatchesHtml: function getMatchesHtml(code, matches) { 2782 function getBrushNameCss(match) { 2783 var result = match ? match.brushName || brushName : brushName; 2784 return result ? result + ' ' : ''; 2785 }; 2786 2787 var _this = this, 2788 pos = 0, 2789 result = '', 2790 brushName = _this.opts.brush || '', 2791 match, 2792 matchBrushName, 2793 i, 2794 l; 2795 2796 // Finally, go through the final list of matches and pull the all 2797 // together adding everything in between that isn't a match. 2798 for (i = 0, l = matches.length; i < l; i++) { 2799 match = matches[i]; 2800 2801 if (match === null || match.length === 0) continue; 2802 2803 matchBrushName = getBrushNameCss(match); 2804 2805 result += _this.wrapLinesWithCode(code.substr(pos, match.index - pos), matchBrushName + 'plain') + _this.wrapLinesWithCode(match.value, matchBrushName + match.css); 2806 2807 pos = match.index + match.length + (match.offset || 0); 2808 } 2809 2810 // don't forget to add whatever's remaining in the string 2811 result += _this.wrapLinesWithCode(code.substr(pos), getBrushNameCss() + 'plain'); 2812 2813 return result; 2814 }, 2815 2816 /** 2817 * Generates HTML markup for the whole syntax highlighter. 2818 * @param {String} code Source code. 2819 * @return {String} Returns HTML markup. 2820 */ 2821 getHtml: function getHtml() { 2822 var _this = this, 2823 opts = _this.opts, 2824 code = _this.code, 2825 matches = _this.matches, 2826 classes = ['syntaxhighlighter'], 2827 lineNumbers, 2828 gutter, 2829 html; 2830 2831 if (opts.collapse === true) classes.push('collapsed'); 2832 2833 gutter = opts.gutter !== false; 2834 2835 if (!gutter) classes.push('nogutter'); 2836 2837 // add custom user style name 2838 classes.push(opts.className); 2839 2840 // add brush alias to the class name for custom CSS 2841 classes.push(opts.brush); 2842 2843 if (gutter) lineNumbers = _this.figureOutLineNumbers(code); 2844 2845 // processes found matches into the html 2846 html = _this.getMatchesHtml(code, matches); 2847 2848 // finally, split all lines so that they wrap well 2849 html = _this.getCodeLinesHtml(html, lineNumbers); 2850 2851 // finally, process the links 2852 if (opts.autoLinks) html = _this.processUrls(html); 2853 2854 html = '\n <div class="' + classes.join(' ') + '">\n <table border="0" cellpadding="0" cellspacing="0">\n ' + _this.getTitleHtml(opts.title) + '\n <tbody>\n <tr>\n ' + (gutter ? '<td class="gutter">' + _this.renderLineNumbers(code) + '</td>' : '') + '\n <td class="code">\n <div class="container">' + html + '</div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n '; 2855 2856 return html; 2857 } 2858 }; 2859 2860/***/ }), 2861/* 10 */ 2862/***/ (function(module, exports) { 2863 2864 'use strict'; 2865 2866 /** 2867 * Splits block of text into lines. 2868 * @param {String} block Block of text. 2869 * @return {Array} Returns array of lines. 2870 */ 2871 function splitLines(block) { 2872 return block.split(/\r?\n/); 2873 } 2874 2875 /** 2876 * Executes a callback on each line and replaces each line with result from the callback. 2877 * @param {Object} str Input string. 2878 * @param {Object} callback Callback function taking one string argument and returning a string. 2879 */ 2880 function eachLine(str, callback) { 2881 var lines = splitLines(str); 2882 2883 for (var i = 0, l = lines.length; i < l; i++) { 2884 lines[i] = callback(lines[i], i); 2885 }return lines.join('\n'); 2886 } 2887 2888 /** 2889 * Generates a unique element ID. 2890 */ 2891 function guid(prefix) { 2892 return (prefix || '') + Math.round(Math.random() * 1000000).toString(); 2893 } 2894 2895 /** 2896 * Merges two objects. Values from obj2 override values in obj1. 2897 * Function is NOT recursive and works only for one dimensional objects. 2898 * @param {Object} obj1 First object. 2899 * @param {Object} obj2 Second object. 2900 * @return {Object} Returns combination of both objects. 2901 */ 2902 function merge(obj1, obj2) { 2903 var result = {}, 2904 name; 2905 2906 for (name in obj1) { 2907 result[name] = obj1[name]; 2908 }for (name in obj2) { 2909 result[name] = obj2[name]; 2910 }return result; 2911 } 2912 2913 /** 2914 * Removes all white space at the begining and end of a string. 2915 * 2916 * @param {String} str String to trim. 2917 * @return {String} Returns string without leading and following white space characters. 2918 */ 2919 function trim(str) { 2920 return str.replace(/^\s+|\s+$/g, ''); 2921 } 2922 2923 /** 2924 * Converts the source to array object. Mostly used for function arguments and 2925 * lists returned by getElementsByTagName() which aren't Array objects. 2926 * @param {List} source Source list. 2927 * @return {Array} Returns array. 2928 */ 2929 function toArray(source) { 2930 return Array.prototype.slice.apply(source); 2931 } 2932 2933 /** 2934 * Attempts to convert string to boolean. 2935 * @param {String} value Input string. 2936 * @return {Boolean} Returns true if input was "true", false if input was "false" and value otherwise. 2937 */ 2938 function toBoolean(value) { 2939 var result = { "true": true, "false": false }[value]; 2940 return result == null ? value : result; 2941 } 2942 2943 module.exports = { 2944 splitLines: splitLines, 2945 eachLine: eachLine, 2946 guid: guid, 2947 merge: merge, 2948 trim: trim, 2949 toArray: toArray, 2950 toBoolean: toBoolean 2951 }; 2952 2953/***/ }), 2954/* 11 */ 2955/***/ (function(module, exports, __webpack_require__) { 2956 2957 'use strict'; 2958 2959 var trim = __webpack_require__(12), 2960 bloggerMode = __webpack_require__(13), 2961 stripBrs = __webpack_require__(14), 2962 unindenter = __webpack_require__(15), 2963 retabber = __webpack_require__(16); 2964 2965 module.exports = function (code, opts) { 2966 code = trim(code, opts); 2967 code = bloggerMode(code, opts); 2968 code = stripBrs(code, opts); 2969 code = unindenter.unindent(code, opts); 2970 2971 var tabSize = opts['tab-size']; 2972 code = opts['smart-tabs'] === true ? retabber.smart(code, tabSize) : retabber.regular(code, tabSize); 2973 2974 return code; 2975 }; 2976 2977/***/ }), 2978/* 12 */ 2979/***/ (function(module, exports) { 2980 2981 'use strict'; 2982 2983 module.exports = function (code, opts) { 2984 return code 2985 // This is a special trim which only removes first and last empty lines 2986 // and doesn't affect valid leading space on the first line. 2987 .replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, '') 2988 2989 // IE lets these buggers through 2990 .replace(/\r/g, ' '); 2991 }; 2992 2993/***/ }), 2994/* 13 */ 2995/***/ (function(module, exports) { 2996 2997 'use strict'; 2998 2999 module.exports = function (code, opts) { 3000 var br = /<br\s*\/?>|<br\s*\/?>/gi; 3001 3002 if (opts['bloggerMode'] === true) code = code.replace(br, '\n'); 3003 3004 return code; 3005 }; 3006 3007/***/ }), 3008/* 14 */ 3009/***/ (function(module, exports) { 3010 3011 'use strict'; 3012 3013 module.exports = function (code, opts) { 3014 var br = /<br\s*\/?>|<br\s*\/?>/gi; 3015 3016 if (opts['stripBrs'] === true) code = code.replace(br, ''); 3017 3018 return code; 3019 }; 3020 3021/***/ }), 3022/* 15 */ 3023/***/ (function(module, exports) { 3024 3025 'use strict'; 3026 3027 function isEmpty(str) { 3028 return (/^\s*$/.test(str) 3029 ); 3030 } 3031 3032 module.exports = { 3033 unindent: function unindent(code) { 3034 var lines = code.split(/\r?\n/), 3035 regex = /^\s*/, 3036 min = 1000, 3037 line, 3038 matches, 3039 i, 3040 l; 3041 3042 // go through every line and check for common number of indents 3043 for (i = 0, l = lines.length; i < l && min > 0; i++) { 3044 line = lines[i]; 3045 3046 if (isEmpty(line)) continue; 3047 3048 matches = regex.exec(line); 3049 3050 // In the event that just one line doesn't have leading white space 3051 // we can't unindent anything, so bail completely. 3052 if (matches == null) return code; 3053 3054 min = Math.min(matches[0].length, min); 3055 } 3056 3057 // trim minimum common number of white space from the begining of every line 3058 if (min > 0) for (i = 0, l = lines.length; i < l; i++) { 3059 if (!isEmpty(lines[i])) lines[i] = lines[i].substr(min); 3060 }return lines.join('\n'); 3061 } 3062 }; 3063 3064/***/ }), 3065/* 16 */ 3066/***/ (function(module, exports) { 3067 3068 'use strict'; 3069 3070 var spaces = ''; 3071 3072 // Create a string with 1000 spaces to copy spaces from... 3073 // It's assumed that there would be no indentation longer than that. 3074 for (var i = 0; i < 50; i++) { 3075 spaces += ' '; 3076 } // 20 spaces * 50 3077 3078 // This function inserts specified amount of spaces in the string 3079 // where a tab is while removing that given tab. 3080 function insertSpaces(line, pos, count) { 3081 return line.substr(0, pos) + spaces.substr(0, count) + line.substr(pos + 1, line.length) // pos + 1 will get rid of the tab 3082 ; 3083 } 3084 3085 module.exports = { 3086 smart: function smart(code, tabSize) { 3087 var lines = code.split(/\r?\n/), 3088 tab = '\t', 3089 line, 3090 pos, 3091 i, 3092 l; 3093 3094 // Go through all the lines and do the 'smart tabs' magic. 3095 for (i = 0, l = lines.length; i < l; i++) { 3096 line = lines[i]; 3097 3098 if (line.indexOf(tab) === -1) continue; 3099 3100 pos = 0; 3101 3102 while ((pos = line.indexOf(tab)) !== -1) { 3103 // This is pretty much all there is to the 'smart tabs' logic. 3104 // Based on the position within the line and size of a tab, 3105 // calculate the amount of spaces we need to insert. 3106 line = insertSpaces(line, pos, tabSize - pos % tabSize); 3107 } 3108 3109 lines[i] = line; 3110 } 3111 3112 return lines.join('\n'); 3113 }, 3114 3115 regular: function regular(code, tabSize) { 3116 return code.replace(/\t/g, spaces.substr(0, tabSize)); 3117 } 3118 }; 3119 3120/***/ }), 3121/* 17 */ 3122/***/ (function(module, exports) { 3123 3124 'use strict'; 3125 3126 /** 3127 * Finds all <SCRIPT TYPE="text/syntaxhighlighter" /> elementss. 3128 * Finds both "text/syntaxhighlighter" and "syntaxhighlighter" 3129 * ...in order to make W3C validator happy with subtype and backwardscompatible without subtype 3130 * @return {Array} Returns array of all found SyntaxHighlighter tags. 3131 */ 3132 function getSyntaxHighlighterScriptTags() { 3133 var tags = document.getElementsByTagName('script'), 3134 result = []; 3135 3136 for (var i = 0; i < tags.length; i++) { 3137 if (tags[i].type == 'text/syntaxhighlighter' || tags[i].type == 'syntaxhighlighter') result.push(tags[i]); 3138 }return result; 3139 }; 3140 3141 /** 3142 * Checks if target DOM elements has specified CSS class. 3143 * @param {DOMElement} target Target DOM element to check. 3144 * @param {String} className Name of the CSS class to check for. 3145 * @return {Boolean} Returns true if class name is present, false otherwise. 3146 */ 3147 function hasClass(target, className) { 3148 return target.className.indexOf(className) != -1; 3149 } 3150 3151 /** 3152 * Adds CSS class name to the target DOM element. 3153 * @param {DOMElement} target Target DOM element. 3154 * @param {String} className New CSS class to add. 3155 */ 3156 function addClass(target, className) { 3157 if (!hasClass(target, className)) target.className += ' ' + className; 3158 } 3159 3160 /** 3161 * Removes CSS class name from the target DOM element. 3162 * @param {DOMElement} target Target DOM element. 3163 * @param {String} className CSS class to remove. 3164 */ 3165 function removeClass(target, className) { 3166 target.className = target.className.replace(className, ''); 3167 } 3168 3169 /** 3170 * Adds event handler to the target object. 3171 * @param {Object} obj Target object. 3172 * @param {String} type Name of the event. 3173 * @param {Function} func Handling function. 3174 */ 3175 function attachEvent(obj, type, func, scope) { 3176 function handler(e) { 3177 e = e || window.event; 3178 3179 if (!e.target) { 3180 e.target = e.srcElement; 3181 e.preventDefault = function () { 3182 this.returnValue = false; 3183 }; 3184 } 3185 3186 func.call(scope || window, e); 3187 }; 3188 3189 if (obj.attachEvent) { 3190 obj.attachEvent('on' + type, handler); 3191 } else { 3192 obj.addEventListener(type, handler, false); 3193 } 3194 } 3195 3196 /** 3197 * Looks for a child or parent node which has specified classname. 3198 * Equivalent to jQuery's $(container).find(".className") 3199 * @param {Element} target Target element. 3200 * @param {String} search Class name or node name to look for. 3201 * @param {Boolean} reverse If set to true, will go up the node tree instead of down. 3202 * @return {Element} Returns found child or parent element on null. 3203 */ 3204 function findElement(target, search, reverse /* optional */) { 3205 if (target == null) return null; 3206 3207 var nodes = reverse != true ? target.childNodes : [target.parentNode], 3208 propertyToFind = { '#': 'id', '.': 'className' }[search.substr(0, 1)] || 'nodeName', 3209 expectedValue, 3210 found; 3211 3212 expectedValue = propertyToFind != 'nodeName' ? search.substr(1) : search.toUpperCase(); 3213 3214 // main return of the found node 3215 if ((target[propertyToFind] || '').indexOf(expectedValue) != -1) return target; 3216 3217 for (var i = 0, l = nodes.length; nodes && i < l && found == null; i++) { 3218 found = findElement(nodes[i], search, reverse); 3219 }return found; 3220 } 3221 3222 /** 3223 * Looks for a parent node which has specified classname. 3224 * This is an alias to <code>findElement(container, className, true)</code>. 3225 * @param {Element} target Target element. 3226 * @param {String} className Class name to look for. 3227 * @return {Element} Returns found parent element on null. 3228 */ 3229 function findParentElement(target, className) { 3230 return findElement(target, className, true); 3231 } 3232 3233 /** 3234 * Opens up a centered popup window. 3235 * @param {String} url URL to open in the window. 3236 * @param {String} name Popup name. 3237 * @param {int} width Popup width. 3238 * @param {int} height Popup height. 3239 * @param {String} options window.open() options. 3240 * @return {Window} Returns window instance. 3241 */ 3242 function popup(url, name, width, height, options) { 3243 var x = (screen.width - width) / 2, 3244 y = (screen.height - height) / 2; 3245 3246 options += ', left=' + x + ', top=' + y + ', width=' + width + ', height=' + height; 3247 options = options.replace(/^,/, ''); 3248 3249 var win = window.open(url, name, options); 3250 win.focus(); 3251 return win; 3252 } 3253 3254 function getElementsByTagName(name) { 3255 return document.getElementsByTagName(name); 3256 } 3257 3258 /** 3259 * Finds all elements on the page which could be processes by SyntaxHighlighter. 3260 */ 3261 function findElementsToHighlight(opts) { 3262 var elements = getElementsByTagName(opts['tagName']), 3263 scripts, 3264 i; 3265 3266 // support for <SCRIPT TYPE="syntaxhighlighter" /> feature 3267 if (opts['useScriptTags']) { 3268 scripts = getElementsByTagName('script'); 3269 3270 for (i = 0; i < scripts.length; i++) { 3271 if (scripts[i].type.match(/^(text\/)?syntaxhighlighter$/)) elements.push(scripts[i]); 3272 } 3273 } 3274 3275 return elements; 3276 } 3277 3278 function create(name) { 3279 return document.createElement(name); 3280 } 3281 3282 /** 3283 * Quick code mouse double click handler. 3284 */ 3285 function quickCodeHandler(e) { 3286 var target = e.target, 3287 highlighterDiv = findParentElement(target, '.syntaxhighlighter'), 3288 container = findParentElement(target, '.container'), 3289 textarea = document.createElement('textarea'), 3290 highlighter; 3291 3292 if (!container || !highlighterDiv || findElement(container, 'textarea')) return; 3293 3294 //highlighter = highlighters.get(highlighterDiv.id); 3295 3296 // add source class name 3297 addClass(highlighterDiv, 'source'); 3298 3299 // Have to go over each line and grab it's text, can't just do it on the 3300 // container because Firefox loses all \n where as Webkit doesn't. 3301 var lines = container.childNodes, 3302 code = []; 3303 3304 for (var i = 0, l = lines.length; i < l; i++) { 3305 code.push(lines[i].innerText || lines[i].textContent); 3306 } // using \r instead of \r or \r\n makes this work equally well on IE, FF and Webkit 3307 code = code.join('\r'); 3308 3309 // For Webkit browsers, replace nbsp with a breaking space 3310 code = code.replace(/\u00a0/g, " "); 3311 3312 // inject <textarea/> tag 3313 textarea.readOnly = true; // https://github.com/syntaxhighlighter/syntaxhighlighter/pull/329 3314 textarea.appendChild(document.createTextNode(code)); 3315 container.appendChild(textarea); 3316 3317 // preselect all text 3318 textarea.focus(); 3319 textarea.select(); 3320 3321 // set up handler for lost focus 3322 attachEvent(textarea, 'blur', function (e) { 3323 textarea.parentNode.removeChild(textarea); 3324 removeClass(highlighterDiv, 'source'); 3325 }); 3326 }; 3327 3328 module.exports = { 3329 quickCodeHandler: quickCodeHandler, 3330 create: create, 3331 popup: popup, 3332 hasClass: hasClass, 3333 addClass: addClass, 3334 removeClass: removeClass, 3335 attachEvent: attachEvent, 3336 findElement: findElement, 3337 findParentElement: findParentElement, 3338 getSyntaxHighlighterScriptTags: getSyntaxHighlighterScriptTags, 3339 findElementsToHighlight: findElementsToHighlight 3340 }; 3341 3342/***/ }), 3343/* 18 */ 3344/***/ (function(module, exports) { 3345 3346 'use strict'; 3347 3348 module.exports = { 3349 space: ' ', 3350 3351 /** Enables use of <SCRIPT type="syntaxhighlighter" /> tags. */ 3352 useScriptTags: true, 3353 3354 /** Blogger mode flag. */ 3355 bloggerMode: false, 3356 3357 stripBrs: false, 3358 3359 /** Name of the tag that SyntaxHighlighter will automatically look for. */ 3360 tagName: 'pre' 3361 }; 3362 3363/***/ }), 3364/* 19 */ 3365/***/ (function(module, exports) { 3366 3367 'use strict'; 3368 3369 module.exports = { 3370 /** Additional CSS class names to be added to highlighter elements. */ 3371 'class-name': '', 3372 3373 /** First line number. */ 3374 'first-line': 1, 3375 3376 /** 3377 * Pads line numbers. Possible values are: 3378 * 3379 * false - don't pad line numbers. 3380 * true - automaticaly pad numbers with minimum required number of leading zeroes. 3381 * [int] - length up to which pad line numbers. 3382 */ 3383 'pad-line-numbers': false, 3384 3385 /** Lines to highlight. */ 3386 'highlight': null, 3387 3388 /** Title to be displayed above the code block. */ 3389 'title': null, 3390 3391 /** Enables or disables smart tabs. */ 3392 'smart-tabs': true, 3393 3394 /** Gets or sets tab size. */ 3395 'tab-size': 4, 3396 3397 /** Enables or disables gutter. */ 3398 'gutter': true, 3399 3400 /** Enables quick code copy and paste from double click. */ 3401 'quick-code': true, 3402 3403 /** Forces code view to be collapsed. */ 3404 'collapse': false, 3405 3406 /** Enables or disables automatic links. */ 3407 'auto-links': true, 3408 3409 'unindent': true, 3410 3411 'html-script': false 3412 }; 3413 3414/***/ }), 3415/* 20 */ 3416/***/ (function(module, exports, __webpack_require__) { 3417 3418 /* WEBPACK VAR INJECTION */(function(process) {'use strict'; 3419 3420 var applyRegexList = __webpack_require__(5).applyRegexList; 3421 3422 function HtmlScript(BrushXML, brushClass) { 3423 var scriptBrush, 3424 xmlBrush = new BrushXML(); 3425 3426 if (brushClass == null) return; 3427 3428 scriptBrush = new brushClass(); 3429 3430 if (scriptBrush.htmlScript == null) throw new Error('Brush wasn\'t configured for html-script option: ' + brushClass.brushName); 3431 3432 xmlBrush.regexList.push({ regex: scriptBrush.htmlScript.code, func: process }); 3433 3434 this.regexList = xmlBrush.regexList; 3435 3436 function offsetMatches(matches, offset) { 3437 for (var j = 0, l = matches.length; j < l; j++) { 3438 matches[j].index += offset; 3439 } 3440 } 3441 3442 function process(match, info) { 3443 var code = match.code, 3444 results = [], 3445 regexList = scriptBrush.regexList, 3446 offset = match.index + match.left.length, 3447 htmlScript = scriptBrush.htmlScript, 3448 matches; 3449 3450 function add(matches) { 3451 results = results.concat(matches); 3452 } 3453 3454 matches = applyRegexList(code, regexList); 3455 offsetMatches(matches, offset); 3456 add(matches); 3457 3458 // add left script bracket 3459 if (htmlScript.left != null && match.left != null) { 3460 matches = applyRegexList(match.left, [htmlScript.left]); 3461 offsetMatches(matches, match.index); 3462 add(matches); 3463 } 3464 3465 // add right script bracket 3466 if (htmlScript.right != null && match.right != null) { 3467 matches = applyRegexList(match.right, [htmlScript.right]); 3468 offsetMatches(matches, match.index + match[0].lastIndexOf(match.right)); 3469 add(matches); 3470 } 3471 3472 for (var j = 0, l = results.length; j < l; j++) { 3473 results[j].brushName = brushClass.brushName; 3474 }return results; 3475 } 3476 }; 3477 3478 module.exports = HtmlScript; 3479 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21))) 3480 3481/***/ }), 3482/* 21 */ 3483/***/ (function(module, exports) { 3484 3485 'use strict'; 3486 3487 // shim for using process in browser 3488 var process = module.exports = {}; 3489 3490 // cached from whatever global is present so that test runners that stub it 3491 // don't break things. But we need to wrap it in a try catch in case it is 3492 // wrapped in strict mode code which doesn't define any globals. It's inside a 3493 // function because try/catches deoptimize in certain engines. 3494 3495 var cachedSetTimeout; 3496 var cachedClearTimeout; 3497 3498 function defaultSetTimout() { 3499 throw new Error('setTimeout has not been defined'); 3500 } 3501 function defaultClearTimeout() { 3502 throw new Error('clearTimeout has not been defined'); 3503 } 3504 (function () { 3505 try { 3506 if (typeof setTimeout === 'function') { 3507 cachedSetTimeout = setTimeout; 3508 } else { 3509 cachedSetTimeout = defaultSetTimout; 3510 } 3511 } catch (e) { 3512 cachedSetTimeout = defaultSetTimout; 3513 } 3514 try { 3515 if (typeof clearTimeout === 'function') { 3516 cachedClearTimeout = clearTimeout; 3517 } else { 3518 cachedClearTimeout = defaultClearTimeout; 3519 } 3520 } catch (e) { 3521 cachedClearTimeout = defaultClearTimeout; 3522 } 3523 })(); 3524 function runTimeout(fun) { 3525 if (cachedSetTimeout === setTimeout) { 3526 //normal enviroments in sane situations 3527 return setTimeout(fun, 0); 3528 } 3529 // if setTimeout wasn't available but was latter defined 3530 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 3531 cachedSetTimeout = setTimeout; 3532 return setTimeout(fun, 0); 3533 } 3534 try { 3535 // when when somebody has screwed with setTimeout but no I.E. maddness 3536 return cachedSetTimeout(fun, 0); 3537 } catch (e) { 3538 try { 3539 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 3540 return cachedSetTimeout.call(null, fun, 0); 3541 } catch (e) { 3542 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 3543 return cachedSetTimeout.call(this, fun, 0); 3544 } 3545 } 3546 } 3547 function runClearTimeout(marker) { 3548 if (cachedClearTimeout === clearTimeout) { 3549 //normal enviroments in sane situations 3550 return clearTimeout(marker); 3551 } 3552 // if clearTimeout wasn't available but was latter defined 3553 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 3554 cachedClearTimeout = clearTimeout; 3555 return clearTimeout(marker); 3556 } 3557 try { 3558 // when when somebody has screwed with setTimeout but no I.E. maddness 3559 return cachedClearTimeout(marker); 3560 } catch (e) { 3561 try { 3562 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 3563 return cachedClearTimeout.call(null, marker); 3564 } catch (e) { 3565 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 3566 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 3567 return cachedClearTimeout.call(this, marker); 3568 } 3569 } 3570 } 3571 var queue = []; 3572 var draining = false; 3573 var currentQueue; 3574 var queueIndex = -1; 3575 3576 function cleanUpNextTick() { 3577 if (!draining || !currentQueue) { 3578 return; 3579 } 3580 draining = false; 3581 if (currentQueue.length) { 3582 queue = currentQueue.concat(queue); 3583 } else { 3584 queueIndex = -1; 3585 } 3586 if (queue.length) { 3587 drainQueue(); 3588 } 3589 } 3590 3591 function drainQueue() { 3592 if (draining) { 3593 return; 3594 } 3595 var timeout = runTimeout(cleanUpNextTick); 3596 draining = true; 3597 3598 var len = queue.length; 3599 while (len) { 3600 currentQueue = queue; 3601 queue = []; 3602 while (++queueIndex < len) { 3603 if (currentQueue) { 3604 currentQueue[queueIndex].run(); 3605 } 3606 } 3607 queueIndex = -1; 3608 len = queue.length; 3609 } 3610 currentQueue = null; 3611 draining = false; 3612 runClearTimeout(timeout); 3613 } 3614 3615 process.nextTick = function (fun) { 3616 var args = new Array(arguments.length - 1); 3617 if (arguments.length > 1) { 3618 for (var i = 1; i < arguments.length; i++) { 3619 args[i - 1] = arguments[i]; 3620 } 3621 } 3622 queue.push(new Item(fun, args)); 3623 if (queue.length === 1 && !draining) { 3624 runTimeout(drainQueue); 3625 } 3626 }; 3627 3628 // v8 likes predictible objects 3629 function Item(fun, array) { 3630 this.fun = fun; 3631 this.array = array; 3632 } 3633 Item.prototype.run = function () { 3634 this.fun.apply(null, this.array); 3635 }; 3636 process.title = 'browser'; 3637 process.browser = true; 3638 process.env = {}; 3639 process.argv = []; 3640 process.version = ''; // empty string to avoid regexp issues 3641 process.versions = {}; 3642 3643 function noop() {} 3644 3645 process.on = noop; 3646 process.addListener = noop; 3647 process.once = noop; 3648 process.off = noop; 3649 process.removeListener = noop; 3650 process.removeAllListeners = noop; 3651 process.emit = noop; 3652 process.prependListener = noop; 3653 process.prependOnceListener = noop; 3654 3655 process.listeners = function (name) { 3656 return []; 3657 }; 3658 3659 process.binding = function (name) { 3660 throw new Error('process.binding is not supported'); 3661 }; 3662 3663 process.cwd = function () { 3664 return '/'; 3665 }; 3666 process.chdir = function (dir) { 3667 throw new Error('process.chdir is not supported'); 3668 }; 3669 process.umask = function () { 3670 return 0; 3671 }; 3672 3673/***/ }), 3674/* 22 */ 3675/***/ (function(module, exports, __webpack_require__) { 3676 3677 'use strict'; 3678 3679 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 3680 3681 var _syntaxhighlighterHtmlRenderer = __webpack_require__(9); 3682 3683 var _syntaxhighlighterHtmlRenderer2 = _interopRequireDefault(_syntaxhighlighterHtmlRenderer); 3684 3685 var _syntaxhighlighterRegex = __webpack_require__(3); 3686 3687 var _syntaxhighlighterMatch = __webpack_require__(5); 3688 3689 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3690 3691 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3692 3693 module.exports = function () { 3694 function BrushBase() { 3695 _classCallCheck(this, BrushBase); 3696 } 3697 3698 _createClass(BrushBase, [{ 3699 key: 'getKeywords', 3700 3701 /** 3702 * Converts space separated list of keywords into a regular expression string. 3703 * @param {String} str Space separated keywords. 3704 * @return {String} Returns regular expression string. 3705 */ 3706 value: function getKeywords(str) { 3707 var results = str.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '|'); 3708 3709 return '\\b(?:' + results + ')\\b'; 3710 } 3711 3712 /** 3713 * Makes a brush compatible with the `html-script` functionality. 3714 * @param {Object} regexGroup Object containing `left` and `right` regular expressions. 3715 */ 3716 3717 }, { 3718 key: 'forHtmlScript', 3719 value: function forHtmlScript(regexGroup) { 3720 var regex = { 'end': regexGroup.right.source }; 3721 3722 if (regexGroup.eof) { 3723 regex.end = '(?:(?:' + regex.end + ')|$)'; 3724 } 3725 3726 this.htmlScript = { 3727 left: { regex: regexGroup.left, css: 'script' }, 3728 right: { regex: regexGroup.right, css: 'script' }, 3729 code: (0, _syntaxhighlighterRegex.XRegExp)("(?<left>" + regexGroup.left.source + ")" + "(?<code>.*?)" + "(?<right>" + regex.end + ")", "sgi") 3730 }; 3731 } 3732 }, { 3733 key: 'getHtml', 3734 value: function getHtml(code) { 3735 var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 3736 3737 var matches = (0, _syntaxhighlighterMatch.applyRegexList)(code, this.regexList); 3738 var renderer = new _syntaxhighlighterHtmlRenderer2.default(code, matches, params); 3739 return renderer.getHtml(); 3740 } 3741 }]); 3742 3743 return BrushBase; 3744 }(); 3745 3746/***/ }), 3747/* 23 */ 3748/***/ (function(module, exports, __webpack_require__) { 3749 3750 'use strict'; 3751 3752 var BrushBase = __webpack_require__(22); 3753 var regexLib = __webpack_require__(3).commonRegExp; 3754 3755 function Brush() { 3756 // AppleScript brush by David Chambers 3757 // http://davidchambersdesign.com/ 3758 var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without'; 3759 var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle'; 3760 var specials = 'activate add alias ask attachment boolean class constant delete duplicate empty exists id integer list make message modal modified new no pi properties quit real record remove rest result reveal reverse run running save string word yes'; 3761 3762 this.regexList = [{ 3763 regex: /(--|#).*$/gm, 3764 css: 'comments' 3765 }, { 3766 regex: /\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm, // support nested comments 3767 css: 'comments' 3768 }, { 3769 regex: /"[\s\S]*?"/gm, 3770 css: 'string' 3771 }, { 3772 regex: /(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g, // operators 3773 css: 'color1' 3774 }, { 3775 regex: /(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g, // numbers 3776 css: 'color1' 3777 }, { 3778 regex: /(?:&(amp;|gt;|lt;)?|=|� |>|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/g, 3779 css: 'color2' 3780 }, { 3781 regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g, 3782 css: 'keyword' 3783 }, { 3784 regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals 3785 css: 'keyword' 3786 }, { 3787 regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g, 3788 css: 'color3' 3789 }, { 3790 regex: /\b(?:adding folder items to|after receiving|clipboard info|set the clipboard to|(the )?clipboard|entire contents|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|return(ed)?|second(?! item)(s)?|list (disks|folder)|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|starting at|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g, 3791 css: 'color4' 3792 }, { 3793 regex: /\b(?:tracks|paragraph|text item(s)?)\b/g, 3794 css: 'classes' 3795 }, { 3796 regex: /\b(?:AppleScript|album|video kind|grouping|length|text item delimiters|quoted form|POSIX path(?= of))\b/g, 3797 css: 'properties' 3798 }, { 3799 regex: /\b(?:run|exists|count)\b/g, 3800 css: 'commandNames' 3801 }, { 3802 regex: /\b(?:POSIX (file|path))\b/g, 3803 css: 'additionClasses' 3804 }, { 3805 regex: /\b(?:message|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|regexp|string result|using( delimiters)?|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor))\b/g, 3806 css: 'additionParameterNames' 3807 }, { 3808 regex: /\b(?:display(ing| (alert|dialog|mode))?|choose( ((remote )?application|color|folder|from list|URL))?|(do( shell)?|load|run|store) script|re_compile|find text)\b/g, 3809 css: 'additionCommandNames' 3810 }, { 3811 regex: /\b(?:xxx)\b/g, 3812 css: 'parameterNames' 3813 }, { 3814 regex: /\b(?:true|false|none)\b/g, 3815 css: 'enumeratedValues' 3816 }, { 3817 regex: new RegExp(this.getKeywords(specials), 'gm'), 3818 css: 'color3' 3819 }, { 3820 regex: new RegExp(this.getKeywords(keywords), 'gm'), 3821 css: 'keyword' 3822 }, { 3823 regex: new RegExp(this.getKeywords(ordinals), 'gm'), 3824 css: 'keyword' 3825 }]; 3826 }; 3827 3828 Brush.prototype = new BrushBase(); 3829 Brush.aliases = ['applescript']; 3830 module.exports = Brush; 3831 3832/***/ }), 3833/* 24 */ 3834/***/ (function(module, exports, __webpack_require__) { 3835 3836 'use strict'; 3837 3838 var BrushBase = __webpack_require__(22); 3839 var regexLib = __webpack_require__(3).commonRegExp; 3840 3841 function Brush() { 3842 // Created by Peter Atoria @ http://iAtoria.com 3843 3844 var inits = 'class interface function package'; 3845 3846 var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' + 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' + 'extends false final finally flash_proxy for get if implements import in include Infinity ' + 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' + 'Null Number Object object_proxy override parseFloat parseInt private protected public ' + 'return set static String super switch this throw true try typeof uint undefined unescape ' + 'use void while with'; 3847 3848 this.regexList = [{ 3849 regex: regexLib.singleLineCComments, 3850 css: 'comments' 3851 }, { 3852 regex: regexLib.multiLineCComments, 3853 css: 'comments' 3854 }, { 3855 regex: regexLib.doubleQuotedString, 3856 css: 'string' 3857 }, { 3858 regex: regexLib.singleQuotedString, 3859 css: 'string' 3860 }, { 3861 regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, 3862 css: 'value' 3863 }, { 3864 regex: new RegExp(this.getKeywords(inits), 'gm'), 3865 css: 'color3' 3866 }, { 3867 regex: new RegExp(this.getKeywords(keywords), 'gm'), 3868 css: 'keyword' 3869 }, { 3870 regex: new RegExp('var', 'gm'), 3871 css: 'variable' 3872 }, { 3873 regex: new RegExp('trace', 'gm'), 3874 css: 'color1' 3875 }]; 3876 3877 this.forHtmlScript(regexLib.scriptScriptTags); 3878 }; 3879 3880 Brush.prototype = new BrushBase(); 3881 Brush.aliases = ['actionscript3', 'as3']; 3882 module.exports = Brush; 3883 3884/***/ }), 3885/* 25 */ 3886/***/ (function(module, exports, __webpack_require__) { 3887 3888 'use strict'; 3889 3890 var BrushBase = __webpack_require__(22); 3891 var regexLib = __webpack_require__(3).commonRegExp; 3892 var XRegExp = __webpack_require__(3).XRegExp; 3893 var Match = __webpack_require__(5).Match; 3894 3895 function Brush() { 3896 function hereDocProcess(match, regexInfo) { 3897 var result = []; 3898 3899 if (match.here_doc != null) result.push(new Match(match.here_doc, match.index + match[0].indexOf(match.here_doc), 'string')); 3900 3901 if (match.full_tag != null) result.push(new Match(match.full_tag, match.index, 'preprocessor')); 3902 3903 if (match.end_tag != null) result.push(new Match(match.end_tag, match.index + match[0].lastIndexOf(match.end_tag), 'preprocessor')); 3904 3905 return result; 3906 } 3907 3908 var keywords = 'if fi then elif else for do done until while break continue case esac function return in eq ne ge le'; 3909 var commands = 'alias apropos awk basename base64 bash bc bg builtin bunzip2 bzcat bzip2 bzip2recover cal cat cd cfdisk chgrp chmod chown chroot' + 'cksum clear cmp comm command cp cron crontab crypt csplit cut date dc dd ddrescue declare df ' + 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + 'free fsck ftp gawk gcc gdb getconf getopts grep groups gunzip gzcat gzip hash head history hostname id ifconfig ' + 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + 'mv nasm nc ndisasm netstat nice nl nohup nslookup objdump od open op passwd paste pathchk ping popd pr printcap ' + 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + 'sleep sort source split ssh strace strings su sudo sum symlink sync tail tar tee test time ' + 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + 'vi watch wc whereis which who whoami Wget xargs xxd yes chsh zcat'; 3910 3911 this.regexList = [{ 3912 regex: /^#!.*$/gm, 3913 css: 'preprocessor bold' 3914 }, { 3915 regex: /\/[\w-\/]+/gm, 3916 css: 'plain' 3917 }, { 3918 regex: regexLib.singleLinePerlComments, 3919 css: 'comments' 3920 }, { 3921 regex: regexLib.doubleQuotedString, 3922 css: 'string' 3923 }, { 3924 regex: regexLib.singleQuotedString, 3925 css: 'string' 3926 }, { 3927 regex: new RegExp(this.getKeywords(keywords), 'gm'), 3928 css: 'keyword' 3929 }, { 3930 regex: new RegExp(this.getKeywords(commands), 'gm'), 3931 css: 'functions' 3932 }, { 3933 regex: new XRegExp("(?<full_tag>(<|<){2}(?<tag>\\w+)) .*$(?<here_doc>[\\s\\S]*)(?<end_tag>^\\k<tag>$)", 'gm'), 3934 func: hereDocProcess 3935 }]; 3936 } 3937 3938 Brush.prototype = new BrushBase(); 3939 Brush.aliases = ['bash', 'shell', 'sh']; 3940 module.exports = Brush; 3941 3942/***/ }), 3943/* 26 */ 3944/***/ (function(module, exports, __webpack_require__) { 3945 3946 'use strict'; 3947 3948 var BrushBase = __webpack_require__(22); 3949 var regexLib = __webpack_require__(3).commonRegExp; 3950 3951 function Brush() { 3952 // Contributed by Jen 3953 // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus 3954 3955 var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' + 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' + 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' + 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' + 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' + 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' + 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' + 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' + 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' + 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' + 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' + 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' + 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' + 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' + 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' + 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' + 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' + 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' + 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' + 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' + 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' + 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' + 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' + 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' + 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' + 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' + 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' + 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' + 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' + 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' + 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' + 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' + 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' + 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' + 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' + 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' + 'XmlValidate Year YesNoFormat'; 3956 3957 var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' + 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' + 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' + 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' + 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' + 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' + 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' + 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' + 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' + 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' + 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' + 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' + 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' + 'cfwindow cfxml cfzip cfzipparam'; 3958 3959 var operators = 'all and any between cross in join like not null or outer some'; 3960 3961 this.regexList = [{ 3962 regex: new RegExp('--(.*)$', 'gm'), 3963 css: 'comments' 3964 }, { 3965 regex: regexLib.xmlComments, 3966 css: 'comments' 3967 }, { 3968 regex: regexLib.doubleQuotedString, 3969 css: 'string' 3970 }, { 3971 regex: regexLib.singleQuotedString, 3972 css: 'string' 3973 }, { 3974 regex: new RegExp(this.getKeywords(funcs), 'gmi'), 3975 css: 'functions' 3976 }, { 3977 regex: new RegExp(this.getKeywords(operators), 'gmi'), 3978 css: 'color1' 3979 }, { 3980 regex: new RegExp(this.getKeywords(keywords), 'gmi'), 3981 css: 'keyword' 3982 }]; 3983 } 3984 3985 Brush.prototype = new BrushBase(); 3986 Brush.aliases = ['coldfusion', 'cf']; 3987 module.exports = Brush; 3988 3989/***/ }), 3990/* 27 */ 3991/***/ (function(module, exports, __webpack_require__) { 3992 3993 'use strict'; 3994 3995 var BrushBase = __webpack_require__(22); 3996 var regexLib = __webpack_require__(3).commonRegExp; 3997 3998 function Brush() { 3999 // Copyright 2006 Shin, YoungJin 4000 4001 var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' + 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' + 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' + 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' + 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' + 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' + 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' + 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' + 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' + 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' + 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' + 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' + 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' + 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' + 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' + 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' + 'char char16_t char32_t bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' + 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' + 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' + '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' + 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' + 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' + 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' + 'va_list wchar_t wctrans_t wctype_t wint_t signed'; 4002 4003 var keywords = 'alignas alignof auto break case catch class const constexpr decltype __finally __exception __try ' + 'const_cast continue private public protected __declspec ' + 'default delete deprecated dllexport dllimport do dynamic_cast ' + 'else enum explicit extern if for friend goto inline ' + 'mutable naked namespace new noinline noreturn nothrow noexcept nullptr ' + 'register reinterpret_cast return selectany ' + 'sizeof static static_cast static_assert struct switch template this ' + 'thread thread_local throw true false try typedef typeid typename union ' + 'using uuid virtual void volatile whcar_t while'; 4004 4005 var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint ' + 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' + 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' + 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' + 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' + 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' + 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' + 'fwrite getc getchar gets perror printf putc putchar puts remove ' + 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' + 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' + 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' + 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' + 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' + 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' + 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' + 'clock ctime difftime gmtime localtime mktime strftime time'; 4006 4007 this.regexList = [{ 4008 regex: regexLib.singleLineCComments, 4009 css: 'comments' 4010 }, { 4011 regex: regexLib.multiLineCComments, 4012 css: 'comments' 4013 }, { 4014 regex: regexLib.doubleQuotedString, 4015 css: 'string' 4016 }, { 4017 regex: regexLib.singleQuotedString, 4018 css: 'string' 4019 }, { 4020 regex: /^ *#.*/gm, 4021 css: 'preprocessor' 4022 }, { 4023 regex: new RegExp(this.getKeywords(datatypes), 'gm'), 4024 css: 'color1 bold' 4025 }, { 4026 regex: new RegExp(this.getKeywords(functions), 'gm'), 4027 css: 'functions bold' 4028 }, { 4029 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4030 css: 'keyword bold' 4031 }]; 4032 }; 4033 4034 Brush.prototype = new BrushBase(); 4035 Brush.aliases = ['cpp', 'cc', 'c++', 'c', 'h', 'hpp', 'h++']; 4036 module.exports = Brush; 4037 4038/***/ }), 4039/* 28 */ 4040/***/ (function(module, exports, __webpack_require__) { 4041 4042 'use strict'; 4043 4044 var BrushBase = __webpack_require__(22); 4045 var regexLib = __webpack_require__(3).commonRegExp; 4046 var Match = __webpack_require__(5).Match; 4047 4048 function Brush() { 4049 var keywords = 'abstract as base bool break byte case catch char checked class const ' + 'continue decimal default delegate do double else enum event explicit volatile ' + 'extern false finally fixed float for foreach get goto if implicit in int ' + 'interface internal is lock long namespace new null object operator out ' + 'override params private protected public readonly ref return sbyte sealed set ' + 'short sizeof stackalloc static string struct switch this throw true try ' + 'typeof uint ulong unchecked unsafe ushort using virtual void while var ' + 'from group by into select let where orderby join on equals ascending descending'; 4050 4051 function fixComments(match, regexInfo) { 4052 var css = match[0].indexOf("///") == 0 ? 'color1' : 'comments'; 4053 return [new Match(match[0], match.index, css)]; 4054 } 4055 4056 this.regexList = [{ 4057 regex: regexLib.singleLineCComments, 4058 func: fixComments 4059 }, { 4060 regex: regexLib.multiLineCComments, 4061 css: 'comments' 4062 }, { 4063 regex: /@"(?:[^"]|"")*"/g, 4064 css: 'string' 4065 }, { 4066 regex: regexLib.doubleQuotedString, 4067 css: 'string' 4068 }, { 4069 regex: regexLib.singleQuotedString, 4070 css: 'string' 4071 }, { 4072 regex: /^\s*#.*/gm, 4073 css: 'preprocessor' 4074 }, { 4075 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4076 css: 'keyword' 4077 }, { 4078 regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, 4079 css: 'keyword' 4080 }, { 4081 regex: /\byield(?=\s+(?:return|break)\b)/g, 4082 css: 'keyword' 4083 }]; 4084 4085 this.forHtmlScript(regexLib.aspScriptTags); 4086 }; 4087 4088 Brush.prototype = new BrushBase(); 4089 Brush.aliases = ['c#', 'c-sharp', 'csharp']; 4090 module.exports = Brush; 4091 4092/***/ }), 4093/* 29 */ 4094/***/ (function(module, exports, __webpack_require__) { 4095 4096 'use strict'; 4097 4098 var BrushBase = __webpack_require__(22); 4099 var regexLib = __webpack_require__(3).commonRegExp; 4100 4101 function Brush() { 4102 function getKeywordsCSS(str) { 4103 return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; 4104 }; 4105 4106 function getValuesCSS(str) { 4107 return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; 4108 }; 4109 4110 var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index'; 4111 4112 var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder ' + 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed ' + 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double ' + 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia ' + 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic ' + 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha ' + 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower ' + 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset ' + 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side ' + 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow ' + 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize ' + 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal ' + 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin ' + 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; 4113 4114 var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; 4115 4116 this.regexList = [{ 4117 regex: regexLib.multiLineCComments, 4118 css: 'comments' 4119 }, { 4120 regex: regexLib.doubleQuotedString, 4121 css: 'string' 4122 }, { 4123 regex: regexLib.singleQuotedString, 4124 css: 'string' 4125 }, { 4126 regex: /\#[a-fA-F0-9]{3,6}/g, 4127 css: 'value' 4128 }, { 4129 regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, 4130 css: 'value' 4131 }, { 4132 regex: /!important/g, 4133 css: 'color3' 4134 }, { 4135 regex: new RegExp(getKeywordsCSS(keywords), 'gm'), 4136 css: 'keyword' 4137 }, { 4138 regex: new RegExp(getValuesCSS(values), 'g'), 4139 css: 'value' 4140 }, { 4141 regex: new RegExp(this.getKeywords(fonts), 'g'), 4142 css: 'color1' 4143 }]; 4144 4145 this.forHtmlScript({ 4146 left: /(<|<)\s*style.*?(>|>)/gi, 4147 right: /(<|<)\/\s*style\s*(>|>)/gi 4148 }); 4149 }; 4150 4151 Brush.prototype = new BrushBase(); 4152 Brush.aliases = ['css']; 4153 module.exports = Brush; 4154 4155/***/ }), 4156/* 30 */ 4157/***/ (function(module, exports, __webpack_require__) { 4158 4159 'use strict'; 4160 4161 var BrushBase = __webpack_require__(22); 4162 var regexLib = __webpack_require__(3).commonRegExp; 4163 4164 function Brush() { 4165 var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' + 'case char class comp const constructor currency destructor div do double ' + 'downto else end except exports extended false file finalization finally ' + 'for function goto if implementation in inherited int64 initialization ' + 'integer interface is label library longint longword mod nil not object ' + 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' + 'pint64 pointer private procedure program property pshortstring pstring ' + 'pvariant pwidechar pwidestring protected public published raise real real48 ' + 'record repeat set shl shortint shortstring shr single smallint string then ' + 'threadvar to true try type unit until uses val var varirnt while widechar ' + 'widestring with word write writeln xor'; 4166 4167 this.regexList = [{ 4168 regex: /\(\*[\s\S]*?\*\)/gm, 4169 css: 'comments' 4170 }, { 4171 regex: /{(?!\$)[\s\S]*?}/gm, 4172 css: 'comments' 4173 }, { 4174 regex: regexLib.singleLineCComments, 4175 css: 'comments' 4176 }, { 4177 regex: regexLib.singleQuotedString, 4178 css: 'string' 4179 }, { 4180 regex: /\{\$[a-zA-Z]+ .+\}/g, 4181 css: 'color1' 4182 }, { 4183 regex: /\b[\d\.]+\b/g, 4184 css: 'value' 4185 }, { 4186 regex: /\$[a-zA-Z0-9]+\b/g, 4187 css: 'value' 4188 }, { 4189 regex: new RegExp(this.getKeywords(keywords), 'gmi'), 4190 css: 'keyword' 4191 }]; 4192 }; 4193 4194 Brush.prototype = new BrushBase(); 4195 Brush.aliases = ['delphi', 'pascal', 'pas']; 4196 module.exports = Brush; 4197 4198/***/ }), 4199/* 31 */ 4200/***/ (function(module, exports, __webpack_require__) { 4201 4202 'use strict'; 4203 4204 var BrushBase = __webpack_require__(22); 4205 var regexLib = __webpack_require__(3).commonRegExp; 4206 4207 function Brush() { 4208 this.regexList = [{ 4209 regex: /^\+\+\+ .*$/gm, 4210 css: 'color2' 4211 }, { 4212 regex: /^\-\-\- .*$/gm, 4213 css: 'color2' 4214 }, { 4215 regex: /^\s.*$/gm, 4216 css: 'color1' 4217 }, { 4218 regex: /^@@.*@@.*$/gm, 4219 css: 'variable' 4220 }, { 4221 regex: /^\+.*$/gm, 4222 css: 'string' 4223 }, { 4224 regex: /^\-.*$/gm, 4225 css: 'color3' 4226 }]; 4227 }; 4228 4229 Brush.prototype = new BrushBase(); 4230 Brush.aliases = ['diff', 'patch']; 4231 module.exports = Brush; 4232 4233/***/ }), 4234/* 32 */ 4235/***/ (function(module, exports, __webpack_require__) { 4236 4237 'use strict'; 4238 4239 var BrushBase = __webpack_require__(22); 4240 var regexLib = __webpack_require__(3).commonRegExp; 4241 4242 function Brush() { 4243 // Contributed by Jean-Lou Dupont 4244 // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html 4245 4246 // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5 4247 var keywords = 'after and andalso band begin bnot bor bsl bsr bxor ' + 'case catch cond div end fun if let not of or orelse ' + 'query receive rem try when xor' + 4248 // additional 4249 ' module export import define'; 4250 4251 this.regexList = [{ 4252 regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), 4253 css: 'constants' 4254 }, { 4255 regex: new RegExp("\\%.+", 'gm'), 4256 css: 'comments' 4257 }, { 4258 regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), 4259 css: 'preprocessor' 4260 }, { 4261 regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), 4262 css: 'functions' 4263 }, { 4264 regex: regexLib.doubleQuotedString, 4265 css: 'string' 4266 }, { 4267 regex: regexLib.singleQuotedString, 4268 css: 'string' 4269 }, { 4270 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4271 css: 'keyword' 4272 }]; 4273 }; 4274 4275 Brush.prototype = new BrushBase(); 4276 Brush.aliases = ['erl', 'erlang']; 4277 module.exports = Brush; 4278 4279/***/ }), 4280/* 33 */ 4281/***/ (function(module, exports, __webpack_require__) { 4282 4283 'use strict'; 4284 4285 var BrushBase = __webpack_require__(22); 4286 var regexLib = __webpack_require__(3).commonRegExp; 4287 4288 function Brush() { 4289 // Contributed by Andres Almiray 4290 // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter 4291 4292 var keywords = 'as assert break case catch class continue def default do else extends finally ' + 'if in implements import instanceof interface new package property return switch ' + 'throw throws try while public protected private static'; 4293 var types = 'void boolean byte char short int long float double'; 4294 var constants = 'null'; 4295 var methods = 'allProperties count get size ' + 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' + 'findIndexOf grep inject max min reverseEach sort ' + 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' + 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' + 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' + 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' + 'transformChar transformLine withOutputStream withPrintWriter withStream ' + 'withStreams withWriter withWriterAppend write writeLine ' + 'dump inspect invokeMethod print println step times upto use waitForOrKill ' + 'getText'; 4296 4297 this.regexList = [{ 4298 regex: regexLib.singleLineCComments, 4299 css: 'comments' 4300 }, { 4301 regex: regexLib.multiLineCComments, 4302 css: 'comments' 4303 }, { 4304 regex: regexLib.doubleQuotedString, 4305 css: 'string' 4306 }, { 4307 regex: regexLib.singleQuotedString, 4308 css: 'string' 4309 }, { 4310 regex: /""".*"""/g, 4311 css: 'string' 4312 }, { 4313 regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), 4314 css: 'value' 4315 }, { 4316 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4317 css: 'keyword' 4318 }, { 4319 regex: new RegExp(this.getKeywords(types), 'gm'), 4320 css: 'color1' 4321 }, { 4322 regex: new RegExp(this.getKeywords(constants), 'gm'), 4323 css: 'constants' 4324 }, { 4325 regex: new RegExp(this.getKeywords(methods), 'gm'), 4326 css: 'functions' 4327 }]; 4328 4329 this.forHtmlScript(regexLib.aspScriptTags); 4330 } 4331 4332 Brush.prototype = new BrushBase(); 4333 Brush.aliases = ['groovy']; 4334 module.exports = Brush; 4335 4336/***/ }), 4337/* 34 */ 4338/***/ (function(module, exports, __webpack_require__) { 4339 4340 'use strict'; 4341 4342 var BrushBase = __webpack_require__(22); 4343 var regexLib = __webpack_require__(3).commonRegExp; 4344 4345 function Brush() { 4346 4347 var inits = 'class interface package macro enum typedef extends implements dynamic in for if while else do try switch case catch'; 4348 4349 var keywords = 'return break continue new throw cast using import function public private inline static untyped callback true false null Int Float String Void Std Bool Dynamic Array Vector'; 4350 4351 this.regexList = [{ 4352 regex: regexLib.singleLineCComments, 4353 css: 'comments' 4354 }, { 4355 regex: regexLib.multiLineCComments, 4356 css: 'comments' 4357 }, { 4358 regex: regexLib.doubleQuotedString, 4359 css: 'string' 4360 }, { 4361 regex: regexLib.singleQuotedString, 4362 css: 'string' 4363 }, { 4364 regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, 4365 css: 'value' 4366 }, { 4367 regex: new RegExp(this.getKeywords(inits), 'gm'), 4368 css: 'color3' 4369 }, { 4370 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4371 css: 'keyword' 4372 }, { 4373 regex: new RegExp('var', 'gm'), 4374 css: 'variable' 4375 }, { 4376 regex: new RegExp('trace', 'gm'), 4377 css: 'color1' 4378 }, { 4379 regex: new RegExp('#if', 'gm'), 4380 css: 'comments' 4381 }, { 4382 regex: new RegExp('#elseif', 'gm'), 4383 css: 'comments' 4384 }, { 4385 regex: new RegExp('#end', 'gm'), 4386 css: 'comments' 4387 }, { 4388 regex: new RegExp('#error', 'gm'), 4389 css: 'comments' 4390 }]; 4391 4392 //standard compiler conditionals flags 4393 var flags = ["debug", "error", "cpp", "js", "neko", "php", "flash", "flash8", "flash9", "flash10", "flash10", "mobile", "desktop", "web", "ios", "android", "iphone"]; 4394 4395 //append the flags to the array with a ! operator 4396 var i; 4397 var length = flags.length; 4398 for (i = 0; i <= length - 1; i++) { 4399 this.regexList.push({ 4400 regex: new RegExp(flags[i], 'gm'), 4401 css: 'comments' 4402 }); 4403 this.regexList.push({ 4404 regex: new RegExp('!' + flags[i], 'gm'), 4405 css: 'comments' 4406 }); 4407 } 4408 4409 this.forHtmlScript(regexLib.scriptScriptTags); 4410 } 4411 4412 ; 4413 4414 Brush.prototype = new BrushBase(); 4415 Brush.aliases = ['haxe', 'hx']; 4416 module.exports = Brush; 4417 4418/***/ }), 4419/* 35 */ 4420/***/ (function(module, exports, __webpack_require__) { 4421 4422 'use strict'; 4423 4424 var BrushBase = __webpack_require__(22); 4425 var regexLib = __webpack_require__(3).commonRegExp; 4426 4427 function Brush() { 4428 var keywords = 'abstract assert boolean break byte case catch char class const ' + 'continue default do double else enum extends ' + 'false final finally float for goto if implements import ' + 'instanceof int interface long native new null ' + 'package private protected public return ' + 'short static strictfp super switch synchronized this throw throws true ' + 'transient try void volatile while'; 4429 4430 this.regexList = [{ 4431 regex: regexLib.singleLineCComments, 4432 css: 'comments' 4433 }, { 4434 regex: /\/\*([^\*][\s\S]*?)?\*\//gm, 4435 css: 'comments' 4436 }, { 4437 regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, 4438 css: 'preprocessor' 4439 }, { 4440 regex: regexLib.doubleQuotedString, 4441 css: 'string' 4442 }, { 4443 regex: regexLib.singleQuotedString, 4444 css: 'string' 4445 }, { 4446 regex: /\b([\d]+(\.[\d]+)?f?|[\d]+l?|0x[a-f0-9]+)\b/gi, 4447 css: 'value' 4448 }, { 4449 regex: /(?!\@interface\b)\@[\$\w]+\b/g, 4450 css: 'color1' 4451 }, { 4452 regex: /\@interface\b/g, 4453 css: 'color2' 4454 }, { 4455 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4456 css: 'keyword' 4457 }]; 4458 4459 this.forHtmlScript({ 4460 left: /(<|<)%[@!=]?/g, 4461 right: /%(>|>)/g 4462 }); 4463 }; 4464 4465 Brush.prototype = new BrushBase(); 4466 Brush.aliases = ['java']; 4467 module.exports = Brush; 4468 4469/***/ }), 4470/* 36 */ 4471/***/ (function(module, exports, __webpack_require__) { 4472 4473 'use strict'; 4474 4475 var BrushBase = __webpack_require__(22); 4476 var regexLib = __webpack_require__(3).commonRegExp; 4477 4478 function Brush() { 4479 // Contributed by Patrick Webster 4480 // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html 4481 var datatypes = 'Boolean Byte Character Double Duration ' + 'Float Integer Long Number Short String Void'; 4482 4483 var keywords = 'abstract after and as assert at before bind bound break catch class ' + 'continue def delete else exclusive extends false finally first for from ' + 'function if import in indexof init insert instanceof into inverse last ' + 'lazy mixin mod nativearray new not null on or override package postinit ' + 'protected public public-init public-read replace return reverse sizeof ' + 'step super then this throw true try tween typeof var where while with ' + 'attribute let private readonly static trigger'; 4484 4485 this.regexList = [{ 4486 regex: regexLib.singleLineCComments, 4487 css: 'comments' 4488 }, { 4489 regex: regexLib.multiLineCComments, 4490 css: 'comments' 4491 }, { 4492 regex: regexLib.singleQuotedString, 4493 css: 'string' 4494 }, { 4495 regex: regexLib.doubleQuotedString, 4496 css: 'string' 4497 }, { 4498 regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, 4499 css: 'color2' 4500 }, { 4501 regex: new RegExp(this.getKeywords(datatypes), 'gm'), 4502 css: 'variable' 4503 }, { 4504 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4505 css: 'keyword' 4506 }]; 4507 this.forHtmlScript(regexLib.aspScriptTags); 4508 }; 4509 4510 Brush.prototype = new BrushBase(); 4511 Brush.aliases = ['jfx', 'javafx']; 4512 module.exports = Brush; 4513 4514/***/ }), 4515/* 37 */ 4516/***/ (function(module, exports, __webpack_require__) { 4517 4518 'use strict'; 4519 4520 var BrushBase = __webpack_require__(22); 4521 var regexLib = __webpack_require__(3).commonRegExp; 4522 4523 function Brush() { 4524 var keywords = 'break case catch class continue ' + 'default delete do else enum export extends false ' + 'for from as function if implements import in instanceof ' + 'interface let new null package private protected ' + 'static return super switch ' + 'this throw true try typeof var while with yield'; 4525 4526 this.regexList = [{ 4527 regex: regexLib.multiLineDoubleQuotedString, 4528 css: 'string' 4529 }, { 4530 regex: regexLib.multiLineSingleQuotedString, 4531 css: 'string' 4532 }, { 4533 regex: regexLib.singleLineCComments, 4534 css: 'comments' 4535 }, { 4536 regex: regexLib.multiLineCComments, 4537 css: 'comments' 4538 }, { 4539 regex: /\s*#.*/gm, 4540 css: 'preprocessor' 4541 }, { 4542 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4543 css: 'keyword' 4544 }]; 4545 4546 this.forHtmlScript(regexLib.scriptScriptTags); 4547 } 4548 4549 Brush.prototype = new BrushBase(); 4550 Brush.aliases = ['js', 'jscript', 'javascript', 'json']; 4551 module.exports = Brush; 4552 4553/***/ }), 4554/* 38 */ 4555/***/ (function(module, exports, __webpack_require__) { 4556 4557 'use strict'; 4558 4559 var BrushBase = __webpack_require__(22); 4560 var regexLib = __webpack_require__(3).commonRegExp; 4561 4562 function Brush() { 4563 // Contributed by David Simmons-Duffin and Marty Kube 4564 4565 var funcs = 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' + 'chroot close closedir connect cos crypt defined delete each endgrent ' + 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' + 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' + 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' + 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' + 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' + 'getservbyname getservbyport getservent getsockname getsockopt glob ' + 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' + 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' + 'oct open opendir ord pack pipe pop pos print printf prototype push ' + 'quotemeta rand read readdir readline readlink readpipe recv rename ' + 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' + 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' + 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' + 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' + 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' + 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' + 'undef unlink unpack unshift utime values vec wait waitpid warn write ' + 4566 // feature 4567 'say'; 4568 4569 var keywords = 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' + 'for foreach goto if import last local my next no our package redo ref ' + 'require return sub tie tied unless untie until use wantarray while ' + 4570 // feature 4571 'given when default ' + 4572 // Try::Tiny 4573 'try catch finally ' + 4574 // Moose 4575 'has extends with before after around override augment'; 4576 4577 this.regexList = [{ 4578 regex: /(<<|<<)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g, 4579 css: 'string' 4580 }, { 4581 regex: /#.*$/gm, 4582 css: 'comments' 4583 }, { 4584 regex: /^#!.*\n/g, 4585 css: 'preprocessor' 4586 }, { 4587 regex: /-?\w+(?=\s*=(>|>))/g, 4588 css: 'string' 4589 }, 4590 4591 // is this too much? 4592 { 4593 regex: /\bq[qwxr]?\([\s\S]*?\)/g, 4594 css: 'string' 4595 }, { 4596 regex: /\bq[qwxr]?\{[\s\S]*?\}/g, 4597 css: 'string' 4598 }, { 4599 regex: /\bq[qwxr]?\[[\s\S]*?\]/g, 4600 css: 'string' 4601 }, { 4602 regex: /\bq[qwxr]?(<|<)[\s\S]*?(>|>)/g, 4603 css: 'string' 4604 }, { 4605 regex: /\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g, 4606 css: 'string' 4607 }, { 4608 regex: regexLib.doubleQuotedString, 4609 css: 'string' 4610 }, { 4611 regex: regexLib.singleQuotedString, 4612 css: 'string' 4613 }, { 4614 regex: /(?:&|[$@%*]|\$#)\$?[a-zA-Z_](\w+|::)*/g, 4615 css: 'variable' 4616 }, { 4617 regex: /\b__(?:END|DATA)__\b[\s\S]*$/g, 4618 css: 'comments' 4619 }, { 4620 regex: /(^|\n)=\w[\s\S]*?(\n=cut\s*(?=\n)|$)/g, 4621 css: 'comments' 4622 }, { 4623 regex: new RegExp(this.getKeywords(funcs), 'gm'), 4624 css: 'functions' 4625 }, { 4626 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4627 css: 'keyword' 4628 }]; 4629 4630 this.forHtmlScript(regexLib.phpScriptTags); 4631 } 4632 4633 Brush.prototype = new BrushBase(); 4634 Brush.aliases = ['perl', 'Perl', 'pl']; 4635 module.exports = Brush; 4636 4637/***/ }), 4638/* 39 */ 4639/***/ (function(module, exports, __webpack_require__) { 4640 4641 'use strict'; 4642 4643 Object.defineProperty(exports, "__esModule", { 4644 value: true 4645 }); 4646 4647 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 4648 4649 var _brushBase = __webpack_require__(22); 4650 4651 var _brushBase2 = _interopRequireDefault(_brushBase); 4652 4653 var _syntaxhighlighterRegex = __webpack_require__(3); 4654 4655 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 4656 4657 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4658 4659 function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } 4660 4661 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 4662 4663 var functions = 'abs acos acosh addcslashes addslashes ' + 'array_change_key_case array_chunk array_combine array_count_values array_diff ' + 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill ' + 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key ' + 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map ' + 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product ' + 'array_push array_rand array_reduce array_reverse array_search array_shift ' + 'array_slice array_splice array_sum array_udiff array_udiff_assoc ' + 'array_udiff_uassoc array_uintersect array_uintersect_assoc ' + 'array_uintersect_uassoc array_unique array_unshift array_values array_walk ' + 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert ' + 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress ' + 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir ' + 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists ' + 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct ' + 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log ' + 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded ' + 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents ' + 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype ' + 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf ' + 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname ' + 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt ' + 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext ' + 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set ' + 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double ' + 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long ' + 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault ' + 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br ' + 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir ' + 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split ' + 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes ' + 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk ' + 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime ' + 'strtoupper strtr strval substr substr_compare'; 4664 4665 var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' + 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final finally for foreach ' + 'function global goto if implements include include_once interface instanceof insteadof namespace new ' + 'old_function or private protected public return require require_once static switch ' + 'trait throw try use const while xor yield '; 4666 4667 var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__'; 4668 4669 var Brush = function (_BrushBase) { 4670 _inherits(Brush, _BrushBase); 4671 4672 _createClass(Brush, null, [{ 4673 key: 'aliases', 4674 get: function get() { 4675 return ['php']; 4676 } 4677 }]); 4678 4679 function Brush() { 4680 _classCallCheck(this, Brush); 4681 4682 var _this = _possibleConstructorReturn(this, (Brush.__proto__ || Object.getPrototypeOf(Brush)).call(this)); 4683 4684 _this.regexList = [{ regex: _syntaxhighlighterRegex.commonRegExp.singleLineCComments, css: 'comments' }, { regex: _syntaxhighlighterRegex.commonRegExp.multiLineCComments, css: 'comments' }, { regex: _syntaxhighlighterRegex.commonRegExp.doubleQuotedString, css: 'string' }, { regex: _syntaxhighlighterRegex.commonRegExp.singleQuotedString, css: 'string' }, { regex: /\$\w+/g, css: 'variable' }, { regex: new RegExp(_this.getKeywords(functions), 'gmi'), css: 'functions' }, { regex: new RegExp(_this.getKeywords(constants), 'gmi'), css: 'constants' }, { regex: new RegExp(_this.getKeywords(keywords), 'gm'), css: 'keyword' }]; 4685 4686 _this.forHtmlScript(_syntaxhighlighterRegex.commonRegExp.phpScriptTags); 4687 return _this; 4688 } 4689 4690 return Brush; 4691 }(_brushBase2.default); 4692 4693 exports.default = Brush; 4694 4695/***/ }), 4696/* 40 */ 4697/***/ (function(module, exports, __webpack_require__) { 4698 4699 'use strict'; 4700 4701 var BrushBase = __webpack_require__(22); 4702 var regexLib = __webpack_require__(3).commonRegExp; 4703 4704 function Brush() { 4705 this.regexList = []; 4706 }; 4707 4708 Brush.prototype = new BrushBase(); 4709 Brush.aliases = ['text', 'plain']; 4710 module.exports = Brush; 4711 4712/***/ }), 4713/* 41 */ 4714/***/ (function(module, exports, __webpack_require__) { 4715 4716 'use strict'; 4717 4718 var BrushBase = __webpack_require__(22); 4719 var regexLib = __webpack_require__(3).commonRegExp; 4720 4721 function Brush() { 4722 // Contributed by Joel 'Jaykul' Bennett, http://PoshCode.org | http://HuddledMasses.org 4723 var keywords = 'while validateset validaterange validatepattern validatelength validatecount ' + 'until trap switch return ref process param parameter in if global: ' + 'function foreach for finally filter end elseif else dynamicparam do default ' + 'continue cmdletbinding break begin alias \\? % #script #private #local #global ' + 'mandatory parametersetname position valuefrompipeline ' + 'valuefrompipelinebypropertyname valuefromremainingarguments helpmessage '; 4724 4725 var operators = ' and as band bnot bor bxor casesensitive ccontains ceq cge cgt cle ' + 'clike clt cmatch cne cnotcontains cnotlike cnotmatch contains ' + 'creplace eq exact f file ge gt icontains ieq ige igt ile ilike ilt ' + 'imatch ine inotcontains inotlike inotmatch ireplace is isnot le like ' + 'lt match ne not notcontains notlike notmatch or regex replace wildcard'; 4726 4727 var verbs = 'write where wait use update unregister undo trace test tee take suspend ' + 'stop start split sort skip show set send select scroll resume restore ' + 'restart resolve resize reset rename remove register receive read push ' + 'pop ping out new move measure limit join invoke import group get format ' + 'foreach export expand exit enter enable disconnect disable debug cxnew ' + 'copy convertto convertfrom convert connect complete compare clear ' + 'checkpoint aggregate add'; 4728 4729 // I can't find a way to match the comment based help in multi-line comments, because SH won't highlight in highlights, and javascript doesn't support lookbehind 4730 var commenthelp = ' component description example externalhelp forwardhelpcategory forwardhelptargetname forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsis'; 4731 4732 this.regexList = [{ 4733 regex: new RegExp('^\\s*#[#\\s]*\\.(' + this.getKeywords(commenthelp) + ').*$', 'gim'), 4734 css: 'preprocessor help bold' 4735 }, { 4736 regex: regexLib.singleLinePerlComments, 4737 css: 'comments' 4738 }, { 4739 regex: /(<|<)#[\s\S]*?#(>|>)/gm, 4740 css: 'comments here' 4741 }, { 4742 regex: new RegExp('@"\\n[\\s\\S]*?\\n"@', 'gm'), 4743 css: 'script string here' 4744 }, { 4745 regex: new RegExp("@'\\n[\\s\\S]*?\\n'@", 'gm'), 4746 css: 'script string single here' 4747 }, { 4748 regex: new RegExp('"(?:\\$\\([^\\)]*\\)|[^"]|`"|"")*[^`]"', 'g'), 4749 css: 'string' 4750 }, { 4751 regex: new RegExp("'(?:[^']|'')*'", 'g'), 4752 css: 'string single' 4753 }, { 4754 regex: new RegExp('[\\$|@|@@](?:(?:global|script|private|env):)?[A-Z0-9_]+', 'gi'), 4755 css: 'variable' 4756 }, { 4757 regex: new RegExp('(?:\\b' + verbs.replace(/ /g, '\\b|\\b') + ')-[a-zA-Z_][a-zA-Z0-9_]*', 'gmi'), 4758 css: 'functions' 4759 }, { 4760 regex: new RegExp(this.getKeywords(keywords), 'gmi'), 4761 css: 'keyword' 4762 }, { 4763 regex: new RegExp('-' + this.getKeywords(operators), 'gmi'), 4764 css: 'operator value' 4765 }, { 4766 regex: new RegExp('\\[[A-Z_\\[][A-Z0-9_. `,\\[\\]]*\\]', 'gi'), 4767 css: 'constants' 4768 }, { 4769 regex: new RegExp('\\s+-(?!' + this.getKeywords(operators) + ')[a-zA-Z_][a-zA-Z0-9_]*', 'gmi'), 4770 css: 'color1' 4771 }]; 4772 }; 4773 4774 Brush.prototype = new BrushBase(); 4775 Brush.aliases = ['powershell', 'ps', 'posh']; 4776 module.exports = Brush; 4777 4778/***/ }), 4779/* 42 */ 4780/***/ (function(module, exports, __webpack_require__) { 4781 4782 'use strict'; 4783 4784 var BrushBase = __webpack_require__(22); 4785 var regexLib = __webpack_require__(3).commonRegExp; 4786 4787 function Brush() { 4788 // Contributed by Gheorghe Milas and Ahmad Sherif 4789 4790 var keywords = 'and assert break class continue def del elif else ' + 'except exec finally for from global if import in is ' + 'lambda not or pass raise return try yield while'; 4791 4792 var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' + 'chr classmethod cmp coerce compile complex delattr dict dir ' + 'divmod enumerate eval execfile file filter float format frozenset ' + 'getattr globals hasattr hash help hex id input int intern ' + 'isinstance issubclass iter len list locals long map max min next ' + 'object oct open ord pow print property range raw_input reduce ' + 'reload repr reversed round set setattr slice sorted staticmethod ' + 'str sum super tuple type type unichr unicode vars xrange zip'; 4793 4794 var special = 'None True False self cls class_'; 4795 4796 this.regexList = [{ 4797 regex: regexLib.singleLinePerlComments, 4798 css: 'comments' 4799 }, { 4800 regex: /^\s*@\w+/gm, 4801 css: 'decorator' 4802 }, { 4803 regex: /(['\"]{3})([^\1])*?\1/gm, 4804 css: 'comments' 4805 }, { 4806 regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, 4807 css: 'string' 4808 }, { 4809 regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, 4810 css: 'string' 4811 }, { 4812 regex: /\+|\-|\*|\/|\%|=|==/gm, 4813 css: 'keyword' 4814 }, { 4815 regex: /\b\d+\.?\w*/g, 4816 css: 'value' 4817 }, { 4818 regex: new RegExp(this.getKeywords(funcs), 'gmi'), 4819 css: 'functions' 4820 }, { 4821 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4822 css: 'keyword' 4823 }, { 4824 regex: new RegExp(this.getKeywords(special), 'gm'), 4825 css: 'color1' 4826 }]; 4827 4828 this.forHtmlScript(regexLib.aspScriptTags); 4829 }; 4830 4831 Brush.prototype = new BrushBase(); 4832 Brush.aliases = ['py', 'python']; 4833 module.exports = Brush; 4834 4835/***/ }), 4836/* 43 */ 4837/***/ (function(module, exports, __webpack_require__) { 4838 4839 'use strict'; 4840 4841 var BrushBase = __webpack_require__(22); 4842 var regexLib = __webpack_require__(3).commonRegExp; 4843 4844 function Brush() { 4845 // Contributed by Erik Peterson. 4846 4847 var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' + 'END end ensure false for if in module new next nil not or raise redo rescue retry return ' + 'self super then throw true undef unless until when while yield'; 4848 4849 var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' + 'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' + 'ThreadGroup Thread Time TrueClass'; 4850 4851 this.regexList = [{ 4852 regex: regexLib.singleLinePerlComments, 4853 css: 'comments' 4854 }, { 4855 regex: regexLib.doubleQuotedString, 4856 css: 'string' 4857 }, { 4858 regex: regexLib.singleQuotedString, 4859 css: 'string' 4860 }, { 4861 regex: /\b[A-Z0-9_]+\b/g, 4862 css: 'constants' 4863 }, { 4864 regex: /:[a-z][A-Za-z0-9_]*/g, 4865 css: 'color2' 4866 }, { 4867 regex: /(\$|@@|@)\w+/g, 4868 css: 'variable bold' 4869 }, { 4870 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4871 css: 'keyword' 4872 }, { 4873 regex: new RegExp(this.getKeywords(builtins), 'gm'), 4874 css: 'color1' 4875 }]; 4876 4877 this.forHtmlScript(regexLib.aspScriptTags); 4878 }; 4879 4880 Brush.prototype = new BrushBase(); 4881 Brush.aliases = ['ruby', 'rails', 'ror', 'rb']; 4882 module.exports = Brush; 4883 4884/***/ }), 4885/* 44 */ 4886/***/ (function(module, exports, __webpack_require__) { 4887 4888 'use strict'; 4889 4890 var BrushBase = __webpack_require__(22); 4891 var regexLib = __webpack_require__(3).commonRegExp; 4892 4893 function Brush() { 4894 function getKeywordsCSS(str) { 4895 return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b'; 4896 }; 4897 4898 function getValuesCSS(str) { 4899 return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b'; 4900 }; 4901 4902 function getKeywordsPrependedBy(keywords, by) { 4903 return '(?:' + keywords.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '|' + by + '\\b').replace(/^/, by + '\\b') + ')\\b'; 4904 } 4905 4906 var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' + 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' + 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' + 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' + 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' + 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' + 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' + 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' + 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' + 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' + 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' + 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' + 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' + 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index zoom'; 4907 4908 var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder ' + 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed ' + 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero digits disc dotted double ' + 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia ' + 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic ' + 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha ' + 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower ' + 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset ' + 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side ' + 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow ' + 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize ' + 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal ' + 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin ' + 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow'; 4909 4910 var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif'; 4911 4912 var statements = 'important default'; 4913 var preprocessor = 'import extend debug warn if else for while mixin function include content media'; 4914 4915 var r = regexLib; 4916 4917 this.regexList = [{ 4918 regex: r.multiLineCComments, 4919 css: 'comments' 4920 }, { 4921 regex: r.singleLineCComments, 4922 css: 'comments' 4923 }, { 4924 regex: r.doubleQuotedString, 4925 css: 'string' 4926 }, { 4927 regex: r.singleQuotedString, 4928 css: 'string' 4929 }, { 4930 regex: /\#[a-fA-F0-9]{3,6}/g, 4931 css: 'value' 4932 }, { 4933 regex: /\b(-?\d+)(\.\d+)?(px|em|rem|pt|\:|\%|)\b/g, 4934 css: 'value' 4935 }, { 4936 regex: /\$[\w-]+/g, 4937 css: 'variable' 4938 }, { 4939 regex: new RegExp(getKeywordsPrependedBy(statements, '!'), 'g'), 4940 css: 'color3' 4941 }, { 4942 regex: new RegExp(getKeywordsPrependedBy(preprocessor, '@'), 'g'), 4943 css: 'preprocessor' 4944 }, { 4945 regex: new RegExp(getKeywordsCSS(keywords), 'gm'), 4946 css: 'keyword' 4947 }, { 4948 regex: new RegExp(getValuesCSS(values), 'g'), 4949 css: 'value' 4950 }, { 4951 regex: new RegExp(this.getKeywords(fonts), 'g'), 4952 css: 'color1' 4953 }]; 4954 }; 4955 4956 Brush.prototype = new BrushBase(); 4957 Brush.aliases = ['sass', 'scss']; 4958 module.exports = Brush; 4959 4960/***/ }), 4961/* 45 */ 4962/***/ (function(module, exports, __webpack_require__) { 4963 4964 'use strict'; 4965 4966 var BrushBase = __webpack_require__(22); 4967 var regexLib = __webpack_require__(3).commonRegExp; 4968 4969 function Brush() { 4970 // Contributed by Yegor Jbanov and David Bernard. 4971 4972 var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' + 'override try lazy for var catch throw type extends class while with new final yield abstract ' + 'else do if return protected private this package false'; 4973 4974 var keyops = '[_:=><%#@]+'; 4975 4976 this.regexList = [{ 4977 regex: regexLib.singleLineCComments, 4978 css: 'comments' 4979 }, { 4980 regex: regexLib.multiLineCComments, 4981 css: 'comments' 4982 }, { 4983 regex: regexLib.multiLineSingleQuotedString, 4984 css: 'string' 4985 }, { 4986 regex: regexLib.multiLineDoubleQuotedString, 4987 css: 'string' 4988 }, { 4989 regex: regexLib.singleQuotedString, 4990 css: 'string' 4991 }, { 4992 regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, 4993 css: 'value' 4994 }, { 4995 regex: new RegExp(this.getKeywords(keywords), 'gm'), 4996 css: 'keyword' 4997 }, { 4998 regex: new RegExp(keyops, 'gm'), 4999 css: 'keyword' 5000 }]; 5001 } 5002 5003 Brush.prototype = new BrushBase(); 5004 Brush.aliases = ['scala']; 5005 module.exports = Brush; 5006 5007/***/ }), 5008/* 46 */ 5009/***/ (function(module, exports, __webpack_require__) { 5010 5011 'use strict'; 5012 5013 var BrushBase = __webpack_require__(22); 5014 var regexLib = __webpack_require__(3).commonRegExp; 5015 5016 function Brush() { 5017 var funcs = 'abs avg case cast coalesce convert count current_timestamp ' + 'current_user day isnull left lower month nullif replace right ' + 'session_user space substring sum system_user upper user year'; 5018 5019 var keywords = 'absolute action add after alter as asc at authorization begin bigint ' + 'binary bit by cascade char character check checkpoint close collate ' + 'column commit committed connect connection constraint contains continue ' + 'create cube current current_date current_time cursor database date ' + 'deallocate dec decimal declare default delete desc distinct double drop ' + 'dynamic else end end-exec escape except exec execute false fetch first ' + 'float for force foreign forward free from full function global goto grant ' + 'group grouping having hour ignore index inner insensitive insert instead ' + 'int integer intersect into is isolation key last level load local max min ' + 'minute modify move name national nchar next no numeric of off on only ' + 'open option order out output partial password precision prepare primary ' + 'prior privileges procedure public read real references relative repeatable ' + 'restrict return returns revoke rollback rollup rows rule schema scroll ' + 'second section select sequence serializable set size smallint static ' + 'statistics table temp temporary then time timestamp to top transaction ' + 'translation trigger true truncate uncommitted union unique update values ' + 'varchar varying view when where with work'; 5020 5021 var operators = 'all and any between cross in join like not null or outer some'; 5022 5023 this.regexList = [{ 5024 regex: /--(.*)$/gm, 5025 css: 'comments' 5026 }, { 5027 regex: /\/\*([^\*][\s\S]*?)?\*\//gm, 5028 css: 'comments' 5029 }, { 5030 regex: regexLib.multiLineDoubleQuotedString, 5031 css: 'string' 5032 }, { 5033 regex: regexLib.multiLineSingleQuotedString, 5034 css: 'string' 5035 }, { 5036 regex: new RegExp(this.getKeywords(funcs), 'gmi'), 5037 css: 'color2' 5038 }, { 5039 regex: new RegExp(this.getKeywords(operators), 'gmi'), 5040 css: 'color1' 5041 }, { 5042 regex: new RegExp(this.getKeywords(keywords), 'gmi'), 5043 css: 'keyword' 5044 }]; 5045 }; 5046 5047 Brush.prototype = new BrushBase(); 5048 Brush.aliases = ['sql']; 5049 module.exports = Brush; 5050 5051/***/ }), 5052/* 47 */ 5053/***/ (function(module, exports, __webpack_require__) { 5054 5055 'use strict'; 5056 5057 var BrushBase = __webpack_require__(22); 5058 var regexLib = __webpack_require__(3).commonRegExp; 5059 var Match = __webpack_require__(5).Match; 5060 5061 function Brush() { 5062 // Swift brush contributed by Nate Cook 5063 // http://natecook.com/code/swift-syntax-highlighting 5064 5065 function getKeywordsPrependedBy(keywords, by) { 5066 return '(?:' + keywords.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '|' + by + '\\b').replace(/^/, by + '\\b') + ')\\b'; 5067 } 5068 5069 function multiLineCCommentsAdd(match, regexInfo) { 5070 var str = match[0], 5071 result = [], 5072 pos = 0, 5073 matchStart = 0, 5074 level = 0; 5075 5076 while (pos < str.length - 1) { 5077 var chunk = str.substr(pos, 2); 5078 if (level == 0) { 5079 if (chunk == "/*") { 5080 matchStart = pos; 5081 level++; 5082 pos += 2; 5083 } else { 5084 pos++; 5085 } 5086 } else { 5087 if (chunk == "/*") { 5088 level++; 5089 pos += 2; 5090 } else if (chunk == "*/") { 5091 level--; 5092 if (level == 0) { 5093 result.push(new Match(str.substring(matchStart, pos + 2), matchStart + match.index, regexInfo.css)); 5094 } 5095 pos += 2; 5096 } else { 5097 pos++; 5098 } 5099 } 5100 } 5101 5102 return result; 5103 } 5104 5105 function stringAdd(match, regexInfo) { 5106 var str = match[0], 5107 result = [], 5108 pos = 0, 5109 matchStart = 0, 5110 level = 0; 5111 5112 while (pos < str.length - 1) { 5113 if (level == 0) { 5114 if (str.substr(pos, 2) == "\\(") { 5115 result.push(new Match(str.substring(matchStart, pos + 2), matchStart + match.index, regexInfo.css)); 5116 level++; 5117 pos += 2; 5118 } else { 5119 pos++; 5120 } 5121 } else { 5122 if (str[pos] == "(") { 5123 level++; 5124 } 5125 if (str[pos] == ")") { 5126 level--; 5127 if (level == 0) { 5128 matchStart = pos; 5129 } 5130 } 5131 pos++; 5132 } 5133 } 5134 if (level == 0) { 5135 result.push(new Match(str.substring(matchStart, str.length), matchStart + match.index, regexInfo.css)); 5136 } 5137 5138 return result; 5139 }; 5140 5141 // "Swift-native types" are all the protocols, classes, structs, enums, funcs, vars, and typealiases built into the language 5142 var swiftTypes = 'AbsoluteValuable Any AnyClass Array ArrayBound ArrayBuffer ArrayBufferType ArrayLiteralConvertible ArrayType AutoreleasingUnsafePointer BidirectionalIndex Bit BitwiseOperations Bool C CBool CChar CChar16 CChar32 CConstPointer CConstVoidPointer CDouble CFloat CInt CLong CLongLong CMutablePointer CMutableVoidPointer COpaquePointer CShort CSignedChar CString CUnsignedChar CUnsignedInt CUnsignedLong CUnsignedLongLong CUnsignedShort CVaListPointer CVarArg CWideChar Character CharacterLiteralConvertible Collection CollectionOfOne Comparable ContiguousArray ContiguousArrayBuffer DebugPrintable Dictionary DictionaryGenerator DictionaryIndex DictionaryLiteralConvertible Double EmptyCollection EmptyGenerator EnumerateGenerator Equatable ExtendedGraphemeClusterLiteralConvertible ExtendedGraphemeClusterType ExtensibleCollection FilterCollectionView FilterCollectionViewIndex FilterGenerator FilterSequenceView Float Float32 Float64 Float80 FloatLiteralConvertible FloatLiteralType FloatingPointClassification FloatingPointNumber ForwardIndex Generator GeneratorOf GeneratorOfOne GeneratorSequence Hashable HeapBuffer HeapBufferStorage HeapBufferStorageBase ImplicitlyUnwrappedOptional IndexingGenerator Int Int16 Int32 Int64 Int8 IntEncoder IntMax Integer IntegerArithmetic IntegerLiteralConvertible IntegerLiteralType Less LifetimeManager LogicValue MapCollectionView MapSequenceGenerator MapSequenceView MaxBuiltinFloatType MaxBuiltinIntegerType Mirror MirrorDisposition MutableCollection MutableSliceable ObjectIdentifier OnHeap Optional OutputStream PermutationGenerator Printable QuickLookObject RandomAccessIndex Range RangeGenerator RawByte RawOptionSet RawRepresentable Reflectable Repeat ReverseIndex ReverseRange ReverseRangeGenerator ReverseView Sequence SequenceOf SignedInteger SignedNumber Sink SinkOf Slice SliceBuffer Sliceable StaticString Streamable StridedRangeGenerator String StringElement StringInterpolationConvertible StringLiteralConvertible StringLiteralType UInt UInt16 UInt32 UInt64 UInt8 UIntMax UTF16 UTF32 UTF8 UWord UnicodeCodec UnicodeScalar Unmanaged UnsafeArray UnsafePointer UnsignedInteger Void Word Zip2 ZipGenerator2 abs advance alignof alignofValue assert bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal false filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced join lexicographicalCompare map max maxElement min minElement nil numericCast partition posix print println quickSort reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof strideofValue swap swift toString transcode true underestimateCount unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafePointers withVaList'; 5143 5144 var keywords = 'as break case class continue default deinit do dynamicType else enum ' + 'extension fallthrough for func if import in init is let new protocol ' + 'return self Self static struct subscript super switch Type typealias ' + 'var where while __COLUMN__ __FILE__ __FUNCTION__ __LINE__ associativity ' + 'didSet get infix inout left mutating none nonmutating operator override ' + 'postfix precedence prefix right set unowned unowned(safe) unowned(unsafe) weak willSet'; 5145 5146 var attributes = 'assignment class_protocol exported final lazy noreturn NSCopying NSManaged objc optional required auto_closure noreturn IBAction IBDesignable IBInspectable IBOutlet infix prefix postfix'; 5147 5148 this.regexList = [ 5149 // html entities 5150 { 5151 regex: new RegExp('\&[a-z]+;', 'gi'), 5152 css: 'plain' 5153 }, { 5154 regex: regexLib.singleLineCComments, 5155 css: 'comments' 5156 }, { 5157 regex: new RegExp('\\/\\*[\\s\\S]*\\*\\/', 'g'), 5158 css: 'comments', 5159 func: multiLineCCommentsAdd 5160 }, { 5161 regex: regexLib.doubleQuotedString, 5162 css: 'string', 5163 func: stringAdd 5164 }, { 5165 regex: new RegExp('\\b([\\d_]+(\\.[\\de_]+)?|0x[a-f0-9_]+(\\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b', 'gi'), 5166 css: 'value' 5167 }, { 5168 regex: new RegExp(this.getKeywords(keywords), 'gm'), 5169 css: 'keyword' 5170 }, { 5171 regex: new RegExp(getKeywordsPrependedBy(attributes, '@'), 'gm'), 5172 css: 'color1' 5173 }, { 5174 regex: new RegExp(this.getKeywords(swiftTypes), 'gm'), 5175 css: 'color2' 5176 }, { 5177 regex: new RegExp('\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b', 'gi'), 5178 css: 'variable' 5179 }]; 5180 }; 5181 5182 Brush.prototype = new BrushBase(); 5183 Brush.aliases = ['swift']; 5184 module.exports = Brush; 5185 5186/***/ }), 5187/* 48 */ 5188/***/ (function(module, exports, __webpack_require__) { 5189 5190 'use strict'; 5191 5192 var BrushBase = __webpack_require__(22); 5193 var regexLib = __webpack_require__(3).commonRegExp; 5194 5195 function Brush() { 5196 // Contributed by Chad Granum 5197 this.regexList = [{ 5198 regex: new RegExp('^1..\\d+', 'gm'), 5199 css: 'plain bold italic' 5200 }, { 5201 regex: new RegExp('^ok( \\d+)?', 'gm'), 5202 css: 'keyword' 5203 }, { 5204 regex: new RegExp('^not ok( \\d+)?', 'gm'), 5205 css: 'color3 bold' 5206 }, { 5207 regex: new RegExp('(?!^\\s*)#.*$', 'gm'), 5208 css: 'variable bold' 5209 }, { 5210 regex: new RegExp('^#.*$', 'gm'), 5211 css: 'comments bold' 5212 }, { 5213 regex: new RegExp('^(?!(not )?ok)[^1].*$', 'gm'), 5214 css: 'comments' 5215 }, { 5216 regex: regexLib.doubleQuotedString, 5217 css: 'string' 5218 }, { 5219 regex: regexLib.singleQuotedString, 5220 css: 'string' 5221 }]; 5222 } 5223 5224 Brush.prototype = new BrushBase(); 5225 Brush.aliases = ['tap', 'Tap', 'TAP']; 5226 module.exports = Brush; 5227 5228/***/ }), 5229/* 49 */ 5230/***/ (function(module, exports, __webpack_require__) { 5231 5232 'use strict'; 5233 5234 var BrushBase = __webpack_require__(22); 5235 var regexLib = __webpack_require__(3).commonRegExp; 5236 5237 function Brush() { 5238 var keywords = 'break case catch class continue ' + 'default delete do else enum export extends false ' + 'for function if implements import in instanceof ' + 'interface let new null package private protected ' + 'static return super switch ' + 'this throw true try typeof var while with yield' + ' any bool declare get module never number public readonly set string'; // TypeScript-specific, everything above is common with JavaScript 5239 5240 this.regexList = [{ 5241 regex: regexLib.multiLineDoubleQuotedString, 5242 css: 'string' 5243 }, { 5244 regex: regexLib.multiLineSingleQuotedString, 5245 css: 'string' 5246 }, { 5247 regex: regexLib.singleLineCComments, 5248 css: 'comments' 5249 }, { 5250 regex: regexLib.multiLineCComments, 5251 css: 'comments' 5252 }, { 5253 regex: new RegExp(this.getKeywords(keywords), 'gm'), 5254 css: 'keyword' 5255 }]; 5256 5257 this.forHtmlScript(regexLib.scriptScriptTags); 5258 }; 5259 5260 Brush.prototype = new BrushBase(); 5261 Brush.aliases = ['ts', 'typescript']; 5262 module.exports = Brush; 5263 5264/***/ }), 5265/* 50 */ 5266/***/ (function(module, exports, __webpack_require__) { 5267 5268 'use strict'; 5269 5270 var BrushBase = __webpack_require__(22); 5271 var regexLib = __webpack_require__(3).commonRegExp; 5272 5273 function Brush() { 5274 var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' + 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' + 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' + 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' + 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' + 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' + 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' + 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' + 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' + 'Overloads Overridable Overrides ParamArray Preserve Private Property ' + 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' + 'Return Select Set Shadows Shared Short Single Static Step Stop String ' + 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' + 'Variant When While With WithEvents WriteOnly Xor'; 5275 5276 this.regexList = [{ 5277 regex: /'.*$/gm, 5278 css: 'comments' 5279 }, { 5280 regex: regexLib.doubleQuotedString, 5281 css: 'string' 5282 }, { 5283 regex: /^\s*#.*$/gm, 5284 css: 'preprocessor' 5285 }, { 5286 regex: new RegExp(this.getKeywords(keywords), 'gm'), 5287 css: 'keyword' 5288 }]; 5289 5290 this.forHtmlScript(regexLib.aspScriptTags); 5291 }; 5292 5293 Brush.prototype = new BrushBase(); 5294 Brush.aliases = ['vb', 'vbnet']; 5295 module.exports = Brush; 5296 5297/***/ }), 5298/* 51 */ 5299/***/ (function(module, exports, __webpack_require__) { 5300 5301 'use strict'; 5302 5303 var BrushBase = __webpack_require__(22); 5304 var regexLib = __webpack_require__(3).commonRegExp; 5305 var XRegExp = __webpack_require__(3).XRegExp; 5306 var Match = __webpack_require__(5).Match; 5307 5308 function Brush() { 5309 function process(match, regexInfo) { 5310 var code = match[0], 5311 tag = XRegExp.exec(code, XRegExp('(<|<)[\\s\\/\\?!]*(?<name>[:\\w-\\.]+)', 'xg')), 5312 result = []; 5313 5314 if (match.attributes != null) { 5315 var attributes, 5316 pos = 0, 5317 regex = XRegExp('(?<name> [\\w:.-]+)' + '\\s*=\\s*' + '(?<value> ".*?"|\'.*?\'|\\w+)', 'xg'); 5318 5319 while ((attributes = XRegExp.exec(code, regex, pos)) != null) { 5320 result.push(new Match(attributes.name, match.index + attributes.index, 'color1')); 5321 result.push(new Match(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); 5322 pos = attributes.index + attributes[0].length; 5323 } 5324 } 5325 5326 if (tag != null) result.push(new Match(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')); 5327 5328 return result; 5329 } 5330 5331 this.regexList = [{ 5332 regex: XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), 5333 css: 'color2' 5334 }, { 5335 regex: regexLib.xmlComments, 5336 css: 'comments' 5337 }, { 5338 regex: XRegExp('(<|<)[\\s\\/\\?!]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(>|>)', 'sg'), 5339 func: process 5340 }]; 5341 }; 5342 5343 Brush.prototype = new BrushBase(); 5344 Brush.aliases = ['xml', 'xhtml', 'xslt', 'html', 'plist']; 5345 module.exports = Brush; 5346 5347/***/ }), 5348/* 52 */ 5349/***/ (function(module, exports, __webpack_require__) { 5350 5351 'use strict'; 5352 5353 var BrushBase = __webpack_require__(22); 5354 var regexLib = __webpack_require__(3).commonRegExp; 5355 5356 function Brush() { 5357 var ops = 'abs_diff_image abs_funct_1d abs_image abs_matrix abs_matrix_mod access_channel acos_image activate_compute_device adapt_template add_channels add_class_train_data_gmm add_class_train_data_knn add_class_train_data_mlp add_class_train_data_svm add_deformable_surface_model_reference_point add_deformable_surface_model_sample add_image add_matrix add_matrix_mod add_metrology_object_circle_measure add_metrology_object_ellipse_measure add_metrology_object_generic add_metrology_object_line_measure add_metrology_object_rectangle2_measure add_noise_distribution add_noise_white add_noise_white_contour_xld add_sample_class_gmm add_sample_class_knn add_sample_class_mlp add_sample_class_svm add_sample_class_train_data add_sample_identifier_preparation_data add_sample_identifier_training_data add_samples_image_class_gmm add_samples_image_class_knn add_samples_image_class_mlp add_samples_image_class_svm add_scene_3d_camera add_scene_3d_instance add_scene_3d_label add_scene_3d_light add_texture_inspection_model_image adjust_mosaic_images affine_trans_contour_xld affine_trans_image affine_trans_image_size affine_trans_object_model_3d affine_trans_pixel affine_trans_point_2d affine_trans_point_3d affine_trans_polygon_xld affine_trans_region align_metrology_model angle_ll angle_lx anisotropic_diffusion append_channel append_ocr_trainf apply_bead_inspection_model apply_color_trans_lut apply_distance_transform_xld apply_metrology_model apply_sample_identifier apply_sheet_of_light_calibration apply_texture_inspection_model approx_chain approx_chain_simple area_center area_center_gray area_center_points_xld area_center_xld area_holes area_object_model_3d asin_image atan2_image atan_image attach_background_to_window attach_drawing_object_to_window auto_threshold axis_angle_to_quat background_seg bandpass_image best_match best_match_mg best_match_pre_mg best_match_rot best_match_rot_mg bilateral_filter bin_threshold binary_threshold binocular_calibration binocular_disparity binocular_disparity_mg binocular_disparity_ms binocular_distance binocular_distance_mg binocular_distance_ms binomial_filter bit_and bit_lshift bit_mask bit_not bit_or bit_rshift bit_slice bit_xor bottom_hat boundary broadcast_condition bundle_adjust_mosaic calibrate_cameras calibrate_hand_eye calibrate_sheet_of_light caltab_points cam_mat_to_cam_par cam_par_pose_to_hom_mat3d cam_par_to_cam_mat camera_calibration cfa_to_rgb change_domain change_format change_radial_distortion_cam_par change_radial_distortion_contours_xld change_radial_distortion_image change_radial_distortion_points channels_to_image char_threshold check_difference circularity circularity_xld class_2dim_sup class_2dim_unsup class_ndim_box class_ndim_norm classify_class_gmm classify_class_knn classify_class_mlp classify_class_svm classify_image_class_gmm classify_image_class_knn classify_image_class_lut classify_image_class_mlp classify_image_class_svm clear_all_bar_code_models clear_all_barriers clear_all_calib_data clear_all_camera_setup_models clear_all_class_gmm clear_all_class_knn clear_all_class_lut clear_all_class_mlp clear_all_class_svm clear_all_class_train_data clear_all_color_trans_luts clear_all_component_models clear_all_conditions clear_all_data_code_2d_models clear_all_deformable_models clear_all_descriptor_models clear_all_events clear_all_lexica clear_all_matrices clear_all_metrology_models clear_all_mutexes clear_all_ncc_models clear_all_object_model_3d clear_all_ocr_class_knn clear_all_ocr_class_mlp clear_all_ocr_class_svm clear_all_sample_identifiers clear_all_scattered_data_interpolators clear_all_serialized_items clear_all_shape_model_3d clear_all_shape_models clear_all_sheet_of_light_models clear_all_stereo_models clear_all_surface_matching_results clear_all_surface_models clear_all_templates clear_all_text_models clear_all_text_results clear_all_training_components clear_all_variation_models clear_bar_code_model clear_barrier clear_bead_inspection_model clear_calib_data clear_camera_setup_model clear_class_gmm clear_class_knn clear_class_lut clear_class_mlp clear_class_svm clear_class_train_data clear_color_trans_lut clear_component_model clear_condition clear_data_code_2d_model clear_deformable_model clear_deformable_surface_matching_result clear_deformable_surface_model clear_descriptor_model clear_distance_transform_xld clear_drawing_object clear_event clear_lexicon clear_matrix clear_message clear_message_queue clear_metrology_model clear_metrology_object clear_mutex clear_ncc_model clear_obj clear_object_model_3d clear_ocr_class_cnn clear_ocr_class_knn clear_ocr_class_mlp clear_ocr_class_svm clear_rectangle clear_sample_identifier clear_samples_class_gmm clear_samples_class_mlp clear_samples_class_svm clear_sampset clear_scattered_data_interpolator clear_scene_3d clear_serial clear_serialized_item clear_shape_model clear_shape_model_3d clear_sheet_of_light_model clear_stereo_model clear_surface_matching_result clear_surface_model clear_template clear_text_model clear_text_result clear_texture_inspection_model clear_texture_inspection_result clear_train_data_variation_model clear_training_components clear_variation_model clear_window clip_contours_xld clip_end_points_contours_xld clip_region clip_region_rel close_all_bg_esti close_all_class_box close_all_files close_all_framegrabbers close_all_measures close_all_ocrs close_all_ocvs close_all_serials close_all_sockets close_bg_esti close_class_box close_contours_xld close_edges close_edges_length close_file close_framegrabber close_io_channel close_io_device close_measure close_ocr close_ocv close_serial close_socket close_window closest_point_transform closing closing_circle closing_golay closing_rectangle1 cluster_model_components coherence_enhancing_diff combine_roads_xld compactness compactness_xld compare_ext_variation_model compare_obj compare_variation_model complement complex_to_real compose2 compose3 compose4 compose5 compose6 compose7 compose_funct_1d concat_obj concat_ocr_trainf connect_and_holes connect_grid_points connection connection_object_model_3d contlength contour_point_num_xld contour_to_world_plane_xld control_io_channel control_io_device control_io_interface convert_coordinates_image_to_window convert_coordinates_window_to_image convert_image_type convert_map_type convert_point_3d_cart_to_spher convert_point_3d_spher_to_cart convert_pose_type convert_tuple_to_vector_1d convert_vector_to_tuple convex_hull_object_model_3d convexity convexity_xld convol_fft convol_gabor convol_image cooc_feature_image cooc_feature_matrix copy_file copy_image copy_matrix copy_metrology_model copy_metrology_object copy_obj copy_object_model_3d copy_rectangle corner_response correlation_fft cos_image count_channels count_obj count_relation count_seconds create_aniso_shape_model create_aniso_shape_model_xld create_bar_code_model create_barrier create_bead_inspection_model create_bg_esti create_calib_data create_calib_descriptor_model create_caltab create_cam_pose_look_at_point create_camera_setup_model create_class_box create_class_gmm create_class_knn create_class_lut_gmm create_class_lut_knn create_class_lut_mlp create_class_lut_svm create_class_mlp create_class_svm create_class_train_data create_color_trans_lut create_component_model create_condition create_data_code_2d_model create_deformable_surface_model create_distance_transform_xld create_drawing_object_circle create_drawing_object_circle_sector create_drawing_object_ellipse create_drawing_object_ellipse_sector create_drawing_object_line create_drawing_object_rectangle1 create_drawing_object_rectangle2 create_drawing_object_text create_drawing_object_xld create_event create_funct_1d_array create_funct_1d_pairs create_lexicon create_local_deformable_model create_local_deformable_model_xld create_matrix create_message create_message_queue create_metrology_model create_mutex create_ncc_model create_ocr_class_box create_ocr_class_knn create_ocr_class_mlp create_ocr_class_svm create_ocv_proj create_planar_calib_deformable_model create_planar_calib_deformable_model_xld create_planar_uncalib_deformable_model create_planar_uncalib_deformable_model_xld create_pose create_rectification_grid create_sample_identifier create_scaled_shape_model create_scaled_shape_model_xld create_scattered_data_interpolator create_scene_3d create_serialized_item_ptr create_shape_model create_shape_model_3d create_shape_model_xld create_sheet_of_light_calib_object create_sheet_of_light_model create_stereo_model create_surface_model create_template create_template_rot create_text_model create_text_model_reader create_texture_inspection_model create_trained_component_model create_uncalib_descriptor_model create_variation_model critical_points_sub_pix crop_contours_xld crop_domain crop_domain_rel crop_part crop_rectangle1 deactivate_all_compute_devices deactivate_compute_device decode_bar_code_rectangle2 decompose2 decompose3 decompose4 decompose5 decompose6 decompose7 decompose_matrix delete_file depth_from_focus dequeue_message derivate_funct_1d derivate_gauss derivate_vector_field descript_class_box deserialize_bar_code_model deserialize_calib_data deserialize_cam_par deserialize_camera_setup_model deserialize_class_box deserialize_class_gmm deserialize_class_knn deserialize_class_mlp deserialize_class_svm deserialize_class_train_data deserialize_component_model deserialize_data_code_2d_model deserialize_deformable_model deserialize_deformable_surface_model deserialize_descriptor_model deserialize_distance_transform_xld deserialize_dual_quat deserialize_fft_optimization_data deserialize_hom_mat2d deserialize_hom_mat3d deserialize_image deserialize_matrix deserialize_measure deserialize_metrology_model deserialize_ncc_model deserialize_object deserialize_object_model_3d deserialize_ocr deserialize_ocr_class_cnn deserialize_ocr_class_knn deserialize_ocr_class_mlp deserialize_ocr_class_svm deserialize_ocv deserialize_pose deserialize_quat deserialize_region deserialize_sample_identifier deserialize_shape_model deserialize_shape_model_3d deserialize_sheet_of_light_model deserialize_surface_model deserialize_template deserialize_texture_inspection_model deserialize_training_components deserialize_tuple deserialize_variation_model deserialize_xld detach_background_from_window detach_drawing_object_from_window detect_edge_segments determinant_matrix determine_deformable_model_params determine_ncc_model_params determine_shape_model_params dev_clear_obj dev_clear_window dev_close_inspect_ctrl dev_close_tool dev_close_window dev_disp_text dev_display dev_error_var dev_get_exception_data dev_get_preferences dev_get_system dev_get_window dev_inspect_ctrl dev_map_par dev_map_prog dev_map_var dev_open_dialog dev_open_file_dialog dev_open_tool dev_open_window dev_set_check dev_set_color dev_set_colored dev_set_draw dev_set_line_width dev_set_lut dev_set_paint dev_set_part dev_set_preferences dev_set_shape dev_set_tool_geometry dev_set_window dev_set_window_extents dev_show_tool dev_unmap_par dev_unmap_prog dev_unmap_var dev_update_pc dev_update_time dev_update_var dev_update_window deviation_image deviation_n diameter_region diameter_xld diff_of_gauss difference difference_closed_contours_xld difference_closed_polygons_xld dilation1 dilation2 dilation_circle dilation_golay dilation_rectangle1 dilation_seq disp_arc disp_arrow disp_caltab disp_channel disp_circle disp_color disp_cross disp_distribution disp_ellipse disp_image disp_line disp_lut disp_obj disp_object_model_3d disp_polygon disp_rectangle1 disp_rectangle2 disp_region disp_text disp_xld disparity_image_to_xyz disparity_to_distance disparity_to_point_3d display_scene_3d dist_ellipse_contour_points_xld dist_ellipse_contour_xld dist_rectangle2_contour_points_xld distance_cc distance_cc_min distance_contours_xld distance_funct_1d distance_lc distance_lr distance_object_model_3d distance_pc distance_pl distance_pp distance_pr distance_ps distance_rr_min distance_rr_min_dil distance_sc distance_sl distance_sr distance_ss distance_to_disparity distance_transform div_element_matrix div_element_matrix_mod div_image do_ocr_multi do_ocr_multi_class_cnn do_ocr_multi_class_knn do_ocr_multi_class_mlp do_ocr_multi_class_svm do_ocr_single do_ocr_single_class_cnn do_ocr_single_class_knn do_ocr_single_class_mlp do_ocr_single_class_svm do_ocr_word_cnn do_ocr_word_knn do_ocr_word_mlp do_ocr_word_svm do_ocv_simple dots_image drag_region1 drag_region2 drag_region3 draw_circle draw_circle_mod draw_ellipse draw_ellipse_mod draw_line draw_line_mod draw_nurbs draw_nurbs_interp draw_nurbs_interp_mod draw_nurbs_mod draw_point draw_point_mod draw_polygon draw_rectangle1 draw_rectangle1_mod draw_rectangle2 draw_rectangle2_mod draw_region draw_xld draw_xld_mod dual_quat_compose dual_quat_conjugate dual_quat_interpolate dual_quat_normalize dual_quat_to_hom_mat3d dual_quat_to_pose dual_quat_to_screw dual_quat_trans_line_3d dual_rank dual_threshold dump_window dump_window_image dyn_threshold eccentricity eccentricity_points_xld eccentricity_xld edges_color edges_color_sub_pix edges_image edges_object_model_3d edges_sub_pix eigenvalues_general_matrix eigenvalues_symmetric_matrix eliminate_min_max eliminate_runs eliminate_sp elliptic_axis elliptic_axis_gray elliptic_axis_points_xld elliptic_axis_xld emphasize energy_gabor enqueue_message enquire_class_box enquire_reject_class_box entropy_gray entropy_image equ_histo_image erosion1 erosion2 erosion_circle erosion_golay erosion_rectangle1 erosion_seq essential_to_fundamental_matrix estimate_al_am estimate_noise estimate_sl_al_lr estimate_sl_al_zc estimate_tilt_lr estimate_tilt_zc euler_number evaluate_class_gmm evaluate_class_mlp evaluate_class_svm executable_expression exhaustive_match exhaustive_match_mg exp_image expand_domain_gray expand_gray expand_gray_ref expand_line expand_region fast_match fast_match_mg fast_threshold fft_generic fft_image fft_image_inv file_exists fill_interlace fill_up fill_up_shape filter_kalman find_aniso_shape_model find_aniso_shape_models find_bar_code find_calib_descriptor_model find_calib_object find_caltab find_component_model find_data_code_2d find_deformable_surface_model find_local_deformable_model find_marks_and_pose find_ncc_model find_ncc_models find_neighbors find_planar_calib_deformable_model find_planar_uncalib_deformable_model find_rectification_grid find_scaled_shape_model find_scaled_shape_models find_shape_model find_shape_model_3d find_shape_models find_surface_model find_surface_model_image find_text find_uncalib_descriptor_model fit_circle_contour_xld fit_ellipse_contour_xld fit_line_contour_xld fit_primitives_object_model_3d fit_rectangle2_contour_xld fit_surface_first_order fit_surface_second_order fitting flush_buffer fnew_line fread_char fread_line fread_serialized_item fread_string frei_amp frei_dir full_domain funct_1d_to_pairs fuzzy_entropy fuzzy_measure_pairing fuzzy_measure_pairs fuzzy_measure_pos fuzzy_perimeter fwrite_serialized_item fwrite_string gamma_image gauss_distribution gauss_filter gauss_image gen_arbitrary_distortion_map gen_bandfilter gen_bandpass gen_binocular_proj_rectification gen_binocular_rectification_map gen_box_object_model_3d gen_bundle_adjusted_mosaic gen_caltab gen_checker_region gen_circle gen_circle_contour_xld gen_circle_sector gen_contour_nurbs_xld gen_contour_polygon_rounded_xld gen_contour_polygon_xld gen_contour_region_xld gen_contours_skeleton_xld gen_cooc_matrix gen_cross_contour_xld gen_cube_map_mosaic gen_cylinder_object_model_3d gen_derivative_filter gen_disc_se gen_ellipse gen_ellipse_contour_xld gen_ellipse_sector gen_empty_obj gen_empty_object_model_3d gen_empty_region gen_filter_mask gen_gabor gen_gauss_filter gen_gauss_pyramid gen_grid_rectification_map gen_grid_region gen_highpass gen_image1 gen_image1_extern gen_image1_rect gen_image3 gen_image3_extern gen_image_const gen_image_gray_ramp gen_image_interleaved gen_image_proto gen_image_surface_first_order gen_image_surface_second_order gen_image_to_world_plane_map gen_initial_components gen_lowpass gen_mean_filter gen_measure_arc gen_measure_rectangle2 gen_nurbs_interp gen_object_model_3d_from_points gen_parallel_contour_xld gen_parallels_xld gen_plane_object_model_3d gen_polygons_xld gen_principal_comp_trans gen_projective_mosaic gen_psf_defocus gen_psf_motion gen_radial_distortion_map gen_random_region gen_random_regions gen_rectangle1 gen_rectangle2 gen_rectangle2_contour_xld gen_region_contour_xld gen_region_histo gen_region_hline gen_region_line gen_region_points gen_region_polygon gen_region_polygon_filled gen_region_polygon_xld gen_region_runs gen_sin_bandpass gen_sphere_object_model_3d gen_sphere_object_model_3d_center gen_spherical_mosaic gen_std_bandpass gen_struct_elements generalized_eigenvalues_general_matrix generalized_eigenvalues_symmetric_matrix get_aop_info get_bar_code_object get_bar_code_param get_bar_code_param_specific get_bar_code_result get_bead_inspection_param get_bg_esti_params get_calib_data get_calib_data_observ_contours get_calib_data_observ_points get_calib_data_observ_pose get_camera_setup_param get_channel_info get_chapter_info get_check get_circle_pose get_class_box_param get_class_train_data_gmm get_class_train_data_knn get_class_train_data_mlp get_class_train_data_svm get_component_model_params get_component_model_tree get_component_relations get_comprise get_compute_device_info get_compute_device_param get_contour_angle_xld get_contour_attrib_xld get_contour_global_attrib_xld get_contour_xld get_current_dir get_data_code_2d_objects get_data_code_2d_param get_data_code_2d_results get_deformable_model_contours get_deformable_model_origin get_deformable_model_params get_deformable_surface_matching_result get_deformable_surface_model_param get_descriptor_model_origin get_descriptor_model_params get_descriptor_model_points get_descriptor_model_results get_diagonal_matrix get_disp_object_model_3d_info get_display_scene_3d_info get_distance_transform_xld_contour get_distance_transform_xld_param get_domain get_draw get_drawing_object_iconic get_drawing_object_params get_error_text get_extended_error_info get_features_ocr_class_knn get_features_ocr_class_mlp get_features_ocr_class_svm get_fix get_fixed_lut get_font get_font_extents get_found_component_model get_framegrabber_callback get_framegrabber_lut get_framegrabber_param get_full_matrix get_grayval get_grayval_contour_xld get_grayval_interpolated get_hsi get_icon get_image_pointer1 get_image_pointer1_rect get_image_pointer3 get_image_size get_image_time get_image_type get_insert get_io_channel_param get_io_device_param get_keywords get_line_approx get_line_of_sight get_line_style get_line_width get_lines_xld get_lut get_lut_style get_mbutton get_mbutton_sub_pix get_message_obj get_message_param get_message_queue_param get_message_tuple get_metrology_model_param get_metrology_object_fuzzy_param get_metrology_object_indices get_metrology_object_measures get_metrology_object_model_contour get_metrology_object_num_instances get_metrology_object_param get_metrology_object_result get_metrology_object_result_contour get_modules get_mposition get_mposition_sub_pix get_mshape get_ncc_model_origin get_ncc_model_params get_ncc_model_region get_next_socket_data_type get_obj_class get_object_model_3d_params get_operator_info get_operator_name get_os_window_handle get_paint get_pair_funct_1d get_parallels_xld get_param_info get_param_names get_param_num get_param_types get_params_class_gmm get_params_class_knn get_params_class_mlp get_params_class_svm get_params_ocr_class_cnn get_params_ocr_class_knn get_params_ocr_class_mlp get_params_ocr_class_svm get_part get_part_style get_pixel get_points_ellipse get_polygon_xld get_pose_type get_prep_info_class_gmm get_prep_info_class_mlp get_prep_info_class_svm get_prep_info_ocr_class_mlp get_prep_info_ocr_class_svm get_rectangle_pose get_region_chain get_region_contour get_region_convex get_region_index get_region_points get_region_polygon get_region_runs get_region_thickness get_regress_params_xld get_regularization_params_class_mlp get_regularization_params_ocr_class_mlp get_rejection_params_class_mlp get_rejection_params_ocr_class_mlp get_rgb get_rgba get_sample_class_gmm get_sample_class_knn get_sample_class_mlp get_sample_class_svm get_sample_class_train_data get_sample_identifier_object_info get_sample_identifier_param get_sample_num_class_gmm get_sample_num_class_knn get_sample_num_class_mlp get_sample_num_class_svm get_sample_num_class_train_data get_serial_param get_serialized_item_ptr get_shape get_shape_model_3d_contours get_shape_model_3d_params get_shape_model_contours get_shape_model_origin get_shape_model_params get_sheet_of_light_param get_sheet_of_light_result get_sheet_of_light_result_object_model_3d get_size_matrix get_socket_descriptor get_socket_param get_spy get_stereo_model_image_pairs get_stereo_model_object get_stereo_model_object_model_3d get_stereo_model_param get_string_extents get_sub_matrix get_support_vector_class_svm get_support_vector_num_class_svm get_support_vector_num_ocr_class_svm get_support_vector_ocr_class_svm get_surface_matching_result get_surface_model_param get_system get_system_time get_text_model_param get_text_object get_text_result get_texture_inspection_model_image get_texture_inspection_model_param get_texture_inspection_result_object get_threading_attrib get_thresh_images_variation_model get_tposition get_training_components get_tshape get_value_matrix get_variation_model get_window_attr get_window_background_image get_window_extents get_window_param get_window_pointer3 get_window_type get_y_value_funct_1d give_bg_esti gnuplot_close gnuplot_open_file gnuplot_open_pipe gnuplot_plot_ctrl gnuplot_plot_funct_1d gnuplot_plot_image golay_elements grab_data grab_data_async grab_image grab_image_async grab_image_start gray_bothat gray_closing gray_closing_rect gray_closing_shape gray_dilation gray_dilation_rect gray_dilation_shape gray_erosion gray_erosion_rect gray_erosion_shape gray_features gray_histo gray_histo_abs gray_histo_range gray_inside gray_opening gray_opening_rect gray_opening_shape gray_projections gray_range_rect gray_skeleton gray_tophat guided_filter hamming_change_region hamming_distance hamming_distance_norm hand_eye_calibration harmonic_interpolation highpass_image histo_2dim histo_to_thresh hit_or_miss hit_or_miss_golay hit_or_miss_seq hom_mat2d_compose hom_mat2d_determinant hom_mat2d_identity hom_mat2d_invert hom_mat2d_reflect hom_mat2d_reflect_local hom_mat2d_rotate hom_mat2d_rotate_local hom_mat2d_scale hom_mat2d_scale_local hom_mat2d_slant hom_mat2d_slant_local hom_mat2d_to_affine_par hom_mat2d_translate hom_mat2d_translate_local hom_mat2d_transpose hom_mat3d_compose hom_mat3d_determinant hom_mat3d_identity hom_mat3d_invert hom_mat3d_project hom_mat3d_rotate hom_mat3d_rotate_local hom_mat3d_scale hom_mat3d_scale_local hom_mat3d_to_pose hom_mat3d_translate hom_mat3d_translate_local hom_mat3d_transpose hom_vector_to_proj_hom_mat2d hough_circle_trans hough_circles hough_line_trans hough_line_trans_dir hough_lines hough_lines_dir hysteresis_threshold illuminate image_points_to_world_plane image_to_channels image_to_world_plane import import_lexicon info_edges info_framegrabber info_ocr_class_box info_parallels_xld info_smooth init_compute_device inner_circle inner_rectangle1 inpainting_aniso inpainting_ced inpainting_ct inpainting_mcf inpainting_texture inspect_clustered_components inspect_lexicon inspect_shape_model integer_to_obj integrate_funct_1d intensity interjacent interleave_channels interpolate_scattered_data interpolate_scattered_data_image interpolate_scattered_data_points_to_image intersect_lines_of_sight intersect_plane_object_model_3d intersection intersection_circle_contour_xld intersection_circles intersection_closed_contours_xld intersection_closed_polygons_xld intersection_contours_xld intersection_line_circle intersection_line_contour_xld intersection_lines intersection_ll intersection_segment_circle intersection_segment_contour_xld intersection_segment_line intersection_segments invert_funct_1d invert_image invert_matrix invert_matrix_mod isotropic_diffusion junctions_skeleton kirsch_amp kirsch_dir label_to_region laplace laplace_of_gauss learn_class_box learn_ndim_box learn_ndim_norm learn_sampset_box length_xld line_orientation line_position linear_trans_color lines_color lines_facet lines_gauss list_files local_max local_max_contours_xld local_max_sub_pix local_min local_min_max_funct_1d local_min_sub_pix local_threshold lock_mutex log_image lookup_lexicon lowlands lowlands_center lut_trans make_dir map_image match_essential_matrix_ransac match_funct_1d_trans match_fundamental_matrix_distortion_ransac match_fundamental_matrix_ransac match_rel_pose_ransac max_diameter_object_model_3d max_image max_matrix max_parallels_xld mean_curvature_flow mean_image mean_matrix mean_n mean_sp measure_pairs measure_pos measure_profile_sheet_of_light measure_projection measure_thresh median_image median_rect median_separate median_weighted merge_cont_line_scan_xld merge_regions_line_scan midrange_image min_image min_matrix min_max_gray minkowski_add1 minkowski_add2 minkowski_sub1 minkowski_sub2 mirror_image mirror_region mod_parallels_xld modify_component_relations moments_any_points_xld moments_any_xld moments_gray_plane moments_object_model_3d moments_points_xld moments_region_2nd moments_region_2nd_invar moments_region_2nd_rel_invar moments_region_3rd moments_region_3rd_invar moments_region_central moments_region_central_invar moments_xld monotony morph_hat morph_skeleton morph_skiz move_rectangle move_region mult_element_matrix mult_element_matrix_mod mult_image mult_matrix mult_matrix_mod negate_funct_1d new_extern_window new_line noise_distribution_mean nonmax_suppression_amp nonmax_suppression_dir norm_matrix num_points_funct_1d obj_diff obj_to_integer object_model_3d_to_xyz ocr_change_char ocr_get_features open_compute_device open_file open_framegrabber open_io_channel open_io_device open_serial open_socket_accept open_socket_connect open_textwindow open_window opening opening_circle opening_golay opening_rectangle1 opening_seg optical_flow_mg optimize_aop optimize_fft_speed optimize_rft_speed orientation_points_xld orientation_region orientation_xld orthogonal_decompose_matrix overpaint_gray overpaint_region paint_gray paint_region paint_xld partition_dynamic partition_lines partition_rectangle phase_correlation_fft phase_deg phase_rad photometric_stereo plane_deviation plateaus plateaus_center point_line_to_hom_mat2d points_foerstner points_harris points_harris_binomial points_lepetit points_sojka polar_trans_contour_xld polar_trans_contour_xld_inv polar_trans_image polar_trans_image_ext polar_trans_image_inv polar_trans_region polar_trans_region_inv pose_average pose_compose pose_invert pose_to_dual_quat pose_to_hom_mat3d pose_to_quat pouring pow_element_matrix pow_element_matrix_mod pow_image pow_matrix pow_matrix_mod pow_scalar_element_matrix pow_scalar_element_matrix_mod power_byte power_ln power_real prepare_direct_variation_model prepare_object_model_3d prepare_sample_identifier prepare_variation_model prewitt_amp prewitt_dir principal_comp proj_hom_mat2d_to_pose proj_match_points_distortion_ransac proj_match_points_distortion_ransac_guided proj_match_points_ransac proj_match_points_ransac_guided project_3d_point project_hom_point_hom_mat3d project_object_model_3d project_point_hom_mat3d project_shape_model_3d projection_pl projective_trans_contour_xld projective_trans_hom_point_3d projective_trans_image projective_trans_image_size projective_trans_object_model_3d projective_trans_pixel projective_trans_point_2d projective_trans_point_3d projective_trans_region protect_ocr_trainf pruning quat_compose quat_conjugate quat_interpolate quat_normalize quat_rotate_point_3d quat_to_hom_mat3d quat_to_pose query_all_colors query_aop_info query_available_compute_devices query_bar_code_params query_calib_data_observ_indices query_color query_colored query_contour_attribs_xld query_contour_global_attribs_xld query_data_code_2d_params query_font query_gray query_insert query_io_device query_io_interface query_line_width query_lut query_mshape query_operator_info query_paint query_param_info query_params_ocr_class_cnn query_shape query_sheet_of_light_params query_spy query_tshape query_window_type radial_distortion_self_calibration radiometric_self_calibration rank_image rank_n rank_rect rank_region read_aop_knowledge read_bar_code_model read_calib_data read_cam_par read_camera_setup_model read_char read_class_box read_class_gmm read_class_knn read_class_mlp read_class_svm read_class_train_data read_component_model read_contour_xld_arc_info read_contour_xld_dxf read_data_code_2d_model read_deformable_model read_deformable_surface_model read_descriptor_model read_distance_transform_xld read_fft_optimization_data read_funct_1d read_gray_se read_image read_io_channel read_kalman read_matrix read_measure read_metrology_model read_ncc_model read_object read_object_model_3d read_ocr read_ocr_class_cnn read_ocr_class_knn read_ocr_class_mlp read_ocr_class_svm read_ocr_trainf read_ocr_trainf_names read_ocr_trainf_names_protected read_ocr_trainf_select read_ocv read_polygon_xld_arc_info read_polygon_xld_dxf read_pose read_region read_sample_identifier read_samples_class_gmm read_samples_class_mlp read_samples_class_svm read_sampset read_sequence read_serial read_shape_model read_shape_model_3d read_sheet_of_light_model read_string read_surface_model read_template read_texture_inspection_model read_training_components read_tuple read_variation_model read_world_file real_to_complex real_to_vector_field receive_data receive_image receive_region receive_serialized_item receive_tuple receive_xld reconst3d_from_fundamental_matrix reconstruct_height_field_from_gradient reconstruct_points_stereo reconstruct_surface_stereo rectangle1_domain rectangularity reduce_class_svm reduce_domain reduce_object_model_3d_by_view reduce_ocr_class_svm refine_deformable_surface_model refine_surface_model_pose refine_surface_model_pose_image region_features region_to_bin region_to_label region_to_mean regiongrowing regiongrowing_mean regiongrowing_n register_object_model_3d_global register_object_model_3d_pair regress_contours_xld rel_pose_to_fundamental_matrix release_all_compute_devices release_compute_device remove_calib_data remove_calib_data_observ remove_dir remove_noise_region remove_sample_identifier_preparation_data remove_sample_identifier_training_data remove_scene_3d_camera remove_scene_3d_instance remove_scene_3d_label remove_scene_3d_light remove_texture_inspection_model_image render_object_model_3d render_scene_3d repeat_matrix reset_fuzzy_measure reset_metrology_object_fuzzy_param reset_metrology_object_param reset_obj_db reset_sheet_of_light_model rft_generic rgb1_to_gray rgb3_to_gray rigid_trans_object_model_3d roberts robinson_amp robinson_dir rotate_image roundness run_bg_esti runlength_distribution runlength_features saddle_points_sub_pix sample_funct_1d sample_object_model_3d scale_image scale_image_max scale_matrix scale_matrix_mod scale_y_funct_1d scene_flow_calib scene_flow_uncalib screw_to_dual_quat search_operator segment_characters segment_contour_attrib_xld segment_contours_xld segment_image_mser segment_object_model_3d select_characters select_contours_xld select_feature_set_gmm select_feature_set_knn select_feature_set_mlp select_feature_set_svm select_feature_set_trainf_knn select_feature_set_trainf_mlp select_feature_set_trainf_mlp_protected select_feature_set_trainf_svm select_feature_set_trainf_svm_protected select_gray select_grayvalues_from_channels select_lines select_lines_longest select_matching_lines select_obj select_object_model_3d select_points_object_model_3d select_region_point select_region_spatial select_shape select_shape_proto select_shape_std select_shape_xld select_sub_feature_class_train_data select_xld_point send_data send_image send_mouse_double_click_event send_mouse_down_event send_mouse_drag_event send_mouse_up_event send_region send_serialized_item send_tuple send_xld serialize_bar_code_model serialize_calib_data serialize_cam_par serialize_camera_setup_model serialize_class_box serialize_class_gmm serialize_class_knn serialize_class_mlp serialize_class_svm serialize_class_train_data serialize_component_model serialize_data_code_2d_model serialize_deformable_model serialize_deformable_surface_model serialize_descriptor_model serialize_distance_transform_xld serialize_dual_quat serialize_fft_optimization_data serialize_hom_mat2d serialize_hom_mat3d serialize_image serialize_matrix serialize_measure serialize_metrology_model serialize_ncc_model serialize_object serialize_object_model_3d serialize_ocr serialize_ocr_class_cnn serialize_ocr_class_knn serialize_ocr_class_mlp serialize_ocr_class_svm serialize_ocv serialize_pose serialize_quat serialize_region serialize_sample_identifier serialize_shape_model serialize_shape_model_3d serialize_sheet_of_light_model serialize_surface_model serialize_template serialize_texture_inspection_model serialize_training_components serialize_tuple serialize_variation_model serialize_xld set_aop_info set_bar_code_param set_bar_code_param_specific set_bead_inspection_param set_bg_esti_params set_calib_data set_calib_data_calib_object set_calib_data_cam_param set_calib_data_observ_points set_calib_data_observ_pose set_camera_setup_cam_param set_camera_setup_param set_check set_class_box_param set_color set_colored set_comprise set_compute_device_param set_content_update_callback set_current_dir set_data_code_2d_param set_deformable_model_origin set_deformable_model_param set_descriptor_model_origin set_diagonal_matrix set_distance_transform_xld_param set_draw set_drawing_object_callback set_drawing_object_params set_drawing_object_xld set_feature_lengths_class_train_data set_fix set_fixed_lut set_font set_framegrabber_callback set_framegrabber_lut set_framegrabber_param set_full_matrix set_fuzzy_measure set_fuzzy_measure_norm_pair set_gray set_grayval set_hsi set_icon set_insert set_io_channel_param set_io_device_param set_line_approx set_line_style set_line_width set_local_deformable_model_metric set_lut set_lut_style set_message_obj set_message_param set_message_queue_param set_message_tuple set_metrology_model_image_size set_metrology_model_param set_metrology_object_fuzzy_param set_metrology_object_param set_mshape set_ncc_model_origin set_ncc_model_param set_object_model_3d_attrib set_object_model_3d_attrib_mod set_offset_template set_origin_pose set_paint set_params_class_knn set_part set_part_style set_pixel set_planar_calib_deformable_model_metric set_planar_uncalib_deformable_model_metric set_profile_sheet_of_light set_reference_template set_regularization_params_class_mlp set_regularization_params_ocr_class_mlp set_rejection_params_class_mlp set_rejection_params_ocr_class_mlp set_rgb set_rgba set_sample_identifier_object_info set_sample_identifier_param set_scene_3d_camera_pose set_scene_3d_instance_param set_scene_3d_instance_pose set_scene_3d_label_param set_scene_3d_light_param set_scene_3d_param set_scene_3d_to_world_pose set_serial_param set_shape set_shape_model_metric set_shape_model_origin set_shape_model_param set_sheet_of_light_param set_socket_param set_spy set_stereo_model_image_pairs set_stereo_model_param set_sub_matrix set_surface_model_param set_system set_text_model_param set_texture_inspection_model_param set_tposition set_tshape set_value_matrix set_window_attr set_window_dc set_window_extents set_window_param set_window_type sfs_mod_lr sfs_orig_lr sfs_pentland shade_height_field shape_histo_all shape_histo_point shape_trans shape_trans_xld shock_filter sigma_image signal_condition signal_event sim_caltab simplify_object_model_3d simulate_defocus simulate_motion sin_image skeleton slide_image smallest_bounding_box_object_model_3d smallest_circle smallest_circle_xld smallest_rectangle1 smallest_rectangle1_xld smallest_rectangle2 smallest_rectangle2_xld smallest_sphere_object_model_3d smooth_contours_xld smooth_funct_1d_gauss smooth_funct_1d_mean smooth_image smooth_object_model_3d sobel_amp sobel_dir socket_accept_connect solve_matrix sort_contours_xld sort_region sp_distribution spatial_relation split_contours_xld split_skeleton_lines split_skeleton_region sqrt_image sqrt_matrix sqrt_matrix_mod stationary_camera_self_calibration sub_image sub_matrix sub_matrix_mod suggest_lexicon sum_matrix surface_normals_object_model_3d svd_matrix symm_difference symm_difference_closed_contours_xld symm_difference_closed_polygons_xld symmetry system_call tan_image test_closed_xld test_equal_obj test_equal_region test_region_point test_sampset_box test_self_intersection_xld test_subset_region test_xld_point testd_ocr_class_box text_line_orientation text_line_slant texture_laws thickening thickening_golay thickening_seq thinning thinning_golay thinning_seq threshold threshold_sub_pix tile_channels tile_images tile_images_offset timed_wait_condition top_hat topographic_sketch train_class_gmm train_class_knn train_class_mlp train_class_svm train_model_components train_sample_identifier train_texture_inspection_model train_variation_model traind_ocr_class_box traind_ocv_proj trainf_ocr_class_box trainf_ocr_class_knn trainf_ocr_class_mlp trainf_ocr_class_mlp_protected trainf_ocr_class_svm trainf_ocr_class_svm_protected trans_from_rgb trans_pose_shape_model_3d trans_to_rgb transform_funct_1d transform_metrology_object translate_measure transpose_matrix transpose_matrix_mod transpose_region triangulate_object_model_3d trimmed_mean try_lock_mutex try_wait_event tuple_abs tuple_acos tuple_add tuple_and tuple_asin tuple_atan tuple_atan2 tuple_band tuple_bnot tuple_bor tuple_bxor tuple_ceil tuple_chr tuple_chrt tuple_concat tuple_cos tuple_cosh tuple_cumul tuple_deg tuple_deviation tuple_difference tuple_div tuple_environment tuple_equal tuple_equal_elem tuple_exp tuple_fabs tuple_find tuple_find_first tuple_find_last tuple_first_n tuple_floor tuple_fmod tuple_gen_const tuple_gen_sequence tuple_greater tuple_greater_elem tuple_greater_equal tuple_greater_equal_elem tuple_histo_range tuple_insert tuple_int tuple_intersection tuple_inverse tuple_is_int tuple_is_int_elem tuple_is_mixed tuple_is_number tuple_is_real tuple_is_real_elem tuple_is_string tuple_is_string_elem tuple_last_n tuple_ldexp tuple_length tuple_less tuple_less_elem tuple_less_equal tuple_less_equal_elem tuple_log tuple_log10 tuple_lsh tuple_max tuple_max2 tuple_mean tuple_median tuple_min tuple_min2 tuple_mod tuple_mult tuple_neg tuple_not tuple_not_equal tuple_not_equal_elem tuple_number tuple_or tuple_ord tuple_ords tuple_pow tuple_rad tuple_rand tuple_real tuple_regexp_match tuple_regexp_replace tuple_regexp_select tuple_regexp_test tuple_remove tuple_replace tuple_round tuple_rsh tuple_select tuple_select_mask tuple_select_range tuple_select_rank tuple_sgn tuple_sin tuple_sinh tuple_sort tuple_sort_index tuple_split tuple_sqrt tuple_str_bit_select tuple_str_first_n tuple_str_last_n tuple_strchr tuple_string tuple_strlen tuple_strrchr tuple_strrstr tuple_strstr tuple_sub tuple_substr tuple_sum tuple_symmdiff tuple_tan tuple_tanh tuple_type tuple_type_elem tuple_union tuple_uniq tuple_xor union1 union2 union2_closed_contours_xld union2_closed_polygons_xld union_adjacent_contours_xld union_cocircular_contours_xld union_collinear_contours_ext_xld union_collinear_contours_xld union_cotangential_contours_xld union_object_model_3d union_straight_contours_histo_xld union_straight_contours_xld unlock_mutex unproject_coordinates unwarp_image_vector_field update_bg_esti update_kalman update_window_pose var_threshold vector_angle_to_rigid vector_field_length vector_field_to_hom_mat2d vector_field_to_real vector_to_aniso vector_to_essential_matrix vector_to_fundamental_matrix vector_to_fundamental_matrix_distortion vector_to_hom_mat2d vector_to_hom_mat3d vector_to_pose vector_to_proj_hom_mat2d vector_to_proj_hom_mat2d_distortion vector_to_rel_pose vector_to_rigid vector_to_similarity volume_object_model_3d_relative_to_plane wait_barrier wait_condition wait_event wait_seconds watersheds watersheds_threshold wiener_filter wiener_filter_ni write_aop_knowledge write_bar_code_model write_calib_data write_cam_par write_camera_setup_model write_class_box write_class_gmm write_class_knn write_class_mlp write_class_svm write_class_train_data write_component_model write_contour_xld_arc_info write_contour_xld_dxf write_data_code_2d_model write_deformable_model write_deformable_surface_model write_descriptor_model write_distance_transform_xld write_fft_optimization_data write_funct_1d write_image write_io_channel write_lut write_matrix write_measure write_metrology_model write_ncc_model write_object write_object_model_3d write_ocr write_ocr_class_knn write_ocr_class_mlp write_ocr_class_svm write_ocr_trainf write_ocr_trainf_image write_ocv write_polygon_xld_arc_info write_polygon_xld_dxf write_pose write_region write_sample_identifier write_samples_class_gmm write_samples_class_mlp write_samples_class_svm write_serial write_shape_model write_shape_model_3d write_sheet_of_light_model write_string write_surface_model write_template write_texture_inspection_model write_training_components write_tuple write_variation_model x_range_funct_1d xyz_to_object_model_3d y_range_funct_1d zero_crossing zero_crossing_sub_pix zero_crossings_funct_1d zoom_image_factor zoom_image_size zoom_region'; 5358 5359 var reservedFunctions = 'H_MSG_FAIL H_MSG_FALSE H_MSG_TRUE H_MSG_VOID H_TYPE_ANY H_TYPE_INT H_TYPE_MIXED H_TYPE_REAL H_TYPE_STRING abs acos and asin atan atan2 band bnot bor bxor ceil chr chrt cos cosh cumul deg deviation environment exp fabs false find floor fmod gen_tuple_const int inverse is_int is_int_elem is_mixed is_number is_real is_real_elem is_string is_string_elem ldexp log log10 lsh max max2 mean median min min2 not or ord ords par_start pow rad rand real regexp_match regexp_replace regexp_select regexp_test remove replace round rsh select_mask select_rank sgn sin sinh sort sort_index split sqrt strchr strlen strrchr strrstr strstr subset sum tan tanh true type type_elem uniq xor'; 5360 5361 var reservedControl = 'assign assign_at break case catch comment continue convert_tuple_to_vector_1d convert_vector_to_tuple default else elseif endfor endif endswitch endtry endwhile executable_expression exit export_def for global if ifelse import insert par_join repeat return stop switch throw try until while'; 5362 5363 this.regexList = [{ 5364 regex: regexLib.singleQuotedString, 5365 css: 'string' 5366 }, { 5367 regex: new RegExp(this.getKeywords(ops), 'gm'), 5368 css: 'color1' 5369 }, { 5370 regex: new RegExp(this.getKeywords(reservedFunctions), 'gm'), 5371 css: 'functions' 5372 }, { 5373 regex: new RegExp(this.getKeywords(reservedControl) + '|:=', 'gm'), 5374 css: 'keyword' 5375 }, { 5376 regex: new RegExp(/\*.*/, 'gm'), 5377 css: 'comments' 5378 }]; 5379 } 5380 5381 Brush.prototype = new BrushBase(); 5382 Brush.aliases = ['halcon', 'hdevelop', 'hdev']; 5383 module.exports = Brush; 5384 5385/***/ }), 5386/* 53 */ 5387/***/ (function(module, exports, __webpack_require__) { 5388 5389 'use strict'; 5390 5391 var BrushBase = __webpack_require__(22); 5392 var regexLib = __webpack_require__(3).commonRegExp; 5393 5394 function Brush() { 5395 var keywords = 'ABS ACOS ACTION ADD AND ANDN ANY ANY_BIT ANY_DATE ANY_INT ANY_NUM ANY_REAL ARRAY ASIN AT ATAN ' + 'BOOL BY BYTE ' + 'CAL CALC CALCN CASE CD CDT CLK CONCAT CONFIGURATION CONSTANT COS CTD CTU CTUD CU CV ' + 'D DATE DATE_AND_TIME DELETE DINT DIV DO DS DT DWORD ' + 'ELSE ELSIF END_ACTION END_CASE END_CONFIGURATION END_FOR END_FUNCTION END_FUNCTION_BLOCK END_IF END_PROGRAM END_REPEAT END_RESOURCE END_STEP END_STRUCT END_TRANSITION END_TYPE END_VAR END_WHILE EN ENO EQ ET EXIT EXP EXPT ' + 'FALSE F_EDGE F_TRIG FIND FOR FROM FUNCTION FUNCTION_BLOCK ' + 'GE GT' + 'IF IN INITIAL_STEP INSERT INT INTERVAL ' + 'JMP JMPC JMPCN ' + 'L LD LDN LE LEFT LEN LIMIT LINT LN LOG LREAL LT LWORD ' + 'MAX MID MIN MOD MOVE MUL MUX ' + 'N NE NEG NOT ' + 'OF ON OR OEN ' + 'P PRIORITY PROGRAM PT PV ' + 'Q Q1 QU QD ' + 'R R1 R_TRIG READ_ONLY READ_WRITE REAL RELEASE REPEAT REPLACE RESOURCE RET RETAIN RETC RTCN RETURN RIGHT ROL ROR RS RTC R_EDGE ' + 'S S1 SD SEL SEMA SHL SHR SIN SINGLE SINT SL SQRT SR ST STEP STN STRING STRUCT SUB ' + 'TAN TASK THEN TIME TIME_OF_DAY TO TOD TOF TON TP TRANSITION TRUE TYPE ' + 'UDINT UINT ULINT UNTIL USINT ' + 'VAR VAR_ACCESS VAR_EXTERNAL VAR_GLOBAL VAR_INPUT VAR_IN_OUT VAR_OUTPUT ' + 'WHILE WITH WORD ' + 'XOR XORN'; 5396 5397 this.regexList = [{ 5398 //time literal 5399 regex: /(T|t|TIME|time)(?=.*([hms]|[HMS]))#(\d+(h|H))?(\d+(m|M))?(\d+(s|s))?(\d+(ms|MS))?/g, 5400 css: 'color2' 5401 }, { 5402 // date and time literal 5403 regex: /(DT|dt|date_and_time|DATE_AND_TIME)#\d{4}-\d{2}-\d{2}-\d{2}:\d{2}:\d{2}\.\d{2}/g, 5404 css: 'color2' 5405 }, { 5406 // time of day literal 5407 regex: /(TOD|tod|time_of_day|TIME_OF_DAY)#\d+:\d+(:\d+)?((\.\d+)|(\.?))/g, 5408 css: 'color2' 5409 }, { 5410 //date literal 5411 regex: /(D|d|DATE|date)#\d{4}-\d{2}-\d{2}/g, 5412 css: 'color2' 5413 }, { 5414 //direct adressing 5415 regex: /%[A-Z]{1,2}\d+(\.\d+)*/g, 5416 css: 'color2' 5417 }, { 5418 //multiline comment (* *) 5419 regex: /\(\*[\s\S]*?\*\)/gm, 5420 css: 'comments' 5421 }, { 5422 //string literal 'myvalue' 5423 regex: regexLib.singleQuotedString, 5424 css: 'string' 5425 }, { 5426 //number integers, floating point with dot or exponential 5427 regex: /\b\d+([\.eE]\d+)?\b/g, 5428 css: 'value' 5429 }, { 5430 //keywords 5431 regex: new RegExp(this.getKeywords(keywords), 'gmi'), 5432 css: 'keyword' 5433 }]; 5434 }; 5435 5436 Brush.prototype = new BrushBase(); 5437 Brush.aliases = ['structuredtext', 'ST', 'IEC61131', 'st', 'iec61131']; 5438 module.exports = Brush; 5439 5440/***/ }), 5441/* 54 */ 5442/***/ (function(module, exports, __webpack_require__) { 5443 5444 'use strict'; 5445 5446 var BrushBase = __webpack_require__(22); 5447 var regexLib = __webpack_require__(3).commonRegExp; 5448 5449 function Brush() { 5450 var keywords = 'abstract annotation as break by catch class companion const constructor continue' + ' crossinline data do dynamic else enum external false final finally for fun get if' + ' import in infix init inline inner interface internal is lateinit noinline null object' + ' open operator out override package private protected public reified return sealed' + ' set super tailrec this throw trait true try type val var vararg when where while' + ' String Array Unit Int'; 5451 5452 this.regexList = [{ 5453 // line comment 5454 regex: regexLib.singleLineCComments, 5455 css: 'comments' 5456 }, { 5457 // block comment 5458 regex: /\/\*([^\*][\s\S]*?)?\*\//gm, 5459 css: 'comments' 5460 }, { 5461 // javadoc 5462 regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, 5463 css: 'preprocessor' 5464 }, { 5465 regex: regexLib.doubleQuotedString, 5466 css: 'string' 5467 }, { 5468 regex: regexLib.singleQuotedString, 5469 css: 'string' 5470 }, { 5471 // numbers 5472 regex: /\b([\d]+(\.[\d]+)?f?|[\d]+l?|0x[a-f0-9]+)\b/gi, 5473 css: 'value' 5474 }, { 5475 // annotations 5476 regex: /\@(Target|Retention|Repeatable|MustBeDocumented|Test|Deprecated)/g, 5477 css: 'color2' 5478 }, { 5479 // User-site targets 5480 regex: /\@(file|property|field|get|set|receiver|param|setparam|delegate):/g, 5481 css: 'color2' 5482 }, { 5483 // @Inject annotation 5484 regex: /\@(Inject)\b/g, 5485 css: 'color3' 5486 }, { 5487 regex: new RegExp(this.getKeywords(keywords), 'gm'), 5488 css: 'keyword' 5489 }]; 5490 5491 this.forHtmlScript({ 5492 left: /(<|<)%[@!=]?/g, 5493 right: /%(>|>)/g 5494 }); 5495 }; 5496 5497 Brush.prototype = new BrushBase(); 5498 Brush.aliases = ['kotlin']; 5499 module.exports = Brush; 5500 5501/***/ }), 5502/* 55 */ 5503/***/ (function(module, exports, __webpack_require__) { 5504 5505 'use strict'; 5506 5507 /** 5508 * SyntaxHighlighter LaTeX Brush by DiGMi 5509 * http://digmi.org 5510 * 5511 * Used for SyntaxHighlighter which can be found at: 5512 * http://alexgorbatchev.com/SyntaxHighlighter 5513 * 5514 * @version 5515 * 1.0.0 (July 21 2012) 5516 * 5517 * @copyright 5518 * Copyright (C) 2012 Or Dagmi. 5519 * 2016 Erik Wegner 5520 */ 5521 var BrushBase = __webpack_require__(22); 5522 5523 function Brush() { 5524 var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le'; 5525 var specials = 'include usepackage begin end ref label includegraphics'; 5526 5527 this.regexList = [{ regex: /%.*$/gm, 5528 css: 'comments' }, { regex: /\$[\s\S]*?\$/gm, 5529 css: 'string' }, { regex: /\\\w+/gm, // Command 5530 css: 'keyword' }, { regex: /\{.*}/gm, // Parameter 5531 css: 'color2' }, { regex: /\[.*]/gm, // Optional Parameter 5532 css: 'color3' }, { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' }, { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }]; 5533 }; 5534 5535 Brush.prototype = new BrushBase(); 5536 Brush.aliases = ['latex']; 5537 module.exports = Brush; 5538 5539/***/ }), 5540/* 56 */ 5541/***/ (function(module, exports, __webpack_require__) { 5542 5543 'use strict'; 5544 5545 var BrushBase = __webpack_require__(22); 5546 var regexLib = __webpack_require__(3).commonRegExp; 5547 function Brush() { 5548 var functions = 'subst patsubst strip findstring filter filter-out sort dir notdir suffix basename addsuffix addprefix join word wordlist words firstword wildcard foreach origin shell'; 5549 var constants = 'PHONY SUFFIXES DEFAULT PRECIOUS INTERMEDIATE SECONDARY IGNORE SILENT EXPORT_ALL_VARIABLES'; 5550 this.regexList = [{ regex: regexLib.singleLinePerlComments, css: 'comments' }, // one line comments 5551 { regex: regexLib.doubleQuotedString, css: 'string' }, // double quoted strings 5552 { regex: regexLib.singleQuotedString, css: 'string' }, // single quoted strings 5553 { regex: /\$\([^\@%<\?\^\+\*]\w+\)/gm, css: 'variable' }, // 変数 5554 { regex: /((\$\(?[\@%<\?\^\+\*](D\)|F\))*)|%|\$<)/gm, css: 'keyword' }, // 自動変数 5555 { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions' }, // テキスト変形関数 5556 { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' // ビルトインターゲット名 5557 }]; 5558 } 5559 Brush.prototype = new BrushBase(); 5560 Brush.aliases = ['Makefile']; 5561 module.exports = Brush; 5562 5563/***/ }), 5564/* 57 */ 5565/***/ (function(module, exports, __webpack_require__) { 5566 5567 'use strict'; 5568 5569 var BrushBase = __webpack_require__(22); 5570 var regexLib = __webpack_require__(3).commonRegExp; 5571 5572 function Brush() { 5573 var keywords = 'alias break case catch catchQuiet continue default do else false float for global if in int matrix proc return source string switch true vector while'; 5574 var functions = 'aaf2fcp about abs addAttr addDynamic addExtension addMetadata addPP affectedNet affects aimConstraint air aliasAttr align alignCtx alignCurve alignSurface allNodeTypes ambientLight angle angleBetween animCurveEditor animDisplay animLayer animView annotate applyAttrPattern applyMetadata applyTake arclen arcLenDimContext arcLengthDimension arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assembly assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attributeInfo attributeMenu attributeName attributeQuery attrNavigationControlGrp audioTrack autoKeyframe autoPlace autoSave bakeClip bakePartialHistory bakeResults bakeSimulation baseTemplate baseView batchRender bevel bevelPlus bezierAnchorPreset bezierAnchorState bezierCurveToNurbs bezierInfo bindSkin binMembership blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip cacheFile cacheFileCombine cacheFileMerge cacheFileTrack callbacks camera cameraSet cameraView canCreateCaddyManip canCreateManip canvas ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterize characterMap chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipMatching clipSchedule clipSchedulerOutliner closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorInputWidgetGrp colorManagementCatalog colorManagementFileRules colorManagementPrefs colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandLogging commandPort componentBox componentEditor condition cone confirmDialog connectAttr connectControl connectDynamic connectionInfo connectJoint constrain constrainValue constructionHistory container containerBind containerProxy containerPublish containerTemplate containerView contextInfo control convertIffToPsd convertSolidTx convertTessellation convertUnit copyAttr copyDeformerWeights copyFlexor copyKey copySkinWeights cos createAttrPatterns createDisplayLayer createEditor createLayeredPsdFile createNode createRenderLayer createSubdivRegion cross ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEditorCtx curveEPCtx curveIntersect curveMoveEPCtx curveOnSurface curveRGBColor curveSketchCtx cutKey cycleCheck cylinder dagObjectCompare dagPose dataStructure date dbcount dbmessage dbpeek dbtrace defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deformerWeights deg_to_rad delete deleteAttr deleteAttrPattern deleteExtension deleteUI delrandstr deltaMush detachCurve detachDeviceAttr detachSurface deviceEditor deviceManager devicePanel dgdirty dgeval dgfilter dgInfo dgmodified dgtimer dimWhen directionalLight directKeyCtx dirmap disable disableIncorrectNameWarning disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dockControl dolly dollyCtx dopeSheetEditor dot doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynamicLoad dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref editDisplayLayerGlobals editDisplayLayerMembers editMetadata editor editorTemplate editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers effector emit emitter enableDevice encodeString env erf error eval evalDeferred evalEcho evalNoSelectNotify evaluationManager evaluator event exactWorldBoundingBox exclusiveLightCheckBox exec exists exp exportEdits expression expressionEditorListen extendCurve extendSurface extrude falloffCurve fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileDialog2 fileInfo filePathEditor filetest filletCurve filter filterCurve filterExpand filterStudioImport findKeyframe findType fitBspline flexor floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow flowLayout fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen format formLayout fprint frameBufferName frameLayout fread freadAllLines freadAllText freeFormFillet frewind fwrite fwriteAllLines fwriteAllText gamma gauss geomBind geometryConstraint geomToBBox getAttr getClassification getDefaultBrush getenv getFileList getFluidAttr getInputDeviceRange getLastError getMetadata getModifiers getModulePath getPanel getParticleAttr getpid getProcArguments getRenderDependencies getRenderTasks globalStitch glRender glRenderEditor gmatch goal grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity greasePencilCtx grid gridLayout group hardenPointCurve hardware hardwareRenderPanel hasMetadata headsUpDisplay headsUpMessage help helpLine hermite hide hikGlobals hilite hitTest hotBox hotkey hotkeyCheck hotkeyCtx hotkeyEditorPanel hotkeySet hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikfkDisplayMethod ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo illustratorCurves image imagePlane imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer internalVar intersect intField intFieldGrp intScrollBar intSlider intSliderGrp inViewEditor inViewMessage iprEngine isConnected isDirty isolateSelect isTrue itemFilter itemFilterAttr itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats keyingGroup keyTangent lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog license lightlink lightList linearPrecision linstep listAnimatable listAttr listAttrPatterns listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listNodesWithIncorrectNames listNodeTypes listRelatives listSets loadFluid loadModule loadPlugin loadPrefObjects loadUI lockNode loft log lookThru ls lsThroughFilter lsUI mag makebot makeIdentity makeLive makePaintable makeSingleSurface manipMoveContext manipMoveLimitsCtx manipOptions manipPivot manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max maxfloat maxint mayaDpiSetting melInfo melOptions memory menu menuBarLayout menuEditor menuItem menuSet menuSetPref messageLine min minfloat minimizeApp minint mirrorJoint modelCurrentTimeCtx modelEditor modelPanel moduleInfo mouse move moveKeyCtx moveVertexAlongDirection movieInfo movIn movOut multiProfileBirailSurface multiTouch mute nameCommand nameField namespace namespaceInfo nBase newton nodeCast nodeEditor nodeIconButton nodeOutliner nodePreset nodeTreeLister nodeType noise nonLinear normalConstraint nParticle nSoft nurbsBoolean nurbsCopyUVSet nurbsCube nurbsCurveToBezier nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet objectCenter objectType objectTypeUI objExists offsetCurve offsetCurveOnSurface offsetSurface ogs ogsRender openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort panel paneLayout panelConfiguration panelHistory panZoom panZoomCtx paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleFill particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose perCameraVisibility percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast pluginDisplayFilter pluginInfo pointConstraint pointCurveConstraint pointLight pointOnCurve pointOnPolyConstraint pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBevel3 polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCBoolOp polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorMod polyColorPerVertex polyColorSet polyCompare polyCone polyConnectComponents polyContourProjection polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditEdgeFlow polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyHole polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyMultiLayoutUV polyNormal polyNormalizeUV polyNormalPerVertex polyOptions polyOptUvs polyOutput polyPinUV polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjectCurve polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polyRemesh polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySlideEdge polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitCtx2 polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyTorus polyToSubdiv polyTransfer polyTriangulate polyUnite polyUniteSkinned polyUVRectangle polyUVSet polyWedgeFace popen popupMenu pose pow preloadRefEd prepareRender print profiler profilerTool progressBar progressWindow projectCurve projectionContext projectionManip projectTangent promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshEditorTemplates regionSelectKeyCtx rehash relationship reloadImage removeJoint removeMultiInstance rename renameAttr renameUI render renderer renderGlobalsNode renderInfo renderLayerPostProcess renderManip renderPartition renderPassRegistry renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext reorder reorderContainer reorderDeformers requires reroot resampleFluid resetTool resolutionNode resourceManager retimeKeyCtx reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings saveViewportSettings scale scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptedPanel scriptedPanelType scriptJob scriptNode scriptTable scrollField scrollLayout sculpt sculptMeshCacheCtx sculptTarget seed select selectContext selectedNodes selectionConnection selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selLoadSettings separator sequenceManager setAttr setAttrMapping setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyframe setKeyframeBlendshapeTargetWts setKeyPath setMenuMode setNodeTypeFlag setParent setParticleAttr setRenderPassType sets setStartupMessage setToolTo setUITemplate setXformManip shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shot shotRipple shotTrack showHelp showHidden showManipCtx showMetadata showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinBindCtx skinCluster skinPercent smoothCurve smoothstep smoothTangentSurface snapKey snapMode snapshot snapshotBeadCtx snapshotModifyKeyCtx snapTogetherCtx soft softMod softModCtx softSelect soloMaterial sort sortCaseInsensitive sound soundControl spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace stereoCameraView stereoRigManager stitchSurface stitchSurfacePoints strcmp stringArrayIntersector stringArrayRemove stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdiv subdivCrease subdivDisplaySmoothness subdLayoutUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdPlanarProjection subdToBlind subdToPoly subdTransferUVsToCache substitute substituteGeometry substring suitePrefs surface surfaceSampler surfaceShaderList swatchDisplayPort swatchRefresh switchTable symbolButton symbolCheckBox symmetricModelling sysFile system tabLayout tan tangentConstraint targetWeldCtx texCutContext texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSculptCacheContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textureDeformer texturePlacementContext textureWindow texTweakUVContext texWinToolCtx threadCount threePointArcCtx timeCode timeControl timePort timer timerX timeWarp toggle toggleAxis toggleWindowVisibility tokenize tolerance tolower toolBar toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transferShadingSets transformCompare transformLimits translator treeLister treeView trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx ubercam uiTemplate unassignInputDevice undo undoInfo unfold ungroup uniform unit unknownNode unknownPlugin unloadPlugin untangleUV untrim upAxis userCtx uvLink uvSnapshot vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor vnn vnnCompound vnnConnect volumeAxis volumeBind vortex waitCursor walkCtx warning webBrowser webBrowserPrefs webView whatIs whatsNewHighlight window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xform xformConstraint xpmPicker'; 5575 this.regexList = [{ regex: regexLib.singleLineCComments, css: 'comments' }, { regex: regexLib.multiLineCComments, css: 'color1' }, { regex: regexLib.doubleQuotedString, css: 'string' }, { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions italic' }, { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }]; 5576 }; 5577 5578 Brush.prototype = new BrushBase(); 5579 Brush.aliases = ['mel']; 5580 module.exports = Brush; 5581 5582/***/ }), 5583/* 58 */ 5584/***/ (function(module, exports, __webpack_require__) { 5585 5586 'use strict'; 5587 5588 var BrushBase = __webpack_require__(22); 5589 var regexLib = __webpack_require__(3).commonRegExp; 5590 5591 function Brush() { 5592 var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' + 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' + 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' + 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' + 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' + 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' + 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' + 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' + 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' + 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' + 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' + 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' + 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' + 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' + 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' + 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' + 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' + 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' + 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' + '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t id ' + 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' + 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' + 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' + 'va_list wchar_t wctrans_t wctype_t wint_t signed'; 5593 5594 var keywords = 'break case catch class copy const __finally __exception __try ' + 'const_cast continue private public protected __declspec ' + 'default delete deprecated dllexport dllimport do dynamic_cast ' + 'else enum explicit extern if for friend getter goto inline ' + 'mutable naked namespace new nil NO noinline nonatomic noreturn nothrow NULL ' + 'readonly readwrite register reinterpret_cast retain return SEL selectany self ' + 'setter sizeof static static_cast struct super switch template this ' + 'thread throw true false try typedef typeid typename union ' + 'using uuid virtual void volatile whcar_t while YES'; 5595 5596 var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' + 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' + 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' + 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' + 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' + 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' + 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' + 'fwrite getc getchar gets perror printf putc putchar puts remove ' + 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' + 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' + 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' + 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' + 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' + 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' + 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' + 'clock ctime difftime gmtime localtime mktime strftime time'; 5597 5598 this.regexList = [{ 5599 regex: regexLib.singleLineCComments, 5600 css: 'comments' 5601 }, { 5602 regex: regexLib.multiLineCComments, 5603 css: 'comments' 5604 }, { 5605 regex: regexLib.doubleQuotedString, 5606 css: 'string' 5607 }, { 5608 regex: regexLib.singleQuotedString, 5609 css: 'string' 5610 }, { 5611 regex: /^ *#.*/gm, 5612 css: 'preprocessor' 5613 }, { 5614 regex: /^#!.*$/gm, 5615 css: 'preprocessor' 5616 }, { 5617 regex: new RegExp(this.getKeywords(datatypes), 'gm'), 5618 css: 'keyword bold' 5619 }, { 5620 regex: new RegExp(this.getKeywords(functions), 'gm'), 5621 css: 'functions bold' 5622 }, { 5623 regex: new RegExp(this.getKeywords(keywords), 'gm'), 5624 css: 'keyword bold' 5625 }, { 5626 regex: new RegExp('\\bNS\\w+\\b', 'gm'), 5627 css: 'keyword bold' 5628 }, { 5629 regex: new RegExp('\\bUI\\w+\\b', 'gm'), 5630 css: 'keyword bold' 5631 }, { 5632 regex: new RegExp('\\bIB\\w+\\b', 'gm'), 5633 css: 'keyword bold' 5634 }, { 5635 regex: new RegExp('@\\w+\\b', 'gm'), 5636 css: 'keyword bold' 5637 }]; 5638 } 5639 5640 Brush.prototype = new BrushBase(); 5641 Brush.aliases = ['objective-c', 'obj-c', 'objc', 'oc']; 5642 module.exports = Brush; 5643 5644/***/ }), 5645/* 59 */ 5646/***/ (function(module, exports, __webpack_require__) { 5647 5648 'use strict'; 5649 5650 /** 5651 * Yaml Brush for SyntaxHighlighter 5652 * 5653 * ppepin@rentpath.com 5654 * erik.wegner@ewus.de 5655 * 5656 */ 5657 var BrushBase = __webpack_require__(22); 5658 5659 function Brush() { 5660 // Yaml Brush 5661 5662 var constants = '~ true false on off'; 5663 5664 var regexLib = __webpack_require__(3).commonRegExp; 5665 5666 this.regexList = [{ regex: regexLib.singleLinePerlComments, css: 'comments' }, // comment 5667 { regex: regexLib.doubleQuotedString, css: 'string' }, // double quoted string 5668 { regex: regexLib.singleQuotedString, css: 'string' }, // single quoted string 5669 { regex: /^\s*([a-z0-9\._-])+\s*:/gmi, css: 'variable' }, // key 5670 { regex: /\s?(\.)([a-z0-9\._-])+\s?:/gmi, css: 'comments' }, // section 5671 { regex: /\s(@|:)([a-z0-9\._-])+\s*$/gmi, css: 'variable bold' }, // variable, reference 5672 { regex: /\s+\d+\s?$/gm, css: 'color2 bold' }, // integers 5673 { regex: /(\{|\}|\[|\]|,|~|:)/gm, css: 'constants' }, // inline hash and array, comma, null 5674 { regex: /^\s+(-)+/gm, css: 'string bold' }, // array list entry 5675 { regex: /^---/gm, css: 'string bold' }, // category 5676 { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' // constants 5677 }]; 5678 5679 this.forHtmlScript(regexLib.phpScriptTags); 5680 } 5681 5682 Brush.prototype = new BrushBase(); 5683 Brush.aliases = ['yaml', 'yml']; 5684 module.exports = Brush; 5685 5686/***/ }), 5687/* 60 */ 5688/***/ (function(module, exports, __webpack_require__) { 5689 5690 'use strict'; 5691 5692 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 5693 5694 /*! 5695 * domready (c) Dustin Diaz 2014 - License MIT 5696 */ 5697 !function (name, definition) { 5698 5699 if (true) module.exports = definition();else if (typeof define == 'function' && _typeof(define.amd) == 'object') define(definition);else this[name] = definition(); 5700 }('domready', function () { 5701 5702 var fns = [], 5703 _listener, 5704 doc = document, 5705 hack = doc.documentElement.doScroll, 5706 domContentLoaded = 'DOMContentLoaded', 5707 loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState); 5708 5709 if (!loaded) doc.addEventListener(domContentLoaded, _listener = function listener() { 5710 doc.removeEventListener(domContentLoaded, _listener); 5711 loaded = 1; 5712 while (_listener = fns.shift()) { 5713 _listener(); 5714 } 5715 }); 5716 5717 return function (fn) { 5718 loaded ? setTimeout(fn, 0) : fns.push(fn); 5719 }; 5720 }); 5721 5722/***/ }), 5723/* 61 */ 5724/***/ (function(module, exports) { 5725 5726 'use strict'; 5727 5728 Object.defineProperty(exports, "__esModule", { 5729 value: true 5730 }); 5731 var string = exports.string = function string(value) { 5732 return value.replace(/^([A-Z])/g, function (_, character) { 5733 return character.toLowerCase(); 5734 }).replace(/([A-Z])/g, function (_, character) { 5735 return '-' + character.toLowerCase(); 5736 }); 5737 }; 5738 5739 var object = exports.object = function object(value) { 5740 var result = {}; 5741 Object.keys(value).forEach(function (key) { 5742 return result[string(key)] = value[key]; 5743 }); 5744 return result; 5745 }; 5746 5747/***/ }), 5748/* 62 */ 5749/***/ (function(module, exports, __webpack_require__) { 5750 5751 'use strict'; 5752 5753 var _core = __webpack_require__(1); 5754 5755 var _core2 = _interopRequireDefault(_core); 5756 5757 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 5758 5759 window.SyntaxHighlighter = _core2.default; // Compatability layer to support V3 brushes. This file is only included when `--compat` 5760 // flag is passed to the `gulp build` command. 5761 5762 if (typeof window.XRegExp === 'undefined') { 5763 window.XRegExp = __webpack_require__(3).XRegExp; 5764 } 5765 5766/***/ }) 5767/******/ ]); 5768//# sourceMappingURL=syntaxhighlighter.js.map